@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class KeyStoreDataReplaceCertificateKeyStoreContent extends ReplaceCertificateKeyStoreContent
ReplaceCertificateKeyStoreContent
implementation to indicate that the server should use a certificate key store
whose content (that is, the bytes that comprise the key store file) is
provided directly in the extended request.
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds
package structure, are only
supported for use against Ping Identity, UnboundID, and
Nokia/Alcatel-Lucent 8661 server products. These classes provide support
for proprietary functionality or for external specifications that are not
considered stable or mature enough to be guaranteed to work in an
interoperable way with other types of LDAP servers.
Constructor and Description |
---|
KeyStoreDataReplaceCertificateKeyStoreContent(byte[] keyStoreData,
java.lang.String keyStorePIN,
java.lang.String privateKeyPIN,
java.lang.String keyStoreType,
java.lang.String sourceCertificateAlias)
Creates a new instance of this key store content object with the provided
information.
|
KeyStoreDataReplaceCertificateKeyStoreContent(java.io.File keyStoreFile,
java.lang.String keyStorePIN,
java.lang.String privateKeyPIN,
java.lang.String keyStoreType,
java.lang.String sourceCertificateAlias)
Creates a new instance of this key store content object with the provided
information.
|
Modifier and Type | Method and Description |
---|---|
ASN1Element |
encode()
Encodes this key store content object to an ASN.1 element suitable for
inclusion in either a replace listener certificate or replace inter-server
certificate request.
|
byte[] |
getKeyStoreData()
Retrieves the raw data that comprises the key store with the new
certificate to use.
|
java.lang.String |
getKeyStorePIN()
Retrieves the PIN needed to access protected content in the key store.
|
java.lang.String |
getKeyStoreType()
Retrieves the key store type for the target key store, if available.
|
java.lang.String |
getPrivateKeyPIN()
Retrieves the PIN needed to access private key information in the key
store, if available.
|
java.lang.String |
getSourceCertificateAlias()
Retrieves the alias of the private key entry in the key store that contains
the new certificate chain to be used, if available.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this key store content object to the
provided buffer.
|
decode, toString
public KeyStoreDataReplaceCertificateKeyStoreContent(@NotNull byte[] keyStoreData, @NotNull java.lang.String keyStorePIN, @Nullable java.lang.String privateKeyPIN, @Nullable java.lang.String keyStoreType, @Nullable java.lang.String sourceCertificateAlias)
keyStoreData
- The raw bytes that comprises the key store
with the new certificate to use. It must
not be null
or empty.keyStorePIN
- The PIN needed to access protected content
in the key store. It must not be
null
or empty.privateKeyPIN
- The PIN needed to access private key
information in the key store. It may be
null
if the key store PIN should
also be used as the private key PIN.keyStoreType
- The key store type for the target key
store. If provided, its value will likely
be one of JKS, PKCS12, or BCFKS. If this
is null
, then the server will
attempt to automatically determine the
appropriate key store type.sourceCertificateAlias
- The alias of the private key entry in the
key store that contains the new certificate
chain to be used. It may optionally be
null
if and only if the key store
has only a single private key entry.public KeyStoreDataReplaceCertificateKeyStoreContent(@NotNull java.io.File keyStoreFile, @NotNull java.lang.String keyStorePIN, @Nullable java.lang.String privateKeyPIN, @Nullable java.lang.String keyStoreType, @Nullable java.lang.String sourceCertificateAlias) throws java.io.IOException
keyStoreFile
- The local (client-side) file from which the
certificate data should be read. It must
not be null
. and the file must
exist.keyStorePIN
- The PIN needed to access protected content
in the key store. It must not be
null
or empty.privateKeyPIN
- The PIN needed to access private key
information in the key store. It may be
null
if the key store PIN should
also be used as the private key PIN.keyStoreType
- The key store type for the target key
store. If provided, its value will likely
be one of JKS, PKCS12, or BCFKS. If this
is null
, then the server will
attempt to automatically determine the
appropriate key store type.sourceCertificateAlias
- The alias of the private key entry in the
key store that contains the new certificate
chain to be used. It may optionally be
null
if and only if the key store
has only a single private key entry.java.io.IOException
- If a problem occurs while attempting to read from the
key store file.@NotNull public byte[] getKeyStoreData()
@NotNull public java.lang.String getKeyStorePIN()
@Nullable public java.lang.String getPrivateKeyPIN()
null
if the key store PIN should also be used as the
private key PIN.@Nullable public java.lang.String getKeyStoreType()
null
if
the key store type is not available and the server should attempt
to automatically determine the appropriate key store type.@Nullable public java.lang.String getSourceCertificateAlias()
null
if no source
certificate alias was provided and the key store is expected to
have only a single private key entry.@NotNull public ASN1Element encode()
encode
in class ReplaceCertificateKeyStoreContent
public void toString(@NotNull java.lang.StringBuilder buffer)
toString
in class ReplaceCertificateKeyStoreContent
buffer
- The buffer to which the encoded representation should be
appended. It must not be null
.