instance method
OpenSSL::Netscape::SPKI#public_key=
(::OpenSSL::PKey::PKey) -> ::OpenSSL::PKey::PKey
spki.public_key = pub => pkey
ext/openssl/ossl_ns_spki.c
View on GitHub ↗
static VALUE
ossl_spki_set_public_key(VALUE self, VALUE key)
{
NETSCAPE_SPKI *spki;
EVP_PKEY *pkey;
GetSPKI(self, spki);
pkey = GetPKeyPtr(key);
ossl_pkey_check_public_key(pkey);
if (!NETSCAPE_SPKI_set_pubkey(spki, pkey))
ossl_raise(eSPKIError, "NETSCAPE_SPKI_set_pubkey");
return key;
}
Parameters
-
pub - the public key to be set for this instance
Sets the public key to be associated with the SPKI, an instance of OpenSSL::PKey. This should be the public key corresponding to the private key used for signing the SPKI.