diff --git a/Recipe b/Recipe index 894ab2a9..2ce432c1 100644 --- a/Recipe +++ b/Recipe @@ -389,8 +389,10 @@ osxlaunch : [UT] osxlaunch fuzzterm : [UT] UXTERM CHARSET MISC version uxmisc uxucs fuzzterm time settings + uxstore be_none uxnogtk memory -testcrypt : [UT] testcrypt SSHCRYPTO marshal utils memory tree234 uxutils -testcrypt : [C] testcrypt SSHCRYPTO marshal utils memory tree234 winmiscs +testcrypt : [UT] testcrypt SSHCRYPTO sshprime marshal utils memory tree234 + + uxutils +testcrypt : [C] testcrypt SSHCRYPTO sshprime marshal utils memory tree234 + + winmiscs testzlib : [UT] testzlib sshzlib memory uppity : [UT] uxserver SSHSERVER UXMISC uxsignal uxnoise uxgss uxnogtk diff --git a/testcrypt.c b/testcrypt.c index 05615c93..da228985 100644 --- a/testcrypt.c +++ b/testcrypt.c @@ -900,6 +900,16 @@ bool crcda_detect(ptrlen packet, ptrlen iv) #define return_void(out, expression) (expression) +static void no_progress(void *param, int action, int phase, int iprogress) {} + +mp_int *primegen_wrapper( + int bits, int modulus, int residue, mp_int *factor, unsigned firstbits) +{ + return primegen(bits, modulus, residue, factor, + 0, no_progress, NULL, firstbits); +} +#define primegen primegen_wrapper + #define VALTYPE_TYPEDEF(n,t,f) \ typedef t TD_val_##n; \ typedef t *TD_out_val_##n; @@ -967,8 +977,19 @@ typedef RsaSsh1Order TD_rsaorder; return_##rettype(out, function(arg1, arg2, arg3, arg4)); \ } +#define FUNC5(rettype, function, type1, type2, type3, type4, type5) \ + static void handle_##function(BinarySource *in, strbuf *out) { \ + TD_##type1 arg1 = get_##type1(in); \ + TD_##type2 arg2 = get_##type2(in); \ + TD_##type3 arg3 = get_##type3(in); \ + TD_##type4 arg4 = get_##type4(in); \ + TD_##type5 arg5 = get_##type5(in); \ + return_##rettype(out, function(arg1, arg2, arg3, arg4, arg5)); \ + } + #include "testcrypt.h" +#undef FUNC5 #undef FUNC4 #undef FUNC3 #undef FUNC2 @@ -1002,9 +1023,11 @@ static void process_line(BinarySource *in, strbuf *out) #define FUNC2 FUNC #define FUNC3 FUNC #define FUNC4 FUNC +#define FUNC5 FUNC #include "testcrypt.h" +#undef FUNC5 #undef FUNC4 #undef FUNC3 #undef FUNC2 diff --git a/testcrypt.h b/testcrypt.h index ae99b51b..bc7c6772 100644 --- a/testcrypt.h +++ b/testcrypt.h @@ -238,6 +238,7 @@ FUNC1(uint, crc32_rfc1662, val_string_ptrlen) FUNC1(uint, crc32_ssh1, val_string_ptrlen) FUNC2(uint, crc32_update, uint, val_string_ptrlen) FUNC2(boolean, crcda_detect, val_string_ptrlen, val_string_ptrlen) +FUNC5(val_mpint, primegen, uint, uint, uint, val_mpint, uint) /* * These functions aren't part of PuTTY's own API, but are additions