mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[ssl] Let requests default to https
This commit is contained in:
parent
9df1456045
commit
a26c5956f4
@ -203,6 +203,11 @@ connection\&.ssl\&.cert_verify \fB[0|1]\fR (default: 0)
|
||||
.RS 4
|
||||
Verify the peer\'s SSL certificate\&. Note that this needs extensive configuration of OpenSSL by the user\&.
|
||||
.RE
|
||||
.PP
|
||||
connection\&.ssl\&.https_by_default \fB[0|1]\fR (default: 0)
|
||||
.RS 4
|
||||
Use HTTPS when a URL scheme is not provided\&.
|
||||
.RE
|
||||
.SS "connection\&.ssl\&.client_cert (Client Certificates)"
|
||||
X509 client certificate options\&.
|
||||
.PP
|
||||
|
@ -118,6 +118,10 @@ static union option_info openssl_options[] = {
|
||||
N_("Verify the peer's SSL certificate. Note that this "
|
||||
"needs extensive configuration of OpenSSL by the user.")),
|
||||
|
||||
INIT_OPT_BOOL("connection.ssl", N_("Use HTTPS by default"),
|
||||
"https_by_default", 0, 0,
|
||||
N_("Use HTTPS when a URL scheme is not provided.")),
|
||||
|
||||
INIT_OPT_TREE("connection.ssl", N_("Client Certificates"),
|
||||
"client_cert", OPT_SORT,
|
||||
N_("X509 client certificate options.")),
|
||||
|
@ -1242,6 +1242,11 @@ parse_uri:
|
||||
break;
|
||||
|
||||
case PROTOCOL_HTTP:
|
||||
#ifdef CONFIG_SSL
|
||||
if (get_opt_bool("connection.ssl.https_by_default", NULL))
|
||||
add_to_string(&str, "https://");
|
||||
else
|
||||
#endif
|
||||
add_to_string(&str, "http://");
|
||||
add_to_string(&str, newurl);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user