summaryrefslogtreecommitdiffhomepage
path: root/dss.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2018-01-25 21:55:25 +0800
committerGitHub <noreply@github.com>2018-01-25 21:55:25 +0800
commite64e25e4d69ddb8f1c7fb8bbdcd09817cae4ca55 (patch)
tree679ecdd500c6355f7b11dbef36c66906065a8ee2 /dss.c
parentba23b823dcec4203dcee59204f0a7dac1a390d96 (diff)
parent598056d1686127285c389cacbdd20707c350d05a (diff)
Merge pull request #49 from fperrad/20170812_lint
Some linting, const parameters
Diffstat (limited to 'dss.c')
-rw-r--r--dss.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dss.c b/dss.c
index 9024b80..1d66d38 100644
--- a/dss.c
+++ b/dss.c
@@ -127,7 +127,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);
@@ -139,7 +139,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);
@@ -150,7 +150,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;
@@ -255,7 +255,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;