]> andersk Git - openssh.git/blobdiff - auth-rh-rsa.c
- (stevesk) OpenSSH CVS update:
[openssh.git] / auth-rh-rsa.c
index 52ce688ce9d38a93c18e7053ae69bcae5013ffd4..a9f17ef8383a737bbfff3951a9f753da7b0e4145 100644 (file)
@@ -1,21 +1,19 @@
 /*
- *
- * auth-rh-rsa.c
- *
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
- *
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
- *
- * Created: Sun May  7 03:08:06 1995 ylo
- *
  * Rhosts or /etc/hosts.equiv authentication combined with RSA host
  * authentication.
  *
+ * As far as I am concerned, the code I have written for this software
+ * can be used freely for any purpose.  Any derived versions of this
+ * software must be clearly marked as such, and if the derived work is
+ * incompatible with the protocol description in the RFC file, it must be
+ * called by a name other than "ssh" or "Secure Shell".
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: auth-rh-rsa.c,v 1.18 2000/11/12 19:50:37 markus Exp $");
 
 #include "packet.h"
 #include "ssh.h"
@@ -41,9 +39,9 @@ auth_rhosts_rsa(struct passwd *pw, const char *client_user, RSA *client_host_key
        HostStatus host_status;
        Key *client_key, *found;
 
-       debug("Trying rhosts with RSA host authentication for %.100s", client_user);
+       debug("Trying rhosts with RSA host authentication for client user %.100s", client_user);
 
-       if (client_host_key == NULL)
+       if (pw == NULL || client_host_key == NULL)
                return 0;
 
        /* Check if we would accept it using rhosts authentication. */
@@ -55,10 +53,10 @@ auth_rhosts_rsa(struct passwd *pw, const char *client_user, RSA *client_host_key
        debug("Rhosts RSA authentication: canonical host %.900s", canonical_hostname);
 
        /* wrap the RSA key into a 'generic' key */
-       client_key = key_new(KEY_RSA);
+       client_key = key_new(KEY_RSA1);
        BN_copy(client_key->rsa->e, client_host_key->e);
        BN_copy(client_key->rsa->n, client_host_key->n);
-       found = key_new(KEY_RSA);
+       found = key_new(KEY_RSA1);
 
        /* Check if we know the host and its host key. */
        host_status = check_host_in_hostfile(SSH_SYSTEM_HOSTFILE, canonical_hostname,
This page took 0.051133 seconds and 4 git commands to generate.