File tree 3 files changed +36
-3
lines changed
3 files changed +36
-3
lines changed Original file line number Diff line number Diff line change @@ -169,9 +169,14 @@ A few caveats:
169
169
add it to your trusted certs then anyone getting hold of it could potentially
170
170
get access to any service you use on the web.
171
171
172
- TODO: Document how to generate such a keystore, and how to trust its
173
- certificate, on Linux, OS/X & Windows.
174
-
172
+ > See [this script](https://github.com/tomakehurst/wiremock/blob/master/scripts/create-ca-cert.sh)
173
+ > for an example of how to build a valid self-signed root certificate called
174
+ > ca-cert.crt already imported into a keystore called ca-cert.jks.
175
+ >
176
+ > On OS/X it can be trusted by dragging ca-cert.crt onto Keychain Access,
177
+ > double clicking on the certificate and setting SSL to "always trust".
178
+ >
179
+ > Please raise PRs to add documentation for other platforms.
175
180
176
181
Proxying of HTTPS traffic when the proxy endpoint is also HTTPS is problematic;
177
182
Postman seems not to cope with an HTTPS proxy even to proxy HTTP traffic. Older
Original file line number Diff line number Diff line change
1
+ [req]
2
+ default_bits = 4096
3
+ prompt = no
4
+ default_md = sha256
5
+ distinguished_name = req_distinguished_name
6
+ x509_extensions = v3_ca
7
+ default_days = 36525
8
+
9
+ [req_distinguished_name]
10
+ C = GB
11
+ ST = London
12
+ O = WireMock
13
+ CN = WireMock Local Self Signed Root Certificate
14
+
15
+ [v3_ca]
16
+ subjectKeyIdentifier = hash
17
+ authorityKeyIdentifier = keyid:always
18
+ basicConstraints = critical, CA:TRUE
19
+ keyUsage = critical, keyCertSign, cRLSign
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -euo pipefail
4
+ read -r -s -p " Please enter a password for the key & keystore (default: password):" PASSWORD
5
+ PASSWORD=${PASSWORD:= password}
6
+ openssl req -x509 -newkey rsa:2048 -utf8 -days 3650 -nodes -config ca-cert.conf -keyout ca-cert.key -out ca-cert.crt
7
+ openssl pkcs12 -export -inkey ca-cert.key -in ca-cert.crt -out ca-cert.p12 -password " pass:$PASSWORD "
8
+ keytool -importkeystore -deststorepass " $PASSWORD " -destkeypass " $PASSWORD " -srckeystore ca-cert.p12 -srcstorepass " $PASSWORD " -deststoretype jks -destkeystore ca-cert.jks
9
+ rm ca-cert.key ca-cert.p12
You can’t perform that action at this time.
0 commit comments