diff options
author | Matt Johnston <matt@ucc.asn.au> | 2018-02-17 19:29:51 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2018-02-17 19:29:51 +0800 |
commit | 7e8094d53a1c01ac671156ff2e67157b64d01a3a (patch) | |
tree | c88345f5bdd118eb9414dff5ab5c307bb1806c57 /dss.c | |
parent | f7a664f127d3dfde0e7c7a9ca74b1d14f9a2f983 (diff) | |
parent | f042eb41ab0d31f8ba0c5ccc9c848ad01f08f986 (diff) | |
download | dropbear-7e8094d53a1c01ac671156ff2e67157b64d01a3a.tar.gz |
merge from main
--HG--
branch : fuzz
Diffstat (limited to 'dss.c')
-rw-r--r-- | dss.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -139,7 +139,7 @@ void dss_key_free(dropbear_dss_key *key) { * mpint g * mpint y */ -void buf_put_dss_pub_key(buffer* buf, dropbear_dss_key *key) { +void buf_put_dss_pub_key(buffer* buf, const dropbear_dss_key *key) { dropbear_assert(key != NULL); buf_putstring(buf, SSH_SIGNKEY_DSS, SSH_SIGNKEY_DSS_LEN); @@ -151,7 +151,7 @@ void buf_put_dss_pub_key(buffer* buf, dropbear_dss_key *key) { } /* Same as buf_put_dss_pub_key, but with the private "x" key appended */ -void buf_put_dss_priv_key(buffer* buf, dropbear_dss_key *key) { +void buf_put_dss_priv_key(buffer* buf, const dropbear_dss_key *key) { dropbear_assert(key != NULL); buf_put_dss_pub_key(buf, key); @@ -162,7 +162,7 @@ void buf_put_dss_priv_key(buffer* buf, dropbear_dss_key *key) { #if DROPBEAR_SIGNKEY_VERIFY /* Verify a DSS signature (in buf) made on data by the key given. * returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */ -int buf_dss_verify(buffer* buf, dropbear_dss_key *key, buffer *data_buf) { +int buf_dss_verify(buffer* buf, const dropbear_dss_key *key, const buffer *data_buf) { unsigned char msghash[SHA1_HASH_SIZE]; hash_state hs; int ret = DROPBEAR_FAILURE; @@ -280,7 +280,7 @@ out: /* Sign the data presented with key, writing the signature contents * to the buffer */ -void buf_put_dss_sign(buffer* buf, dropbear_dss_key *key, buffer *data_buf) { +void buf_put_dss_sign(buffer* buf, const dropbear_dss_key *key, const buffer *data_buf) { unsigned char msghash[SHA1_HASH_SIZE]; unsigned int writelen; unsigned int i; |