diff options
-rw-r--r-- | src/lib/libcrypto/x509/x509_asid.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libcrypto/x509/x509_asid.c b/src/lib/libcrypto/x509/x509_asid.c index 5eeb5953d3..bf51c9bb2a 100644 --- a/src/lib/libcrypto/x509/x509_asid.c +++ b/src/lib/libcrypto/x509/x509_asid.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_asid.c,v 1.25 2021/12/24 02:22:16 tb Exp $ */ | 1 | /* $OpenBSD: x509_asid.c,v 1.26 2021/12/24 02:23:44 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Contributed to the OpenSSL Project by the American Registry for | 3 | * Contributed to the OpenSSL Project by the American Registry for |
4 | * Internet Numbers ("ARIN"). | 4 | * Internet Numbers ("ARIN"). |
@@ -649,7 +649,8 @@ ASIdentifierChoice_canonize(ASIdentifierChoice *choice) | |||
649 | /* | 649 | /* |
650 | * Make sure we're properly sorted (paranoia). | 650 | * Make sure we're properly sorted (paranoia). |
651 | */ | 651 | */ |
652 | OPENSSL_assert(ASN1_INTEGER_cmp(a_min, b_min) <= 0); | 652 | if (ASN1_INTEGER_cmp(a_min, b_min) > 0) |
653 | goto done; | ||
653 | 654 | ||
654 | /* | 655 | /* |
655 | * Punt inverted ranges. | 656 | * Punt inverted ranges. |
@@ -736,7 +737,8 @@ ASIdentifierChoice_canonize(ASIdentifierChoice *choice) | |||
736 | } | 737 | } |
737 | 738 | ||
738 | /* Paranoia */ | 739 | /* Paranoia */ |
739 | OPENSSL_assert(ASIdentifierChoice_is_canonical(choice)); | 740 | if (!ASIdentifierChoice_is_canonical(choice)) |
741 | goto done; | ||
740 | 742 | ||
741 | ret = 1; | 743 | ret = 1; |
742 | 744 | ||