Use the right class/tag when decoding an embedded key
authorMatt Caswell <matt@openssl.org>
Thu, 27 May 2021 15:24:00 +0000 (16:24 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 8 Jun 2021 17:53:28 +0000 (18:53 +0100)
commit2b049e933a8d017fa667e69b5b0ec4437eb8d68c
treefa5b4e59991907be8f6275b7f0e548611a5ebda3
parent7834d50fa92c622e3a1b29a38abbbec2afd1290d
Use the right class/tag when decoding an embedded key

When a key (SubjectPublicKeyInfo) is embedded in some other structure
it may use an implicit tag. However the decoders can only handle the
universal class and don't know how to interpret the implicit tag.
Therefore we modify the data into a form the decoders can handle.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15504)
crypto/x509/x_pubkey.c