summaryrefslogtreecommitdiff
path: root/dh.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-04-15 14:27:16 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-04-15 14:27:16 +0000
commit206941fdd88031e76da1e2aa0b5dd3b8d1d5d38b (patch)
treeb65242384506b68308282d08ed4b9ca16f09d052 /dh.c
parentac2f00390392b22bfc971146e61c440ce62cf242 (diff)
downloadopenssh-git-206941fdd88031e76da1e2aa0b5dd3b8d1d5d38b.tar.gz
- markus@cvs.openbsd.org 2001/04/15 08:43:47
[dh.c sftp-glob.c sftp-glob.h sftp-int.c sshconnect2.c sshd.c] some unused variable and typos; from tomh@po.crl.go.jp
Diffstat (limited to 'dh.c')
-rw-r--r--dh.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/dh.c b/dh.c
index 982064f5..575522dd 100644
--- a/dh.c
+++ b/dh.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: dh.c,v 1.13 2001/04/04 23:09:17 markus Exp $");
+RCSID("$OpenBSD: dh.c,v 1.14 2001/04/15 08:43:45 markus Exp $");
#include "xmalloc.h"
@@ -80,10 +80,10 @@ parse_prime(int linenum, char *line, struct dhgroup *dhg)
dhg->g = BN_new();
dhg->p = BN_new();
- if (BN_hex2bn(&dhg->g, gen) < 0)
+ if (BN_hex2bn(&dhg->g, gen) == 0)
goto failclean;
- if (BN_hex2bn(&dhg->p, prime) < 0)
+ if (BN_hex2bn(&dhg->p, prime) == 0)
goto failclean;
if (BN_num_bits(dhg->p) != dhg->size)
@@ -228,15 +228,14 @@ DH *
dh_new_group_asc(const char *gen, const char *modulus)
{
DH *dh;
- int ret;
dh = DH_new();
if (dh == NULL)
fatal("DH_new");
- if ((ret = BN_hex2bn(&dh->p, modulus)) < 0)
+ if (BN_hex2bn(&dh->p, modulus) == 0)
fatal("BN_hex2bn p");
- if ((ret = BN_hex2bn(&dh->g, gen)) < 0)
+ if (BN_hex2bn(&dh->g, gen) == 0)
fatal("BN_hex2bn g");
return (dh);