mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-06 22:12:47 -05:00
Unix Pageant: ability to build without GTK.
Unix Pageant is in a tricky position as a hybrid CLI/GUI application. It has uses even in a purely CLI environment, but it won't build without libgtk-3-dev and friends. The solution, of course - enabled by the migration to cmake - is to allow it to build without GTK, leaving out just the GTK askpass functionality. That way you can still use it in any of its CLI modes, either as a non-graphical SSH agent or as a client for an agent elsewhere. (You can still even use it in X lifetime mode, because its connection to the X server is done using PuTTY's built-in X authentication and connection setup code. It's only putting up the password prompt window that you lose in this configuration - so you're still fine as long as you don't try to add any encrypted keys.)
This commit is contained in:
19
unix/noaskpass.c
Normal file
19
unix/noaskpass.c
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* GTK implementation of a GUI password/passphrase prompt.
|
||||
*/
|
||||
|
||||
#include "putty.h"
|
||||
|
||||
void random_add_noise(NoiseSourceId source, const void *noise, int length)
|
||||
{
|
||||
/* We have no keypress_prng here, so no need to implement this */
|
||||
}
|
||||
|
||||
const bool buildinfo_gtk_relevant = false;
|
||||
|
||||
char *gtk_askpass_main(const char *display, const char *wintitle,
|
||||
const char *prompt, bool *success)
|
||||
{
|
||||
*success = false;
|
||||
return dupstr("this Pageant was built without GTK");
|
||||
}
|
Reference in New Issue
Block a user