summaryrefslogtreecommitdiff
path: root/auth-rsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth-rsa.c')
-rw-r--r--auth-rsa.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/auth-rsa.c b/auth-rsa.c
index dc1ad81a2..6968df58c 100644
--- a/auth-rsa.c
+++ b/auth-rsa.c
@@ -17,7 +17,7 @@ validity of the host key.
17 17
18#include "config.h" 18#include "config.h"
19#include "includes.h" 19#include "includes.h"
20RCSID("$Id: auth-rsa.c,v 1.4 1999/11/08 05:15:55 damien Exp $"); 20RCSID("$Id: auth-rsa.c,v 1.5 1999/11/12 04:19:27 damien Exp $");
21 21
22#include "rsa.h" 22#include "rsa.h"
23#include "packet.h" 23#include "packet.h"
@@ -25,6 +25,7 @@ RCSID("$Id: auth-rsa.c,v 1.4 1999/11/08 05:15:55 damien Exp $");
25#include "ssh.h" 25#include "ssh.h"
26#include "mpaux.h" 26#include "mpaux.h"
27#include "uidswap.h" 27#include "uidswap.h"
28#include "servconf.h"
28 29
29#ifdef HAVE_OPENSSL 30#ifdef HAVE_OPENSSL
30#include <openssl/rsa.h> 31#include <openssl/rsa.h>
@@ -100,7 +101,6 @@ auth_rsa_challenge_dialog(unsigned int bits, BIGNUM *e, BIGNUM *n)
100 len = BN_num_bytes(challenge); 101 len = BN_num_bytes(challenge);
101 if (len <= 0 || len > 32) 102 if (len <= 0 || len > 32)
102 fatal("auth_rsa_challenge_dialog: bad challenge length %d", len); 103 fatal("auth_rsa_challenge_dialog: bad challenge length %d", len);
103
104 memset(buf, 0, 32); 104 memset(buf, 0, 32);
105 BN_bn2bin(challenge, buf + 32 - len); 105 BN_bn2bin(challenge, buf + 32 - len);
106 MD5_Init(&md); 106 MD5_Init(&md);
@@ -136,8 +136,9 @@ auth_rsa_challenge_dialog(unsigned int bits, BIGNUM *e, BIGNUM *n)
136 successful. This may exit if there is a serious protocol violation. */ 136 successful. This may exit if there is a serious protocol violation. */
137 137
138int 138int
139auth_rsa(struct passwd *pw, BIGNUM *client_n, int strict_modes) 139auth_rsa(struct passwd *pw, BIGNUM *client_n)
140{ 140{
141 extern ServerOptions options;
141 char line[8192]; 142 char line[8192];
142 int authenticated; 143 int authenticated;
143 unsigned int bits; 144 unsigned int bits;
@@ -172,7 +173,7 @@ auth_rsa(struct passwd *pw, BIGNUM *client_n, int strict_modes)
172 return 0; 173 return 0;
173 } 174 }
174 175
175 if (strict_modes) { 176 if (options.strict_modes) {
176 int fail=0; 177 int fail=0;
177 char buf[1024]; 178 char buf[1024];
178 /* Check open file in order to avoid open/stat races */ 179 /* Check open file in order to avoid open/stat races */