1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00
putty-source/unix/noaskpass.c
Simon Tatham d6a83fe336 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.)
2022-01-26 20:02:15 +00:00

20 lines
488 B
C

/*
* 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");
}