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)
- 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 982064f54..575522ddb 100644
--- a/dh.c
+++ b/dh.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: dh.c,v 1.13 2001/04/04 23:09:17 markus Exp $"); 26RCSID("$OpenBSD: dh.c,v 1.14 2001/04/15 08:43:45 markus Exp $");
27 27
28#include "xmalloc.h" 28#include "xmalloc.h"
29 29
@@ -80,10 +80,10 @@ parse_prime(int linenum, char *line, struct dhgroup *dhg)
80 80
81 dhg->g = BN_new(); 81 dhg->g = BN_new();
82 dhg->p = BN_new(); 82 dhg->p = BN_new();
83 if (BN_hex2bn(&dhg->g, gen) < 0) 83 if (BN_hex2bn(&dhg->g, gen) == 0)
84 goto failclean; 84 goto failclean;
85 85
86 if (BN_hex2bn(&dhg->p, prime) < 0) 86 if (BN_hex2bn(&dhg->p, prime) == 0)
87 goto failclean; 87 goto failclean;
88 88
89 if (BN_num_bits(dhg->p) != dhg->size) 89 if (BN_num_bits(dhg->p) != dhg->size)
@@ -228,15 +228,14 @@ DH *
228dh_new_group_asc(const char *gen, const char *modulus) 228dh_new_group_asc(const char *gen, const char *modulus)
229{ 229{
230 DH *dh; 230 DH *dh;
231 int ret;
232 231
233 dh = DH_new(); 232 dh = DH_new();
234 if (dh == NULL) 233 if (dh == NULL)
235 fatal("DH_new"); 234 fatal("DH_new");
236 235
237 if ((ret = BN_hex2bn(&dh->p, modulus)) < 0) 236 if (BN_hex2bn(&dh->p, modulus) == 0)
238 fatal("BN_hex2bn p"); 237 fatal("BN_hex2bn p");
239 if ((ret = BN_hex2bn(&dh->g, gen)) < 0) 238 if (BN_hex2bn(&dh->g, gen) == 0)
240 fatal("BN_hex2bn g"); 239 fatal("BN_hex2bn g");
241 240
242 return (dh); 241 return (dh);