File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -375,13 +375,15 @@ ssl_cert_callback(SSL *ssl, void *arg)
375375 int retval = 1 ;
376376
377377 // If we are in tunnel mode, don't select a cert. Pause!
378- NetVConnection *netvc = reinterpret_cast <NetVConnection *>(sslnetvc);
379- if (HttpProxyPort::TRANSPORT_BLIND_TUNNEL == netvc->attributes ) {
378+ if (sslnetvc) {
379+ NetVConnection *netvc = reinterpret_cast <NetVConnection *>(sslnetvc);
380+ if (HttpProxyPort::TRANSPORT_BLIND_TUNNEL == netvc->attributes ) {
380381#ifdef OPENSSL_IS_BORINGSSL
381- return -2 ; // Retry
382+ return -2 ; // Retry
382383#else
383- return -1 ; // Pause
384+ return -1 ; // Pause
384385#endif
386+ }
385387 }
386388
387389 SSLCertContextType ctxType = SSLCertContextType::GENERIC;
@@ -411,7 +413,7 @@ ssl_cert_callback(SSL *ssl, void *arg)
411413 retval = -1 ; // Pause
412414 }
413415 } else {
414- if (tcss->selectCertificate (ssl, ctxType) == 1 ) {
416+ if (tcss && tcss ->selectCertificate (ssl, ctxType) == 1 ) {
415417 retval = 1 ;
416418 } else {
417419 retval = 0 ;
You can’t perform that action at this time.
0 commit comments