diff options
-rw-r--r-- | src/components/security_manager/src/ssl_context_impl.cc | 9 | ||||
-rw-r--r-- | src/components/security_manager/test/ssl_certificate_handshake_test.cc | 9 |
2 files changed, 0 insertions, 18 deletions
diff --git a/src/components/security_manager/src/ssl_context_impl.cc b/src/components/security_manager/src/ssl_context_impl.cc index 756ec37164..67be17db63 100644 --- a/src/components/security_manager/src/ssl_context_impl.cc +++ b/src/components/security_manager/src/ssl_context_impl.cc @@ -266,17 +266,8 @@ CryptoManagerImpl::SSLContextImpl::CheckCertContext() { X509_NAME* subj_name = X509_get_subject_name(cert); - const std::string& cn = GetTextBy(subj_name, NID_commonName); const std::string& sn = GetTextBy(subj_name, NID_serialNumber); - if (!(hsh_context_.expected_cn.CompareIgnoreCase(cn.c_str()))) { - LOG4CXX_ERROR(logger_, - "Trying to run handshake with wrong app name: " - << cn << ". Expected app name: " - << hsh_context_.expected_cn.AsMBString()); - return Handshake_Result_AppNameMismatch; - } - if (!(hsh_context_.expected_sn.CompareIgnoreCase(sn.c_str()))) { LOG4CXX_ERROR(logger_, "Trying to run handshake with wrong app id: " diff --git a/src/components/security_manager/test/ssl_certificate_handshake_test.cc b/src/components/security_manager/test/ssl_certificate_handshake_test.cc index d5bb1ecaee..83ffa33b44 100644 --- a/src/components/security_manager/test/ssl_certificate_handshake_test.cc +++ b/src/components/security_manager/test/ssl_certificate_handshake_test.cc @@ -534,15 +534,6 @@ TEST_P(SSLHandshakeTest, AppNameAndAppIDInvalid) { client_ctx_->SetHandshakeContext( security_manager::SSLContext::HandshakeContext( - custom_str::CustomString("server"), - custom_str::CustomString("Wrong"))); - - GTEST_TRACE(HandshakeProcedure_ClientSideFail( - security_manager::SSLContext::Handshake_Result_AppNameMismatch)); - - ResetConnections(); - client_ctx_->SetHandshakeContext( - security_manager::SSLContext::HandshakeContext( custom_str::CustomString("Wrong"), custom_str::CustomString("server"))); |