Special case SM2 when decoding
authorMatt Caswell <matt@openssl.org>
Fri, 21 May 2021 10:55:33 +0000 (11:55 +0100)
committerShane Lontis <shane.lontis@oracle.com>
Sun, 30 May 2021 23:13:19 +0000 (09:13 +1000)
commit3811e0019aa8340b413e65fcf81d4b726f437c93
treeed12ed56c42641c18293f0a501f4bf4f8b28694d
parent3068a183ae3a6eba858aa23b2a4d9f7d2ba8a4c1
Special case SM2 when decoding

SM2 abuses the EC oid by reusing it - but an EC key is different to an SM2
key. Therefore we have to special case SM2 during decoding. If we encounter
the EC OID then we have to try both algorithms.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/15522)
crypto/encode_decode/decoder_pkey.c