rsa: Try legacy encoding functions for pubkey
authorTomas Mraz <tomas@openssl.org>
Wed, 11 Aug 2021 11:09:09 +0000 (13:09 +0200)
committerTomas Mraz <tomas@openssl.org>
Tue, 24 Aug 2021 15:56:46 +0000 (17:56 +0200)
commit94736c3a10ae7d109243abffb0200931fb3db5a8
tree1f1ac6de4dc7792d2b7dc65401e6a71abed3a0f8
parent796f4f7085ac95a1b0ccee8ff3c6c183219cdab2
rsa: Try legacy encoding functions for pubkey

If there are no suitable encoders it might mean the key is in
an engine and thus it is a legacy key. Try legacy encoding
routines to encode the public key. We do not attempt encoding
a private key as it would be in most cases impossible anyway.

Fixes #16256

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16289)
apps/rsa.c