diff options
author | Matt Johnston <matt@ucc.asn.au> | 2018-01-25 21:55:25 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2018-01-25 21:55:25 +0800 |
commit | a962408209de19f7e363104be3d379b2faa8078f (patch) | |
tree | 0bf3175edefc24504fa5beb818775e4fe5a73534 /svr-authpubkey.c | |
parent | 4a7467b7374ea59f04dfc31b7aa8647d8b5e3c45 (diff) | |
parent | 2d3dbea54538277663f55515cac3d27ce16f0559 (diff) | |
download | dropbear-a962408209de19f7e363104be3d379b2faa8078f.tar.gz |
Merge pull request #49 from fperrad/20170812_lint
Some linting, const parameters
Diffstat (limited to 'svr-authpubkey.c')
-rw-r--r-- | svr-authpubkey.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/svr-authpubkey.c b/svr-authpubkey.c index 1c8b088..8905ac9 100644 --- a/svr-authpubkey.c +++ b/svr-authpubkey.c @@ -70,11 +70,11 @@ #define MIN_AUTHKEYS_LINE 10 /* "ssh-rsa AB" - short but doesn't matter */ #define MAX_AUTHKEYS_LINE 4200 /* max length of a line in authkeys */ -static int checkpubkey(char* algo, unsigned int algolen, - unsigned char* keyblob, unsigned int keybloblen); +static int checkpubkey(const char* algo, unsigned int algolen, + const unsigned char* keyblob, unsigned int keybloblen); static int checkpubkeyperms(void); -static void send_msg_userauth_pk_ok(char* algo, unsigned int algolen, - unsigned char* keyblob, unsigned int keybloblen); +static void send_msg_userauth_pk_ok(const char* algo, unsigned int algolen, + const unsigned char* keyblob, unsigned int keybloblen); static int checkfileperm(char * filename); /* process a pubkey auth request, sending success or failure message as @@ -173,8 +173,8 @@ out: /* Reply that the key is valid for auth, this is sent when the user sends * a straight copy of their pubkey to test, to avoid having to perform * expensive signing operations with a worthless key */ -static void send_msg_userauth_pk_ok(char* algo, unsigned int algolen, - unsigned char* keyblob, unsigned int keybloblen) { +static void send_msg_userauth_pk_ok(const char* algo, unsigned int algolen, + const unsigned char* keyblob, unsigned int keybloblen) { TRACE(("enter send_msg_userauth_pk_ok")) CHECKCLEARTOWRITE(); @@ -188,7 +188,7 @@ static void send_msg_userauth_pk_ok(char* algo, unsigned int algolen, } -static int checkpubkey_line(buffer* line, int line_num, char* filename, +static int checkpubkey_line(buffer* line, int line_num, const char* filename, const char* algo, unsigned int algolen, const unsigned char* keyblob, unsigned int keybloblen) { buffer *options_buf = NULL; @@ -292,8 +292,8 @@ out: /* Checks whether a specified publickey (and associated algorithm) is an * acceptable key for authentication */ /* Returns DROPBEAR_SUCCESS if key is ok for auth, DROPBEAR_FAILURE otherwise */ -static int checkpubkey(char* algo, unsigned int algolen, - unsigned char* keyblob, unsigned int keybloblen) { +static int checkpubkey(const char* algo, unsigned int algolen, + const unsigned char* keyblob, unsigned int keybloblen) { FILE * authfile = NULL; char * filename = NULL; |