diff options
author | Viktor Söderqvist <viktor.soderqvist@est.tech> | 2021-04-28 10:54:57 +0200 |
---|---|---|
committer | Todd Short <todd.short@me.com> | 2022-04-02 10:42:16 -0400 |
commit | 07342bad1bf850657e1a1f21188ee9a8a75e3a19 (patch) | |
tree | f9b918931dd10d5a1e58a3a7c039eb29b1e39a7c /include | |
parent | e4cdcb8bc44250aa4e0893dc4a7d64668f0fb949 (diff) |
CMS sign digest
CLI changes: New parameter -digest to CLI command openssl cms, to
provide pre-computed digest for use with -sign.
API changes: New function CMS_final_digest(), like CMS_final() but
uses a pre-computed digest instead of computing it from the data.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/15348)
Diffstat (limited to 'include')
-rw-r--r-- | include/crypto/cmserr.h | 2 | ||||
-rw-r--r-- | include/openssl/cms.h.in | 3 | ||||
-rw-r--r-- | include/openssl/cmserr.h | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/include/crypto/cmserr.h b/include/crypto/cmserr.h index 1de2f9c7d5..a7fcf11fa9 100644 --- a/include/crypto/cmserr.h +++ b/include/crypto/cmserr.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2020-2022 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 diff --git a/include/openssl/cms.h.in b/include/openssl/cms.h.in index da20ddf2f4..e77a9ade6a 100644 --- a/include/openssl/cms.h.in +++ b/include/openssl/cms.h.in @@ -119,6 +119,9 @@ int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags); int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont, unsigned int flags); +int CMS_final_digest(CMS_ContentInfo *cms, + const unsigned char *md, unsigned int mdlen, BIO *dcont, + unsigned int flags); CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, BIO *data, diff --git a/include/openssl/cmserr.h b/include/openssl/cmserr.h index 1c4f4c799d..e8fe9d519d 100644 --- a/include/openssl/cmserr.h +++ b/include/openssl/cmserr.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2022 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 @@ -86,6 +86,7 @@ # define CMS_R_NO_PUBLIC_KEY 134 # define CMS_R_NO_RECEIPT_REQUEST 168 # define CMS_R_NO_SIGNERS 135 +# define CMS_R_OPERATION_UNSUPPORTED 182 # define CMS_R_PEER_KEY_ERROR 188 # define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 136 # define CMS_R_RECEIPT_DECODE_ERROR 169 |