Module: R509::OIDMapper
- Defined in:
- lib/r509/oid_mapper.rb
Overview
Helps map raw OIDs to friendlier short names
Class Method Summary (collapse)
-
+ (Object) batch_register(oids)
Register a batch of OIDs so we have friendly short names ].
-
+ (Boolean) register(oid, short_name, long_name = nil)
Register an OID so we have a friendly short name.
Class Method Details
+ (Object) batch_register(oids)
Register a batch of OIDs so we have friendly short names ]
25 26 27 28 29 30 |
# File 'lib/r509/oid_mapper.rb', line 25 def self.batch_register(oids) oids.each do |oid_hash| self.register(oid_hash[:oid],oid_hash[:short_name],oid_hash[:long_name]) end nil end |
+ (Boolean) register(oid, short_name, long_name = nil)
Register an OID so we have a friendly short name
11 12 13 14 15 16 |
# File 'lib/r509/oid_mapper.rb', line 11 def self.register(oid,short_name,long_name=nil) if long_name.nil? long_name = short_name end OpenSSL::ASN1::ObjectId.register(oid, short_name, long_name) end |