comparison keyimport.c @ 1754:064f5be2fc45

Add buf_decrpos()
author Matt Johnston <matt@ucc.asn.au>
date Sat, 24 Oct 2020 18:56:45 +0800
parents 1051e4eea25a
children 3e0aacf0a4f3
comparison
equal deleted inserted replaced
1753:7c0fcd19e492 1754:064f5be2fc45
635 #if DROPBEAR_ED25519 635 #if DROPBEAR_ED25519
636 if (type == DROPBEAR_SIGNKEY_ED25519) { 636 if (type == DROPBEAR_SIGNKEY_ED25519) {
637 buf_incrpos(blobbuf, 8); 637 buf_incrpos(blobbuf, 8);
638 buf_eatstring(blobbuf); 638 buf_eatstring(blobbuf);
639 buf_eatstring(blobbuf); 639 buf_eatstring(blobbuf);
640 buf_incrpos(blobbuf, -SSH_SIGNKEY_ED25519_LEN-4); 640 buf_decrpos(blobbuf, SSH_SIGNKEY_ED25519_LEN+4);
641 if (buf_get_ed25519_priv_key(blobbuf, retkey->ed25519key) 641 if (buf_get_ed25519_priv_key(blobbuf, retkey->ed25519key)
642 == DROPBEAR_SUCCESS) { 642 == DROPBEAR_SUCCESS) {
643 errmsg = NULL; 643 errmsg = NULL;
644 retval = retkey; 644 retval = retkey;
645 goto error; 645 goto error;