don't ask for untrusted certificates if askauth is 0

This commit is contained in:
wbaumann
2009-10-18 16:00:55 +00:00
parent 308b3aad85
commit cc9f8e1ab6
6 changed files with 18 additions and 12 deletions

View File

@ -354,6 +354,7 @@ main(int argc, char *argv[])
_("failed to release tty properly"));
kill(getppid(), SIGHUP);
}
dav_set_no_terminal();
}
if (!ret) {
@ -1152,10 +1153,12 @@ parse_secrets(dav_args *args)
if (args->cl_username) {
if (args->username)
free(args->username);
if (args->password)
free(args->password);
args->username = args->cl_username;
args->cl_username = NULL;
if (args->password)
free(args->password);
args->password = NULL;
args->p_passwd = user_input(_("Password: "));
}
if (args->askauth && args->useproxy && !args->p_user) {

View File

@ -193,7 +193,7 @@ static int initialized;
/* Whether a terminal is available to communicate with the user.
Should be reset with set_no_terminal() when forking into daemon mode.
Needed by ssl_verify() which may be called at any time. */
static int have_terminal = 1;
static int have_terminal;
/* Handle to convert character encoding from utf-8 to LC_CTYPE.
If NULL no conversion is done. */
@ -439,6 +439,8 @@ dav_init_webdav(const dav_args *args)
}
}
have_terminal = args->askauth;
if (args->locks) {
locks = ne_lockstore_create();
if (!args->lock_owner) {