summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-09-10 11:39:26 +1000
committerDamien Miller <djm@mindrot.org>2010-09-10 11:39:26 +1000
commit6af914a15c0c33e8b5bab5ca61919b8562ff1db9 (patch)
treeb87546d8a88a05e6fd600cbb2b8c0b132278cb10 /ssh.c
parent041ab7c1e7d6514ed84a539a767f79ffb356e807 (diff)
- (djm) [authfd.c authfile.c bufec.c buffer.h configure.ac kex.h kexecdh.c]
[kexecdhc.c kexecdhs.c key.c key.h myproposal.h packet.c readconf.c] [ssh-agent.c ssh-ecdsa.c ssh-keygen.c ssh.c] Disable ECDH and ECDSA on platforms that don't have the requisite OpenSSL support. ok dtucker@
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ssh.c b/ssh.c
index 51c68d7da..3ade744b6 100644
--- a/ssh.c
+++ b/ssh.c
@@ -783,20 +783,26 @@ main(int ac, char **av)
783 sensitive_data.nkeys = 7; 783 sensitive_data.nkeys = 7;
784 sensitive_data.keys = xcalloc(sensitive_data.nkeys, 784 sensitive_data.keys = xcalloc(sensitive_data.nkeys,
785 sizeof(Key)); 785 sizeof(Key));
786 for (i = 0; i < sensitive_data.nkeys; i++)
787 sensitive_data.keys[i] = NULL;
786 788
787 PRIV_START; 789 PRIV_START;
788 sensitive_data.keys[0] = key_load_private_type(KEY_RSA1, 790 sensitive_data.keys[0] = key_load_private_type(KEY_RSA1,
789 _PATH_HOST_KEY_FILE, "", NULL, NULL); 791 _PATH_HOST_KEY_FILE, "", NULL, NULL);
790 sensitive_data.keys[1] = key_load_private_cert(KEY_DSA, 792 sensitive_data.keys[1] = key_load_private_cert(KEY_DSA,
791 _PATH_HOST_DSA_KEY_FILE, "", NULL); 793 _PATH_HOST_DSA_KEY_FILE, "", NULL);
794#ifdef OPENSSL_HAS_ECC
792 sensitive_data.keys[2] = key_load_private_cert(KEY_ECDSA, 795 sensitive_data.keys[2] = key_load_private_cert(KEY_ECDSA,
793 _PATH_HOST_ECDSA_KEY_FILE, "", NULL); 796 _PATH_HOST_ECDSA_KEY_FILE, "", NULL);
797#endif
794 sensitive_data.keys[3] = key_load_private_cert(KEY_RSA, 798 sensitive_data.keys[3] = key_load_private_cert(KEY_RSA,
795 _PATH_HOST_RSA_KEY_FILE, "", NULL); 799 _PATH_HOST_RSA_KEY_FILE, "", NULL);
796 sensitive_data.keys[4] = key_load_private_type(KEY_DSA, 800 sensitive_data.keys[4] = key_load_private_type(KEY_DSA,
797 _PATH_HOST_DSA_KEY_FILE, "", NULL, NULL); 801 _PATH_HOST_DSA_KEY_FILE, "", NULL, NULL);
802#ifdef OPENSSL_HAS_ECC
798 sensitive_data.keys[5] = key_load_private_type(KEY_ECDSA, 803 sensitive_data.keys[5] = key_load_private_type(KEY_ECDSA,
799 _PATH_HOST_ECDSA_KEY_FILE, "", NULL, NULL); 804 _PATH_HOST_ECDSA_KEY_FILE, "", NULL, NULL);
805#endif
800 sensitive_data.keys[6] = key_load_private_type(KEY_RSA, 806 sensitive_data.keys[6] = key_load_private_type(KEY_RSA,
801 _PATH_HOST_RSA_KEY_FILE, "", NULL, NULL); 807 _PATH_HOST_RSA_KEY_FILE, "", NULL, NULL);
802 PRIV_END; 808 PRIV_END;
@@ -808,14 +814,18 @@ main(int ac, char **av)
808 sensitive_data.keys[6] == NULL) { 814 sensitive_data.keys[6] == NULL) {
809 sensitive_data.keys[1] = key_load_cert( 815 sensitive_data.keys[1] = key_load_cert(
810 _PATH_HOST_DSA_KEY_FILE); 816 _PATH_HOST_DSA_KEY_FILE);
817#ifdef OPENSSL_HAS_ECC
811 sensitive_data.keys[2] = key_load_cert( 818 sensitive_data.keys[2] = key_load_cert(
812 _PATH_HOST_ECDSA_KEY_FILE); 819 _PATH_HOST_ECDSA_KEY_FILE);
820#endif
813 sensitive_data.keys[3] = key_load_cert( 821 sensitive_data.keys[3] = key_load_cert(
814 _PATH_HOST_RSA_KEY_FILE); 822 _PATH_HOST_RSA_KEY_FILE);
815 sensitive_data.keys[4] = key_load_public( 823 sensitive_data.keys[4] = key_load_public(
816 _PATH_HOST_DSA_KEY_FILE, NULL); 824 _PATH_HOST_DSA_KEY_FILE, NULL);
825#ifdef OPENSSL_HAS_ECC
817 sensitive_data.keys[5] = key_load_public( 826 sensitive_data.keys[5] = key_load_public(
818 _PATH_HOST_ECDSA_KEY_FILE, NULL); 827 _PATH_HOST_ECDSA_KEY_FILE, NULL);
828#endif
819 sensitive_data.keys[6] = key_load_public( 829 sensitive_data.keys[6] = key_load_public(
820 _PATH_HOST_RSA_KEY_FILE, NULL); 830 _PATH_HOST_RSA_KEY_FILE, NULL);
821 sensitive_data.external_keysign = 1; 831 sensitive_data.external_keysign = 1;