New function to extract AlgorithmIdentifier for PKCS7_RECIP_INFO.
authorDr. Stephen Henson <steve@openssl.org>
Thu, 27 Apr 2006 00:29:50 +0000 (00:29 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 27 Apr 2006 00:29:50 +0000 (00:29 +0000)
crypto/pkcs7/pk7_lib.c
crypto/pkcs7/pkcs7.h

index 8c7f7aa..8b6c153 100644 (file)
@@ -444,6 +444,12 @@ void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
                *psig = si->digest_enc_alg;
        }
 
+void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc)
+       {
+       if (penc)
+               *penc = ri->key_enc_algor;
+       }
+
 PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509)
        {
        PKCS7_RECIP_INFO *ri;
index 201cf4b..3259eeb 100644 (file)
@@ -342,6 +342,7 @@ STACK_OF(PKCS7_SIGNER_INFO) *PKCS7_get_signer_info(PKCS7 *p7);
 PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509);
 void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
                                        X509_ALGOR **pdig, X509_ALGOR **psig);
+void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc);
 int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri);
 int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509);
 int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher);