diff options
author | des <des@FreeBSD.org> | 2006-11-10 16:39:21 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2006-11-10 16:39:21 +0000 |
commit | f591b3e29c677bff2b0f0d482490554c419128fd (patch) | |
tree | 209e642fbe2a816041f67bc27c9800879f5541bc /crypto/openssh/auth-rsa.c | |
parent | e6cc400c8f011e212207834669aaf4b62bee951e (diff) | |
download | FreeBSD-src-f591b3e29c677bff2b0f0d482490554c419128fd.zip FreeBSD-src-f591b3e29c677bff2b0f0d482490554c419128fd.tar.gz |
Vendor import of OpenSSH 4.5p1.
Diffstat (limited to 'crypto/openssh/auth-rsa.c')
-rw-r--r-- | crypto/openssh/auth-rsa.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/crypto/openssh/auth-rsa.c b/crypto/openssh/auth-rsa.c index 8c43458..69f9a58 100644 --- a/crypto/openssh/auth-rsa.c +++ b/crypto/openssh/auth-rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-rsa.c,v 1.71 2006/08/03 03:34:41 deraadt Exp $ */ +/* $OpenBSD: auth-rsa.c,v 1.72 2006/11/06 21:25:27 markus Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -76,10 +76,12 @@ auth_rsa_generate_challenge(Key *key) if ((challenge = BN_new()) == NULL) fatal("auth_rsa_generate_challenge: BN_new() failed"); /* Generate a random challenge. */ - BN_rand(challenge, 256, 0, 0); + if (BN_rand(challenge, 256, 0, 0) == 0) + fatal("auth_rsa_generate_challenge: BN_rand failed"); if ((ctx = BN_CTX_new()) == NULL) - fatal("auth_rsa_generate_challenge: BN_CTX_new() failed"); - BN_mod(challenge, challenge, key->rsa->n, ctx); + fatal("auth_rsa_generate_challenge: BN_CTX_new failed"); + if (BN_mod(challenge, challenge, key->rsa->n, ctx) == 0) + fatal("auth_rsa_generate_challenge: BN_mod failed"); BN_CTX_free(ctx); return challenge; |