- 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@
This commit is contained in:
parent
7336b904ff
commit
adab6f1299
|
@ -7,6 +7,10 @@
|
||||||
check that g^x^q === 1 mod p; recommended by JPAKE author Feng Hao
|
check that g^x^q === 1 mod p; recommended by JPAKE author Feng Hao
|
||||||
(this code is still disabled, but apprently people are treating it as
|
(this code is still disabled, but apprently people are treating it as
|
||||||
a reference implementation)
|
a reference implementation)
|
||||||
|
- 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@
|
||||||
|
|
||||||
20101204
|
20101204
|
||||||
- (djm) [openbsd-compat/bindresvport.c] Use arc4random_uniform(range)
|
- (djm) [openbsd-compat/bindresvport.c] Use arc4random_uniform(range)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: auth-rsa.c,v 1.78 2010/07/13 23:13:16 djm Exp $ */
|
/* $OpenBSD: auth-rsa.c,v 1.79 2010/12/03 23:55:27 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* 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])
|
||||||
MD5_CTX md;
|
MD5_CTX md;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
if (auth_key_is_revoked(key))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* don't allow short keys */
|
/* don't allow short keys */
|
||||||
if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) {
|
if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) {
|
||||||
error("auth_rsa_verify_response: RSA modulus too small: %d < minimum %d bits",
|
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)
|
||||||
"actual %d vs. announced %d.",
|
"actual %d vs. announced %d.",
|
||||||
file, linenum, BN_num_bits(key->rsa->n), bits);
|
file, linenum, BN_num_bits(key->rsa->n), bits);
|
||||||
|
|
||||||
|
/* Never accept a revoked key */
|
||||||
|
if (auth_key_is_revoked(key))
|
||||||
|
break;
|
||||||
|
|
||||||
/* We have found the desired key. */
|
/* We have found the desired key. */
|
||||||
/*
|
/*
|
||||||
* If our options do not allow this key to be used,
|
* If our options do not allow this key to be used,
|
||||||
|
|
Loading…
Reference in New Issue