=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/moduli.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- src/usr.bin/ssh/moduli.c 2019/10/04 03:26:58 1.36 +++ src/usr.bin/ssh/moduli.c 2019/11/15 06:00:20 1.37 @@ -1,4 +1,4 @@ -/* $OpenBSD: moduli.c,v 1.36 2019/10/04 03:26:58 dtucker Exp $ */ +/* $OpenBSD: moduli.c,v 1.37 2019/11/15 06:00:20 djm Exp $ */ /* * Copyright 1994 Phil Karn * Copyright 1996-1998, 2003 William Allen Simpson @@ -572,7 +572,6 @@ char *checkpoint_file, unsigned long start_lineno, unsigned long num_lines) { BIGNUM *q, *p, *a; - BN_CTX *ctx; char *cp, *lp; u_int32_t count_in = 0, count_out = 0, count_possible = 0; u_int32_t generator_known, in_tests, in_tries, in_type, in_size; @@ -596,8 +595,6 @@ fatal("BN_new failed"); if ((q = BN_new()) == NULL) fatal("BN_new failed"); - if ((ctx = BN_CTX_new()) == NULL) - fatal("BN_CTX_new failed"); debug2("%.24s Final %u Miller-Rabin trials (%x generator)", ctime(&time_start), trials, generator_wanted); @@ -747,7 +744,7 @@ * that p is also prime. A single pass will weed out the * vast majority of composite q's. */ - is_prime = BN_is_prime_ex(q, 1, ctx, NULL); + is_prime = BN_is_prime_ex(q, 1, NULL, NULL); if (is_prime < 0) fatal("BN_is_prime_ex failed"); if (is_prime == 0) { @@ -763,7 +760,7 @@ * will show up on the first Rabin-Miller iteration so it * doesn't hurt to specify a high iteration count. */ - is_prime = BN_is_prime_ex(p, trials, ctx, NULL); + is_prime = BN_is_prime_ex(p, trials, NULL, NULL); if (is_prime < 0) fatal("BN_is_prime_ex failed"); if (is_prime == 0) { @@ -773,7 +770,7 @@ debug("%10u: p is almost certainly prime", count_in); /* recheck q more rigorously */ - is_prime = BN_is_prime_ex(q, trials - 1, ctx, NULL); + is_prime = BN_is_prime_ex(q, trials - 1, NULL, NULL); if (is_prime < 0) fatal("BN_is_prime_ex failed"); if (is_prime == 0) { @@ -796,7 +793,6 @@ free(lp); BN_free(p); BN_free(q); - BN_CTX_free(ctx); if (checkpoint_file != NULL) unlink(checkpoint_file);