diff --git a/src/lib/plugin/ns/SecureSocket.cpp b/src/lib/plugin/ns/SecureSocket.cpp index 6b38ec3c..ecda101d 100644 --- a/src/lib/plugin/ns/SecureSocket.cpp +++ b/src/lib/plugin/ns/SecureSocket.cpp @@ -178,8 +178,6 @@ SecureSocket::loadCertificates(const char* filename) } } -const char test[] = "/Users/xinyu/serverCertificateFingerprint.txt"; - void SecureSocket::initContext(bool server) { @@ -210,8 +208,11 @@ SecureSocket::initContext(bool server) } if (!server) { - //void* p = reinterpret_cast(const_cast(m_certFingerprint.c_str())); - SSL_CTX_set_cert_verify_callback(m_ssl->m_context, verifyCertFingerprint, (void*)test); + void* p = reinterpret_cast(const_cast(m_certFingerprint.c_str())); + SSL_CTX_set_cert_verify_callback( + m_ssl->m_context, + verifyCertFingerprint, + p); } }