Quellcode durchsuchen

Fix allow all when no cert list provided

Mark vor 7 Jahren
Ursprung
Commit
e8ed4da022
1 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen
  1. 4 1
      plugins/ua_pki_certificate.c

+ 4 - 1
plugins/ua_pki_certificate.c

@@ -118,7 +118,10 @@ UA_CertificateVerification_Trustlist(UA_CertificateVerification *cv,
     mbedtls_x509_crl_init(&ci->certificateRevocationList);
 
     cv->context = (void*)ci;
-    cv->verifyCertificate = certificateVerification_verify;
+    if(certificateTrustListSize > 0)
+        cv->verifyCertificate = certificateVerification_verify;
+    else
+        cv->verifyCertificate = verifyAllowAll;
     cv->deleteMembers = certificateVerification_deleteMembers;
 
     int err = 0;