Class: OpenSSL::X509::ExtensionFactory
Relationships & Source Files | |
Inherits: | Object |
Defined in: | ext/openssl/ossl_x509ext.c, ext/openssl/lib/openssl/x509.rb |
Class Method Summary
- .new(*args) constructor
Instance Attribute Summary
Instance Method Summary
-
#create_ext(*args)
Array to X509_EXTENSION Structure: [“ln”, “value”, bool_critical] or [“sn”, “value”, bool_critical] or [“ln”, “critical,value”] or the same for sn [“ln”, “value”] => not critical.
- #create_ext_from_array(ary)
- #create_ext_from_hash(hash)
-
#create_ext_from_string(str)
“oid = critical, value”.
- #create_extension(*arg)
Constructor Details
.new(*args)
Instance Attribute Details
#config (rw)
#crl (rw)
#crl=(crl) (rw)
#issuer_certificate (rw)
#issuer_certificate=(cert) (rw)
#subject_certificate (rw)
#subject_certificate=(cert) (rw)
#subject_request (rw)
#subject_request=(req) (rw)
Instance Method Details
#create_ext(*args)
Array to X509_EXTENSION Structure:
- “ln”, “value”, bool_critical
-
or
- “sn”, “value”, bool_critical
-
or
- “ln”, “critical,value”
-
or the same for sn
- “ln”, “value”
-
> not critical
#create_ext_from_array(ary)
# File 'ext/openssl/lib/openssl/x509.rb', line 26
def create_ext_from_array(ary) raise ExtensionError, "unexpected array form" if ary.size > 3 create_ext(ary[0], ary[1], ary[2]) end
#create_ext_from_hash(hash)
[ GitHub ]# File 'ext/openssl/lib/openssl/x509.rb', line 38
def create_ext_from_hash(hash) create_ext(hash["oid"], hash["value"], hash["critical"]) end
#create_ext_from_string(str)
“oid = critical, value”
# File 'ext/openssl/lib/openssl/x509.rb', line 31
def create_ext_from_string(str) # "oid = critical, value" oid, value = str.split(/=/, 2) oid.strip! value.strip! create_ext(oid, value) end
#create_extension(*arg)
[ GitHub ]# File 'ext/openssl/lib/openssl/x509.rb', line 18
def create_extension(*arg) if arg.size > 1 create_ext(*arg) else send("create_ext_from_"+arg[0].class.name.downcase, arg[0]) end end