Mercurial > dropbear
comparison signkey.c @ 1256:506f7681d0f8 coverity
merge up to date
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 15 Mar 2016 22:45:43 +0800 |
parents | 55d485943eb0 |
children | 0c47d97aa9d5 |
comparison
equal
deleted
inserted
replaced
1219:84cf9062718d | 1256:506f7681d0f8 |
---|---|
91 TRACE(("attempt to use ecdsa type %d not compiled in", i)) | 91 TRACE(("attempt to use ecdsa type %d not compiled in", i)) |
92 return DROPBEAR_SIGNKEY_NONE; | 92 return DROPBEAR_SIGNKEY_NONE; |
93 } | 93 } |
94 #endif | 94 #endif |
95 | 95 |
96 return i; | 96 return (enum signkey_type)i; |
97 } | 97 } |
98 } | 98 } |
99 | 99 |
100 TRACE(("signkey_type_from_name unexpected key type.")) | 100 TRACE(("signkey_type_from_name unexpected key type.")) |
101 | 101 |
315 TRACE(("type is %d", type)) | 315 TRACE(("type is %d", type)) |
316 | 316 |
317 #ifdef DROPBEAR_DSS | 317 #ifdef DROPBEAR_DSS |
318 if (type == DROPBEAR_SIGNKEY_DSS) { | 318 if (type == DROPBEAR_SIGNKEY_DSS) { |
319 buf_put_dss_priv_key(buf, key->dsskey); | 319 buf_put_dss_priv_key(buf, key->dsskey); |
320 TRACE(("leave buf_put_priv_key: dss done")) | 320 TRACE(("leave buf_put_priv_key: dss done")) |
321 return; | 321 return; |
322 } | 322 } |
323 #endif | 323 #endif |
324 #ifdef DROPBEAR_RSA | 324 #ifdef DROPBEAR_RSA |
325 if (type == DROPBEAR_SIGNKEY_RSA) { | 325 if (type == DROPBEAR_SIGNKEY_RSA) { |
326 buf_put_rsa_priv_key(buf, key->rsakey); | 326 buf_put_rsa_priv_key(buf, key->rsakey); |
327 TRACE(("leave buf_put_priv_key: rsa done")) | 327 TRACE(("leave buf_put_priv_key: rsa done")) |
328 return; | 328 return; |
329 } | 329 } |
330 #endif | 330 #endif |
331 #ifdef DROPBEAR_ECDSA | 331 #ifdef DROPBEAR_ECDSA |
332 if (signkey_is_ecdsa(type)) { | 332 if (signkey_is_ecdsa(type)) { |
333 ecc_key **eck = (ecc_key**)signkey_key_ptr(key, type); | 333 ecc_key **eck = (ecc_key**)signkey_key_ptr(key, type); |