com.atlassian.confluence.security.trust
Interface KeyStore

All Known Implementing Classes:
HibernateKeyStoreDao

public interface KeyStore

A simple keystore supporting the retrieval and storage of public keys and public/private key pairs. A key store may choose whether to allow the updating of existing keys.


Method Summary
 KeyPair getKeyPair(String alias)
          Returns a key pair for a specified alias.
 PrivateKey getPrivateKey(String alias)
           
 PublicKey getPublicKey(String alias)
           
 void storeKeyPair(String alias, KeyPair keyPair)
          Stores a key pair against a key alias.
 void storePublicKey(String alias, PublicKey publicKey)
          Stores a public key against a key alias.
 

Method Detail

getPrivateKey

PrivateKey getPrivateKey(String alias)
Parameters:
alias - Key alias
Returns:
private key for this alias or null if no such key exists

getPublicKey

PublicKey getPublicKey(String alias)
Parameters:
alias - Key alias
Returns:
public key for this alias or null if no such key exists

getKeyPair

KeyPair getKeyPair(String alias)
Returns a key pair for a specified alias. If there isn't a public/private key pair for the alias null will be returned. This is also true if there is only a public key stored for the alias.

Parameters:
alias - Key alias
Returns:
Key pair for this alias or null if a pair of keys exists

storeKeyPair

void storeKeyPair(String alias,
                  KeyPair keyPair)
Stores a key pair against a key alias. Whether a key store supports updating existing keys forms is left to the key store implementation.

Parameters:
alias - Key alias
keyPair - Key pair to store

storePublicKey

void storePublicKey(String alias,
                    PublicKey publicKey)
Stores a public key against a key alias.

Parameters:
alias - Key alias
publicKey - Key pair to store


Copyright © 2003–2015 Atlassian. All rights reserved.