Skip to content

Commit

Permalink
Handle sk-ecdsa keys in buf_put_pub_key()
Browse files Browse the repository at this point in the history
If a ecdsa SK auth key was used by a client, dbclient would fail

exited: Bad key types in buf_put_pub_key

Fixes: 5edd2ce ("Implement server-side support for sk-ecdsa U2F-backed keys (#142)")
  • Loading branch information
mkj committed Jan 10, 2025
1 parent 7e1b2db commit 6ae4df7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/signkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,11 @@ void buf_put_pub_key(buffer* buf, sign_key *key, enum signkey_type type) {
}
#endif
#if DROPBEAR_ECDSA
if (signkey_is_ecdsa(type)) {
if (signkey_is_ecdsa(type)
#if DROPBEAR_SK_ECDSA
|| type == DROPBEAR_SIGNKEY_SK_ECDSA_NISTP256
#endif
) {
ecc_key **eck = (ecc_key**)signkey_key_ptr(key, type);
if (eck && *eck) {
buf_put_ecdsa_pub_key(pubkeys, *eck);
Expand Down

0 comments on commit 6ae4df7

Please sign in to comment.