aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ec/ec_lib.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2020-04-21 19:07:46 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2020-04-21 19:07:46 +0000
commit65aa3028e51cba07879f3dc4608949c5c6b9fcc0 (patch)
tree310ff0dc688f5f84a478a310752abb888ac68e4e /crypto/ec/ec_lib.c
parentb6cfecdc04a5a5e42ae4f2b025d8246cc16f3342 (diff)
downloadsrc-65aa3028e51cba07879f3dc4608949c5c6b9fcc0.tar.gz
src-65aa3028e51cba07879f3dc4608949c5c6b9fcc0.zip
Import OpenSSL 1.1.1g.vendor/openssl/1.1.1g
Notes
Notes: svn path=/vendor-crypto/openssl/dist/; revision=360173 svn path=/vendor-crypto/openssl/1.1.1g/; revision=360174; tag=vendor/openssl/1.1.1g
Diffstat (limited to 'crypto/ec/ec_lib.c')
-rw-r--r--crypto/ec/ec_lib.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c
index 3554ada82797..6832383cad51 100644
--- a/crypto/ec/ec_lib.c
+++ b/crypto/ec/ec_lib.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
*
* Licensed under the OpenSSL license (the "License"). You may not use
@@ -1007,14 +1007,14 @@ int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
size_t i = 0;
BN_CTX *new_ctx = NULL;
- if ((scalar == NULL) && (num == 0)) {
- return EC_POINT_set_to_infinity(group, r);
- }
-
if (!ec_point_is_compat(r, group)) {
ECerr(EC_F_EC_POINTS_MUL, EC_R_INCOMPATIBLE_OBJECTS);
return 0;
}
+
+ if (scalar == NULL && num == 0)
+ return EC_POINT_set_to_infinity(group, r);
+
for (i = 0; i < num; i++) {
if (!ec_point_is_compat(points[i], group)) {
ECerr(EC_F_EC_POINTS_MUL, EC_R_INCOMPATIBLE_OBJECTS);