libressl/portable

PkeyUtl crashes with "Expecting: ANY PRIVATE KEY" in Mac OS

Closed this issue · 2 comments

Hi, when running with LibreSSL 3.7.3 in Mac OS, I get a crash like:
> echo test | openssl pkeyutl -encrypt -inkey repository_key.pub.pem -pubin -out >(base64)

unable to load Private Key
8519360000:error:09FFF06C:PEM routines:CRYPTO_internal:no start line:pem/pem_lib.c:694:Expecting: ANY PRIVATE KEY
Error initializing context

The same does not happen with OpenSSL 3.1.1 30 May 2023

cat repository_key.pub.pem
-----BEGIN PUBLIC KEY-----
....................
-----END PUBLIC KEY-----
Screenshot 2023-06-28 at 17 11 59

It also works fine if using rsautl command

Screenshot 2023-06-28 at 17 27 55
botovq commented

Hi, when running with LibreSSL 3.7.3 in Mac OS, I get a crash like:

Your picture says 3.3.6. It is not a crash but an error. What type of key is this?

botovq commented

This is not actionable without further info.