-
-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tls_construct_server_key_exchange:internal error / tls_process_server_certificate:length mismatch #7660
Comments
|
Can you output the full error data (line number) on the server? There're multiple internal error paths in |
I'm not sure why, but there is no line number printed. |
Got it: |
|
That corresponds to this code: openssl/ssl/statem/statem_srvr.c Lines 2736 to 2749 in 1708e3e
This is a "should never happen" error. My guess is If I understand what you wrote you are changing the key/cert by using Based on the line number for this error it seems you are using 1.1.1 rather than 1.1.1a? It might be worth trying 1.1.1a as there have been numerous defect fixes - it would be good to rule those out as a cause for this. |
ALPN via
Will try when I'm at work on monday |
|
1.1.1a has the same error. It now occurs at |
|
I've updated the earlier gist with a pure-C reproduction of the issue: https://gist.github.com/james-callahan/7f021533ad20ed107938885f2304b43e#file-test-c |
Oh, sorry - somehow missed that. Does this patch help? |
The test case (linked above) now fails with |
|
I think this would be the right fix? master...james-callahan:7660-alpn_select-cert-change I'd PR it but I'm having trouble writing a test for it. |
|
@mattcaswell ping? does the link above look correct? |
|
It looks correct to me. As for a test I think something should be added to sslapitest. We do already have a test there which calls the alpn callback but it is specific to early data with PSKs. Lines 2751 to 2772 in 871493a
Probably we need a new "test_alpn" test in that file. I'd recommend you take a look at how some of the other tests are written in that file and see if you can base something on that. |
This acts as a workaround for openssl/openssl#7660
This acts as a workaround for openssl/openssl#7660 From #4046
|
I bumped into this as well, while trying to write a Python server to do something similar. I removed my SNI and info callbacks, and still ended up getting the same error. Just an ALPN callback that calls |
|
(@glyph and I already chatted out-of-band, but for posterity.) Calling The ClientHello callback is probably best if you want to treat ALPN as a funny SNI. |
As noted in my original post: we are trying to be consistent across OpenSSL 1.0.2 and OpenSSL 1.1.1. |
|
The version 1.1.1 is not supported anymore. Closing. |
We're running into an issue in OpenSSL 1.1.1+ where we're trying to change the key/cert based on SNI and ALPN (the code worked with previous releases). For compat with earlier OpenSSL versions we're using
SSL_set_SSL_CTX. The issue only seems to happen when the original context is not TLS 1.3. If the server uses TLS1.3 then everything seems to work out....The server side reports:
Client side reports:
Test case here: https://gist.github.com/james-callahan/7f021533ad20ed107938885f2304b43e#file-test-server-lua
The text was updated successfully, but these errors were encountered: