summaryrefslogtreecommitdiff
path: root/auth-rsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth-rsa.c')
-rw-r--r--auth-rsa.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/auth-rsa.c b/auth-rsa.c
index 2f0746b30..16369d47c 100644
--- a/auth-rsa.c
+++ b/auth-rsa.c
@@ -14,7 +14,7 @@
14 */ 14 */
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$OpenBSD: auth-rsa.c,v 1.58 2003/11/04 08:54:09 djm Exp $"); 17RCSID("$OpenBSD: auth-rsa.c,v 1.60 2004/06/21 17:36:31 avsm Exp $");
18 18
19#include <openssl/rsa.h> 19#include <openssl/rsa.h>
20#include <openssl/md5.h> 20#include <openssl/md5.h>
@@ -23,7 +23,6 @@ RCSID("$OpenBSD: auth-rsa.c,v 1.58 2003/11/04 08:54:09 djm Exp $");
23#include "packet.h" 23#include "packet.h"
24#include "xmalloc.h" 24#include "xmalloc.h"
25#include "ssh1.h" 25#include "ssh1.h"
26#include "mpaux.h"
27#include "uidswap.h" 26#include "uidswap.h"
28#include "match.h" 27#include "match.h"
29#include "auth-options.h" 28#include "auth-options.h"
@@ -204,7 +203,7 @@ auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
204 */ 203 */
205 while (fgets(line, sizeof(line), f)) { 204 while (fgets(line, sizeof(line), f)) {
206 char *cp; 205 char *cp;
207 char *options; 206 char *key_options;
208 207
209 linenum++; 208 linenum++;
210 209
@@ -222,7 +221,7 @@ auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
222 */ 221 */
223 if (*cp < '0' || *cp > '9') { 222 if (*cp < '0' || *cp > '9') {
224 int quoted = 0; 223 int quoted = 0;
225 options = cp; 224 key_options = cp;
226 for (; *cp && (quoted || (*cp != ' ' && *cp != '\t')); cp++) { 225 for (; *cp && (quoted || (*cp != ' ' && *cp != '\t')); cp++) {
227 if (*cp == '\\' && cp[1] == '"') 226 if (*cp == '\\' && cp[1] == '"')
228 cp++; /* Skip both */ 227 cp++; /* Skip both */
@@ -230,7 +229,7 @@ auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
230 quoted = !quoted; 229 quoted = !quoted;
231 } 230 }
232 } else 231 } else
233 options = NULL; 232 key_options = NULL;
234 233
235 /* Parse the key from the line. */ 234 /* Parse the key from the line. */
236 if (hostfile_read_key(&cp, &bits, key) == 0) { 235 if (hostfile_read_key(&cp, &bits, key) == 0) {
@@ -255,7 +254,7 @@ auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
255 * If our options do not allow this key to be used, 254 * If our options do not allow this key to be used,
256 * do not send challenge. 255 * do not send challenge.
257 */ 256 */
258 if (!auth_parse_options(pw, options, file, linenum)) 257 if (!auth_parse_options(pw, key_options, file, linenum))
259 continue; 258 continue;
260 259
261 /* break out, this key is allowed */ 260 /* break out, this key is allowed */