mirror of
https://gitee.com/openharmony/security_certificate_framework
synced 2025-02-17 04:18:13 +00:00
commit
6129dc37a1
@ -346,18 +346,17 @@ bool CheckIsSelfSigned(const X509 *cert)
|
||||
if (issuer == NULL) {
|
||||
LOGE("x509 get issuer name failed!");
|
||||
CfPrintOpensslError();
|
||||
return CF_ERR_CRYPTO_OPERATION;
|
||||
return ret;
|
||||
}
|
||||
|
||||
X509_NAME *subject = X509_get_subject_name(cert);
|
||||
if (subject == NULL) {
|
||||
LOGE("x509 get subject name failed!");
|
||||
CfPrintOpensslError();
|
||||
return CF_ERR_CRYPTO_OPERATION;
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = (X509_NAME_cmp(issuer, subject) == 0);
|
||||
LOGI("The ret of whether the cert is self signed is %d.", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user