Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
OpenSSL::Netscape::SPKI#verify
(::OpenSSL::PKey::PKey key) -> bool
spki.verify(key) => boolean
ext/openssl/ossl_ns_spki.c
View on GitHub ↗
static VALUE
ossl_spki_verify(VALUE self, VALUE key)
{
NETSCAPE_SPKI *spki;
EVP_PKEY *pkey;
GetSPKI(self, spki);
pkey = GetPKeyPtr(key);
ossl_pkey_check_public_key(pkey);
switch (NETSCAPE_SPKI_verify(spki, pkey)) {
case 0:
ossl_clear_error();
return Qfalse;
case 1:
return Qtrue;
default:
ossl_raise(eSPKIError, "NETSCAPE_SPKI_verify");
}
}
Parameters
-
key - the public key to be used for verifying the
SPKIsignature
Returns true if the signature is valid, false otherwise. To verify an SPKI, the public key contained within the SPKI should be used.