diff options
author | Emilia Kasper <emilia@openssl.org> | 2016-06-09 23:09:48 +0200 |
---|---|---|
committer | Emilia Kasper <emilia@openssl.org> | 2016-06-20 14:58:36 +0200 |
commit | 9267c11bb5d408e43482173794f08a3c8472afba (patch) | |
tree | 172336307a646ab33854a51627192f3307eb6545 /include | |
parent | rand/randfile.c: remove obsolete commentary. (diff) | |
download | openssl-9267c11bb5d408e43482173794f08a3c8472afba.tar.xz openssl-9267c11bb5d408e43482173794f08a3c8472afba.zip |
Make DSA_SIG and ECDSA_SIG getters const.
Reorder arguments to follow convention.
Also allow r/s to be NULL in DSA_SIG_get0, similarly to ECDSA_SIG_get0.
This complements GH1193 which adds non-const setters.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/dsa.h | 2 | ||||
-rw-r--r-- | include/openssl/ec.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/openssl/dsa.h b/include/openssl/dsa.h index 0c5196d08a..90f2eae7ce 100644 --- a/include/openssl/dsa.h +++ b/include/openssl/dsa.h @@ -81,7 +81,7 @@ DSA_SIG *DSA_SIG_new(void); void DSA_SIG_free(DSA_SIG *a); int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp); DSA_SIG *d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length); -void DSA_SIG_get0(BIGNUM **pr, BIGNUM **ps, const DSA_SIG *sig); +void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s); DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa); diff --git a/include/openssl/ec.h b/include/openssl/ec.h index b5bd83d9a9..ef105b2415 100644 --- a/include/openssl/ec.h +++ b/include/openssl/ec.h @@ -1076,7 +1076,7 @@ ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len); * \param pr pointer to BIGNUM pointer for r (may be NULL) * \param ps pointer to BIGNUM pointer for s (may be NULL) */ -void ECDSA_SIG_get0(BIGNUM **pr, BIGNUM **ps, const ECDSA_SIG *sig); +void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); /** Setter for r and s fields of ECDSA_SIG * \param sig pointer to ECDSA_SIG pointer |