diff --git a/src/RESTObjects/RESTAPI_ProvObjects.h b/src/RESTObjects/RESTAPI_ProvObjects.h index 0b2526c..9a93259 100644 --- a/src/RESTObjects/RESTAPI_ProvObjects.h +++ b/src/RESTObjects/RESTAPI_ProvObjects.h @@ -829,7 +829,7 @@ namespace OpenWifi::ProvObjects { std::string accountId; std::string csr; std::string certificate; - std::vector certificateChain; + std::string certificateChain; std::string certificateId; std::uint64_t expiresAt = 0; std::uint64_t created = 0; diff --git a/src/RadiusEndpointUpdater.h b/src/RadiusEndpointUpdater.h index a75ae80..b4e1200 100644 --- a/src/RadiusEndpointUpdater.h +++ b/src/RadiusEndpointUpdater.h @@ -82,11 +82,7 @@ namespace OpenWifi { InnerServer.set("radsecPort", Server.Port); InnerServer.set("radsecCert", Utils::base64encode((const u_char *)GRCertificate.certificate.c_str(),GRCertificate.certificate.size())); InnerServer.set("radsecKey", Utils::base64encode((const u_char *)GRAccountInfo.CSRPrivateKey.c_str(),GRAccountInfo.CSRPrivateKey.size())); - Poco::JSON::Array CaCerts; - for(const auto &cert:GRCertificate.certificateChain) { - CaCerts.add(Utils::base64encode((const u_char *)cert.c_str(),cert.size())); - } - InnerServer.set("radsecCacerts", CaCerts); + InnerServer.set("radsecCacerts", Utils::base64encode((const u_char *)GRCertificate.certificateChain.c_str(),GRCertificate.certificateChain.size())); InnerServer.set("radsecSecret","radsec"); i++; ServerArray.add(InnerServer); diff --git a/src/storage/storage_glblrcerts.cpp b/src/storage/storage_glblrcerts.cpp index 2c34421..fe0900d 100644 --- a/src/storage/storage_glblrcerts.cpp +++ b/src/storage/storage_glblrcerts.cpp @@ -55,7 +55,7 @@ void ORM::DB(); Out.csr = In.get<3>(); Out.certificate = In.get<4>(); - Out.certificateChain = OpenWifi::RESTAPI_utils::to_object_array(In.get<5>()); + Out.certificateChain = In.get<5>(); Out.certificateId = In.get<6>(); Out.expiresAt = In.get<7>(); Out.created = In.get<8>(); @@ -69,7 +69,7 @@ void ORM::DB(In.accountId); Out.set<3>(In.csr); Out.set<4>(In.certificate); - Out.set<5>(OpenWifi::RESTAPI_utils::to_string(In.certificateChain)); + Out.set<5>(In.certificateChain); Out.set<6>(In.certificateId); Out.set<7>(In.expiresAt); Out.set<8>(In.created);