]> jfr.im git - irc/znc/Csocket.git/commitdiff
Add a getter or the ssl object.
authorThomas Fargeix <redacted>
Wed, 11 Feb 2015 18:09:10 +0000 (19:09 +0100)
committerThomas Fargeix <redacted>
Wed, 11 Feb 2015 18:09:10 +0000 (19:09 +0100)
Csocket.cc
Csocket.h

index cdce7f60b04e36a03cc0e528c7785106f64ad05b..f807e959da515fb5700289411c157250379c52b2 100644 (file)
@@ -2508,6 +2508,13 @@ void Csock::SetSSLObject( SSL *ssl, bool bDeleteExisting )
                FREE_SSL();
        m_ssl = ssl; 
 }
+SSL * Csock::GetSSLObject() const
+{
+       if( m_ssl )
+               return( m_ssl );
+
+       return( NULL );
+}
 void Csock::SetCTXObject( SSL_CTX *sslCtx, bool bDeleteExisting ) 
 {
        if( bDeleteExisting )
index 81ea73bc274c5786a4a0d7e5e7d8f570896f35d8..24d83213c931b2164daec5b1502261f52e39fea8 100644 (file)
--- a/Csocket.h
+++ b/Csocket.h
@@ -876,6 +876,7 @@ public:
        int GetSSLMethod() const;
 
        void SetSSLObject( SSL *ssl, bool bDeleteExisting = false );
+       SSL * GetSSLObject() const;
        void SetCTXObject( SSL_CTX *sslCtx, bool bDeleteExisting = false );
        SSL_SESSION * GetSSLSession() const;