summaryrefslogtreecommitdiffhomepage
path: root/keyimport.c
diff options
context:
space:
mode:
authorGaël PORTAY <gael.portay@gmail.com>2015-05-02 11:37:37 +0200
committerGaël PORTAY <gael.portay@gmail.com>2015-05-05 20:30:49 +0200
commit897da4ee36a47f4b1757590d92b5747a0267cf01 (patch)
tree6896f562a8cd779e427f54476d11ad2805922be2 /keyimport.c
parent90f9f433355179db5dc4b7a7c6326986af11924d (diff)
Uses k_size as an signed integer
buf_incrwritepos() and mp_to_unsigned_bin() functions use k_size as signed integer argument. k_size is also used in an assertion that compared it to curve_size which is a signed long. Only buf_getwriteptr() is using k_size as unsigned. So it safe to use it as signed.
Diffstat (limited to 'keyimport.c')
-rw-r--r--keyimport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/keyimport.c b/keyimport.c
index 8a0d525..d8c0f5c 100644
--- a/keyimport.c
+++ b/keyimport.c
@@ -1043,7 +1043,7 @@ static int openssh_write(const char *filename, sign_key *key,
int curve_oid_len = 0;
const void* curve_oid = NULL;
unsigned long pubkey_size = 2*curve_size+1;
- unsigned int k_size;
+ int k_size;
int err = 0;
/* version. less than 10 bytes */