forked from PowerDNS/pdns
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
384 additions
and
1 deletion.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,12 @@ | |
/configs | ||
/vars | ||
/*_pb2.py | ||
/ca.key | ||
/ca.pem | ||
/ca.srl | ||
/server.chain | ||
/server.csr | ||
/server.key | ||
/server.pem | ||
/server.p12 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
clean-certs: | ||
rm -f ca.key ca.pem ca.srl server.csr server.key server.pem server.chain server.ocsp | ||
clean-configs: | ||
rm -rf configs/* | ||
certs: | ||
# Generate a new CA | ||
openssl req -new -x509 -days 1 -extensions v3_ca -keyout ca.key -out ca.pem -nodes -config configCA.conf | ||
# Generate a new server certificate request | ||
openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr -config configServer.conf | ||
# Sign the server cert | ||
openssl x509 -req -days 1 -CA ca.pem -CAkey ca.key -CAcreateserial -in server.csr -out server.pem -extfile configServer.conf -extensions v3_req | ||
# Generate a chain | ||
cat server.pem ca.pem > server.chain | ||
# Generate a password-protected PKCS12 file | ||
openssl pkcs12 -export -passout pass:passw0rd -clcerts -in server.pem -CAfile ca.pem -inkey server.key -out server.p12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[req] | ||
default_bits = 2048 | ||
encrypt_key = no | ||
prompt = no | ||
distinguished_name = distinguished_name | ||
|
||
[v3_ca] | ||
subjectKeyIdentifier = hash | ||
authorityKeyIdentifier = keyid:always,issuer:always | ||
basicConstraints = critical, CA:true | ||
keyUsage = critical, cRLSign, keyCertSign | ||
|
||
[distinguished_name] | ||
CN = PowerDNS Recursor TLS regression tests CA | ||
OU = PowerDNS.com BV | ||
countryName = NL | ||
|
||
[CA_default] | ||
copy_extensions = copy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[req] | ||
default_bits = 2048 | ||
encrypt_key = no | ||
prompt = no | ||
distinguished_name = server_distinguished_name | ||
req_extensions = v3_req | ||
|
||
[server_distinguished_name] | ||
CN = tls.tests.powerdns.com | ||
OU = PowerDNS.com BV | ||
countryName = NL | ||
|
||
[v3_req] | ||
basicConstraints = CA:FALSE | ||
keyUsage = nonRepudiation, digitalSignature, keyEncipherment | ||
subjectAltName = @alt_names | ||
|
||
[alt_names] | ||
DNS.1 = tls.tests.powerdns.com | ||
DNS.2 = powerdns.com | ||
IP.3 = 127.0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters