Fix DER encoder implementations for output structures "EC" and "SM2"
authorRichard Levitte <levitte@openssl.org>
Sun, 7 Nov 2021 05:18:16 +0000 (06:18 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 9 Nov 2021 04:38:25 +0000 (05:38 +0100)
commit2cb802e16fff3fb2c57ae664baa7bd9ce3e33805
tree9e639d9a0973adf629776d5d4cde19ca906d7f9e
parenteaa76f4788ff1dfa82b0ab9172c81d70bcd1fb59
Fix DER encoder implementations for output structures "EC" and "SM2"

These DER encoder implementations are supposed to be aliases for the
"type-specific" output structure, but were made different in so far
that they would output a "type specific" public key, which turns out
to be garbage (it called i2o_ECPublicKey()).  The "type-specific"
output structure doesn't support that, and shouldn't.

Fixes #16977

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16983)
providers/implementations/encode_decode/encode_key2any.c