diff options
author | David von Oheimb <David.von.Oheimb@siemens.com> | 2019-01-15 21:51:25 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2019-03-06 16:10:09 +0000 |
commit | 9fdcc21fdc9d148f78d9cd5be34030f38cc45812 (patch) | |
tree | 20cba464edf2befc97c1888631dd782cba830c89 /crypto/dh | |
parent | 27d5631236325c3fd8a3bd06af282ac496aac64b (diff) |
constify *_dup() and *i2d_*() and related functions as far as possible, introducing DECLARE_ASN1_DUP_FUNCTION
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8029)
Diffstat (limited to 'crypto/dh')
-rw-r--r-- | crypto/dh/dh_ameth.c | 2 | ||||
-rw-r--r-- | crypto/dh/dh_asn1.c | 4 | ||||
-rw-r--r-- | crypto/dh/dh_pmeth.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c index e9eace149c..1424c41abe 100644 --- a/crypto/dh/dh_ameth.c +++ b/crypto/dh/dh_ameth.c @@ -418,7 +418,7 @@ static int int_dh_param_copy(DH *to, const DH *from, int is_x942) return 1; } -DH *DHparams_dup(DH *dh) +DH *DHparams_dup(const DH *dh) { DH *ret; ret = DH_new(); diff --git a/crypto/dh/dh_asn1.c b/crypto/dh/dh_asn1.c index 89acc7dc0c..aabdfa8360 100644 --- a/crypto/dh/dh_asn1.c +++ b/crypto/dh/dh_asn1.c @@ -37,7 +37,7 @@ ASN1_SEQUENCE_cb(DHparams, dh_cb) = { ASN1_OPT_EMBED(DH, length, ZINT32), } ASN1_SEQUENCE_END_cb(DH, DHparams) -IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(DH, DHparams, DHparams) +IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(DH, DHparams, DHparams) /* * Internal only structures for handling X9.42 DH: this gets translated to or @@ -74,7 +74,7 @@ int_dhx942_dh *d2i_int_dhx(int_dhx942_dh **a, const unsigned char **pp, long length); int i2d_int_dhx(const int_dhx942_dh *a, unsigned char **pp); -IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(int_dhx942_dh, DHxparams, int_dhx) +IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(int_dhx942_dh, DHxparams, int_dhx) /* Application public function: read in X9.42 DH parameters into DH structure */ diff --git a/crypto/dh/dh_pmeth.c b/crypto/dh/dh_pmeth.c index 309a176bd5..3497915292 100644 --- a/crypto/dh/dh_pmeth.c +++ b/crypto/dh/dh_pmeth.c @@ -77,7 +77,7 @@ static void pkey_dh_cleanup(EVP_PKEY_CTX *ctx) } -static int pkey_dh_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src) +static int pkey_dh_copy(EVP_PKEY_CTX *dst, const EVP_PKEY_CTX *src) { DH_PKEY_CTX *dctx, *sctx; if (!pkey_dh_init(dst)) |