warmcat / libwebsockets

canonical libwebsockets.org networking library
https://libwebsockets.org
Other
4.78k stars 1.49k forks source link

mem_cert + mem_privkey with password not working #2740

Open gizmocuz opened 2 years ago

gizmocuz commented 2 years ago

Is it possible that it is not possible to use a mem_privkey with a password?

Everything is working perfect when using external files with the password, but once I use the memory cert/private_key it does not work and an error is returned:

N: unable to use memory privkey

Using a memory cert+key without password works fine

Password is specified the same way as when using external files with 'ssl_private_key_password'

lws-team commented 2 years ago

Anything's possible... you'll have to work back from the error to find out why you are seeing it.

gizmocuz commented 2 years ago

The problem resides here (I am not a libwebsockets developer, so I hope you have something usefull with this information)

openssl-server.c

lws_tls_server_certs_load

line 298 -> SSL_CTX_use_PrivateKey_ASN1

This function returns an error

Has this been tested recently? (Just to make sure that's not an error on my side... still using this without a passphrase all is ok) (And I can use external files with passphrases without issues as well)

gizmocuz commented 1 year ago

Still seems to be an issue. Anyone can verify if this is working or not? (memory cert + passphrase)