Mercurial > dropbear
comparison keyimport.c @ 935:25692c60479e
Fix compiling with ECDSA and DSS disabled
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 25 Jun 2014 23:37:44 +0800 |
parents | d2d624c951ca |
children | 4f65c867fc99 |
comparison
equal
deleted
inserted
replaced
934:68723d66dec6 | 935:25692c60479e |
---|---|
600 /* | 600 /* |
601 * Space to create key blob in. | 601 * Space to create key blob in. |
602 */ | 602 */ |
603 blobbuf = buf_new(3000); | 603 blobbuf = buf_new(3000); |
604 | 604 |
605 #ifdef DROPBEAR_DSS | |
605 if (key->type == OSSH_DSA) { | 606 if (key->type == OSSH_DSA) { |
606 buf_putstring(blobbuf, "ssh-dss", 7); | 607 buf_putstring(blobbuf, "ssh-dss", 7); |
607 retkey->type = DROPBEAR_SIGNKEY_DSS; | 608 retkey->type = DROPBEAR_SIGNKEY_DSS; |
608 } else if (key->type == OSSH_RSA) { | 609 } |
610 #endif | |
611 #ifdef DROPBEAR_RSA | |
612 if (key->type == OSSH_RSA) { | |
609 buf_putstring(blobbuf, "ssh-rsa", 7); | 613 buf_putstring(blobbuf, "ssh-rsa", 7); |
610 retkey->type = DROPBEAR_SIGNKEY_RSA; | 614 retkey->type = DROPBEAR_SIGNKEY_RSA; |
611 } | 615 } |
616 #endif | |
612 | 617 |
613 for (i = 0; i < num_integers; i++) { | 618 for (i = 0; i < num_integers; i++) { |
614 ret = ber_read_id_len(p, key->keyblob+key->keyblob_len-p, | 619 ret = ber_read_id_len(p, key->keyblob+key->keyblob_len-p, |
615 &id, &len, &flags); | 620 &id, &len, &flags); |
616 p += ret; | 621 p += ret; |
829 | 834 |
830 #ifdef DROPBEAR_RSA | 835 #ifdef DROPBEAR_RSA |
831 mp_int dmp1, dmq1, iqmp, tmpval; /* for rsa */ | 836 mp_int dmp1, dmq1, iqmp, tmpval; /* for rsa */ |
832 #endif | 837 #endif |
833 | 838 |
834 if (key->type == DROPBEAR_SIGNKEY_RSA || key->type == DROPBEAR_SIGNKEY_DSS) | 839 if ( |
840 #ifdef DROPBEAR_RSA | |
841 key->type == DROPBEAR_SIGNKEY_RSA || | |
842 #endif | |
843 #ifdef DROPBEAR_DSS | |
844 key->type == DROPBEAR_SIGNKEY_DSS || | |
845 #endif | |
846 0) | |
835 { | 847 { |
836 /* | 848 /* |
837 * Fetch the key blobs. | 849 * Fetch the key blobs. |
838 */ | 850 */ |
839 keyblob = buf_new(3000); | 851 keyblob = buf_new(3000); |