diff options
author | tb <> | 2025-01-22 12:54:40 +0000 |
---|---|---|
committer | tb <> | 2025-01-22 12:54:40 +0000 |
commit | 8494c52aa61387f1eac0ec4ede91ed28dfd4ad81 (patch) | |
tree | 300312cb5802c82626e9f8af6afab27817b1c75e /src | |
parent | 9265252033e95a736d43b21bf2437b3629938ed4 (diff) | |
download | openbsd-8494c52aa61387f1eac0ec4ede91ed28dfd4ad81.tar.gz openbsd-8494c52aa61387f1eac0ec4ede91ed28dfd4ad81.tar.bz2 openbsd-8494c52aa61387f1eac0ec4ede91ed28dfd4ad81.zip |
Use simpler (if a bit weird) dup instead of new + copy
ok jsing
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/ec/ecp_methods.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/libcrypto/ec/ecp_methods.c b/src/lib/libcrypto/ec/ecp_methods.c index 62966e14d6..8bcff77d0a 100644 --- a/src/lib/libcrypto/ec/ecp_methods.c +++ b/src/lib/libcrypto/ec/ecp_methods.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ecp_methods.c,v 1.40 2025/01/22 09:56:58 jsing Exp $ */ | 1 | /* $OpenBSD: ecp_methods.c,v 1.41 2025/01/22 12:54:40 tb Exp $ */ |
2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> | 2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> |
3 | * for the OpenSSL project. | 3 | * for the OpenSSL project. |
4 | * Includes code written by Bodo Moeller for the OpenSSL project. | 4 | * Includes code written by Bodo Moeller for the OpenSSL project. |
@@ -1020,10 +1020,7 @@ ec_mul_ct(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, | |||
1020 | 1020 | ||
1021 | BN_CTX_start(ctx); | 1021 | BN_CTX_start(ctx); |
1022 | 1022 | ||
1023 | if ((s = EC_POINT_new(group)) == NULL) | 1023 | if ((s = EC_POINT_dup(point, group)) == NULL) |
1024 | goto err; | ||
1025 | |||
1026 | if (!EC_POINT_copy(s, point)) | ||
1027 | goto err; | 1024 | goto err; |
1028 | 1025 | ||
1029 | EC_POINT_BN_set_flags(s, BN_FLG_CONSTTIME); | 1026 | EC_POINT_BN_set_flags(s, BN_FLG_CONSTTIME); |