diff options
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 27 |
1 files changed, 18 insertions, 9 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh.c,v 1.348 2010/08/16 04:06:06 djm Exp $ */ | 1 | /* $OpenBSD: ssh.c,v 1.349 2010/08/31 11:54:45 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -780,7 +780,7 @@ main(int ac, char **av) | |||
780 | sensitive_data.external_keysign = 0; | 780 | sensitive_data.external_keysign = 0; |
781 | if (options.rhosts_rsa_authentication || | 781 | if (options.rhosts_rsa_authentication || |
782 | options.hostbased_authentication) { | 782 | options.hostbased_authentication) { |
783 | sensitive_data.nkeys = 5; | 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 | 786 | ||
@@ -789,25 +789,34 @@ main(int ac, char **av) | |||
789 | _PATH_HOST_KEY_FILE, "", NULL, NULL); | 789 | _PATH_HOST_KEY_FILE, "", NULL, NULL); |
790 | sensitive_data.keys[1] = key_load_private_cert(KEY_DSA, | 790 | sensitive_data.keys[1] = key_load_private_cert(KEY_DSA, |
791 | _PATH_HOST_DSA_KEY_FILE, "", NULL); | 791 | _PATH_HOST_DSA_KEY_FILE, "", NULL); |
792 | sensitive_data.keys[2] = key_load_private_cert(KEY_RSA, | 792 | sensitive_data.keys[2] = key_load_private_cert(KEY_ECDSA, |
793 | _PATH_HOST_ECDSA_KEY_FILE, "", NULL); | ||
794 | sensitive_data.keys[3] = key_load_private_cert(KEY_RSA, | ||
793 | _PATH_HOST_RSA_KEY_FILE, "", NULL); | 795 | _PATH_HOST_RSA_KEY_FILE, "", NULL); |
794 | sensitive_data.keys[3] = key_load_private_type(KEY_DSA, | 796 | sensitive_data.keys[4] = key_load_private_type(KEY_DSA, |
795 | _PATH_HOST_DSA_KEY_FILE, "", NULL, NULL); | 797 | _PATH_HOST_DSA_KEY_FILE, "", NULL, NULL); |
796 | sensitive_data.keys[4] = key_load_private_type(KEY_RSA, | 798 | sensitive_data.keys[5] = key_load_private_type(KEY_ECDSA, |
799 | _PATH_HOST_ECDSA_KEY_FILE, "", NULL, NULL); | ||
800 | sensitive_data.keys[6] = key_load_private_type(KEY_RSA, | ||
797 | _PATH_HOST_RSA_KEY_FILE, "", NULL, NULL); | 801 | _PATH_HOST_RSA_KEY_FILE, "", NULL, NULL); |
798 | PRIV_END; | 802 | PRIV_END; |
799 | 803 | ||
800 | if (options.hostbased_authentication == 1 && | 804 | if (options.hostbased_authentication == 1 && |
801 | sensitive_data.keys[0] == NULL && | 805 | sensitive_data.keys[0] == NULL && |
802 | sensitive_data.keys[3] == NULL && | 806 | sensitive_data.keys[4] == NULL && |
803 | sensitive_data.keys[4] == NULL) { | 807 | sensitive_data.keys[5] == NULL && |
808 | sensitive_data.keys[6] == NULL) { | ||
804 | sensitive_data.keys[1] = key_load_cert( | 809 | sensitive_data.keys[1] = key_load_cert( |
805 | _PATH_HOST_DSA_KEY_FILE); | 810 | _PATH_HOST_DSA_KEY_FILE); |
806 | sensitive_data.keys[2] = key_load_cert( | 811 | sensitive_data.keys[2] = key_load_cert( |
812 | _PATH_HOST_ECDSA_KEY_FILE); | ||
813 | sensitive_data.keys[3] = key_load_cert( | ||
807 | _PATH_HOST_RSA_KEY_FILE); | 814 | _PATH_HOST_RSA_KEY_FILE); |
808 | sensitive_data.keys[3] = key_load_public( | ||
809 | _PATH_HOST_DSA_KEY_FILE, NULL); | ||
810 | sensitive_data.keys[4] = key_load_public( | 815 | sensitive_data.keys[4] = key_load_public( |
816 | _PATH_HOST_DSA_KEY_FILE, NULL); | ||
817 | sensitive_data.keys[5] = key_load_public( | ||
818 | _PATH_HOST_ECDSA_KEY_FILE, NULL); | ||
819 | sensitive_data.keys[6] = key_load_public( | ||
811 | _PATH_HOST_RSA_KEY_FILE, NULL); | 820 | _PATH_HOST_RSA_KEY_FILE, NULL); |
812 | sensitive_data.external_keysign = 1; | 821 | sensitive_data.external_keysign = 1; |
813 | } | 822 | } |