-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide a subdomain with a reversed certificate chain (#443)
* Change Ruby version to 2.4 Jekyll requires Ruby 2.4. Update Dockerfile to include it per comment by @shawn-lo on #405 . * Do not run `docker-run` before `docker-build` or `certs-test` have concluded * Provide a subdomain with a disorderly certificate chain * Improve naming of misorderly certificate chain Rename it from disorderly certificate chain, as suggested by lgarron. * Improve naming of reverse certificate chain Ideally, a misorderly chain would leverage 3 or more certificates; since there may be some obstacles to doing so with the live website, simplify the expectations of our use case by renaming it to reverse certificate chain. * Fix typo in naming of reversed certificate chain It's _reversed_ rather than reverse. Co-authored-by: Brad <[email protected]>
- Loading branch information
Showing
9 changed files
with
80 additions
and
3 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -2,14 +2,18 @@ | |
FROM ubuntu:16.04 | ||
MAINTAINER April King <[email protected]> | ||
EXPOSE 80 443 | ||
RUN apt-get update && apt-get install -y apt-transport-https | ||
RUN apt-get install -y software-properties-common | ||
RUN apt-add-repository ppa:brightbox/ruby-ng | ||
RUN apt-get update && apt-get install -y \ | ||
build-essential \ | ||
git \ | ||
libffi-dev \ | ||
make \ | ||
nginx \ | ||
ruby \ | ||
ruby-dev | ||
ruby2.4 \ | ||
ruby2.4-dev | ||
RUN gem update --system | ||
RUN gem install jekyll | ||
|
||
# Install badssl.com | ||
|
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
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,20 @@ | ||
[ req ] | ||
default_bits = 2048 | ||
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 = reversed-chain.__DOMAIN__ | ||
|
||
[ req_v3_usr ] | ||
basicConstraints = CA:FALSE | ||
subjectAltName = @alt_names | ||
|
||
[ alt_names ] | ||
DNS.1 = reversed-chain.__DOMAIN__ |
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 @@ | ||
--- | ||
--- | ||
server { | ||
listen 80; | ||
server_name reversed-chain.{{ site.domain }}; | ||
|
||
return 301 https://$server_name$request_uri; | ||
} | ||
|
||
server { | ||
listen 443; | ||
server_name reversed-chain.{{ site.domain }}; | ||
|
||
include {{ site.serving-path }}/nginx-includes/subdomain-reversed-chain.conf; | ||
include {{ site.serving-path }}/nginx-includes/tls-defaults.conf; | ||
include {{ site.serving-path }}/common/common.conf; | ||
|
||
root {{ site.serving-path }}/domains/cert/reversed-chain; | ||
} |
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,16 @@ | ||
--- | ||
subdomain: reversed-chain | ||
layout: page | ||
favicon: orange | ||
background: rgb(243, 121, 46) | ||
--- | ||
|
||
<div id="content"> | ||
<h1 style="font-size: 8vw;"> | ||
{{ page.subdomain }}.<br>{{ site.domain }} | ||
</h1> | ||
</div> | ||
|
||
<div id="footer" style="font-size: 1.5vw"> | ||
The certificate chain sent by this site is not hierarchically ordered. This will cause a certificate error unless the browser knows how to walk a reversed chain. | ||
</div> |
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
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,6 @@ | ||
--- | ||
--- | ||
|
||
ssl on; | ||
ssl_certificate {{ site.cert-path }}/subdomain-reversed-chain.pem; | ||
ssl_certificate_key /etc/keys/ca-intermediate.key; |