Method: OpenSSL::Netscape::SPKI#public_key=
- Defined in:
- ossl_ns_spki.c
#public_key=(pub) ⇒ Object
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.
207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'ossl_ns_spki.c', line 207
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;
}
|