private void AuthenticateCallback(IAsyncResult ar) { try { _sslStream.EndAuthenticateAsClient(ar); } catch (AuthenticationException e) { _sslFilter.ExceptionCaught(_currentNextFilter, _session, e); return; } catch (IOException e) { _sslFilter.ExceptionCaught(_currentNextFilter, _session, e); return; } Authenticated = true; if (log.IsDebugEnabled) { // Display the properties and settings for the authenticated stream. CustomSslFilter.DisplaySecurityLevel(_sslStream); CustomSslFilter.DisplaySecurityServices(_sslStream); CustomSslFilter.DisplayCertificateInformation(_sslStream); CustomSslFilter.DisplayStreamProperties(_sslStream); } }
public SslHandler(CustomSslFilter sslFilter, IoSession session) { _sslFilter = sslFilter; _session = session; _sessionStream = new IoSessionStream(this); _sslStream = new SslStream(_sessionStream, false); }