Package anbxj
Class Crypto_KeyStoreBuilder
java.lang.Object
anbxj.Crypto_KeyStoreBuilder
- Direct Known Subclasses:
Channel_SSLContextBuilder
Keystore builder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Crypto_KeyStoreSettings
A local copy of channel propertiesprotected KeyStore
KeyStore for storing our public/private key pairprotected KeyStore
// KeyStore for storing the other public keys -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a Crypto_KeyStoreBuilder with the given Crypto_KeyStoreSettings. -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsAlias
(String alias) Checks if the given alias exists in the remote keystore.Retrieves the certificate path from the local keystore.getKss()
Gets the Crypto_KeyStoreSettings.Gets the local certificate.Gets the local private key.Gets the alias of the key.getRemoteCertificate
(String alias) Gets the remote certificate with the specified alias.getRemotePublicKey
(String alias) Gets the remote public key with the specified alias.void
listAliases
(KeyStore keystore, String keyStoreFile) Lists the aliases in the given keystore.
-
Field Details
-
kss
A local copy of channel properties -
localKeyStore
KeyStore for storing our public/private key pair -
remoteKeyStore
// KeyStore for storing the other public keys
-
-
Constructor Details
-
Crypto_KeyStoreBuilder
Constructs a Crypto_KeyStoreBuilder with the given Crypto_KeyStoreSettings.- Parameters:
kss
- the Crypto_KeyStoreSettings
-
-
Method Details
-
getKss
Gets the Crypto_KeyStoreSettings.- Returns:
- the Crypto_KeyStoreSettings
-
getLocaleCertificate
Gets the local certificate.- Returns:
- the local certificate
-
getLocalPrivateKey
Gets the local private key.- Returns:
- the local private key
-
getMyAlias
Gets the alias of the key.- Returns:
- the alias of the key
-
getRemoteCertificate
Gets the remote certificate with the specified alias.- Parameters:
alias
- the alias of the certificate- Returns:
- the remote certificate
-
getRemotePublicKey
Gets the remote public key with the specified alias.- Parameters:
alias
- the alias of the public key- Returns:
- the remote public key
-
listAliases
Lists the aliases in the given keystore.- Parameters:
keystore
- the keystorekeyStoreFile
- the file name of the keystore- Throws:
KeyStoreException
- if an error occurs while listing aliases
-
containsAlias
Checks if the given alias exists in the remote keystore.- Parameters:
alias
- the alias to check- Returns:
- true if the alias exists, false otherwise
-
getCertPath
Retrieves the certificate path from the local keystore.- Returns:
- the certificate path
-