summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorNiels Dossche <niels.dossche@ugent.be>2023-01-17 20:27:49 +0100
committerTomas Mraz <tomas@openssl.org>2023-01-19 14:16:14 +0100
commitb9097b0c3b0a83814ae378b0a70d9daf75185e5f (patch)
treea790ab2787ed438def6ea0b06dd6b42841d9a280 /crypto
parent60c19d0d61d12441db3c00f3d4009fcb5950d8b9 (diff)
Fix incorrect error return value in i2r_ADMISSION_SYNTAX()
The other implementations of i2r return 0 in case of an error, but i2r_ADMISSION_SYNTAX() returns -1. That means the check on i2r does not catch the error. Change it to return 0 like the others do. Fixes: #20066 CLA: trivial Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20068) (cherry picked from commit 53b5d6c30f3b8eaf7a582da2265c0d1cfe14d54f)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/x509/v3_admis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/x509/v3_admis.c b/crypto/x509/v3_admis.c
index bee9cc9931..8ea8237d72 100644
--- a/crypto/x509/v3_admis.c
+++ b/crypto/x509/v3_admis.c
@@ -199,7 +199,7 @@ static int i2r_ADMISSION_SYNTAX(const struct v3_ext_method *method, void *in,
return 1;
err:
- return -1;
+ return 0;
}
const ASN1_OBJECT *NAMING_AUTHORITY_get0_authorityId(const NAMING_AUTHORITY *n)