1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -05:00

Introduce a vtable system for prime generation.

The functions primegen() and primegen_add_progress_phase() are gone.
In their place is a small vtable system with two methods corresponding
to them, plus the usual admin of allocating and freeing contexts.

This API change is the starting point for being able to drop in
different prime generation algorithms at run time in response to user
configuration.
This commit is contained in:
Simon Tatham
2020-02-29 09:10:47 +00:00
parent 08a3547bc5
commit ece788240c
11 changed files with 163 additions and 61 deletions

View File

@ -177,7 +177,7 @@ def make_argword(arg, argtype, fnname, argindex, to_preserve):
return "0x{:x}".format(arg)
if typename in {
"hashalg", "macalg", "keyalg", "cipheralg",
"dh_group", "ecdh_alg", "rsaorder"}:
"dh_group", "ecdh_alg", "rsaorder", "primegenpolicy"}:
arg = unicode_to_bytes(arg)
if isinstance(arg, bytes) and b" " not in arg:
return arg