summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sshd.c b/sshd.c
index 75e267793..b58dd8f37 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.374 2010/03/07 11:57:13 dtucker Exp $ */ 1/* $OpenBSD: sshd.c,v 1.375 2010/04/16 01:47:26 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
@@ -749,6 +749,8 @@ list_hostkey_types(void)
749 if (key == NULL) 749 if (key == NULL)
750 continue; 750 continue;
751 switch (key->type) { 751 switch (key->type) {
752 case KEY_RSA_CERT_V00:
753 case KEY_DSA_CERT_V00:
752 case KEY_RSA_CERT: 754 case KEY_RSA_CERT:
753 case KEY_DSA_CERT: 755 case KEY_DSA_CERT:
754 if (buffer_len(&b) > 0) 756 if (buffer_len(&b) > 0)
@@ -772,10 +774,17 @@ get_hostkey_by_type(int type, int need_private)
772 Key *key; 774 Key *key;
773 775
774 for (i = 0; i < options.num_host_key_files; i++) { 776 for (i = 0; i < options.num_host_key_files; i++) {
775 if (type == KEY_RSA_CERT || type == KEY_DSA_CERT) 777 switch (type) {
778 case KEY_RSA_CERT_V00:
779 case KEY_DSA_CERT_V00:
780 case KEY_RSA_CERT:
781 case KEY_DSA_CERT:
776 key = sensitive_data.host_certificates[i]; 782 key = sensitive_data.host_certificates[i];
777 else 783 break;
784 default:
778 key = sensitive_data.host_keys[i]; 785 key = sensitive_data.host_keys[i];
786 break;
787 }
779 if (key != NULL && key->type == type) 788 if (key != NULL && key->type == type)
780 return need_private ? 789 return need_private ?
781 sensitive_data.host_keys[i] : key; 790 sensitive_data.host_keys[i] : key;