1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00

RSA blinding requires random numbers. Hence, Pageant now needs to

have the random number generator linked in.

[originally from svn r2945]
This commit is contained in:
Simon Tatham 2003-03-16 13:28:48 +00:00
parent f9f695b72a
commit a954943023
2 changed files with 6 additions and 19 deletions

2
Recipe
View File

@ -142,7 +142,7 @@ psftp : [C] psftp console WINSSH be_none SFTP WINMISC scp.res LIBS1
pageant : [G] pageant sshrsa sshpubk sshdes sshbn sshmd5 version tree234 pageant : [G] pageant sshrsa sshpubk sshdes sshbn sshmd5 version tree234
+ misc sshaes sshsha pageantc sshdss sshsh512 winutils winmisc + misc sshaes sshsha pageantc sshdss sshsh512 winutils winmisc
+ pageant.res LIBS + sshrand noise winstore ageant.res LIBS
puttygen : [G] puttygen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version puttygen : [G] puttygen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
+ sshrand noise sshsha winstore misc winctrls sshrsa sshdss winmisc + sshrand noise sshsha winstore misc winctrls sshrsa sshdss winmisc

View File

@ -127,24 +127,6 @@ static void *make_keylist2(int *length);
static void *get_keylist1(void); static void *get_keylist1(void);
static void *get_keylist2(void); static void *get_keylist2(void);
/*
* We need this to link with the RSA code, because rsaencrypt()
* pads its data with random bytes. Since we only use rsadecrypt()
* and the signing functions, which are deterministic, this should
* never be called.
*
* If it _is_ called, there is a _serious_ problem, because it
* won't generate true random numbers. So we must scream, panic,
* and exit immediately if that should happen.
*/
int random_byte(void)
{
MessageBox(main_hwnd, "Internal Error", APPNAME, MB_OK | MB_ICONERROR);
exit(0);
/* this line can't be reached but it placates MSVC's warnings :-) */
return 0;
}
/* /*
* Blob structure for passing to the asymmetric SSH2 key compare * Blob structure for passing to the asymmetric SSH2 key compare
* function, prototyped here. * function, prototyped here.
@ -1947,6 +1929,11 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
} }
/*
* Initialise the random number generator.
*/
random_init();
/* /*
* Initialise storage for short-term passphrase cache. * Initialise storage for short-term passphrase cache.
*/ */