Can't get OpenSSL demo sslecho to work but s_server works #351
Unanswered
space88man
asked this question in
Q&A
Replies: 2 comments
-
|
If I insert the following as the first line of main it works, I suspect the location of this call matters. This call has to be before any call to |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Sequence of SSL_CTX_new and OSSL_STORE_open_ex matters |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When I build sslecho (from openssl demos/sslecho) - modified code - here for pkcs11-provider
the private key loads but it cannot accept any SSL connections - whereas - s_server works correctly.
For an external provider like pkcs11-provider is there any other configuration needed for an SSL_CTX? This demo code does minimal preparation.
I modified the demo to load a private key from KEY_URI env var and certificate from CERT_PEM env var.
SSL_CTX_check_private_keyworks but some how pkcs11-provider is not hooked into the SSL processing state machine. If I use pkcs11-spy, there is no token access during the SSL accept (whereas s_server will access the token to perform handshake).sslecho-demov3.zip
With
s_server— no problem performing SSL handshake:Update: if I copy and paste the
main(...)from sslecho into the top of s_servers_server_main()at this line it works if I open the store twice(!):https://github.com/openssl/openssl/blob/a7e992847de83aa36be0c399c89db3fb827b0be2/apps/s_server.c#L995
but if I try to replicate in sslecho: open store twice it fails during SSL_accept
Code coped into
s_server.c:debug.log
debug1.log
debug2.log
Beta Was this translation helpful? Give feedback.
All reactions