Sha256: ebc0310412aee6e0463ac85fb5c615d4928cde272e688663e3482f5904bb9223

Contents?: true

Size: 937 Bytes

Versions: 32

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'] || 8443),
  :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

32 entries across 32 versions & 1 rubygems

Version Path
braintree-2.36.0 spec/script/httpsd.rb
braintree-2.35.0 spec/script/httpsd.rb
braintree-2.34.1 spec/script/httpsd.rb
braintree-2.34.0 spec/script/httpsd.rb
braintree-2.33.1 spec/script/httpsd.rb
braintree-2.33.0 spec/script/httpsd.rb
braintree-2.32.1 spec/script/httpsd.rb
braintree-2.31.0 spec/script/httpsd.rb
braintree-2.30.2 spec/script/httpsd.rb
braintree-2.30.0 spec/script/httpsd.rb
braintree-2.29.0 spec/script/httpsd.rb
braintree-2.28.0 spec/script/httpsd.rb
braintree-2.27.1 spec/script/httpsd.rb
braintree-2.27.0 spec/script/httpsd.rb
braintree-2.26.0 spec/script/httpsd.rb
braintree-2.25.0 spec/script/httpsd.rb
braintree-2.24.0 spec/script/httpsd.rb
braintree-2.23.0 spec/script/httpsd.rb
braintree-2.22.0 spec/script/httpsd.rb
braintree-2.21.0 spec/script/httpsd.rb