summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sshd.c b/sshd.c
index 7ff109175..a1c3970b3 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.514 2018/08/13 02:41:05 djm Exp $ */ 1/* $OpenBSD: sshd.c,v 1.516 2018/09/21 12:23:17 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
@@ -509,8 +509,8 @@ demote_sensitive_data(void)
509 509
510 for (i = 0; i < options.num_host_key_files; i++) { 510 for (i = 0; i < options.num_host_key_files; i++) {
511 if (sensitive_data.host_keys[i]) { 511 if (sensitive_data.host_keys[i]) {
512 if ((r = sshkey_demote(sensitive_data.host_keys[i], 512 if ((r = sshkey_from_private(
513 &tmp)) != 0) 513 sensitive_data.host_keys[i], &tmp)) != 0)
514 fatal("could not demote host %s key: %s", 514 fatal("could not demote host %s key: %s",
515 sshkey_type(sensitive_data.host_keys[i]), 515 sshkey_type(sensitive_data.host_keys[i]),
516 ssh_err(r)); 516 ssh_err(r));
@@ -552,8 +552,7 @@ privsep_preauth_child(void)
552 552
553#ifdef GSSAPI 553#ifdef GSSAPI
554 /* Cache supported mechanism OIDs for later use */ 554 /* Cache supported mechanism OIDs for later use */
555 if (options.gss_authentication || options.gss_keyex) 555 ssh_gssapi_prepare_supported_oids();
556 ssh_gssapi_prepare_supported_oids();
557#endif 556#endif
558 557
559 reseed_prngs(); 558 reseed_prngs();
@@ -1788,7 +1787,7 @@ main(int ac, char **av)
1788 error("Error loading host key \"%s\": %s", 1787 error("Error loading host key \"%s\": %s",
1789 options.host_key_files[i], ssh_err(r)); 1788 options.host_key_files[i], ssh_err(r));
1790 if (pubkey == NULL && key != NULL) 1789 if (pubkey == NULL && key != NULL)
1791 if ((r = sshkey_demote(key, &pubkey)) != 0) 1790 if ((r = sshkey_from_private(key, &pubkey)) != 0)
1792 fatal("Could not demote key: \"%s\": %s", 1791 fatal("Could not demote key: \"%s\": %s",
1793 options.host_key_files[i], ssh_err(r)); 1792 options.host_key_files[i], ssh_err(r));
1794 sensitive_data.host_keys[i] = key; 1793 sensitive_data.host_keys[i] = key;