class Keystores::Keystore

Public Class Methods

get_instance(key_store_algorithm) click to toggle source

Get an instance of a key store, given a key store algorithm string

# File lib/keystores/keystore.rb, line 7
def self.get_instance(key_store_algorithm)
  @@registry[key_store_algorithm].new
end
register_algorithm(algorithm, clazz) click to toggle source

Register your key store algorithm

# File lib/keystores/keystore.rb, line 12
def self.register_algorithm(algorithm, clazz)
  @@registry[algorithm] = clazz
end

Public Instance Methods

aliases() click to toggle source

Lists all the alias names of this keystore.

# File lib/keystores/keystore.rb, line 17
def aliases

end
contains_alias(aliaz) click to toggle source

Checks if the given alias exists in this keystore.

# File lib/keystores/keystore.rb, line 22
def contains_alias(aliaz)

end
delete_entry(aliaz) click to toggle source

Deletes the entry identified by the given alias from this keystore.

# File lib/keystores/keystore.rb, line 27
def delete_entry(aliaz)

end
get_certificate(aliaz) click to toggle source

Returns the certificate associated with the given alias.

# File lib/keystores/keystore.rb, line 32
def get_certificate(aliaz)

end
get_certificate_alias(certificate) click to toggle source

Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.

# File lib/keystores/keystore.rb, line 37
def get_certificate_alias(certificate)

end
get_certificate_chain(aliaz) click to toggle source

Returns the certificate chain associated with the given alias.

# File lib/keystores/keystore.rb, line 42
def get_certificate_chain(aliaz)

end
get_key(aliaz, password) click to toggle source

Returns the key associated with the given alias, using the given password to recover it.

# File lib/keystores/keystore.rb, line 47
def get_key(aliaz, password)

end
get_type() click to toggle source

Returns the type of this keystore.

# File lib/keystores/keystore.rb, line 52
def get_type

end
is_certificate_entry(aliaz) click to toggle source

Returns true if the entry identified by the given alias was created by a call to set_certificate_entry

# File lib/keystores/keystore.rb, line 57
def is_certificate_entry(aliaz)

end
is_key_entry(aliaz) click to toggle source

Returns true if the entry identified by the given alias was created by a call to set_key_entry

# File lib/keystores/keystore.rb, line 62
def is_key_entry(aliaz)

end
load(key_store_file, password) click to toggle source

Loads this Keystore from the given path.

# File lib/keystores/keystore.rb, line 67
def load(key_store_file, password)

end
set_certificate_entry(aliaz, certificate) click to toggle source

Assigns the given trusted certificate to the given alias.

# File lib/keystores/keystore.rb, line 77
def set_certificate_entry(aliaz, certificate)

end
set_key_entry(aliaz, key, certificate_chain, password = nil) click to toggle source

Assigns the given key to the given alias. If password is nil, it is assumed that the key is already protected

# File lib/keystores/keystore.rb, line 82
def set_key_entry(aliaz, key, certificate_chain, password = nil)

end
size() click to toggle source

Retrieves the number of entries in this keystore.

# File lib/keystores/keystore.rb, line 87
def size

end
store(key_store_file, password) click to toggle source

Stores this keystore to the given path, and protects its integrity with the given password.

# File lib/keystores/keystore.rb, line 72
def store(key_store_file, password)

end