When using PEM_read_bio_PrivateKey_ex() the public key is optional
authorTomas Mraz <tomas@openssl.org>
Wed, 26 Oct 2022 09:29:49 +0000 (11:29 +0200)
committerTomas Mraz <tomas@openssl.org>
Fri, 25 Nov 2022 09:32:18 +0000 (10:32 +0100)
commitadb408dc791e83f59f3a86bd90d8e804c814ac30
tree4911f90da0d0fa92ee1498febd22f63e7fbfc265
parentb484c6268ce38ccbc1bf5ee95bbd36f76fba994f
When using PEM_read_bio_PrivateKey_ex() the public key is optional

Fixes #19498

However the private key part is not optional which was
mishandled by the legacy routine.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19505)
crypto/pem/pem_pkey.c