Skip to content

Commit

Permalink
Create a "client-nopass.pem" for use with Python requests, and add it…
Browse files Browse the repository at this point in the history
… to the download page.

Partly addresses #369.
Using a passphrase other than "badssl.com" for the other files would also be great,
but is a larger change, I think.
  • Loading branch information
Arthur O'Dwyer committed Aug 11, 2020
1 parent 2f1a214 commit e022adb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ certs-test:
cp certs/sets/current/gen/crt/ca-untrusted-root.crt common/certs
cp certs/sets/current/gen/crt/client.p12 common/certs/${TEST_DOMAIN}-client.p12
cp certs/sets/current/gen/crt/client.pem common/certs/${TEST_DOMAIN}-client.pem
cp certs/sets/current/gen/crt/client-nopass.pem common/certs/${TEST_DOMAIN}-client-nopass.pem

.PHONY: certs-prod
certs-prod:
Expand All @@ -50,6 +51,7 @@ certs-prod:
cp certs/sets/current/gen/crt/ca-untrusted-root.crt common/certs
cp certs/sets/current/gen/crt/client.p12 common/certs/${PROD_DOMAIN}-client.p12
cp certs/sets/current/gen/crt/client.pem common/certs/${PROD_DOMAIN}-client.pem
cp certs/sets/current/gen/crt/client-nopass.pem common/certs/${PROD_DOMAIN}-client-nopass.pem

.PHONY: clean-certs
clean-certs:
Expand Down
3 changes: 3 additions & 0 deletions certs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ $(O)/gen/crt/client.p12: $(O)/gen/crt/client.crt $(O)/gen/key/client.key
./tool gen-pkcs12-p12 $@ $(D) $^
$(O)/gen/crt/client.pem: $(O)/gen/crt/client.p12
./tool pkcs12-convert-p12-pem $@ $(D) $^
$(O)/gen/crt/client-nopass.pem: $(O)/gen/crt/client.p12
./tool pkcs12-convert-p12-pem-nopass $@ $(D) $^
CHAINS_PROD += $(O)/gen/crt/client.pem
CHAINS_PROD += $(O)/gen/crt/client-nopass.pem

################################
$(O)/gen/key/ca-untrusted-root.key:
Expand Down
7 changes: 7 additions & 0 deletions certs/tool
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ pkcs12-convert-p12-pem)
-passout "pass:$DOMAIN" \
-in $1
;;
pkcs12-convert-p12-pem-nopass)
openssl pkcs12 \
-out $OUT \
-clcerts \
-passin "pass:$DOMAIN" \
-in $1
;;
self-sign)
openssl x509 -req -CAcreateserial \
-out $OUT \
Expand Down
7 changes: 6 additions & 1 deletion domains/misc/badssl.com/download/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2>Client Certificates</h2>
<table>
<thead>
<td>Download</td>
<td>Password</td>
<td>Passphrase</td>
<td>Format</td>
</thead>
<tbody>
Expand All @@ -36,6 +36,11 @@ <h2>Client Certificates</h2>
<td><b><code>{{ site.domain }}</code></b></td>
<td>PEM</td>
</tr>
<tr>
<td><a href="/certs/{{ site.domain }}-client-nopass.pem">{{ site.domain }}-client-nopass.pem</a></td>
<td>&mdash;</td>
<td>PEM</td>
</tr>
</tbody>
</table>
</div>
Expand Down

0 comments on commit e022adb

Please sign in to comment.