Permalink
Browse files

Added CHANGELOG, README, and LICENSE.

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

0 comments on commit 9c4ff01

Please sign in to comment.