Class: OpenSSL::PKCS7::RecipientInfo

Inherits:
Object
  • Object
show all
Defined in:
ossl_pkcs7.c

Instance Method Summary collapse

Constructor Details

#initializeObject


932
933
934
935
936
937
938
939
940
941
942
943
944
945
# File 'ossl_pkcs7.c', line 932

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;
}

Instance Method Details

#enc_keyObject


967
968
969
970
971
972
973
974
975
# File 'ossl_pkcs7.c', line 967

static VALUE
ossl_pkcs7ri_get_enc_key(VALUE self)
{
    PKCS7_RECIP_INFO *p7ri;

    GetPKCS7ri(self, p7ri);

    return asn1str_to_str(p7ri->enc_key);
}

#issuerObject


947
948
949
950
951
952
953
954
955
# File 'ossl_pkcs7.c', line 947

static VALUE
ossl_pkcs7ri_get_issuer(VALUE self)
{
    PKCS7_RECIP_INFO *p7ri;

    GetPKCS7ri(self, p7ri);

    return ossl_x509name_new(p7ri->issuer_and_serial->issuer);
}

#serialObject


957
958
959
960
961
962
963
964
965
# File 'ossl_pkcs7.c', line 957

static VALUE
ossl_pkcs7ri_get_serial(VALUE self)
{
    PKCS7_RECIP_INFO *p7ri;

    GetPKCS7ri(self, p7ri);

    return asn1integer_to_num(p7ri->issuer_and_serial->serial);
}