Class: Rex::Proto::CryptoAsn1::Cms::Name

Inherits:
Object
  • Object
show all
Defined in:
lib/rex/proto/crypto_asn1/cms.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Name

Returns a new instance of Name.



116
# File 'lib/rex/proto/crypto_asn1/cms.rb', line 116

def initialize(options = {}); end

Instance Attribute Details

#valueObject

Rather than specifying the entire structure of a name, we pass this off to OpenSSL, effectively providing an interface between RASN and OpenSSL.



114
115
116
# File 'lib/rex/proto/crypto_asn1/cms.rb', line 114

def value
  @value
end

Instance Method Details

#parse!(str, ber: false) ⇒ Object



118
119
120
121
# File 'lib/rex/proto/crypto_asn1/cms.rb', line 118

def parse!(str, ber: false)
  self.value = OpenSSL::X509::Name.new(str)
  to_der.length
end

#to_derObject



123
124
125
# File 'lib/rex/proto/crypto_asn1/cms.rb', line 123

def to_der
  value.to_der
end