Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added CHANGELOG, README, and LICENSE.

Also added test files to gemspec.
  • Loading branch information...
commit 9c4ff01232ebee6157ad8929e8cb724a1fda863c 1 parent f73621b
Nathaniel Bibler nbibler authored
6 CHANGELOG.md
Source Rendered
... ... @@ -0,0 +1,6 @@
  1 +## 1.0.0, released 2011-01-17
  2 +
  3 +* Initial major release.
  4 +* Extends OpenSSL::X509::Request, OpenSSL::X509::Certificate, OpenSSL::X509::Name
  5 +* Adds OpenSSLExtensions::X509::CertificateChain and OpenSSLExtensions::X509::AuthorityKeyIdentifier
  6 +
21 LICENSE
... ... @@ -0,0 +1,21 @@
  1 +Copyright (c) 2010 Envy Labs LLC
  2 +
  3 +Permission is hereby granted, free of charge, to any person obtaining
  4 +a copy of this software and associated documentation files (the
  5 +"Software"), to deal in the Software without restriction, including
  6 +without limitation the rights to use, copy, modify, merge, publish,
  7 +distribute, sublicense, and/or sell copies of the Software, and to
  8 +permit persons to whom the Software is furnished to do so, subject to
  9 +the following conditions:
  10 +
  11 +The above copyright notice and this permission notice shall be
  12 +included in all copies or substantial portions of the Software.
  13 +
  14 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  15 +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  16 +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  17 +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  18 +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  19 +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  20 +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  21 +
50 README.md
Source Rendered
... ... @@ -0,0 +1,50 @@
  1 +# OpenSSL Extensions
  2 +
  3 +This library generally provides helper methods which makes working with
  4 +OpenSSL a little more bearable. It does, however, provide some additional
  5 +structures (such as a CertificateChain) which extend the traditional
  6 +features of the library.
  7 +
  8 +## Installation
  9 +
  10 +With [Bundler](http://gembundler.com):
  11 +
  12 + gem 'openssl-extensions', :require => 'openssl-extensions/all'
  13 +
  14 +With standard RubyGems:
  15 +
  16 + gem install openssl-extensions
  17 +
  18 + require 'rubygems'
  19 + require 'openssl-extensions/all'
  20 +
  21 +Once required, the extensions are automatically applied.
  22 +
  23 +## Usage
  24 +
  25 +In general, this extension library should be somewhat transparent to you.
  26 +It does not directly provide many classes with which you might interact.
  27 +Instead, it extends the current classes provided by Ruby's OpenSSL library
  28 +(being OpenSSL::X509::Request, OpenSSL::X509::Certificate, and
  29 +OpenSSL::X509::NAME).
  30 +
  31 +Below is a simple example exercising a few helpers provided by this
  32 +library:
  33 +
  34 + csr_body = File.read('example.csr') # assuming this is valid and exists
  35 + request = OpenSSL::X509::Request.new(csr_body)
  36 +
  37 + request.subject.common_name # => "example.com"
  38 + request.subject.organization # => "Example Corp"
  39 + request.subject.locality # => "Orlando"
  40 + request.subject.region # => "Florida"
  41 + request.subject.country # => "US"
  42 + request.subject.location # => "Orlando, Florida, US"
  43 +
  44 + request.strength # => 2048
  45 + request.challenge_password? # => false
  46 + request.subject_alternative_names # => ['example.com', 'www.example.com']
  47 +
  48 +## License
  49 +
  50 +Released under the MIT License. See the LICENSE file for further details.
6 openssl-extensions.gemspec
... ... @@ -1,8 +1,11 @@
  1 +# -*- encoding: utf-8 -*-
1 2 lib = File.expand_path('../lib/', __FILE__)
2 3 $:.unshift lib unless $:.include?(lib)
3 4
4 5 require 'openssl-extensions/version'
5 6
  7 +extra_rdoc_files = ['CHANGELOG.md', 'LICENSE', 'README.md']
  8 +
6 9 Gem::Specification.new do |s|
7 10 s.name = 'openssl-extensions'
8 11 s.version = OpenSSLExtensions::Version
@@ -17,6 +20,7 @@ Gem::Specification.new do |s|
17 20 s.add_development_dependency 'rspec', '~> 2.4.0'
18 21 s.add_development_dependency 'fuubar', '~> 0.0.1'
19 22
20   - s.files = Dir.glob('lib/**/*')
  23 + s.files = Dir.glob('lib/**/*') + extra_rdoc_files
  24 + s.test_files = Dir.glob('spec/**/*')
21 25 s.require_path = 'lib'
22 26 end

0 comments on commit 9c4ff01

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