Skip to content

Commit f1af78e

Browse files
committed
Add requestCert support to the server
Add this configuartion flag to request a client's certificate for 2-way PKI authentication.
1 parent 09ffe23 commit f1af78e

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

lib/Server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,8 @@ function Server(compiler, options) {
360360
cert: options.cert,
361361
ca: options.ca,
362362
pfx: options.pfx,
363-
passphrase: options.pfxPassphrase
363+
passphrase: options.pfxPassphrase,
364+
requestCert: options.requestCert || false
364365
};
365366
}
366367

lib/optionsSchema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@
145145
"description": "The passphrase to a (SSL) PFX file.",
146146
"type": "string"
147147
},
148+
"requestCert": {
149+
"description": "Enables request for client certificate.",
150+
"type": "boolean"
151+
},
148152
"inline": {
149153
"description": "Enable inline mode to include client scripts in bundle (CLI-only).",
150154
"type": "boolean"

test/Validation.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ describe("Validation", function() {
4949
message: [
5050
" - configuration has an unknown property 'asdf'. These properties are valid:",
5151
" object { hot?, hotOnly?, lazy?, bonjour?, host?, allowedHosts?, filename?, publicPath?, port?, socket?, " +
52-
"watchOptions?, headers?, clientLogLevel?, overlay?, key?, cert?, ca?, pfx?, pfxPassphrase?, " +
52+
"watchOptions?, headers?, clientLogLevel?, overlay?, key?, cert?, ca?, pfx?, pfxPassphrase?, requestCert?, " +
5353
"inline?, disableHostCheck?, public?, https?, contentBase?, watchContentBase?, open?, useLocalIp?, openPage?, features?, " +
5454
"compress?, proxy?, historyApiFallback?, staticOptions?, setup?, stats?, reporter?, " +
5555
"noInfo?, quiet?, serverSideRender?, index?, log?, warn? }"

0 commit comments

Comments
 (0)