1 17 package org.apache.geronimo.management.geronimo; 18 19 import java.security.PrivateKey ; 20 import java.security.cert.Certificate ; 21 22 import javax.net.ssl.KeyManager; 23 import javax.net.ssl.TrustManager; 24 25 30 public interface KeystoreInstance { 31 34 public String getKeystoreName(); 35 36 43 public void unlockKeystore(char[] password) throws KeystoreException; 44 45 50 public void lockKeystore(char[] password) throws KeystoreException; 51 52 57 public boolean isKeystoreLocked(); 58 59 67 public String [] listPrivateKeys(char[] storePassword) throws KeystoreException; 68 69 79 public void unlockPrivateKey(String alias, char[] storePassword, char[] keyPassword) throws KeystoreException; 80 81 85 public String [] getUnlockedKeys(char[] storePassword) throws KeystoreException; 86 87 92 public boolean isTrustStore(char[] storePassword) throws KeystoreException; 93 94 102 public void lockPrivateKey(String alias, char[] storePassword) throws KeystoreException; 103 104 109 public boolean isKeyLocked(String alias); 110 111 117 public String [] listTrustCertificates(char[] storePassword) throws KeystoreException; 118 119 127 public Certificate getCertificate(String alias, char[] storePassword) throws KeystoreException; 128 129 135 public Certificate [] getCertificateChain(String alias, char[] storePassword) throws KeystoreException; 136 137 143 public String getCertificateAlias(Certificate cert, char[] storePassword) throws KeystoreException; 144 145 153 public void importTrustCertificate(Certificate cert, String alias, char[] storePassword) throws KeystoreException; 154 155 173 public void generateKeyPair(String alias, char[] storePassword, char[] keyPassword, String keyAlgorithm, int keySize, 174 String signatureAlgorithm, int validity, String commonName, String orgUnit, 175 String organization, String locality, String state, String country) throws KeystoreException; 176 177 178 186 public KeyManager[] getKeyManager(String algorithm, String alias, char[] storePassword) throws KeystoreException; 187 188 194 public TrustManager[] getTrustManager(String algorithm, char[] storePassword) throws KeystoreException; 195 196 public String generateCSR(String alias, char[] storePassword) throws KeystoreException; 197 198 public void importPKCS7Certificate(String alias, String certbuf, char[] storePassword) throws KeystoreException; 199 200 207 public void deleteEntry(String alias, char[] storePassword) throws KeystoreException; 208 209 210 217 public PrivateKey getPrivateKey(String alias, char[] storePassword, char[] keyPassword) throws KeystoreException; 218 219 226 public Certificate getCertificate(String alias); 227 } 228 | Popular Tags |