method
extensions=
v1_9_3_125 -
Show latest stable
- Class:
OpenSSL::X509::CRL
extensions=(p1)public
Sets X509_EXTENSIONs
static VALUE
ossl_x509crl_set_extensions(VALUE self, VALUE ary)
{
X509_CRL *crl;
X509_EXTENSION *ext;
int i;
Check_Type(ary, T_ARRAY);
/* All ary members should be X509 Extensions */
for (i=0; i<RARRAY_LEN(ary); i++) {
OSSL_Check_Kind(RARRAY_PTR(ary)[i], cX509Ext);
}
GetX509CRL(self, crl);
sk_X509_EXTENSION_pop_free(crl->crl->extensions, X509_EXTENSION_free);
crl->crl->extensions = NULL;
for (i=0; i<RARRAY_LEN(ary); i++) {
ext = DupX509ExtPtr(RARRAY_PTR(ary)[i]);
if(!X509_CRL_add_ext(crl, ext, -1)) { /* DUPs ext - FREE it */
X509_EXTENSION_free(ext);
ossl_raise(eX509CRLError, NULL);
}
X509_EXTENSION_free(ext);
}
return ary;
} Related methods
- Instance methods
- add_extension
- add_revoked
- extensions
- extensions=
- issuer
- issuer=
- last_update
- last_update=
- next_update
- next_update=
- revoked
- revoked=
- sign
- signature_algorithm
- to_der
- to_pem
- to_s
- to_text
- verify
- version
- version=
- Class methods
- new