summaryrefslogtreecommitdiffhomepage
path: root/svr-authpubkey.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-04-07 01:36:42 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-04-07 01:36:42 +0800
commitc6bdc810abab5b58aba26a7618c49f3dac58ebd6 (patch)
tree2594798a88e46aff08f0b350925b4a77eb0a6341 /svr-authpubkey.c
parenta8135dec1e8b9360274679c9ff89cb98cda87930 (diff)
ecc kind of works, needs fixing/testing
--HG-- branch : ecc
Diffstat (limited to 'svr-authpubkey.c')
-rw-r--r--svr-authpubkey.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/svr-authpubkey.c b/svr-authpubkey.c
index d483e9d..1c5f9d6 100644
--- a/svr-authpubkey.c
+++ b/svr-authpubkey.c
@@ -126,14 +126,13 @@ void svr_auth_pubkey() {
/* create the data which has been signed - this a string containing
* session_id, concatenated with the payload packet up to the signature */
signbuf = buf_new(ses.payload->pos + 4 + SHA1_HASH_SIZE);
- buf_putstring(signbuf, ses.session_id, SHA1_HASH_SIZE);
+ buf_putbufstring(signbuf, ses.session_id);
buf_putbytes(signbuf, ses.payload->data, ses.payload->pos);
buf_setpos(signbuf, 0);
/* ... and finally verify the signature */
fp = sign_key_fingerprint(keyblob, keybloblen);
- if (buf_verify(ses.payload, key, buf_getptr(signbuf, signbuf->len),
- signbuf->len) == DROPBEAR_SUCCESS) {
+ if (buf_verify(ses.payload, key, signbuf) == DROPBEAR_SUCCESS) {
dropbear_log(LOG_NOTICE,
"Pubkey auth succeeded for '%s' with key %s from %s",
ses.authstate.pw_name, fp, svr_ses.addrstring);