*/
#include "includes.h"
-RCSID("$OpenBSD: auth-rsa.c,v 1.29 2000/09/07 21:13:36 markus Exp $");
+RCSID("$OpenBSD: auth-rsa.c,v 1.31 2000/10/11 19:59:52 markus Exp $");
#include "rsa.h"
#include "packet.h"
#include <openssl/rsa.h>
#include <openssl/md5.h>
+
+/* import */
+extern ServerOptions options;
+
/*
* Session identifier that is used to bind key exchange and authentication
* responses to a particular session.
int
auth_rsa(struct passwd *pw, BIGNUM *client_n)
{
- extern ServerOptions options;
char line[8192], file[1024];
int authenticated;
unsigned int bits;
struct stat st;
RSA *pk;
+ /* no user given */
+ if (pw == NULL)
+ return 0;
+
/* Temporarily use the user's uid. */
temporarily_use_uid(pw->pw_uid);
if (authenticated)
packet_send_debug("RSA authentication accepted.");
+ else
+ auth_clear_options();
/* Return authentication result. */
return authenticated;