summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/eck_prn.c
diff options
context:
space:
mode:
authortb <>2021-04-20 17:04:13 +0000
committertb <>2021-04-20 17:04:13 +0000
commitdf667324dee726a4c161f0c3c2194b233569942c (patch)
tree173c34f3f2e636d34625fd1b38effccf5db6b71f /src/lib/libcrypto/ec/eck_prn.c
parent16295663705b9c018a523267b6d4d6c3a2e71cbb (diff)
downloadopenbsd-df667324dee726a4c161f0c3c2194b233569942c.tar.gz
openbsd-df667324dee726a4c161f0c3c2194b233569942c.tar.bz2
openbsd-df667324dee726a4c161f0c3c2194b233569942c.zip
Prepare to provide EC_GROUP_{get,set}_curve(3)
There are numerous functions in ec/ that exist with _GF2m and _GFp variants for no good reason. The code of both variants is the same. The EC_METHODs contain a pointer to the appropriate version. This commit hides the _GF2m and _GFp variants from internal use and provides versions that work for both curve types. These will be made public in an upcoming library bump. Similar to part of OpenSSL commit 8e3cced75fb5fee5da59ebef9605d403a999391b ok jsing
Diffstat (limited to 'src/lib/libcrypto/ec/eck_prn.c')
-rw-r--r--src/lib/libcrypto/ec/eck_prn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ec/eck_prn.c b/src/lib/libcrypto/ec/eck_prn.c
index be57d875e3..b17908d7fa 100644
--- a/src/lib/libcrypto/ec/eck_prn.c
+++ b/src/lib/libcrypto/ec/eck_prn.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eck_prn.c,v 1.15 2018/07/15 16:27:39 tb Exp $ */ 1/* $OpenBSD: eck_prn.c,v 1.16 2021/04/20 17:04:13 tb Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -216,14 +216,14 @@ ECPKParameters_print(BIO * bp, const EC_GROUP * x, int off)
216 } 216 }
217#ifndef OPENSSL_NO_EC2M 217#ifndef OPENSSL_NO_EC2M
218 if (is_char_two) { 218 if (is_char_two) {
219 if (!EC_GROUP_get_curve_GF2m(x, p, a, b, ctx)) { 219 if (!EC_GROUP_get_curve(x, p, a, b, ctx)) {
220 reason = ERR_R_EC_LIB; 220 reason = ERR_R_EC_LIB;
221 goto err; 221 goto err;
222 } 222 }
223 } else /* prime field */ 223 } else /* prime field */
224#endif 224#endif
225 { 225 {
226 if (!EC_GROUP_get_curve_GFp(x, p, a, b, ctx)) { 226 if (!EC_GROUP_get_curve(x, p, a, b, ctx)) {
227 reason = ERR_R_EC_LIB; 227 reason = ERR_R_EC_LIB;
228 goto err; 228 goto err;
229 } 229 }