diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_asid.c | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/src/lib/libcrypto/x509/x509_asid.c b/src/lib/libcrypto/x509/x509_asid.c index 37c38d9b68..6c73018b8d 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.34 2022/05/12 20:00:06 tb Exp $ */ | 1 | /* $OpenBSD: x509_asid.c,v 1.35 2022/07/30 17:50:17 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"). |
| @@ -753,9 +753,13 @@ ASIdentifierChoice_canonize(ASIdentifierChoice *choice) | |||
| 753 | int | 753 | int |
| 754 | X509v3_asid_canonize(ASIdentifiers *asid) | 754 | X509v3_asid_canonize(ASIdentifiers *asid) |
| 755 | { | 755 | { |
| 756 | return (asid == NULL || | 756 | if (asid == NULL) |
| 757 | (ASIdentifierChoice_canonize(asid->asnum) && | 757 | return 1; |
| 758 | ASIdentifierChoice_canonize(asid->rdi))); | 758 | |
| 759 | if (!ASIdentifierChoice_canonize(asid->asnum)) | ||
| 760 | return 0; | ||
| 761 | |||
| 762 | return ASIdentifierChoice_canonize(asid->rdi); | ||
| 759 | } | 763 | } |
| 760 | 764 | ||
| 761 | /* | 765 | /* |
| @@ -900,11 +904,20 @@ const X509V3_EXT_METHOD v3_asid = { | |||
| 900 | int | 904 | int |
| 901 | X509v3_asid_inherits(ASIdentifiers *asid) | 905 | X509v3_asid_inherits(ASIdentifiers *asid) |
| 902 | { | 906 | { |
| 903 | return (asid != NULL && | 907 | if (asid == NULL) |
| 904 | ((asid->asnum != NULL && | 908 | return 0; |
| 905 | asid->asnum->type == ASIdentifierChoice_inherit) || | 909 | |
| 906 | (asid->rdi != NULL && | 910 | if (asid->asnum != NULL) { |
| 907 | asid->rdi->type == ASIdentifierChoice_inherit))); | 911 | if (asid->asnum->type == ASIdentifierChoice_inherit) |
| 912 | return 1; | ||
| 913 | } | ||
| 914 | |||
| 915 | if (asid->rdi != NULL) { | ||
| 916 | if (asid->rdi->type == ASIdentifierChoice_inherit) | ||
| 917 | return 1; | ||
| 918 | } | ||
| 919 | |||
| 920 | return 0; | ||
| 908 | } | 921 | } |
| 909 | 922 | ||
| 910 | /* | 923 | /* |
