verifyCertificateSignature method
Verifies the signature of certificate against the public key of
issuer.
Checks the signature only: no validity window, no revocation, no chain building. For full validation use verifyChain.
Implementation
bool verifyCertificateSignature(
X509Certificate certificate,
X509Certificate issuer,
) {
final pubkey = bindings.X509_get_pubkey(issuer.handle);
if (pubkey == nullptr) {
throw OpenSslException('X509_get_pubkey failed');
}
try {
OpenSslException.clearError(bindings);
return bindings.X509_verify(certificate.handle, pubkey) == 1;
} finally {
bindings.EVP_PKEY_free(pubkey);
}
}