Class: Ccrypto::X509NameInfo

Inherits:
Object
  • Object
show all
Includes:
TR::CondUtils
Defined in:
lib/ccrypto/java/ext/x509_cert.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x500name) ⇒ X509NameInfo

Returns a new instance of X509NameInfo.



16
17
18
19
# File 'lib/ccrypto/java/ext/x509_cert.rb', line 16

def initialize(x500name)
  @x500Name = x500name
  extract
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



14
15
16
# File 'lib/ccrypto/java/ext/x509_cert.rb', line 14

def name
  @name
end

#orgObject (readonly)

Returns the value of attribute org.



14
15
16
# File 'lib/ccrypto/java/ext/x509_cert.rb', line 14

def org
  @org
end

#org_unitObject (readonly)

Returns the value of attribute org_unit.



14
15
16
# File 'lib/ccrypto/java/ext/x509_cert.rb', line 14

def org_unit
  @org_unit
end

Instance Method Details

#email=(val) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/ccrypto/java/ext/x509_cert.rb', line 21

def email=(val)
  if val.is_a?(Array) 
    emails.concat(val)
  else
    emails << val
  end
end

#emailsObject



29
30
31
32
33
34
# File 'lib/ccrypto/java/ext/x509_cert.rb', line 29

def emails
  if @_emails.nil?
    @_emails = []
  end
  @_emails
end

#has_email?(name) ⇒ Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/ccrypto/java/ext/x509_cert.rb', line 36

def has_email?(name)
  emails.include?(name)
end

#to_sObject



40
41
42
# File 'lib/ccrypto/java/ext/x509_cert.rb', line 40

def to_s
  @x500Name.toString
end