Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.3' into merge_13_14_16
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfr committed Sep 17, 2024
2 parents 7a1dfce + 90661da commit 60b6f5f
Show file tree
Hide file tree
Showing 4 changed files with 1,131 additions and 3 deletions.
18 changes: 15 additions & 3 deletions plugins/crypto/mbedtls/ua_pki_mbedtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,13 @@ certificateVerification_verify(const UA_CertificateVerification *cv,

/* If the CRL file corresponding to the parent certificate is not present
* then return UA_STATUSCODE_BADCERTIFICATEISSUERREVOCATIONUNKNOWN */
if(!issuerKnown) {
if(issuerKnown) {
flags = 0;
mbedErr = mbedtls_x509_crt_verify_with_profile(parentCert,
&ci->certificateIssuerList,
&ci->certificateRevocationList,
&crtProfile, NULL, &flags, NULL, NULL);
} else {
return UA_STATUSCODE_BADCERTIFICATEISSUERREVOCATIONUNKNOWN;
}

Expand Down Expand Up @@ -427,8 +433,14 @@ certificateVerification_verify(const UA_CertificateVerification *cv,

/* If the CRL file corresponding to the parent certificate is not present
* then return UA_STATUSCODE_BADCERTIFICATEREVOCATIONUNKNOWN */
if(!issuerKnown) {
return UA_STATUSCODE_BADCERTIFICATEREVOCATIONUNKNOWN;
if(issuerKnown) {
flags = 0;
mbedErr = mbedtls_x509_crt_verify_with_profile(parentCert,
&ci->certificateIssuerList,
&ci->certificateRevocationList,
&crtProfile, NULL, &flags, NULL, NULL);
} else {
return UA_STATUSCODE_BADCERTIFICATEISSUERREVOCATIONUNKNOWN;
}

}
Expand Down
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ endif()

if(UA_ENABLE_ENCRYPTION)
ua_add_test(client/check_client_encryption.c)
ua_add_test(encryption/check_crl_validation.c)

if(UA_ENABLE_ENCRYPTION_OPENSSL OR UA_ENABLE_ENCRYPTION_MBEDTLS)
ua_add_test(client/check_client_authentication.c)
Expand Down
Loading

0 comments on commit 60b6f5f

Please sign in to comment.