]> git.ipfire.org Git - thirdparty/openssl.git/commit
[EC][ASN1] Detect missing OID when serializing EC parameters and keys
authorNicola Tuveri <nic.tuv@gmail.com>
Sun, 28 Jun 2020 21:53:46 +0000 (00:53 +0300)
committerNicola Tuveri <nic.tuv@gmail.com>
Sat, 4 Jul 2020 11:56:25 +0000 (14:56 +0300)
commit2797fea7608063f54cf45763d1a7ae60a67dae65
treeb3127be1468495fe60c597eba8e861ead7b0f9c9
parenta98fa843b8ab00e8f3b966a1f5321aaffe805100
[EC][ASN1] Detect missing OID when serializing EC parameters and keys

The following built-in curves do not have an assigned OID:

- Oakley-EC2N-3
- Oakley-EC2N-4

In general we shouldn't assume that an OID is always available.

This commit detects such cases, raises an error and returns appropriate
return values so that the condition can be detected and correctly
handled by the callers, when serializing EC parameters or EC keys with
the default `ec_param_enc:named_curve`.

Fixes #12306

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12312)
crypto/ec/ec_ameth.c
crypto/ec/ec_asn1.c
crypto/ec/ec_err.c
crypto/err/openssl.txt
crypto/pem/pem_lib.c
include/openssl/ecerr.h