diff options
author | tb <> | 2019-03-13 20:34:00 +0000 |
---|---|---|
committer | tb <> | 2019-03-13 20:34:00 +0000 |
commit | e44d7af88579ebe18a2d8ef57242b067993706b1 (patch) | |
tree | 81f6ab2828c3099781b20bfb3c3d4c20a8449029 /src/lib/libcrypto/x509v3/v3_sxnet.c | |
parent | 06abece690d53a96a5357c7304e3672e1601f54a (diff) | |
download | openbsd-e44d7af88579ebe18a2d8ef57242b067993706b1.tar.gz openbsd-e44d7af88579ebe18a2d8ef57242b067993706b1.tar.bz2 openbsd-e44d7af88579ebe18a2d8ef57242b067993706b1.zip |
Fix a number of ASN1_INTEGER vs ASN1_STRING mixups coming from the
mechanical M_ASN1 macro expansion. The ASN1_INTEGER_cmp function
takes signs into account while ASN1_STRING_cmp doesn't. The mixups
mostly involve serialNumbers, which, in principle, should be positive.
However, it is unclear whether that is checked or enforced anywhere
in the code, so these are probably bugs.
Patch from Holger Mikolon
ok jsing
Diffstat (limited to 'src/lib/libcrypto/x509v3/v3_sxnet.c')
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_sxnet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_sxnet.c b/src/lib/libcrypto/x509v3/v3_sxnet.c index 53db28248a..400bc26346 100644 --- a/src/lib/libcrypto/x509v3/v3_sxnet.c +++ b/src/lib/libcrypto/x509v3/v3_sxnet.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: v3_sxnet.c,v 1.21 2018/05/13 15:03:01 tb Exp $ */ | 1 | /* $OpenBSD: v3_sxnet.c,v 1.22 2019/03/13 20:34:00 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -376,7 +376,7 @@ SXNET_get_id_INTEGER(SXNET *sx, ASN1_INTEGER *zone) | |||
376 | 376 | ||
377 | for (i = 0; i < sk_SXNETID_num(sx->ids); i++) { | 377 | for (i = 0; i < sk_SXNETID_num(sx->ids); i++) { |
378 | id = sk_SXNETID_value(sx->ids, i); | 378 | id = sk_SXNETID_value(sx->ids, i); |
379 | if (!ASN1_STRING_cmp(id->zone, zone)) | 379 | if (!ASN1_INTEGER_cmp(id->zone, zone)) |
380 | return id->user; | 380 | return id->user; |
381 | } | 381 | } |
382 | return NULL; | 382 | return NULL; |