diff options
author | markus@openbsd.org <markus@openbsd.org> | 2015-12-04 16:41:28 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-12-07 12:38:58 +1100 |
commit | 76c9fbbe35aabc1db977fb78e827644345e9442e (patch) | |
tree | e7c85e7e1471f1bd00b3a50a58e315c055f40b86 /monitor_wrap.c | |
parent | 6064a8b8295cb5a17b5ebcfade53053377714f40 (diff) |
upstream commit
implement SHA2-{256,512} for RSASSA-PKCS1-v1_5 signatures
(user and host auth) based on draft-rsa-dsa-sha2-256-03.txt and
draft-ssh-ext-info-04.txt; with & ok djm@
Upstream-ID: cf82ce532b2733e5c4b34bb7b7c94835632db309
Diffstat (limited to 'monitor_wrap.c')
-rw-r--r-- | monitor_wrap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c index eac421ba1..d4bfaf372 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: monitor_wrap.c,v 1.85 2015/05/01 03:23:51 djm Exp $ */ | 1 | /* $OpenBSD: monitor_wrap.c,v 1.86 2015/12/04 16:41:28 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright 2002 Niels Provos <provos@citi.umich.edu> | 3 | * Copyright 2002 Niels Provos <provos@citi.umich.edu> |
4 | * Copyright 2002 Markus Friedl <markus@openbsd.org> | 4 | * Copyright 2002 Markus Friedl <markus@openbsd.org> |
@@ -218,7 +218,7 @@ mm_choose_dh(int min, int nbits, int max) | |||
218 | 218 | ||
219 | int | 219 | int |
220 | mm_key_sign(Key *key, u_char **sigp, u_int *lenp, | 220 | mm_key_sign(Key *key, u_char **sigp, u_int *lenp, |
221 | const u_char *data, u_int datalen) | 221 | const u_char *data, u_int datalen, const char *hostkey_alg) |
222 | { | 222 | { |
223 | struct kex *kex = *pmonitor->m_pkex; | 223 | struct kex *kex = *pmonitor->m_pkex; |
224 | Buffer m; | 224 | Buffer m; |
@@ -228,6 +228,7 @@ mm_key_sign(Key *key, u_char **sigp, u_int *lenp, | |||
228 | buffer_init(&m); | 228 | buffer_init(&m); |
229 | buffer_put_int(&m, kex->host_key_index(key, 0, active_state)); | 229 | buffer_put_int(&m, kex->host_key_index(key, 0, active_state)); |
230 | buffer_put_string(&m, data, datalen); | 230 | buffer_put_string(&m, data, datalen); |
231 | buffer_put_cstring(&m, hostkey_alg); | ||
231 | 232 | ||
232 | mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_SIGN, &m); | 233 | mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_SIGN, &m); |
233 | 234 | ||