stephb9959
2023-09-13 12:14:45 -07:00
parent f54fd2b411
commit e8986d84b4
2 changed files with 12 additions and 5 deletions

View File

@@ -53,7 +53,6 @@ namespace OpenWifi {
Context->useCertificate(Cert); Context->useCertificate(Cert);
Context->addChainCertificate(Root); Context->addChainCertificate(Root);
Context->addCertificateAuthority(Root); Context->addCertificateAuthority(Root);
if (level_ == Poco::Net::Context::VERIFY_STRICT) { 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_)); 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) { if (level_ == Poco::Net::Context::VERIFY_STRICT) {
SSL_CTX_set_client_CA_list(SSLCtx, SSL_load_client_CA_file(client_cas_.c_str())); 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->enableSessionCache();
Context->setSessionCacheSize(0); Context->setSessionCacheSize(0);
Context->setSessionTimeout(60); Context->setSessionTimeout(60);
Context->enableExtendedCertificateVerification(true); Context->enableExtendedCertificateVerification( level_!= Poco::Net::Context::VERIFY_NONE );
Context->disableStatelessSessionResumption(); Context->disableStatelessSessionResumption();
} }

View File

@@ -406,7 +406,16 @@ namespace OpenWifi::RESTAPI::Errors {
1172, "The venue name already exists." 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 { static const struct msg SimulationDoesNotExist {
7000, "Simulation Instance ID does not exist." 7000, "Simulation Instance ID does not exist."