summaryrefslogtreecommitdiffstats
path: root/crypto/cms
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2013-11-07 03:55:49 +0000
committerDr. Stephen Henson <steve@openssl.org>2013-11-09 15:09:22 +0000
commit233069f8db1fefda2d67512792b4350abea89802 (patch)
tree988df5a38b3a317280aa36a8aa88e5ad9ecfc971 /crypto/cms
parentc76d6922b187dbfc24693743fde5c0b47ab4c88b (diff)
Add CMS_SignerInfo_get0_signature function.
Add function to retrieve the signature from a CMS_SignerInfo structure: applications can then read or modify it. (cherry picked from commit e8df6cec4c09b9a94c4c07abcf0402d31ec82cc1)
Diffstat (limited to 'crypto/cms')
-rw-r--r--crypto/cms/cms.h1
-rw-r--r--crypto/cms/cms_sd.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/crypto/cms/cms.h b/crypto/cms/cms.h
index 8b1d29f0c1..4b36a69c4f 100644
--- a/crypto/cms/cms.h
+++ b/crypto/cms/cms.h
@@ -275,6 +275,7 @@ int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
unsigned int flags);
void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk, X509 **signer,
X509_ALGOR **pdig, X509_ALGOR **psig);
+ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
int CMS_SignerInfo_sign(CMS_SignerInfo *si);
int CMS_SignerInfo_verify(CMS_SignerInfo *si);
int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain);
diff --git a/crypto/cms/cms_sd.c b/crypto/cms/cms_sd.c
index 16bdaf890d..28ce6a7639 100644
--- a/crypto/cms/cms_sd.c
+++ b/crypto/cms/cms_sd.c
@@ -616,6 +616,11 @@ void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk, X509 **signer,
*psig = si->signatureAlgorithm;
}
+ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si)
+ {
+ return si->signature;
+ }
+
static int cms_SignerInfo_content_sign(CMS_ContentInfo *cms,
CMS_SignerInfo *si, BIO *chain)
{