Class: OpenSSL::PKCS7::RecipientInfo (Ruby 2.5.7)
Description: Class : OpenSSL::PKCS7::RecipientInfo - Ruby 2.5.7

### Home Classes Methods

### In Files

- openssl/ossl_pkcs7.c

### Parent

Object

### Methods

- ::new
- #enc_key
- #issuer
- #serial

### Class/Module Index

Quicksearch

- IO
- IO::WaitReadable
- IO::WaitWritable
- Integer
- OpenSSL
- OpenSSL::ASN1
- OpenSSL::ASN1::ASN1Data
- OpenSSL::ASN1::ASN1Error
- OpenSSL::ASN1::Constructive
- OpenSSL::ASN1::ObjectId
- OpenSSL::ASN1::Primitive
- OpenSSL::BN
- OpenSSL::BNError
- OpenSSL::Buffering
- OpenSSL::Cipher
- OpenSSL::Cipher::Cipher
- OpenSSL::Cipher::CipherError
- OpenSSL::Config
- OpenSSL::ConfigError
- OpenSSL::Digest
- OpenSSL::Digest::DigestError
- OpenSSL::Engine
- OpenSSL::Engine::EngineError
- OpenSSL::ExtConfig
- OpenSSL::HMAC
- OpenSSL::HMACError
- OpenSSL::KDF
- OpenSSL::KDF::KDFError
- OpenSSL::Netscape
- OpenSSL::Netscape::SPKI
- OpenSSL::Netscape::SPKIError
- OpenSSL::OCSP
- OpenSSL::OCSP::BasicResponse
- OpenSSL::OCSP::CertificateId
- OpenSSL::OCSP::OCSPError
- OpenSSL::OCSP::Request
- OpenSSL::OCSP::Response
- OpenSSL::OCSP::SingleResponse
- OpenSSL::OpenSSLError
- OpenSSL::PKCS12
- OpenSSL::PKCS12::PKCS12Error
- OpenSSL::PKCS5
- OpenSSL::PKCS7
- OpenSSL::PKCS7::PKCS7Error
- OpenSSL::PKCS7::RecipientInfo
- OpenSSL::PKCS7::SignerInfo
- OpenSSL::PKey
- OpenSSL::PKey::DH
- OpenSSL::PKey::DHError
- OpenSSL::PKey::DSA
- OpenSSL::PKey::DSAError
- OpenSSL::PKey::EC
- OpenSSL::PKey::EC::Group
- OpenSSL::PKey::EC::Group::Error
- OpenSSL::PKey::EC::Point
- OpenSSL::PKey::EC::Point::Error
- OpenSSL::PKey::ECError
- OpenSSL::PKey::PKey
- OpenSSL::PKey::PKeyError
- OpenSSL::PKey::RSA
- OpenSSL::PKey::RSAError
- OpenSSL::Random
- OpenSSL::Random::RandomError
- OpenSSL::SSL
- OpenSSL::SSL::SSLContext
- OpenSSL::SSL::SSLError
- OpenSSL::SSL::SSLErrorWaitReadable
- OpenSSL::SSL::SSLErrorWaitWritable
- OpenSSL::SSL::SSLServer
- OpenSSL::SSL::SSLSocket
- OpenSSL::SSL::Session
- OpenSSL::SSL::Session::SessionError
- OpenSSL::SSL::SocketForwarder
- OpenSSL::X509
- OpenSSL::X509::Attribute
- OpenSSL::X509::AttributeError
- OpenSSL::X509::CRL
- OpenSSL::X509::CRLError
- OpenSSL::X509::Certificate
- OpenSSL::X509::CertificateError
- OpenSSL::X509::Extension
- OpenSSL::X509::ExtensionError
- OpenSSL::X509::ExtensionFactory
- OpenSSL::X509::Name
- OpenSSL::X509::Name::RFC2253DN
- OpenSSL::X509::NameError
- OpenSSL::X509::Request
- OpenSSL::X509::RequestError
- OpenSSL::X509::Revoked
- OpenSSL::X509::RevokedError
- OpenSSL::X509::Store
- OpenSSL::X509::StoreContext
- OpenSSL::X509::StoreError

No matching classes.

# OpenSSL::PKCS7::RecipientInfo

### Public Class Methods

new(p1) click to toggle source

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

### Public Instance Methods

enc_key() click to toggle source

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

        GetPKCS7ri(self, p7ri);

        return asn1str_to_str(p7ri->enc_key);
    }

issuer() click to toggle source

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

        GetPKCS7ri(self, p7ri);

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

serial() click to toggle source

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

        GetPKCS7ri(self, p7ri);

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