Skip to content
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

Add a certificate with the TLSFeature extension specified by rfc 7633. #115

Open
wants to merge 3 commits 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/badssl-must-staple.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[ req ]
default_bits = 2048
default_keyfile = ../self-signed/badssl.key
distinguished_name = req_distinguished_name
encrypt_key = no
prompt = no
req_extensions = req_v3_usr

[ req_distinguished_name ]
countryName = US
stateOrProvinceName = California
localityName = San Francisco
organizationName = BadSSL
commonName = must-staple.badssl.com

[ req_v3_usr ]
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names
1.3.6.1.5.5.7.1.24 = DER:30:03:02:01:05

[ alt_names ]
DNS.1 = must-staple.badssl.com
DNS.2 = must-staple-no-ocsp.badssl.com
18 changes: 18 additions & 0 deletions certs/cert-generator/cert-generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,24 @@ cat out.pem ../self-signed/badssl-intermediate.pem ../self-signed/badssl-root.pe
rm out.pem
echo

echo "Generating BadSSL.com must-staple Certificate Signing Request"
openssl req -new \
-key ../self-signed/badssl.com.key \
-out badssl-must-staple.csr \
-config badssl-must-staple.conf

echo "Signing BadSSL.com must-staple Certificate"
openssl x509 -req -days 730 -sha256 -CAcreateserial \
-in badssl-must-staple.csr \
-CA ../self-signed/badssl-intermediate.pem \
-CAkey ../self-signed/badssl-intermediate.key \
-extfile badssl-must-staple.conf \
-extensions req_v3_usr \
-out out.pem
cat out.pem ../self-signed/badssl-intermediate.pem ../self-signed/badssl-root.pem > ../self-signed/must-staple.badssl.com.pem
rm out.pem
echo

# Generate the Diffie-Hellman primes
if [[ $regen =~ ^[Yy]$ ]]; then
openssl dhparam -out ../self-signed/dh480.pem 480
Expand Down