Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

first commit

  • Loading branch information...
commit 43605a8b391d52876403ecf44356e2475ed29eb8 0 parents
Stevie Graham authored

Showing 3 changed files with 3,404 additions and 0 deletions. Show diff stats Hide diff stats

  1. +16 0 certified.gemspec
  2. +12 0 certified.rb
  3. +3,376 0 certs/ca-bundle.crt
16 certified.gemspec
... ... @@ -0,0 +1,16 @@
  1 +Gem::Specification.new do |s|
  2 + s.platform = Gem::Platform::RUBY
  3 + s.name = 'certified'
  4 + s.version = '0.1.0'
  5 + s.summary = 'Ensure net/http uses peer verification'
  6 + s.description = "Provides a certificate bundle in case cannot find it's own to verify certificates. Ensures verify mode is set to OpenSSL::SSL::VERIFY_PEER"
  7 +
  8 + s.required_ruby_version = '>= 1.8.7'
  9 +
  10 + s.author = 'Stevie Graham'
  11 + s.email = 'sjtgraham@mac.com'
  12 + s.homepage = 'http://github.com/stevegraham/certified'
  13 +
  14 + s.files = Dir['README.md', 'certified.rb', 'certs/ca-bundle.crt']
  15 + s.require_path = '.'
  16 +end
12 certified.rb
... ... @@ -0,0 +1,12 @@
  1 +require 'net/https'
  2 +
  3 +Net::HTTP.class_eval do
  4 + alias _use_ssl= use_ssl=
  5 +
  6 + def use_ssl= boolean
  7 + self.ca_file = './certs/ca-bundle.crt'
  8 + self.verify_mode = OpenSSL::SSL::VERIFY_PEER
  9 + self._use_ssl = boolean
  10 + end
  11 +end
  12 +
3,376 certs/ca-bundle.crt
3,376 additions, 0 deletions not shown

0 comments on commit 43605a8

Please sign in to comment.
Something went wrong with that request. Please try again.