crypto/cms: Add support for CAdES Basic Electronic Signatures (CAdES-BES)
authorAntonio Iacono <antiac@gmail.com>
Wed, 12 Dec 2018 22:08:49 +0000 (23:08 +0100)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Sun, 27 Jan 2019 22:59:21 +0000 (23:59 +0100)
commite85d19c68e7fb3302410bd72d434793e5c0c23a0
tree748f849bfd79db2cc7b35e5c215f4ed8794cbe62
parent9f5a87fd665cb597fa1c1f4eef882d2d2f833e61
crypto/cms: Add support for CAdES Basic Electronic Signatures (CAdES-BES)

A CAdES Basic Electronic Signature (CAdES-BES) contains, among other
specifications, a collection of  Signing Certificate reference attributes,
stored in the signedData ether as ESS signing-certificate or as
ESS signing-certificate-v2. These are described in detail in Section 5.7.2
of RFC 5126 - CMS Advanced Electronic Signatures (CAdES).

This patch adds support for adding  ESS signing-certificate[-v2] attributes
to CMS signedData. Although it implements only a small part of the RFC, it
is sufficient many cases to enable the `openssl cms` app to create signatures
which comply with legal requirements of some European States (e.g Italy).

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/7893)
30 files changed:
apps/cms.c
crypto/build.info
crypto/cms/cms_err.c
crypto/cms/cms_ess.c
crypto/cms/cms_sd.c
crypto/err/err.c
crypto/err/err_all.c
crypto/err/openssl.ec
crypto/err/openssl.txt
crypto/ess/build.info [new file with mode: 0644]
crypto/ess/ess_asn1.c [new file with mode: 0644]
crypto/ess/ess_err.c [new file with mode: 0644]
crypto/ess/ess_lib.c [new file with mode: 0644]
crypto/include/internal/ess_int.h [new file with mode: 0644]
crypto/ts/ts_asn1.c
crypto/ts/ts_err.c
crypto/ts/ts_lcl.h
crypto/ts/ts_rsp_sign.c
crypto/ts/ts_rsp_verify.c
doc/man1/cms.pod
doc/man3/CMS_add1_signing_cert.pod [new file with mode: 0644]
include/openssl/cms.h
include/openssl/cmserr.h
include/openssl/err.h
include/openssl/ess.h [new file with mode: 0644]
include/openssl/esserr.h [new file with mode: 0644]
include/openssl/ts.h
include/openssl/tserr.h
test/recipes/80-test_cms.t
util/libcrypto.num