summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2019-06-12 19:52:39 +0200
committerTomas Mraz <tmraz@fedoraproject.org>2020-05-27 13:16:30 +0200
commit9e3c510bde91350c5a40b7ba4e9e0945895e9368 (patch)
tree1720a2cfea2ffded3a4e374e2c6e110f2499dbc4 /include/crypto
parentf7f53d7d61bba235b8babf4cf580114d74183e3e (diff)
crypto/cms: add CAdES-BES signed attributes validation
for signing certificate V2 and signing certificate extensions. CAdES: lowercase name for now internal methods. crypto/cms: generated file changes. Add some CHANGES entries. [extended tests] Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/8098)
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/cms.h10
-rw-r--r--include/crypto/ess.h6
2 files changed, 14 insertions, 2 deletions
diff --git a/include/crypto/cms.h b/include/crypto/cms.h
index c630991d68..67263fa886 100644
--- a/include/crypto/cms.h
+++ b/include/crypto/cms.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -7,7 +7,15 @@
* https://www.openssl.org/source/license.html
*/
+#ifndef OPENSSL_NO_CMS
+
/* internal CMS-ESS related stuff */
int cms_add1_signing_cert(CMS_SignerInfo *si, ESS_SIGNING_CERT *sc);
int cms_add1_signing_cert_v2(CMS_SignerInfo *si, ESS_SIGNING_CERT_V2 *sc);
+
+int cms_signerinfo_get_signing_cert_v2(CMS_SignerInfo *si,
+ ESS_SIGNING_CERT_V2 **psc);
+int cms_signerinfo_get_signing_cert(CMS_SignerInfo *si,
+ ESS_SIGNING_CERT **psc);
+#endif
diff --git a/include/crypto/ess.h b/include/crypto/ess.h
index ac6c5c61d7..6ae9a8180b 100644
--- a/include/crypto/ess.h
+++ b/include/crypto/ess.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -24,6 +24,10 @@ ESS_SIGNING_CERT_V2 *ESS_SIGNING_CERT_V2_new_init(const EVP_MD *hash_alg,
STACK_OF(X509) *certs,
int issuer_needed);
+/* Returns < 0 if certificate is not found, certificate index otherwise. */
+int ess_find_cert_v2(const STACK_OF(ESS_CERT_ID_V2) *cert_ids, const X509 *cert);
+int ess_find_cert(const STACK_OF(ESS_CERT_ID) *cert_ids, X509 *cert);
+
/*-
* IssuerSerial ::= SEQUENCE {
* issuer GeneralNames,