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

Disable TLSv1.0 and TLSv1.1 #3354

Merged
merged 3 commits into from Mar 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions vcl/main.vcl
Expand Up @@ -8,6 +8,14 @@

sub vcl_recv {

# Fastly is dropping support for TLSv1.0 and TLSv1.1, in preperation for
# for that, we're going to block support for it now, using VCL. This will
# let us present a better error message in the interim before Fastly shuts
# off TLSv1.0 and TLSv1.1 support completely.
if (tls.client.protocol ~ "^TLSv1(\.(0|1))?$") {
error 804 "Bad SSL Version";
}

# I'm not 100% sure on what this is exactly for, it was taken from the
# Fastly documentation, however, what I *believe* it does is just ensure
# that we don't serve a stale copy of the page from the shield node when
Expand Down Expand Up @@ -383,6 +391,12 @@ sub vcl_error {
set obj.http.Content-Type = "text/plain; charset=UTF-8";
synthetic {"SSL is required."};
return (deliver);
} else if(obj.status == 804) {
set obj.status = 403;
set obj.response = "TLSv1.2+ is required";
set obj.http.Content-Type = "text/plain; charset=UTF-8";
synthetic {"Support for " tls.client.protocol " has been removed, please upgrade to a TLSv1.2+ client."};
return (deliver);
} else if (obj.status == 750) {
set obj.status = 301;
set obj.http.Location = req.http.Location;
Expand Down