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); }
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); }
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); }
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; }
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; }
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; }