diff --git a/src/framework/SubSystemServer.cpp b/src/framework/SubSystemServer.cpp index f6df356c..db4dc14e 100644 --- a/src/framework/SubSystemServer.cpp +++ b/src/framework/SubSystemServer.cpp @@ -53,7 +53,6 @@ namespace OpenWifi { Context->useCertificate(Cert); Context->addChainCertificate(Root); - Context->addCertificateAuthority(Root); if (level_ == Poco::Net::Context::VERIFY_STRICT) { @@ -76,8 +75,7 @@ namespace OpenWifi { L.fatal(fmt::format("Wrong Certificate({}) for Key({})", cert_file_, key_file_)); } - SSL_CTX_set_verify(SSLCtx, SSL_VERIFY_PEER, nullptr); - + SSL_CTX_set_verify(SSLCtx, SSL_VERIFY_PEER, nullptr); if (level_ == Poco::Net::Context::VERIFY_STRICT) { SSL_CTX_set_client_CA_list(SSLCtx, SSL_load_client_CA_file(client_cas_.c_str())); } @@ -87,7 +85,7 @@ namespace OpenWifi { Context->enableSessionCache(); Context->setSessionCacheSize(0); Context->setSessionTimeout(60); - Context->enableExtendedCertificateVerification(true); + Context->enableExtendedCertificateVerification( level_!= Poco::Net::Context::VERIFY_NONE ); Context->disableStatelessSessionResumption(); } diff --git a/src/framework/ow_constants.h b/src/framework/ow_constants.h index 2d45a3d8..65ed7a32 100644 --- a/src/framework/ow_constants.h +++ b/src/framework/ow_constants.h @@ -406,7 +406,16 @@ namespace OpenWifi::RESTAPI::Errors { 1172, "The venue name already exists." }; - static const struct msg DefFirmwareNameExists { 1172, "Firmware name already exists." }; + static const struct msg InvalidGlobalReachAccount { + 1173, "Invalid Global Reach account information." + }; + static const struct msg CannotCreateCSR { + 1174, "Cannot create a CSR certificate." + }; + + static const struct msg DefFirmwareNameExists { 1175, "Firmware name already exists." }; + + static const struct msg NotAValidECKey { 1176, "Not a valid Signing Key." }; static const struct msg SimulationDoesNotExist { 7000, "Simulation Instance ID does not exist."