Mercurial > dropbear
comparison keyimport.c @ 847:f4bb964c8678 keyondemand
Add '-R' for delayed hostkey option
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 07 Nov 2013 23:49:37 +0800 |
parents | b298bb438625 |
children | 754d7bee1068 |
comparison
equal
deleted
inserted
replaced
846:b298bb438625 | 847:f4bb964c8678 |
---|---|
707 key->keyblob+key->keyblob_len-p < len) { | 707 key->keyblob+key->keyblob_len-p < len) { |
708 errmsg = "ASN.1 decoding failure"; | 708 errmsg = "ASN.1 decoding failure"; |
709 goto error; | 709 goto error; |
710 } | 710 } |
711 | 711 |
712 if (len == sizeof(OID_SEC256R1_BLOB) | 712 if (0) {} |
713 #ifdef DROPBEAR_ECC_256 | |
714 else if (len == sizeof(OID_SEC256R1_BLOB) | |
713 && memcmp(p, OID_SEC256R1_BLOB, len) == 0) { | 715 && memcmp(p, OID_SEC256R1_BLOB, len) == 0) { |
714 retkey->type = DROPBEAR_SIGNKEY_ECDSA_NISTP256; | 716 retkey->type = DROPBEAR_SIGNKEY_ECDSA_NISTP256; |
715 curve = &ecc_curve_nistp256; | 717 curve = &ecc_curve_nistp256; |
716 } else if (len == sizeof(OID_SEC384R1_BLOB) | 718 } |
719 #endif | |
720 #ifdef DROPBEAR_ECC_384 | |
721 else if (len == sizeof(OID_SEC384R1_BLOB) | |
717 && memcmp(p, OID_SEC384R1_BLOB, len) == 0) { | 722 && memcmp(p, OID_SEC384R1_BLOB, len) == 0) { |
718 retkey->type = DROPBEAR_SIGNKEY_ECDSA_NISTP384; | 723 retkey->type = DROPBEAR_SIGNKEY_ECDSA_NISTP384; |
719 curve = &ecc_curve_nistp384; | 724 curve = &ecc_curve_nistp384; |
720 } else if (len == sizeof(OID_SEC521R1_BLOB) | 725 } |
726 #endif | |
727 #ifdef DROPBEAR_ECC_521 | |
728 else if (len == sizeof(OID_SEC521R1_BLOB) | |
721 && memcmp(p, OID_SEC521R1_BLOB, len) == 0) { | 729 && memcmp(p, OID_SEC521R1_BLOB, len) == 0) { |
722 retkey->type = DROPBEAR_SIGNKEY_ECDSA_NISTP521; | 730 retkey->type = DROPBEAR_SIGNKEY_ECDSA_NISTP521; |
723 curve = &ecc_curve_nistp521; | 731 curve = &ecc_curve_nistp521; |
724 } else { | 732 } |
733 #endif | |
734 else { | |
725 errmsg = "Unknown ECC key type"; | 735 errmsg = "Unknown ECC key type"; |
726 goto error; | 736 goto error; |
727 } | 737 } |
728 p += len; | 738 p += len; |
729 | 739 |