Sha256: 02f2e1e3948f7e06343f9403cdfb0a7cec56b5b1deb96b5aa7a34e913d66d2f4

Contents?: true

Size: 937 Bytes

Versions: 76

Compression:

Stored size: 937 Bytes

Contents

#!/usr/bin/env ruby
require 'webrick'
require 'webrick/https'
require 'openssl'

private_key_file = File.expand_path(File.join(File.dirname(__FILE__), "..", "ssl", "privateKey.key"))
cert_file = File.expand_path(File.join(File.dirname(__FILE__), "..", "ssl", "certificate.crt"))

pkey = OpenSSL::PKey::RSA.new(File.read(private_key_file))
cert = OpenSSL::X509::Certificate.new(File.read(cert_file))

pid_file = ARGV[0]

s = WEBrick::HTTPServer.new(
  :Port => (ENV['SSL_TEST_PORT'] || 8444),
  :Logger => WEBrick::Log::new(nil, WEBrick::Log::ERROR),
  :DocumentRoot => File.join(File.dirname(__FILE__)),
  :ServerType => WEBrick::Daemon,
  :SSLEnable => true,
  :SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE,
  :SSLCertificate => cert,
  :SSLPrivateKey => pkey,
  :SSLCertName => [ [ "CN",WEBrick::Utils::getservername ] ],
  :StartCallback => proc { File.open(pid_file, "w") { |f| f.write $$.to_s }}
)
trap("INT"){ s.shutdown }
s.start

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
braintree-3.3.0 spec/script/httpsd.rb
braintree-3.2.0 spec/script/httpsd.rb
braintree-3.1.0 spec/script/httpsd.rb
braintree-3.0.1 spec/script/httpsd.rb
braintree-2.104.1 spec/script/httpsd.rb
braintree-2.104.0 spec/script/httpsd.rb
braintree-2.103.0 spec/script/httpsd.rb
braintree-2.102.0 spec/script/httpsd.rb
braintree-2.101.0 spec/script/httpsd.rb
braintree-2.100.0 spec/script/httpsd.rb
braintree-2.99.0 spec/script/httpsd.rb
braintree-2.98.0 spec/script/httpsd.rb
braintree-2.97.0 spec/script/httpsd.rb
braintree-2.96.0 spec/script/httpsd.rb
braintree-2.95.0 spec/script/httpsd.rb
braintree-2.94.0 spec/script/httpsd.rb
braintree-2.93.0 spec/script/httpsd.rb
braintree-2.92.0 spec/script/httpsd.rb
braintree-2.91.0 spec/script/httpsd.rb
braintree-2.90.0 spec/script/httpsd.rb