diff options
author | Richard Levitte <levitte@openssl.org> | 2016-06-14 15:48:16 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-06-15 20:09:27 +0200 |
commit | fd809cfdbd6e32b6b67b68c59f6d55fbed7a9327 (patch) | |
tree | 59cd0002b3161e2892f3f06aeb509d897453c38f /include | |
parent | 9c1a9ccf65d0ea1912675d3a622fa8e51b524b9e (diff) |
Constify the parameter getters for RSA, DSA and DH
Including documentation changes
Reviewed-by: Stephen Henson <steve@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/dh.h | 6 | ||||
-rw-r--r-- | include/openssl/dsa.h | 6 | ||||
-rw-r--r-- | include/openssl/rsa.h | 8 |
3 files changed, 13 insertions, 7 deletions
diff --git a/include/openssl/dh.h b/include/openssl/dh.h index 2eb596d2ba..a574e1871e 100644 --- a/include/openssl/dh.h +++ b/include/openssl/dh.h @@ -151,9 +151,11 @@ int DH_KDF_X9_42(unsigned char *out, size_t outlen, const unsigned char *ukm, size_t ukmlen, const EVP_MD *md); # endif -void DH_get0_pqg(const DH *dh, BIGNUM **p, BIGNUM **q, BIGNUM **g); +void DH_get0_pqg(const DH *dh, + const BIGNUM **p, const BIGNUM **q, const BIGNUM **g); int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); -void DH_get0_key(const DH *dh, BIGNUM **pub_key, BIGNUM **priv_key); +void DH_get0_key(const DH *dh, + const BIGNUM **pub_key, const BIGNUM **priv_key); int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); void DH_clear_flags(DH *dh, int flags); int DH_test_flags(const DH *dh, int flags); diff --git a/include/openssl/dsa.h b/include/openssl/dsa.h index ce1346c2f0..0c5196d08a 100644 --- a/include/openssl/dsa.h +++ b/include/openssl/dsa.h @@ -169,9 +169,11 @@ DH *DSA_dup_DH(const DSA *r); # define EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS (EVP_PKEY_ALG_CTRL + 2) # define EVP_PKEY_CTRL_DSA_PARAMGEN_MD (EVP_PKEY_ALG_CTRL + 3) -void DSA_get0_pqg(const DSA *d, BIGNUM **p, BIGNUM **q, BIGNUM **g); +void DSA_get0_pqg(const DSA *d, + const BIGNUM **p, const BIGNUM **q, const BIGNUM **g); int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g); -void DSA_get0_key(const DSA *d, BIGNUM **pub_key, BIGNUM **priv_key); +void DSA_get0_key(const DSA *d, + const BIGNUM **pub_key, const BIGNUM **priv_key); int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); void DSA_clear_flags(DSA *d, int flags); int DSA_test_flags(const DSA *d, int flags); diff --git a/include/openssl/rsa.h b/include/openssl/rsa.h index 4b82081d93..70d3755124 100644 --- a/include/openssl/rsa.h +++ b/include/openssl/rsa.h @@ -178,10 +178,12 @@ int RSA_security_bits(const RSA *rsa); int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q); int RSA_set0_crt_params(RSA *r,BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp); -void RSA_get0_key(const RSA *r, BIGNUM **n, BIGNUM **e, BIGNUM **d); -void RSA_get0_factors(const RSA *r, BIGNUM **p, BIGNUM **q); +void RSA_get0_key(const RSA *r, + const BIGNUM **n, const BIGNUM **e, const BIGNUM **d); +void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q); void RSA_get0_crt_params(const RSA *r, - BIGNUM **dmp1, BIGNUM **dmq1, BIGNUM **iqmp); + const BIGNUM **dmp1, const BIGNUM **dmq1, + const BIGNUM **iqmp); void RSA_clear_flags(RSA *r, int flags); int RSA_test_flags(const RSA *r, int flags); void RSA_set_flags(RSA *r, int flags); |