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 @@ -2135,8 +2135,8 @@ server.storePassword = gitblit
2135
2135
# authenticate with ssl certificates. If enabled, only https clients with the
2136
2136
# a valid client certificate will be able to access Gitblit.
2137
2137
#
2138
- # If disabled, client certificate authentication is optional and will be tried
2139
- # first before falling-back to form authentication or basic authentication.
2138
+ # If disabled, optional client certificate authentication is configurable by
2139
+ # server.wantClientCertificates
2140
2140
#
2141
2141
# Requiring client certificates to access any of Gitblit may be too extreme,
2142
2142
# consider this carefully.
@@ -2145,6 +2145,15 @@ server.storePassword = gitblit
2145
2145
# RESTART REQUIRED
2146
2146
server.requireClientCertificates = false
2147
2147
2148
+ # If enabled, client certificate authentication is optional and will be tried
2149
+ # first before falling-back to form authentication or basic authentication.
2150
+ #
2151
+ # If disabled, no client certificate authentication will be done at all.
2152
+ #
2153
+ # SINCE 1.8.1
2154
+ # RESTART REQUIRED
2155
+ server.wantClientCertificates = false
2156
+
2148
2157
# Port for shutdown monitor to listen on.
2149
2158
#
2150
2159
# SINCE 0.5.0
Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ public void log(String message) {
292
292
if (params .requireClientCertificates ) {
293
293
factory .setNeedClientAuth (true );
294
294
} else {
295
- factory .setWantClientAuth (true );
295
+ factory .setWantClientAuth (( params . wantClientCertificates ) );
296
296
}
297
297
298
298
ServerConnector connector = new ServerConnector (server , factory );
@@ -602,6 +602,9 @@ public static class Params {
602
602
@ Option (name = "--requireClientCertificates" , usage = "Require client X509 certificates for https connections." )
603
603
public Boolean requireClientCertificates = FILESETTINGS .getBoolean (Keys .server .requireClientCertificates , false );
604
604
605
+ @ Option (name = "--wantClientCertificates" , usage = "Ask for optional client X509 certificate for https connections. Ignored if client certificates are required." )
606
+ public Boolean wantClientCertificates = FILESETTINGS .getBoolean (Keys .server .wantClientCertificates , false );
607
+
605
608
/*
606
609
* Setting overrides
607
610
*/
You can’t perform that action at this time.
0 commit comments