doc = "";
};
+flag = {
+ name = ask-pass;
+ disabled;
+ descrip = "Enable interaction for entering password when in batch mode.";
+ doc = "This option will enable interaction to enter password when in batch mode. That is useful when the template option has been specified.";
+};
+
flag = {
name = pkcs-cipher;
arg-type = string;
#include "certtool-common.h"
extern int batch;
+extern int ask_pass;
#define MAX_ENTRIES 128
#define MAX_POLICIES 8
*/
const char *get_pass(void)
{
- if (batch)
+ if (batch && !ask_pass)
return cfg.password;
else
return getpass("Enter password: ");
const char *get_confirmed_pass(bool empty_ok)
{
- if (batch)
+ if (batch && !ask_pass)
return cfg.password;
else {
const char *pass = NULL;
const char *get_challenge_pass(void)
{
- if (batch)
+ if (batch && !ask_pass)
return cfg.challenge_password;
else
return getpass("Enter a challenge password: ");
/* non interactive operation if set
*/
int batch;
+int ask_pass;
static void tls_log_func(int level, const char *str)
template_parse(OPT_ARG(TEMPLATE));
}
+ ask_pass = ENABLED_OPT(ASK_PASS);
+
gnutls_global_set_log_function(tls_log_func);
if (HAVE_OPT(DEBUG)) {
/* non interactive operation if set
*/
-int batch;
+int batch = 0;
+int ask_pass = 0;
static void tls_log_func(int level, const char *str)
static FILE *outfile;
int batch = 0;
+int ask_pass = 0;
static void tls_log_func(int level, const char *str)
{
static FILE *outfile;
static FILE *infile;
int batch = 0;
+int ask_pass = 0;
static void tls_log_func(int level, const char *str)
{