summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/ec/ec2_oct.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ec/ec2_oct.c b/src/lib/libcrypto/ec/ec2_oct.c
index ad38991471..832083c628 100644
--- a/src/lib/libcrypto/ec/ec2_oct.c
+++ b/src/lib/libcrypto/ec/ec2_oct.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec2_oct.c,v 1.15 2021/04/20 17:32:57 tb Exp $ */ 1/* $OpenBSD: ec2_oct.c,v 1.16 2021/05/03 14:42:45 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -121,6 +121,10 @@ ec_GF2m_simple_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *point
121 if (!BN_GF2m_mod_arr(x, x_, group->poly)) 121 if (!BN_GF2m_mod_arr(x, x_, group->poly))
122 goto err; 122 goto err;
123 if (BN_is_zero(x)) { 123 if (BN_is_zero(x)) {
124 if (y_bit != 0) {
125 ECerror(EC_R_INVALID_COMPRESSED_POINT);
126 goto err;
127 }
124 if (!BN_GF2m_mod_sqrt_arr(y, &group->b, group->poly, ctx)) 128 if (!BN_GF2m_mod_sqrt_arr(y, &group->b, group->poly, ctx))
125 goto err; 129 goto err;
126 } else { 130 } else {