From 564d3bce395aaa544239462cf1a634fe8ded62cb Mon Sep 17 00:00:00 2001 From: evilsocket Date: Wed, 10 Aug 2016 17:14:00 -0700 Subject: [PATCH] Fixed a bug which caused '*.domain.tld' certificates not to be correctly handled --- lib/bettercap/proxy/http/ssl/authority.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/bettercap/proxy/http/ssl/authority.rb b/lib/bettercap/proxy/http/ssl/authority.rb index 9b626ddb..8fe4d4b1 100644 --- a/lib/bettercap/proxy/http/ssl/authority.rb +++ b/lib/bettercap/proxy/http/ssl/authority.rb @@ -58,6 +58,9 @@ def initialize # Find the +hostname+:+port+ certificate and return it. def find( hostname, port ) + # make sure *.domain.tld hostnames are correctly sanitized + hostname.gsub!( "*", "www" ) + key = Digest::SHA256.hexdigest( "#{hostname}_#{port}" ) @lock.synchronize {