diff options
author | tb <> | 2024-11-25 06:51:39 +0000 |
---|---|---|
committer | tb <> | 2024-11-25 06:51:39 +0000 |
commit | 05a50d0f2fa123333e4c07cc68de4816f3194f55 (patch) | |
tree | c538c6d04f98723eabc7002148b5b0c899de84da /src/lib/libcrypto/ec/eck_prn.c | |
parent | ff56d47bbc99ed7ac64ae73eaacbc02525a11b04 (diff) | |
download | openbsd-05a50d0f2fa123333e4c07cc68de4816f3194f55.tar.gz openbsd-05a50d0f2fa123333e4c07cc68de4816f3194f55.tar.bz2 openbsd-05a50d0f2fa123333e4c07cc68de4816f3194f55.zip |
Unify checking for the asn1_flag
There are only two flag values that libcrypto understands and the default
value is 1 while, helpfully, the undesirable non-default is 0. The few
existing callers set OPENSSL_EC_NAMED_CURVE or OPENSSL_EC_EXPLICIT_CURVE.
Nevertheless, the flag should be checked properly as a flag. The recent
upstream checks for EC_GROUP_get_asn1_flag(group) == OPENSSL_EC_NAMED_CURVE
don't look right either...
ok jsing
Diffstat (limited to 'src/lib/libcrypto/ec/eck_prn.c')
-rw-r--r-- | src/lib/libcrypto/ec/eck_prn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ec/eck_prn.c b/src/lib/libcrypto/ec/eck_prn.c index 012391c803..98e1a7e7bd 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.39 2024/11/14 10:27:59 tb Exp $ */ | 1 | /* $OpenBSD: eck_prn.c,v 1.40 2024/11/25 06:51:39 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
4 | */ | 4 | */ |
@@ -330,7 +330,7 @@ ECPKParameters_print(BIO *bio, const EC_GROUP *group, int off) | |||
330 | return 0; | 330 | return 0; |
331 | } | 331 | } |
332 | 332 | ||
333 | if (EC_GROUP_get_asn1_flag(group)) | 333 | if ((EC_GROUP_get_asn1_flag(group) & OPENSSL_EC_NAMED_CURVE) != 0) |
334 | return ecpk_print_asn1_parameters(bio, group, off); | 334 | return ecpk_print_asn1_parameters(bio, group, off); |
335 | 335 | ||
336 | return ecpk_print_explicit_parameters(bio, group, off); | 336 | return ecpk_print_explicit_parameters(bio, group, off); |