-
Notifications
You must be signed in to change notification settings - Fork 141
SSL_get0_alpn_selected() returns NULL and throws exception - "Cant get selected protocol... #24
Comments
@IArun74 which version of the wrapper are you using? Which version of the native library are you using? |
I'm using ManagedOpenSsl for 2.0 .NET Framework, is based on version 1.0.2a of libeay32.dll and ssleay32.dll. I have tried to link with 1.0.2d native dlls as well, same exception was thrown. |
@IArun74 Do you know what version of ManagedOpenSsl.dll you are using? How did you get it? If you built it from source, what commit are you using? |
I got the source from this link - https://github.com/openssl-net/openssl-net. I took the source a week ago. |
Should I need to get the latest ManagedOpenSsl.dll from a most latest commit ? |
ALPN support is a new feature, perhaps it's not fully baked yet. It is required for implementing TLS + HTTP/2. If you don't need this, you can try an earlier release. (any commit before 7a4383b) In any case, looks like there are at least 2 things wrong here:
I'm unfamiliar with the What we need to do here is write a test that reproduces the issue. |
We need have ManagedOpenSsl.dll that supports TLSv1.2 at minimum. Do you mean any commit older than 7a4383b, have no support for TLS? |
I mean ALPN was introduced in 0a17a2a. ALPN is only needed for protocols that require the next protocol to be negotiated by the application layer (Application Layer Protocol Negotiation). This is a TLS extension; the only application I'm aware of that requires this extension is HTTP/2. |
Thanks, Just want to make sure onething here. Currently, the ManagedOpenSsl.dll version I downloaded from github links with 1.0.2a of libeay32.dll and ssleay32.dll. Can I relink with the latest libeay32.dll and ssleay32.dlls (1.0.2d) ? second thing I want to make sure is, Is this ManagedOpenSsl.dll source has any option to support TLSv1.2 explicitly ? or by default it chooses the higher version of TLS ? |
I am having this same issue as well. What can I do on my end to help? |
Turns out, this is not my issue, heh, I should learn to keep debugging before posting an issue. I will be making a new issue, you can ignore my comments on this one. |
@rforbes |
Hi! I also stopped on same problem with latest package. Spending some time on investigation an 6119 d uncommenting row 530 in SslStream.cs class solution started work with TLS12. Can anybody say what do this code and where property AlpnSelectedProtocol is used? Despite of used protocol function SSL_get0_alpn_selected always returning zero pointer.
|
SSL_get0_alpn_selected()
returns null. I’m using standard openssl console client and my own server (with ManagedOpenSsl.dll)The exception is – "Cant get selected protocol. See if ALPN was included into client/server hello");
public static extern void SSL_get0_alpn_selected(IntPtr ssl, out IntPtr data, out int len);
Exception thrown from the following code in ssl.cs
Here is my client commands, that I tried.
Any help would be appreciated.
-Arun
The text was updated successfully, but these errors were encountered: