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 Sep 13, 2023
1 parent 63f49db commit 96cfaf5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/framework/SubSystemServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ namespace OpenWifi {

Context->useCertificate(Cert);
Context->addChainCertificate(Root);

Context->addCertificateAuthority(Root);

if (level_ == Poco::Net::Context::VERIFY_STRICT) {
Expand All @@ -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()));
}
Expand All @@ -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();
}

Expand Down Expand Up @@ -320,8 +318,6 @@ namespace OpenWifi {
} else if (L == "once")
M = Poco::Net::Context::VERIFY_ONCE;

std::cout << "Security level: " << level << " : " << L << " : " << M << std::endl;

PropertiesFileServerEntry entry(
MicroServiceConfigGetString(address, ""), MicroServiceConfigGetInt(port, 0),
MicroServiceConfigPath(key, ""), MicroServiceConfigPath(cert, ""),
Expand Down

0 comments on commit 96cfaf5

Please sign in to comment.