-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
When building openssl with mingw64, make test
is hang up
#24436
Comments
Can you please run |
$ make V=1 TESTS='test_sslrecords' test
"make" depend && "make" _tests
make[1]: Entering directory '/e/workspace/github.com/openssl/mingw-ucrt64'
make[1]: Leaving directory '/e/workspace/github.com/openssl/mingw-ucrt64'
make[1]: Entering directory '/e/workspace/github.com/openssl/mingw-ucrt64'
"make" run_tests
make[2]: Entering directory '/e/workspace/github.com/openssl/mingw-ucrt64'
( SRCTOP=../openssl \
BLDTOP=. \
PERL="perl" \
FIPSKEY="f4556650ac31d35461610bac4ed81b1a181b2d8a43ea2854cbae22ca74560813" \
EXE_EXT=.exe \
perl ../openssl/test/run_tests.pl test_sslrecords )
00-prep_fipsmodule_cnf.t ..
# The results of this test will end up in test-runs/prep_fipsmodule
1..0 # SKIP FIPS module config file only supported in a fips build
skipped: FIPS module config file only supported in a fips build
Files=1, Tests=0, 1 wallclock secs ( 0.00 usr 0.02 sys + 0.27 cusr 0.28 csys = 0.56 CPU)
Result: NOTESTS
70-test_sslrecords.t ..
# The results of this test will end up in test-runs/test_sslrecords
1..42
Proxy started on port [::1]:43809
Server command: ../../util/wrap.pl ../../apps/openssl.exe s_server -no_comp -engine ossltest -state -ext_cache -accept [::1]:0 -cert ../../../openssl/apps/server.pem -cert2 ../../../openssl/apps/server.pem -naccept 1 -rev -max_protocol TLSv1.3 -cipher AES128-SHA -ciphersuites TLS_AES_128_GCM_SHA256 -tls1_2
Engine "ossltest" set.
Using default temp DH parameters
ACCEPT [::1]:43810
Server responds on [::1]:43810
Client command: ../../util/wrap.pl ../../apps/openssl.exe s_client -engine ossltest -connect [::1]:43809 -max_protocol TLSv1.3 -no_tls1_3 -servername localhost
SSL_accept:before SSL initialization
Engine "ossltest" set.
s_client didn't try to connect
SSL3 alert write:fatal:decode error
SSL_accept:error in error
CONNECTION FAILURE
D45B0000:error:0A000126:SSL routines::unexpected eof while reading:../openssl/ssl/record/rec_layer_s3.c:687:
# Looks like your test exited with 29 before it could output anything.
Dubious, test returned 29 (wstat 7424, 0x1d00)
Failed 42/42 subtests
Test Summary Report
-------------------
70-test_sslrecords.t (Wstat: 7424 (exited 29) Tests: 0 Failed: 0)
Non-zero exit status: 29
Parse errors: Bad plan. You planned 42 tests but ran 0.
Files=1, Tests=0, 61 wallclock secs ( 0.02 usr 0.02 sys + 0.28 cusr 0.23 csys = 0.55 CPU)
Result: FAIL
make[2]: *** [Makefile:3744: run_tests] Error 1
make[2]: Leaving directory '/e/workspace/github.com/openssl/mingw-ucrt64'
make[1]: *** [Makefile:3741: _tests] Error 2
make[1]: Leaving directory '/e/workspace/github.com/openssl/mingw-ucrt64'
make: *** [Makefile:3739: tests] Error 2 my build folder is obviously, I think problem is started from |
If you attempt to run the s_server and s_client commands manually from the command line, do either of them issue any additional warnings (or more likely crash)? |
after mannually update Server command: $ ./util/wrap.pl ./apps/openssl.exe s_server -no_comp -engine ossltest -state -ext_cache -accept [::1]:0 -cert ../openssl/apps/server.pem -cert2 ../openssl/apps/server.pem -naccept 1 -rev -max_protocol TLSv1.3 -cipher AES128-SHA -ciphersuites TLS_AES_128_GCM_SHA256 -tls1_2
Engine "ossltest" set.
Using default temp DH parameters
ACCEPT [::1]:45173
It is accepting, This should have no problem. After mannually update Client command: $ ./util/wrap.pl ./apps/openssl.exe s_client -engine ossltest -connect [::1]:43809 -max_protocol TLSv1.3 -no_tls1_3 -servername localhost
Engine "ossltest" set.
805F0000:error:8000274D:system library:BIO_connect:Unknown error:../openssl/crypto/bio/bio_sock2.c:178:calling connect()
805F0000:error:10000067:BIO routines:BIO_connect:connect error:../openssl/crypto/bio/bio_sock2.c:180:
connect:errno=0 I think it should be openssl source code problem. |
Its a system call error. the above is indicating that the call to connect returned -1 with errno set to 0. IIRC that typically occurs because the connect call actually attempted to establish a tcp connection with the remote process, but the handshake traffic was blocked for some reason. Nominally, this can be caused iptables or other network administrative rules in the ip stack blocking said traffic. Do you have a firewall or other iptables/similar rules established? If so, can you disable your firewall and try again? |
so, you answered your own question :) you disabled your firewall, which allows the ssl client to make contact with the ssl server, but when you ran the commands you didn't specify a target port on the client, so it attempted to connect to the default server port, which the server wasn't listening on, so the connection failed. Then, when you re-ran the commands, you properly matched the server listening port with the client target port, and everything worked. |
$ ./util/wrap.pl ./apps/openssl.exe s_client -engine ossltest -connect [::1]:46485 -max_protocol TLSv1.3 -no_tls1_3 -servername localhost
Engine "ossltest" set.
Connecting to ::1
CONNECTED(00000138)
write:errno=10054
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 215 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1716290511
Timeout : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: no
--- is this client command output correct? do you see "write:errno=10054" in the output? |
I have another question: server port and client port must be matched in this test? |
@nhorman @t8m @alex @JackDanger I value your feedback. |
Please do not ping random people, it's rude. Especially don't ping me, I'm not even involved in maintaining OpenSSL. |
./Configure mingw64
make
make test
is hang up......I can not find solution in google search and others.
The text was updated successfully, but these errors were encountered: