Class: Rex::Proto::CryptoAsn1::ObjectId
- Inherits:
-
OpenSSL::ASN1::ObjectId
- Object
- OpenSSL::ASN1::ObjectId
- Rex::Proto::CryptoAsn1::ObjectId
- Defined in:
- lib/rex/proto/crypto_asn1/o_i_ds.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
-
#initialize(*args, label: nil, name: nil) ⇒ ObjectId
constructor
A new instance of ObjectId.
-
#microsoft? ⇒ Boolean
Returns whether or not this OID is one of Microsoft’s.
Constructor Details
#initialize(*args, label: nil, name: nil) ⇒ ObjectId
Returns a new instance of ObjectId.
8 9 10 11 12 |
# File 'lib/rex/proto/crypto_asn1/o_i_ds.rb', line 8 def initialize(*args, label: nil, name: nil) @label = label @name = name super(*args) end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
7 8 9 |
# File 'lib/rex/proto/crypto_asn1/o_i_ds.rb', line 7 def label @label end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/rex/proto/crypto_asn1/o_i_ds.rb', line 7 def name @name end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
14 15 16 17 18 |
# File 'lib/rex/proto/crypto_asn1/o_i_ds.rb', line 14 def eql?(other) return false unless other.is_a?(self.class) return false unless other.value == value true end |
#microsoft? ⇒ Boolean
Returns whether or not this OID is one of Microsoft’s
23 24 25 |
# File 'lib/rex/proto/crypto_asn1/o_i_ds.rb', line 23 def microsoft? @value.start_with?('1.3.6.1.4.1.311.') || @value == '1.3.6.1.4.1.311' end |