From: FdaSilvaYY Date: Sun, 19 Jun 2016 16:14:58 +0000 (+0200) Subject: Constify CMS_decrypt_set1_key input buffer X-Git-Tag: OpenSSL_1_1_0-pre6~106 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c17dd597ac5ac687b4cc7b585d7f8fb0cf987a20;p=oweals%2Fopenssl.git Constify CMS_decrypt_set1_key input buffer Reviewed-by: Matt Caswell Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/1300) --- 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);