Sha256: 5485d24996666bda178f1731951ff3a3973faa4829edbd728ad0ae5e1029094b

Contents?: true

Size: 648 Bytes

Versions: 7

Compression:

Stored size: 648 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 #:nodoc:
      { :csr_body => GeoCerts.escape(self.body) }
    end
    
  end
  
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
geocerts-1.0.1 lib/geo_certs/csr.rb
geocerts-1.0.0 lib/geo_certs/csr.rb
geocerts-0.0.25 lib/geo_certs/csr.rb
geocerts-0.0.24 lib/geo_certs/csr.rb
geocerts-0.0.23 lib/geo_certs/csr.rb
geocerts-0.0.22 lib/geo_certs/csr.rb
geocerts-0.0.21 lib/geo_certs/csr.rb