Skip to content

Add expired-ocsp.badssl.com subdomain #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions certs/cert-generator/cert-generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,30 @@ openssl x509 -req -days 730 -sha256 -CAcreateserial \
-in badssl-wildcard.csr \
-CA ../self-signed/badssl-intermediate.pem \
-CAkey ../self-signed/badssl-intermediate.key \
-set_serial 01 \
-extfile badssl-wildcard.conf \
-extensions req_v3_usr \
-out out.pem
cat out.pem ../self-signed/badssl-intermediate.pem ../self-signed/badssl-root.pem > ../self-signed/wildcard.normal.pem
echo

echo "Generating expired OCSP response for BadSSL Default Certificate"
printf "V\t\t\t01\t\t\n" > index.txt # 01 must match serial # of cert, as passed to -set_serial above
echo "unique_subject = no" > index.txt.attr
openssl ocsp \
-index index.txt \
-rsigner ../self-signed/badssl-intermediate.pem \
-rkey ../self-signed/badssl-intermediate.key \
-CA ../self-signed/badssl-intermediate.pem \
-issuer ../self-signed/badssl-intermediate.pem \
-CAfile ../self-signed/badssl-root.pem \
-serial 01 \
-nmin 1 \
-nrequest 1 \
-respout ../self-signed/wildcard.expired-ocsp.der
rm index.txt index.txt.attr
echo

echo "Generating incomplete certificate chain"
cp out.pem ../self-signed/wildcard.incomplete-chain.pem
rm out.pem
Expand All @@ -69,6 +87,7 @@ openssl x509 -req -days $du2016 -sha1 -CAcreateserial \
-in badssl-wildcard.csr \
-CA ../self-signed/badssl-intermediate.pem \
-CAkey ../self-signed/badssl-intermediate.key \
-set_serial 02 \
-extfile badssl-wildcard.conf \
-extensions req_v3_usr \
-out out.pem
Expand All @@ -81,6 +100,7 @@ openssl x509 -req -days $du2017 -sha1 -CAcreateserial \
-in badssl-wildcard.csr \
-CA ../self-signed/badssl-intermediate.pem \
-CAkey ../self-signed/badssl-intermediate.key \
-set_serial 03 \
-extfile badssl-wildcard.conf \
-extensions req_v3_usr \
-out out.pem
Expand All @@ -96,6 +116,7 @@ if [ ! -f ../self-signed/wildcard.expired.pem ]
-in badssl-wildcard.csr \
-CA ../self-signed/badssl-intermediate.pem \
-CAkey ../self-signed/badssl-intermediate.key \
-set_serial 04 \
-extfile badssl-wildcard.conf \
-extensions req_v3_usr \
-out out.pem
Expand All @@ -110,6 +131,7 @@ echo "Self-signing BadSSL SHA-256 Certificate"
openssl x509 -req -days 730 -sha256 -CAcreateserial \
-in badssl-wildcard.csr \
-signkey ../self-signed/badssl.com.key \
-set_serial 05 \
-extfile badssl-wildcard.conf \
-extensions req_v3_usr \
-out out.pem
Expand All @@ -136,6 +158,7 @@ openssl x509 -req -days 730 -sha256 -CAcreateserial \
-in rsa512.badssl-wildcard.csr \
-CA ../self-signed/badssl-intermediate.pem \
-CAkey ../self-signed/badssl-intermediate.key \
-set_serial 06 \
-extfile badssl-wildcard.conf \
-extensions req_v3_usr \
-out out.pem
Expand All @@ -160,6 +183,7 @@ openssl x509 -req -days 730 -sha256 -CAcreateserial \
-in rsa1024.badssl-wildcard.csr \
-CA ../self-signed/badssl-intermediate.pem \
-CAkey ../self-signed/badssl-intermediate.key \
-set_serial 07 \
-extfile badssl-wildcard.conf \
-extensions req_v3_usr \
-out out.pem
Expand Down
Binary file added certs/self-signed/wildcard.expired-ocsp.der
Binary file not shown.
Binary file added certs/wildcard.expired-ocsp.der
Binary file not shown.
1 change: 1 addition & 0 deletions domains/misc/badssl.com/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
<a href="https://dh-small-subgroup.badssl.com/" class="more bad">dh-small-subgroup</a>
<a href="https://dh-composite.badssl.com/" class="more bad">dh-composite</a>
<a href="https://incomplete-chain.badssl.com/" class="more orange">incomplete-chain</a>
<a href="https://expired-ocsp.badssl.com/" class="more orange">expired-ocsp</a>
<a href="https://very.badssl.com/" class="more dubious">very</a>
<a href="https://rc4-md5.badssl.com/" class="more neutral">rc4-md5</a>
<a href="http://http.badssl.com/" class="more neutral">http</a>
Expand Down
20 changes: 20 additions & 0 deletions domains/misc/expired-ocsp.badssl.com.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
server {
listen 80;
server_name expired-ocsp.badssl.com;

return 301 https://$server_name$request_uri;
}

server {
listen 443;
server_name expired-ocsp.badssl.com;

include /var/www/badssl/nginx-includes/wildcard.normal.conf;
include /var/www/badssl/nginx-includes/tls-defaults.conf;
include /var/www/badssl/common/common.conf;

ssl_stapling on;
ssl_stapling_file /var/www/badssl/certs/wildcard.expired-ocsp.der;

root /var/www/badssl/domains/misc/expired-ocsp.badssl.com;
}
40 changes: 40 additions & 0 deletions domains/misc/expired-ocsp.badssl.com/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!doctype html>
<html>
<head>
<title>expired-ocsp.badssl.com</title>
<link rel="shortcut icon" href="/icons/favicon-orange.ico"/>
<link rel="apple-touch-icon" href="/icon-orange.png"/>
<style>
html, body {
background: rgb(243, 121, 46);

margin: 0;
padding: 0;

height: 100%;
display: -webkit-flexbox;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
}
h1 {
color: white;
text-align: center;
font-family: "Source Code Pro", Monaco, Consolas, "Courier New", monospace, Impact;
font-size: 5em;
font-size: 8vw;
text-shadow:
0 0 20px rgba(255, 255, 255, 0.5),
0 0 40px rgba(255, 255, 255, 0.5),
0 0 60px rgba(255, 255, 255, 0.5);
}
</style>
</head>
<body>
<h1>expired-ocsp.<br>badssl.com</h1>
</body>
</html>