summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/dh.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2001-04-15 08:43:45 +0000
committermarkus <markus@openbsd.org>2001-04-15 08:43:45 +0000
commit96fae57756c8ec491b8463b6fe34a00ac52420ef (patch)
tree3b65ae25db6369d3cee7f2411d05225e93bd6637 /usr.bin/ssh/dh.c
parentSupport U160 on 53c1010 chips. (diff)
downloadwireguard-openbsd-96fae57756c8ec491b8463b6fe34a00ac52420ef.tar.xz
wireguard-openbsd-96fae57756c8ec491b8463b6fe34a00ac52420ef.zip
some unused variable and typos; from tomh@po.crl.go.jp
Diffstat (limited to 'usr.bin/ssh/dh.c')
-rw-r--r--usr.bin/ssh/dh.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.bin/ssh/dh.c b/usr.bin/ssh/dh.c
index 982064f54a1..575522ddb5e 100644
--- a/usr.bin/ssh/dh.c
+++ b/usr.bin/ssh/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);