From c17dd597ac5ac687b4cc7b585d7f8fb0cf987a20 Mon Sep 17 00:00:00 2001 From: FdaSilvaYY Date: Sun, 19 Jun 2016 18:14:58 +0200 Subject: [PATCH] Constify CMS_decrypt_set1_key input buffer Reviewed-by: Matt Caswell Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/1300) --- crypto/cms/cms_smime.c | 2 +- include/openssl/cms.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/cms/cms_smime.c b/crypto/cms/cms_smime.c index 4a8f819f24..dbf7dd3a38 100644 --- a/crypto/cms/cms_smime.c +++ b/crypto/cms/cms_smime.c @@ -672,7 +672,7 @@ int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert) int CMS_decrypt_set1_key(CMS_ContentInfo *cms, unsigned char *key, size_t keylen, - unsigned char *id, size_t idlen) + const unsigned char *id, size_t idlen) { STACK_OF(CMS_RecipientInfo) *ris; CMS_RecipientInfo *ri; diff --git a/include/openssl/cms.h b/include/openssl/cms.h index dbc27e5562..85cebf0dc3 100644 --- a/include/openssl/cms.h +++ b/include/openssl/cms.h @@ -144,7 +144,7 @@ int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert, int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert); int CMS_decrypt_set1_key(CMS_ContentInfo *cms, unsigned char *key, size_t keylen, - unsigned char *id, size_t idlen); + const unsigned char *id, size_t idlen); int CMS_decrypt_set1_password(CMS_ContentInfo *cms, unsigned char *pass, ossl_ssize_t passlen);