Method: OpenSSL::PKCS7::RecipientInfo#initialize

Defined in:
ext/openssl/ossl_pkcs7.c

#initialize(cert) ⇒ Object



962
963
964
965
966
967
968
969
970
971
972
973
974
975
# File 'ext/openssl/ossl_pkcs7.c', line 962

static VALUE
ossl_pkcs7ri_initialize(VALUE self, VALUE cert)
{
    PKCS7_RECIP_INFO *p7ri;
    X509 *x509;

    x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */
    GetPKCS7ri(self, p7ri);
    if (!PKCS7_RECIP_INFO_set(p7ri, x509)) {
	ossl_raise(ePKCS7Error, NULL);
    }

    return self;
}