summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2010-12-05 09:01:47 +1100
committerDarren Tucker <dtucker@zip.com.au>2010-12-05 09:01:47 +1100
commitadab6f12992c522e1208fa2bdf89ce572840ccf8 (patch)
tree852a4d723fce1154d227680ec9ca7764153d46ba
parent7336b904ffab8c8b412b8ef19d7d0387a584ec58 (diff)
- djm@cvs.openbsd.org 2010/12/03 23:55:27
[auth-rsa.c] move check for revoked keys to run earlier (in auth_rsa_key_allowed) bz#1829; patch from ldv AT altlinux.org; ok markus@
-rw-r--r--ChangeLog4
-rw-r--r--auth-rsa.c9
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 26c9b477c..a8aeacc56 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,10 @@
7 check that g^x^q === 1 mod p; recommended by JPAKE author Feng Hao 7 check that g^x^q === 1 mod p; recommended by JPAKE author Feng Hao
8 (this code is still disabled, but apprently people are treating it as 8 (this code is still disabled, but apprently people are treating it as
9 a reference implementation) 9 a reference implementation)
10 - djm@cvs.openbsd.org 2010/12/03 23:55:27
11 [auth-rsa.c]
12 move check for revoked keys to run earlier (in auth_rsa_key_allowed)
13 bz#1829; patch from ldv AT altlinux.org; ok markus@
10 14
1120101204 1520101204
12 - (djm) [openbsd-compat/bindresvport.c] Use arc4random_uniform(range) 16 - (djm) [openbsd-compat/bindresvport.c] Use arc4random_uniform(range)
diff --git a/auth-rsa.c b/auth-rsa.c
index 56702d130..4edaab056 100644
--- a/auth-rsa.c
+++ b/auth-rsa.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth-rsa.c,v 1.78 2010/07/13 23:13:16 djm Exp $ */ 1/* $OpenBSD: auth-rsa.c,v 1.79 2010/12/03 23:55:27 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -94,9 +94,6 @@ auth_rsa_verify_response(Key *key, BIGNUM *challenge, u_char response[16])
94 MD5_CTX md; 94 MD5_CTX md;
95 int len; 95 int len;
96 96
97 if (auth_key_is_revoked(key))
98 return 0;
99
100 /* don't allow short keys */ 97 /* don't allow short keys */
101 if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) { 98 if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) {
102 error("auth_rsa_verify_response: RSA modulus too small: %d < minimum %d bits", 99 error("auth_rsa_verify_response: RSA modulus too small: %d < minimum %d bits",
@@ -249,6 +246,10 @@ auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
249 "actual %d vs. announced %d.", 246 "actual %d vs. announced %d.",
250 file, linenum, BN_num_bits(key->rsa->n), bits); 247 file, linenum, BN_num_bits(key->rsa->n), bits);
251 248
249 /* Never accept a revoked key */
250 if (auth_key_is_revoked(key))
251 break;
252
252 /* We have found the desired key. */ 253 /* We have found the desired key. */
253 /* 254 /*
254 * If our options do not allow this key to be used, 255 * If our options do not allow this key to be used,