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 eb48e791d..06a2e1e5c 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
@@ -748,6 +748,8 @@ list_hostkey_types(void)
748 if (key == NULL) 748 if (key == NULL)
749 continue; 749 continue;
750 switch (key->type) { 750 switch (key->type) {
751 case KEY_RSA_CERT_V00:
752 case KEY_DSA_CERT_V00:
751 case KEY_RSA_CERT: 753 case KEY_RSA_CERT:
752 case KEY_DSA_CERT: 754 case KEY_DSA_CERT:
753 if (buffer_len(&b) > 0) 755 if (buffer_len(&b) > 0)
@@ -771,10 +773,17 @@ get_hostkey_by_type(int type, int need_private)
771 Key *key; 773 Key *key;
772 774
773 for (i = 0; i < options.num_host_key_files; i++) { 775 for (i = 0; i < options.num_host_key_files; i++) {
774 if (type == KEY_RSA_CERT || type == KEY_DSA_CERT) 776 switch (type) {
777 case KEY_RSA_CERT_V00:
778 case KEY_DSA_CERT_V00:
779 case KEY_RSA_CERT:
780 case KEY_DSA_CERT:
775 key = sensitive_data.host_certificates[i]; 781 key = sensitive_data.host_certificates[i];
776 else 782 break;
783 default:
777 key = sensitive_data.host_keys[i]; 784 key = sensitive_data.host_keys[i];
785 break;
786 }
778 if (key != NULL && key->type == type) 787 if (key != NULL && key->type == type)
779 return need_private ? 788 return need_private ?
780 sensitive_data.host_keys[i] : key; 789 sensitive_data.host_keys[i] : key;