-
-
Save headius/9b39484d37c5d1c0219107576ff5ac47 to your computer and use it in GitHub Desktop.
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
Only in ../ruby/lib/webrick: .document | |
Common subdirectories: lib/webrick/httpauth and ../ruby/lib/webrick/httpauth | |
diff -u lib/webrick/httpproxy.rb ../ruby/lib/webrick/httpproxy.rb | |
--- lib/webrick/httpproxy.rb 2020-06-30 14:19:23.000000000 -0500 | |
+++ ../ruby/lib/webrick/httpproxy.rb 2020-06-30 14:26:34.000000000 -0500 | |
@@ -295,6 +295,10 @@ | |
return FakeProxyURI | |
end | |
+ def create_net_http(uri, upstream) | |
+ Net::HTTP.new(uri.host, uri.port, upstream.host, upstream.port) | |
+ end | |
+ | |
def perform_proxy_request(req, res, req_class, body_stream = nil) | |
uri = req.request_uri | |
path = uri.path.dup | |
@@ -303,7 +307,7 @@ | |
upstream = setup_upstream_proxy_authentication(req, res, header) | |
body_tmp = [] | |
- http = Net::HTTP.new(uri.host, uri.port, upstream.host, upstream.port) | |
+ http = create_net_http(uri, upstream) | |
req_fib = Fiber.new do | |
http.start do | |
if @config[:ProxyTimeout] | |
Common subdirectories: lib/webrick/httpservlet and ../ruby/lib/webrick/httpservlet | |
diff -u lib/webrick/ssl.rb ../ruby/lib/webrick/ssl.rb | |
--- lib/webrick/ssl.rb 2020-06-29 23:36:38.000000000 -0500 | |
+++ ../ruby/lib/webrick/ssl.rb 2020-06-30 14:26:34.000000000 -0500 | |
@@ -122,7 +122,7 @@ | |
ef.issuer_certificate = cert | |
cert.extensions = [ | |
ef.create_extension("basicConstraints","CA:FALSE"), | |
- ef.create_extension("keyUsage", "keyEncipherment"), | |
+ ef.create_extension("keyUsage", "keyEncipherment, digitalSignature, keyAgreement, dataEncipherment"), | |
ef.create_extension("subjectKeyIdentifier", "hash"), | |
ef.create_extension("extendedKeyUsage", "serverAuth"), | |
ef.create_extension("nsComment", comment), | |
@@ -130,7 +130,7 @@ | |
aki = ef.create_extension("authorityKeyIdentifier", | |
"keyid:always,issuer:always") | |
cert.add_extension(aki) | |
- cert.sign(rsa, OpenSSL::Digest::SHA256.new) | |
+ cert.sign(rsa, "SHA256") | |
return [ cert, rsa ] | |
end | |
Only in ../ruby/lib/webrick: webrick.gemspec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment