Sha256: 5b93deb81e0ea2e5841e9fcd17a1de58e3bcdd96866c8e7c499acd6c0eb1195d

Contents?: true

Size: 940 Bytes

Versions: 25

Compression:

Stored size: 940 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

25 entries across 25 versions & 1 rubygems

Version Path
braintree-4.23.0 spec/script/httpsd.rb
braintree-4.22.0 spec/script/httpsd.rb
braintree-4.21.0 spec/script/httpsd.rb
braintree-4.20.0 spec/script/httpsd.rb
braintree-4.19.0 spec/script/httpsd.rb
braintree-4.18.0 spec/script/httpsd.rb
braintree-4.17.0 spec/script/httpsd.rb
braintree-4.16.0 spec/script/httpsd.rb
braintree-4.15.0 spec/script/httpsd.rb
braintree-4.14.0 spec/script/httpsd.rb
braintree-4.13.0 spec/script/httpsd.rb
braintree-4.12.0 spec/script/httpsd.rb
braintree-4.11.0 spec/script/httpsd.rb
braintree-4.10.0 spec/script/httpsd.rb
braintree-4.9.0 spec/script/httpsd.rb
braintree-4.8.0 spec/script/httpsd.rb
braintree-4.7.0 spec/script/httpsd.rb
braintree-4.6.0 spec/script/httpsd.rb
braintree-4.5.0 spec/script/httpsd.rb
braintree-4.4.0 spec/script/httpsd.rb