summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/sshd.c b/sshd.c
index 6e7192cf5..67eb66a11 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.426 2014/04/29 18:01:49 markus Exp $ */ 1/* $OpenBSD: sshd.c,v 1.427 2014/06/24 01:13:21 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
@@ -1031,8 +1031,10 @@ recv_rexec_state(int fd, Buffer *conf)
1031 buffer_get_bignum(&m, sensitive_data.server_key->rsa->iqmp); 1031 buffer_get_bignum(&m, sensitive_data.server_key->rsa->iqmp);
1032 buffer_get_bignum(&m, sensitive_data.server_key->rsa->p); 1032 buffer_get_bignum(&m, sensitive_data.server_key->rsa->p);
1033 buffer_get_bignum(&m, sensitive_data.server_key->rsa->q); 1033 buffer_get_bignum(&m, sensitive_data.server_key->rsa->q);
1034 rsa_generate_additional_parameters( 1034 if (rsa_generate_additional_parameters(
1035 sensitive_data.server_key->rsa); 1035 sensitive_data.server_key->rsa) != 0)
1036 fatal("%s: rsa_generate_additional_parameters "
1037 "error", __func__);
1036#else 1038#else
1037 fatal("ssh1 not supported"); 1039 fatal("ssh1 not supported");
1038#endif 1040#endif
@@ -2215,10 +2217,10 @@ ssh1_session_key(BIGNUM *session_key_int)
2215 SSH_KEY_BITS_RESERVED); 2217 SSH_KEY_BITS_RESERVED);
2216 } 2218 }
2217 if (rsa_private_decrypt(session_key_int, session_key_int, 2219 if (rsa_private_decrypt(session_key_int, session_key_int,
2218 sensitive_data.server_key->rsa) <= 0) 2220 sensitive_data.server_key->rsa) != 0)
2219 rsafail++; 2221 rsafail++;
2220 if (rsa_private_decrypt(session_key_int, session_key_int, 2222 if (rsa_private_decrypt(session_key_int, session_key_int,
2221 sensitive_data.ssh1_host_key->rsa) <= 0) 2223 sensitive_data.ssh1_host_key->rsa) != 0)
2222 rsafail++; 2224 rsafail++;
2223 } else { 2225 } else {
2224 /* Host key has bigger modulus (or they are equal). */ 2226 /* Host key has bigger modulus (or they are equal). */
@@ -2233,10 +2235,10 @@ ssh1_session_key(BIGNUM *session_key_int)
2233 SSH_KEY_BITS_RESERVED); 2235 SSH_KEY_BITS_RESERVED);
2234 } 2236 }
2235 if (rsa_private_decrypt(session_key_int, session_key_int, 2237 if (rsa_private_decrypt(session_key_int, session_key_int,
2236 sensitive_data.ssh1_host_key->rsa) < 0) 2238 sensitive_data.ssh1_host_key->rsa) != 0)
2237 rsafail++; 2239 rsafail++;
2238 if (rsa_private_decrypt(session_key_int, session_key_int, 2240 if (rsa_private_decrypt(session_key_int, session_key_int,
2239 sensitive_data.server_key->rsa) < 0) 2241 sensitive_data.server_key->rsa) != 0)
2240 rsafail++; 2242 rsafail++;
2241 } 2243 }
2242 return (rsafail); 2244 return (rsafail);