diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshd.c,v 1.375 2010/04/16 01:47:26 djm Exp $ */ | 1 | /* $OpenBSD: sshd.c,v 1.381 2011/01/11 06:13:10 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 |
@@ -737,6 +737,7 @@ list_hostkey_types(void) | |||
737 | switch (key->type) { | 737 | switch (key->type) { |
738 | case KEY_RSA: | 738 | case KEY_RSA: |
739 | case KEY_DSA: | 739 | case KEY_DSA: |
740 | case KEY_ECDSA: | ||
740 | if (buffer_len(&b) > 0) | 741 | if (buffer_len(&b) > 0) |
741 | buffer_append(&b, ",", 1); | 742 | buffer_append(&b, ",", 1); |
742 | p = key_ssh_name(key); | 743 | p = key_ssh_name(key); |
@@ -752,6 +753,7 @@ list_hostkey_types(void) | |||
752 | case KEY_DSA_CERT_V00: | 753 | case KEY_DSA_CERT_V00: |
753 | case KEY_RSA_CERT: | 754 | case KEY_RSA_CERT: |
754 | case KEY_DSA_CERT: | 755 | case KEY_DSA_CERT: |
756 | case KEY_ECDSA_CERT: | ||
755 | if (buffer_len(&b) > 0) | 757 | if (buffer_len(&b) > 0) |
756 | buffer_append(&b, ",", 1); | 758 | buffer_append(&b, ",", 1); |
757 | p = key_ssh_name(key); | 759 | p = key_ssh_name(key); |
@@ -778,6 +780,7 @@ get_hostkey_by_type(int type, int need_private) | |||
778 | case KEY_DSA_CERT_V00: | 780 | case KEY_DSA_CERT_V00: |
779 | case KEY_RSA_CERT: | 781 | case KEY_RSA_CERT: |
780 | case KEY_DSA_CERT: | 782 | case KEY_DSA_CERT: |
783 | case KEY_ECDSA_CERT: | ||
781 | key = sensitive_data.host_certificates[i]; | 784 | key = sensitive_data.host_certificates[i]; |
782 | break; | 785 | break; |
783 | default: | 786 | default: |
@@ -1468,7 +1471,7 @@ main(int ac, char **av) | |||
1468 | else | 1471 | else |
1469 | closefrom(REEXEC_DEVCRYPTO_RESERVED_FD); | 1472 | closefrom(REEXEC_DEVCRYPTO_RESERVED_FD); |
1470 | 1473 | ||
1471 | SSLeay_add_all_algorithms(); | 1474 | OpenSSL_add_all_algorithms(); |
1472 | 1475 | ||
1473 | /* | 1476 | /* |
1474 | * Force logging to stderr until we have loaded the private host | 1477 | * Force logging to stderr until we have loaded the private host |
@@ -1580,6 +1583,7 @@ main(int ac, char **av) | |||
1580 | break; | 1583 | break; |
1581 | case KEY_RSA: | 1584 | case KEY_RSA: |
1582 | case KEY_DSA: | 1585 | case KEY_DSA: |
1586 | case KEY_ECDSA: | ||
1583 | sensitive_data.have_ssh2_key = 1; | 1587 | sensitive_data.have_ssh2_key = 1; |
1584 | break; | 1588 | break; |
1585 | } | 1589 | } |
@@ -2084,7 +2088,8 @@ main(int ac, char **av) | |||
2084 | /* The connection has been terminated. */ | 2088 | /* The connection has been terminated. */ |
2085 | packet_get_state(MODE_IN, NULL, NULL, NULL, &ibytes); | 2089 | packet_get_state(MODE_IN, NULL, NULL, NULL, &ibytes); |
2086 | packet_get_state(MODE_OUT, NULL, NULL, NULL, &obytes); | 2090 | packet_get_state(MODE_OUT, NULL, NULL, NULL, &obytes); |
2087 | verbose("Transferred: sent %llu, received %llu bytes", obytes, ibytes); | 2091 | verbose("Transferred: sent %llu, received %llu bytes", |
2092 | (unsigned long long)obytes, (unsigned long long)ibytes); | ||
2088 | 2093 | ||
2089 | verbose("Closing connection to %.500s port %d", remote_ip, remote_port); | 2094 | verbose("Closing connection to %.500s port %d", remote_ip, remote_port); |
2090 | 2095 | ||
@@ -2354,6 +2359,8 @@ do_ssh2_kex(void) | |||
2354 | myproposal[PROPOSAL_COMP_ALGS_CTOS] = | 2359 | myproposal[PROPOSAL_COMP_ALGS_CTOS] = |
2355 | myproposal[PROPOSAL_COMP_ALGS_STOC] = "none,zlib@openssh.com"; | 2360 | myproposal[PROPOSAL_COMP_ALGS_STOC] = "none,zlib@openssh.com"; |
2356 | } | 2361 | } |
2362 | if (options.kex_algorithms != NULL) | ||
2363 | myproposal[PROPOSAL_KEX_ALGS] = options.kex_algorithms; | ||
2357 | 2364 | ||
2358 | myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types(); | 2365 | myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types(); |
2359 | 2366 | ||
@@ -2405,6 +2412,7 @@ do_ssh2_kex(void) | |||
2405 | kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; | 2412 | kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; |
2406 | kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; | 2413 | kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; |
2407 | kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; | 2414 | kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; |
2415 | kex->kex[KEX_ECDH_SHA2] = kexecdh_server; | ||
2408 | #ifdef GSSAPI | 2416 | #ifdef GSSAPI |
2409 | if (options.gss_keyex) { | 2417 | if (options.gss_keyex) { |
2410 | kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server; | 2418 | kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server; |