예제 #1
0
        internal static libssl.SSL_CIPHER GetConnectionInfo(SafeSslHandle context)
        {
            IntPtr cipherPtr = libssl.SSL_get_current_cipher(context);
            var    cipher    = new libssl.SSL_CIPHER();

            if (IntPtr.Zero != cipherPtr)
            {
                cipher = Marshal.PtrToStructure <libssl.SSL_CIPHER>(cipherPtr);
            }

            return(cipher);
        }
예제 #2
0
        internal static libssl.SSL_CIPHER GetConnectionInfo(IntPtr sslContextPtr)
        {
            SslContext context   = Marshal.PtrToStructure <SslContext>(sslContextPtr);
            IntPtr     sslPtr    = context.sslPtr;
            IntPtr     cipherPtr = libssl.SSL_get_current_cipher(sslPtr);
            var        cipher    = new libssl.SSL_CIPHER();

            if (IntPtr.Zero != cipherPtr)
            {
                cipher = Marshal.PtrToStructure <libssl.SSL_CIPHER>(cipherPtr);
            }

            return(cipher);
        }
예제 #3
0
        internal static libssl.SSL_CIPHER GetConnectionInfo(SafeSslHandle sslHandle, out string protocolVersion)
        {
            IntPtr cipherPtr = libssl.SSL_get_current_cipher(sslHandle);
            var    cipher    = new libssl.SSL_CIPHER();

            if (IntPtr.Zero != cipherPtr)
            {
                cipher = Marshal.PtrToStructure <libssl.SSL_CIPHER>(cipherPtr);
            }

            IntPtr versionPtr = libssl.SSL_get_version(sslHandle);

            protocolVersion = Marshal.PtrToStringAnsi(versionPtr);
            return(cipher);
        }
예제 #4
0
        internal static libssl.SSL_CIPHER GetConnectionInfo(IntPtr sslContextPtr)
        {
            SslContext context = Marshal.PtrToStructure<SslContext>(sslContextPtr);
            IntPtr sslPtr = context.sslPtr;
            IntPtr cipherPtr = libssl.SSL_get_current_cipher(sslPtr);
            var cipher = new libssl.SSL_CIPHER();
            if (IntPtr.Zero != cipherPtr)
            {
                cipher = Marshal.PtrToStructure<libssl.SSL_CIPHER>(cipherPtr);
            }

            return cipher;
        }
예제 #5
0
        internal static libssl.SSL_CIPHER GetConnectionInfo(SafeSslHandle sslHandle, out string protocolVersion)
        {
            IntPtr cipherPtr = libssl.SSL_get_current_cipher(sslHandle);
            var cipher = new libssl.SSL_CIPHER();
            if (IntPtr.Zero != cipherPtr)
            {
                cipher = Marshal.PtrToStructure<libssl.SSL_CIPHER>(cipherPtr);
            }

            IntPtr versionPtr = libssl.SSL_get_version(sslHandle);
            protocolVersion = Marshal.PtrToStringAnsi(versionPtr);
            return cipher;
        }
예제 #6
0
        internal static libssl.SSL_CIPHER GetConnectionInfo(SafeSslHandle context)
        {
            IntPtr cipherPtr = libssl.SSL_get_current_cipher(context);
            var cipher = new libssl.SSL_CIPHER();
            if (IntPtr.Zero != cipherPtr)
            {
                cipher = Marshal.PtrToStructure<libssl.SSL_CIPHER>(cipherPtr);
            }

            return cipher;
        }