File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -2059,8 +2059,8 @@ server.storePassword = gitblit
2059
2059
# authenticate with ssl certificates. If enabled, only https clients with the
2060
2060
# a valid client certificate will be able to access Gitblit.
2061
2061
#
2062
- # If disabled, client certificate authentication is optional and will be tried
2063
- # first before falling-back to form authentication or basic authentication.
2062
+ # If disabled, optional client certificate authentication is configurable by
2063
+ # server.wantClientCertificates
2064
2064
#
2065
2065
# Requiring client certificates to access any of Gitblit may be too extreme,
2066
2066
# consider this carefully.
@@ -2069,6 +2069,15 @@ server.storePassword = gitblit
2069
2069
# RESTART REQUIRED
2070
2070
server.requireClientCertificates = false
2071
2071
2072
+ # If enabled, client certificate authentication is optional and will be tried
2073
+ # first before falling-back to form authentication or basic authentication.
2074
+ #
2075
+ # If disabled, no client certificate authentication will be done at all.
2076
+ #
2077
+ # SINCE 1.8.1
2078
+ # RESTART REQUIRED
2079
+ server.wantClientCertificates = false
2080
+
2072
2081
# Port for shutdown monitor to listen on.
2073
2082
#
2074
2083
# SINCE 0.5.0
Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ public void log(String message) {
288
288
if (params .requireClientCertificates ) {
289
289
factory .setNeedClientAuth (true );
290
290
} else {
291
- factory .setWantClientAuth (true );
291
+ factory .setWantClientAuth (( params . wantClientCertificates ) );
292
292
}
293
293
294
294
ServerConnector connector = new ServerConnector (server , factory );
@@ -597,6 +597,9 @@ public static class Params {
597
597
@ Option (name = "--requireClientCertificates" , usage = "Require client X509 certificates for https connections." )
598
598
public Boolean requireClientCertificates = FILESETTINGS .getBoolean (Keys .server .requireClientCertificates , false );
599
599
600
+ @ Option (name = "--wantClientCertificates" , usage = "Ask for optional client X509 certificate for https connections. Ignored if client certificates are required." )
601
+ public Boolean wantClientCertificates = FILESETTINGS .getBoolean (Keys .server .wantClientCertificates , false );
602
+
600
603
/*
601
604
* Setting overrides
602
605
*/
You can’t perform that action at this time.
0 commit comments