Class: OpenSSL::X509::Extension

Inherits:
Object
  • Object
show all
Defined in:
lib/shared/openssl/dummy.rb,
lib/1.8/openssl/x509-internal.rb,
lib/1.9/openssl/x509-internal.rb

Instance Method Summary collapse

Instance Method Details

#to_aObject



57
58
59
# File 'lib/1.8/openssl/x509-internal.rb', line 57

def to_a
  [ self.oid, self.value, self.critical? ]
end

#to_hObject

“value”=>value, “critical”=>true|false



53
54
55
# File 'lib/1.8/openssl/x509-internal.rb', line 53

def to_h # {"oid"=>sn|ln, "value"=>value, "critical"=>true|false}
  {"oid"=>self.oid,"value"=>self.value,"critical"=>self.critical?}
end

#to_sObject

“oid = critical, value”



46
47
48
49
50
51
# File 'lib/1.8/openssl/x509-internal.rb', line 46

def to_s # "oid = critical, value"
  str = self.oid
  str << " = "
  str << "critical, " if self.critical?
  str << self.value.gsub(/\n/, ", ")
end