MCPcopy Create free account
hub / github.com/apache/trafficserver / _verify_certificate

Method _verify_certificate

src/iocore/net/SSLNetVConnection.cc:2048–2067  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2046}
2047
2048int
2049SSLNetVConnection::_verify_certificate(X509_STORE_CTX * /* ctx ATS_UNUSED */)
2050{
2051 // Currently, TS_EVENT_SSL_VERIFY_CLIENT/SERVER are invoked only with a NetVC instance.
2052 // This requires plugins to call TSSslVerifyCTX in their event handler.
2053 // We could pass a structure that has both a cert to verify and a NetVC.
2054 // It would allow us to remove confusing TSSslVerifyCTX and its internal implementation that are only available during a very
2055 // limited time.
2056 if (get_context() == NET_VCONNECTION_IN) {
2057 this->callHooks(TS_EVENT_SSL_VERIFY_CLIENT /* , ctx */);
2058 } else {
2059 this->callHooks(TS_EVENT_SSL_VERIFY_SERVER /* , ctx */);
2060 }
2061
2062 if (this->sslHandshakeStatus == SSLHandshakeStatus::SSL_HANDSHAKE_ERROR) {
2063 return 1;
2064 }
2065
2066 return 0;
2067}
2068
2069ssl_error_t
2070SSLNetVConnection::_ssl_accept()

Callers 1

verify_certificateMethod · 0.45

Calls 1

callHooksMethod · 0.80

Tested by

no test coverage detected