summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNicola Tuveri <nic.tuv@gmail.com>2020-06-29 00:53:46 +0300
committerNicola Tuveri <nic.tuv@gmail.com>2020-07-04 14:56:25 +0300
commit2797fea7608063f54cf45763d1a7ae60a67dae65 (patch)
treeb3127be1468495fe60c597eba8e861ead7b0f9c9 /include
parenta98fa843b8ab00e8f3b966a1f5321aaffe805100 (diff)
[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)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/ecerr.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/openssl/ecerr.h b/include/openssl/ecerr.h
index f7b9183456..51738113dc 100644
--- a/include/openssl/ecerr.h
+++ b/include/openssl/ecerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -243,6 +243,7 @@ int ERR_load_EC_strings(void);
# define EC_R_LADDER_POST_FAILURE 136
# define EC_R_LADDER_PRE_FAILURE 153
# define EC_R_LADDER_STEP_FAILURE 162
+# define EC_R_MISSING_OID 167
# define EC_R_MISSING_PARAMETERS 124
# define EC_R_MISSING_PRIVATE_KEY 125
# define EC_R_NEED_NEW_SETUP_VALUES 157