Class: IcAgent::Certificate

Inherits:
Object
  • Object
show all
Defined in:
lib/ic_agent/certificate.rb

Class Method Summary collapse

Class Method Details

.delegation(cert) ⇒ Object

Retrieves the delegation from a certificate.

Parameters:

  • cert: The certificate object.

Returns: The delegation value.



38
39
40
# File 'lib/ic_agent/certificate.rb', line 38

def self.delegation(cert)
  cert.value['delegation']
end

.lookup(path, cert) ⇒ Object

Performs a lookup operation in the certificate tree based on the given path.

Parameters:

  • path: The path to lookup.

  • cert: The certificate object containing the tree.

Returns: The value found at the specified path in the tree.



18
19
20
# File 'lib/ic_agent/certificate.rb', line 18

def self.lookup(path, cert)
  lookup_path(path, cert.value['tree'])
end

.signature(cert) ⇒ Object

Retrieves the signature from a certificate.

Parameters:

  • cert: The certificate object.

Returns: The signature value.



28
29
30
# File 'lib/ic_agent/certificate.rb', line 28

def self.signature(cert)
  cert.value['signature']
end

.tree(cert) ⇒ Object

Retrieves the tree from a certificate.

Parameters:

  • cert: The certificate object.

Returns: The tree value.



48
49
50
# File 'lib/ic_agent/certificate.rb', line 48

def self.tree(cert)
  cert.value['tree']
end