diff options
author | Colin Watson <cjwatson@debian.org> | 2013-09-14 23:42:11 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2013-09-14 23:42:11 +0100 |
commit | 327155e6824b3ee13837bdde04e4eb47e147ff46 (patch) | |
tree | 8f8743122403c7a2e6ed919156711fb1520c657f /kexdhs.c | |
parent | 0334ce32304e9ba2a10ee5ca49ca6e8ff3ba6cf4 (diff) | |
parent | 74e339b8f8936bc0d985e053a076d0c9b5e9ea51 (diff) |
* New upstream release (http://www.openssh.com/txt/release-6.3).
- sftp(1): add support for resuming partial downloads using the "reget"
command and on the sftp commandline or on the "get" commandline using
the "-a" (append) option (closes: #158590).
- ssh(1): add an "IgnoreUnknown" configuration option to selectively
suppress errors arising from unknown configuration directives (closes:
#436052).
- sftp(1): update progressmeter when data is acknowledged, not when it's
sent (partially addresses #708372).
- ssh(1): do not fatally exit when attempting to cleanup multiplexing-
created channels that are incompletely opened (closes: #651357).
Diffstat (limited to 'kexdhs.c')
-rw-r--r-- | kexdhs.c | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kexdhs.c,v 1.12 2010/11/10 01:33:07 djm Exp $ */ | 1 | /* $OpenBSD: kexdhs.c,v 1.14 2013/07/19 07:37:48 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -80,9 +80,6 @@ kexdh_server(Kex *kex) | |||
80 | if (server_host_public == NULL) | 80 | if (server_host_public == NULL) |
81 | fatal("Unsupported hostkey type %d", kex->hostkey_type); | 81 | fatal("Unsupported hostkey type %d", kex->hostkey_type); |
82 | server_host_private = kex->load_host_private_key(kex->hostkey_type); | 82 | server_host_private = kex->load_host_private_key(kex->hostkey_type); |
83 | if (server_host_private == NULL) | ||
84 | fatal("Missing private key for hostkey type %d", | ||
85 | kex->hostkey_type); | ||
86 | 83 | ||
87 | /* key, cert */ | 84 | /* key, cert */ |
88 | if ((dh_client_pub = BN_new()) == NULL) | 85 | if ((dh_client_pub = BN_new()) == NULL) |
@@ -118,7 +115,7 @@ kexdh_server(Kex *kex) | |||
118 | if (BN_bin2bn(kbuf, kout, shared_secret) == NULL) | 115 | if (BN_bin2bn(kbuf, kout, shared_secret) == NULL) |
119 | fatal("kexdh_server: BN_bin2bn failed"); | 116 | fatal("kexdh_server: BN_bin2bn failed"); |
120 | memset(kbuf, 0, klen); | 117 | memset(kbuf, 0, klen); |
121 | xfree(kbuf); | 118 | free(kbuf); |
122 | 119 | ||
123 | key_to_blob(server_host_public, &server_host_key_blob, &sbloblen); | 120 | key_to_blob(server_host_public, &server_host_key_blob, &sbloblen); |
124 | 121 | ||
@@ -144,9 +141,8 @@ kexdh_server(Kex *kex) | |||
144 | } | 141 | } |
145 | 142 | ||
146 | /* sign H */ | 143 | /* sign H */ |
147 | if (PRIVSEP(key_sign(server_host_private, &signature, &slen, hash, | 144 | kex->sign(server_host_private, server_host_public, &signature, &slen, |
148 | hashlen)) < 0) | 145 | hash, hashlen); |
149 | fatal("kexdh_server: key_sign failed"); | ||
150 | 146 | ||
151 | /* destroy_sensitive_data(); */ | 147 | /* destroy_sensitive_data(); */ |
152 | 148 | ||
@@ -157,8 +153,8 @@ kexdh_server(Kex *kex) | |||
157 | packet_put_string(signature, slen); | 153 | packet_put_string(signature, slen); |
158 | packet_send(); | 154 | packet_send(); |
159 | 155 | ||
160 | xfree(signature); | 156 | free(signature); |
161 | xfree(server_host_key_blob); | 157 | free(server_host_key_blob); |
162 | /* have keys, free DH */ | 158 | /* have keys, free DH */ |
163 | DH_free(dh); | 159 | DH_free(dh); |
164 | 160 | ||