summaryrefslogtreecommitdiffstats
path: root/crypto/pem/pem_sign.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-11-15 08:54:17 +0100
committerRichard Levitte <levitte@openssl.org>2019-11-18 02:34:12 +0100
commitde0799b0fc845869d775520382b4e7f9995732e5 (patch)
treefbe29de0651a1a2399089f25ed9b1266f7b56bd6 /crypto/pem/pem_sign.c
parent97a986f78289fef71bf8778dc4763458e983750c (diff)
PEM: constify PEM_write_ routines
There's no reason why the object to be written, or the key string given by the caller should be non-const. This makes the IMPLEMENT_PEM_..._const and DECLARE_PEM_..._const macros superfluous, so we keep them around but mark them deprecated. In all places where IMPLEMENT_PEM_..._const and DECLARE_PEM_..._const are used, they are replaced with the corresponding macros without '_const'. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10452)
Diffstat (limited to 'crypto/pem/pem_sign.c')
-rw-r--r--crypto/pem/pem_sign.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/pem/pem_sign.c b/crypto/pem/pem_sign.c
index 4be03a4794..c12afd5c3b 100644
--- a/crypto/pem/pem_sign.c
+++ b/crypto/pem/pem_sign.c
@@ -19,7 +19,8 @@ int PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type)
return EVP_DigestInit_ex(ctx, type, NULL);
}
-int PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *data, unsigned int count)
+int PEM_SignUpdate(EVP_MD_CTX *ctx,
+ const unsigned char *data, unsigned int count)
{
return EVP_DigestUpdate(ctx, data, count);
}