diff options
author | tb <> | 2024-12-06 04:35:03 +0000 |
---|---|---|
committer | tb <> | 2024-12-06 04:35:03 +0000 |
commit | ec6a80c2122918d0d43aa05322cc30a8d45c7d81 (patch) | |
tree | ed4fda406898fc81a1d4c617faf07972aad0d8ea /src/lib/libcrypto/ec/ec_local.h | |
parent | b32147fff9dbbaff86a38b82df29174c55cca816 (diff) | |
download | openbsd-ec6a80c2122918d0d43aa05322cc30a8d45c7d81.tar.gz openbsd-ec6a80c2122918d0d43aa05322cc30a8d45c7d81.tar.bz2 openbsd-ec6a80c2122918d0d43aa05322cc30a8d45c7d81.zip |
Set nid on group decoded from EC parameters
We match curve parameters against the builtin curves and only accept
them if they're encoding a curve known to us. After getting rid of the
wtls curves, some of which used to coincide with secp curves (sometimes
the wrong ones), the nid is unambiguous. Setting the nid has no direct
implications on the encoding.
This helps ssh avoid doing ugly computations during the key exchange
for PEM keys using this encoding.
ok djm joshua jsing
Diffstat (limited to 'src/lib/libcrypto/ec/ec_local.h')
-rw-r--r-- | src/lib/libcrypto/ec/ec_local.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ec/ec_local.h b/src/lib/libcrypto/ec/ec_local.h index 11cc36cf67..9a5c42f866 100644 --- a/src/lib/libcrypto/ec/ec_local.h +++ b/src/lib/libcrypto/ec/ec_local.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ec_local.h,v 1.40 2024/11/30 21:09:59 tb Exp $ */ | 1 | /* $OpenBSD: ec_local.h,v 1.41 2024/12/06 04:35:03 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 | */ |
@@ -294,7 +294,7 @@ int EC_POINT_set_Jprojective_coordinates(const EC_GROUP *group, EC_POINT *p, | |||
294 | int EC_POINT_get_Jprojective_coordinates(const EC_GROUP *group, | 294 | int EC_POINT_get_Jprojective_coordinates(const EC_GROUP *group, |
295 | const EC_POINT *p, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx); | 295 | const EC_POINT *p, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx); |
296 | 296 | ||
297 | int ec_group_is_builtin_curve(const EC_GROUP *group); | 297 | int ec_group_is_builtin_curve(const EC_GROUP *group, int *out_nid); |
298 | int ec_group_get_field_type(const EC_GROUP *group); | 298 | int ec_group_get_field_type(const EC_GROUP *group); |
299 | 299 | ||
300 | /* | 300 | /* |