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
 java.security.KeyPair getKeyPair(java.lang.String alias)
          Returns a key pair for a specified alias.
 java.security.PrivateKey getPrivateKey(java.lang.String alias)
           
 java.security.PublicKey getPublicKey(java.lang.String alias)
           
 void storeKeyPair(java.lang.String alias, java.security.KeyPair keyPair)
          Stores a key pair against a key alias.
 void storePublicKey(java.lang.String alias, java.security.PublicKey publicKey)
          Stores a public key against a key alias.
 

Method Detail

getPrivateKey

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

getPublicKey

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

getKeyPair

java.security.KeyPair getKeyPair(java.lang.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(java.lang.String alias,
                  java.security.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(java.lang.String alias,
                    java.security.PublicKey publicKey)
Stores a public key against a key alias.

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


Copyright © 2003-2009 Atlassian Pty Ltd. All Rights Reserved.