# HG changeset patch # User Matt Johnston # Date 1403710664 -28800 # Node ID 25692c60479eb4cc8ec4643b6a1c033c769db1c6 # Parent 68723d66dec64e296f5826a9b86e1bbce8ce926e Fix compiling with ECDSA and DSS disabled diff -r 68723d66dec6 -r 25692c60479e keyimport.c --- a/keyimport.c Tue May 20 21:21:02 2014 +0800 +++ b/keyimport.c Wed Jun 25 23:37:44 2014 +0800 @@ -602,13 +602,18 @@ */ blobbuf = buf_new(3000); +#ifdef DROPBEAR_DSS if (key->type == OSSH_DSA) { buf_putstring(blobbuf, "ssh-dss", 7); retkey->type = DROPBEAR_SIGNKEY_DSS; - } else if (key->type == OSSH_RSA) { + } +#endif +#ifdef DROPBEAR_RSA + if (key->type == OSSH_RSA) { buf_putstring(blobbuf, "ssh-rsa", 7); retkey->type = DROPBEAR_SIGNKEY_RSA; } +#endif for (i = 0; i < num_integers; i++) { ret = ber_read_id_len(p, key->keyblob+key->keyblob_len-p, @@ -831,7 +836,14 @@ mp_int dmp1, dmq1, iqmp, tmpval; /* for rsa */ #endif - if (key->type == DROPBEAR_SIGNKEY_RSA || key->type == DROPBEAR_SIGNKEY_DSS) + if ( +#ifdef DROPBEAR_RSA + key->type == DROPBEAR_SIGNKEY_RSA || +#endif +#ifdef DROPBEAR_DSS + key->type == DROPBEAR_SIGNKEY_DSS || +#endif + 0) { /* * Fetch the key blobs. diff -r 68723d66dec6 -r 25692c60479e signkey.c --- a/signkey.c Tue May 20 21:21:02 2014 +0800 +++ b/signkey.c Wed Jun 25 23:37:44 2014 +0800 @@ -106,6 +106,7 @@ void ** signkey_key_ptr(sign_key *key, enum signkey_type type) { switch (type) { +#ifdef DROPBEAR_ECDSA #ifdef DROPBEAR_ECC_256 case DROPBEAR_SIGNKEY_ECDSA_NISTP256: return (void**)&key->ecckey256; @@ -118,6 +119,7 @@ case DROPBEAR_SIGNKEY_ECDSA_NISTP521: return (void**)&key->ecckey521; #endif +#endif /* DROPBEAR_ECDSA */ #ifdef DROPBEAR_RSA case DROPBEAR_SIGNKEY_RSA: return (void**)&key->rsakey;