diff --git a/Recipe b/Recipe index 14e26b3d..2b0669c2 100644 --- a/Recipe +++ b/Recipe @@ -312,15 +312,15 @@ LIBS = advapi32.lib user32.lib gdi32.lib comdlg32.lib # Network backend sets. This also brings in the relevant attachment # to proxy.c depending on whether we're crypto-avoidant or not. BE_ALL = be_all cproxy -BE_NOSSH = be_nossh nocproxy +BE_NOSSH = be_nossh norand nocproxy BE_SSH = be_ssh cproxy BE_NONE = be_none nocproxy # More backend sets, with the additional Windows serial-port module. W_BE_ALL = be_all_s winser cproxy -W_BE_NOSSH = be_nos_s winser nocproxy +W_BE_NOSSH = be_nos_s norand winser nocproxy # And with the Unix serial-port module. U_BE_ALL = be_all_s uxser cproxy -U_BE_NOSSH = be_nos_s uxser nocproxy +U_BE_NOSSH = be_nos_s norand uxser nocproxy # Auxiliary crypto modules used by key generators. KEYGEN = sshrsag sshdssg sshecdsag diff --git a/be_nos_s.c b/be_nos_s.c index 15906cfa..f298f1b5 100644 --- a/be_nos_s.c +++ b/be_nos_s.c @@ -17,18 +17,3 @@ const struct BackendVtable *const backends[] = { &serial_backend, NULL }; - -/* - * Stub implementations of functions not used in non-ssh versions. - */ -void random_save_seed(void) -{ -} - -void random_destroy_seed(void) -{ -} - -void noise_ultralight(NoiseSourceId id, unsigned long data) -{ -} diff --git a/be_nossh.c b/be_nossh.c index 184f28dc..9adc8837 100644 --- a/be_nossh.c +++ b/be_nossh.c @@ -16,18 +16,3 @@ const struct BackendVtable *const backends[] = { &raw_backend, NULL }; - -/* - * Stub implementations of functions not used in non-ssh versions. - */ -void random_save_seed(void) -{ -} - -void random_destroy_seed(void) -{ -} - -void noise_ultralight(NoiseSourceId id, unsigned long data) -{ -} diff --git a/norand.c b/norand.c new file mode 100644 index 00000000..2ad9f661 --- /dev/null +++ b/norand.c @@ -0,0 +1,22 @@ +/* + * Stub implementations of RNG functions for applications without an RNG. + */ + +#include "putty.h" + +void random_read(void *out, size_t size) +{ + unreachable("Random numbers are not available in this application"); +} + +void random_save_seed(void) +{ +} + +void random_destroy_seed(void) +{ +} + +void noise_ultralight(NoiseSourceId id, unsigned long data) +{ +}