summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ec_lib.c
diff options
context:
space:
mode:
authortb <>2021-09-12 16:23:19 +0000
committertb <>2021-09-12 16:23:19 +0000
commit10e8e3b7f398be5d656d5725a95663a364220e35 (patch)
treeb56ccede67272adac043d4d9b35f1e73cfed19db /src/lib/libcrypto/ec/ec_lib.c
parent13dbc996ebccef083673eb0d489a35eda7075e9a (diff)
downloadopenbsd-10e8e3b7f398be5d656d5725a95663a364220e35.tar.gz
openbsd-10e8e3b7f398be5d656d5725a95663a364220e35.tar.bz2
openbsd-10e8e3b7f398be5d656d5725a95663a364220e35.zip
Default to using named curve parameter encoding
The pre-OpenSSL 1.1.0 default was to use explicit curve parameter encoding. Most applications want to use named curve parameter encoding and have to opt into this explicitly. Stephen Henson changed this default in OpenSSL commit 86f300d3 6 years ago and provided a new OPENSSL_EC_EXPLICIT_CURVE define to opt back into the old default. According to Debian's codesearch, no application currently does this, which indicates that we currently have a bad default. In the future it is more likely that applications expect the new default, so we follow OpenSSL to avoid problems. Prompted by schwarze who noted that OPENSSL_EC_EXPLICIT_CURVE is missing. ok beck inoguchi jsing
Diffstat (limited to 'src/lib/libcrypto/ec/ec_lib.c')
-rw-r--r--src/lib/libcrypto/ec/ec_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c
index 994fd2d4c1..7cc69f8154 100644
--- a/src/lib/libcrypto/ec/ec_lib.c
+++ b/src/lib/libcrypto/ec/ec_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_lib.c,v 1.40 2021/09/08 17:29:21 tb Exp $ */ 1/* $OpenBSD: ec_lib.c,v 1.41 2021/09/12 16:23:19 tb Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -100,7 +100,7 @@ EC_GROUP_new(const EC_METHOD * meth)
100 BN_init(&ret->cofactor); 100 BN_init(&ret->cofactor);
101 101
102 ret->curve_name = 0; 102 ret->curve_name = 0;
103 ret->asn1_flag = 0; 103 ret->asn1_flag = OPENSSL_EC_NAMED_CURVE;
104 ret->asn1_form = POINT_CONVERSION_UNCOMPRESSED; 104 ret->asn1_form = POINT_CONVERSION_UNCOMPRESSED;
105 105
106 ret->seed = NULL; 106 ret->seed = NULL;