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:23 +0000
commitda15c6160836f5852ff1d1132d76f124327121ba (patch)
tree961c869e18fe74e1972edf47f9362ce6235122f9 /crypto/cms
parent534e5fabadb18901daeff79f3a450d1b612880bd (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.
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 06a4a25ae3..e8b2e1f889 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)
{