]> andersk Git - openssh.git/commitdiff
- stevesk@cvs.openbsd.org 2002/03/29 19:18:33
authormouring <mouring>
Tue, 2 Apr 2002 20:43:11 +0000 (20:43 +0000)
committermouring <mouring>
Tue, 2 Apr 2002 20:43:11 +0000 (20:43 +0000)
     [auth-rsa.c ssh-rsa.c ssh.h]
     make RSA modulus minimum #define; ok markus@

ChangeLog
auth-rsa.c
ssh-rsa.c
ssh.h

index 36a651c1a1c821fd5948e9d44704c703acef61e6..b6cea574ccd9d7e73ecfa3454edbb56663dc8ce6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,9 @@
    - stevesk@cvs.openbsd.org 2002/03/29 19:16:22
      [sshd.8]
      RSA key modulus size minimum 768; ok markus@
+   - stevesk@cvs.openbsd.org 2002/03/29 19:18:33
+     [auth-rsa.c ssh-rsa.c ssh.h]
+     make RSA modulus minimum #define; ok markus@
 
 20020401
  - (stevesk) [monitor.c] PAM should work again; will *not* work with
index 5b98f2cf2b609b19cf78cc61db0ea8144f075d7c..493f14b1147a6eb7b691ce56a246c8b57cc40162 100644 (file)
@@ -14,7 +14,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth-rsa.c,v 1.54 2002/03/26 23:13:03 markus Exp $");
+RCSID("$OpenBSD: auth-rsa.c,v 1.55 2002/03/29 19:18:33 stevesk Exp $");
 
 #include <openssl/rsa.h>
 #include <openssl/md5.h>
@@ -33,6 +33,7 @@ RCSID("$OpenBSD: auth-rsa.c,v 1.54 2002/03/26 23:13:03 markus Exp $");
 #include "auth.h"
 #include "hostfile.h"
 #include "monitor_wrap.h"
+#include "ssh.h"
 
 /* import */
 extern ServerOptions options;
@@ -79,7 +80,7 @@ auth_rsa_verify_response(Key *key, BIGNUM *challenge, u_char response[16])
        int len;
 
        /* don't allow short keys */
-       if (BN_num_bits(key->rsa->n) < 768) {
+       if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) {
                error("auth_rsa_verify_response: n too small: %d bits",
                    BN_num_bits(key->rsa->n));
                return (0);
index 8e79d4e1d310749269e80341b258c0155de08610..b2fcc3408ad03a204b725271f2c97e4fb3d04bf0 100644 (file)
--- a/ssh-rsa.c
+++ b/ssh-rsa.c
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh-rsa.c,v 1.16 2002/02/24 19:14:59 markus Exp $");
+RCSID("$OpenBSD: ssh-rsa.c,v 1.17 2002/03/29 19:18:33 stevesk Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/err.h>
@@ -35,6 +35,7 @@ RCSID("$OpenBSD: ssh-rsa.c,v 1.16 2002/02/24 19:14:59 markus Exp $");
 #include "key.h"
 #include "ssh-rsa.h"
 #include "compat.h"
+#include "ssh.h"
 
 /* RSASSA-PKCS1-v1_5 (PKCS #1 v2.0 signature) with SHA1 */
 int
@@ -129,7 +130,7 @@ ssh_rsa_verify(
                error("ssh_rsa_verify: SSH_BUG_SIGBLOB not supported");
                return -1;
        }
-       if (BN_num_bits(key->rsa->n) < 768) {
+       if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) {
                error("ssh_rsa_verify: n too small: %d bits",
                    BN_num_bits(key->rsa->n));
                return -1;
diff --git a/ssh.h b/ssh.h
index 078c9f7c73d8d5dae9a8bae214b4ff3b3185fd70..c5b500345477ef1b001b98ae4181e93b29f9c764 100644 (file)
--- a/ssh.h
+++ b/ssh.h
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ssh.h,v 1.65 2002/03/20 19:12:25 stevesk Exp $        */
+/*     $OpenBSD: ssh.h,v 1.66 2002/03/29 19:18:33 stevesk Exp $        */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  */
 #define SSH_PRIVSEP_USER               "nobody"
 
+/* Minimum modulus size (n) for RSA keys. */
+#define SSH_RSA_MINIMUM_MODULUS_SIZE   768
+
 #endif                         /* SSH_H */
This page took 0.051785 seconds and 5 git commands to generate.