Sha256: 1c0285d00f2f8325418b3dffc95783b10410fed6d1d32c4d7ee57aef16ec0531

Contents?: true

Size: 639 Bytes

Versions: 10

Compression:

Stored size: 639 Bytes

Contents

require 'cgi'

module GeoCerts
  
  ##
  # Wraps information required by or received from GeoCerts about a 
  # Certificate Signing Request (CSR).
  # 
  class CSR
    
    attr_accessor :body,
                  :common_name,
                  :city,
                  :state,
                  :country,
                  :organization,
                  :organizational_unit
    
    def initialize(attributes = {})
      attributes.each_pair do |name, value|
        send("#{name}=", value) if respond_to?(name)
      end
    end
    
    def to_geocerts_hash
      { :csr_body => GeoCerts.escape(self.body) }
    end
    
  end
  
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
geocerts-0.0.20 lib/geo_certs/csr.rb
geocerts-0.0.19 lib/geo_certs/csr.rb
geocerts-0.0.18 lib/geo_certs/csr.rb
geocerts-0.0.17 lib/geo_certs/csr.rb
geocerts-0.0.16 lib/geo_certs/csr.rb
geocerts-0.0.15 lib/geo_certs/csr.rb
geocerts-0.0.14 lib/geo_certs/csr.rb
geocerts-0.0.13 lib/geo_certs/csr.rb
geocerts-0.0.12 lib/geo_certs/csr.rb
geocerts-0.0.11 lib/geo_certs/csr.rb