Skip to content

Commit

Permalink
https://telecominfraproject.atlassian.net/browse/WIFI-7831
Browse files Browse the repository at this point in the history
Signed-off-by: stephb9959 <[email protected]>
  • Loading branch information
stephb9959 committed Oct 4, 2023
1 parent a951cb0 commit 6d9b974
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/RESTObjects/RESTAPI_ProvObjects.h
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ namespace OpenWifi::ProvObjects {
std::string accountId;
std::string csr;
std::string certificate;
std::vector<std::string> certificateChain;
std::string certificateChain;
std::string certificateId;
std::uint64_t expiresAt = 0;
std::uint64_t created = 0;
Expand Down
6 changes: 1 addition & 5 deletions src/RadiusEndpointUpdater.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/storage/storage_glblrcerts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void ORM::DB<OpenWifi::GLBLRCertsDBRecordType, OpenWifi::ProvObjects::GLBLRCerti
Out.accountId = In.get<2>();
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>();
Expand All @@ -69,7 +69,7 @@ void ORM::DB<OpenWifi::GLBLRCertsDBRecordType, OpenWifi::ProvObjects::GLBLRCerti
Out.set<2>(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);
Expand Down

0 comments on commit 6d9b974

Please sign in to comment.