libwebsockets icon indicating copy to clipboard operation
libwebsockets copied to clipboard

mem_cert + mem_privkey with password not working

Open gizmocuz opened this issue 3 years ago • 3 comments

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'

gizmocuz avatar Oct 10 '22 13:10 gizmocuz

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

lws-team avatar Oct 10 '22 13:10 lws-team

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 avatar Oct 10 '22 13:10 gizmocuz

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

gizmocuz avatar Jun 12 '23 11:06 gizmocuz