This Callback may be used by client or server authentication modules to obtain private keys or private key references, from key repositories available to the CallbackHandler that processes the Callback.
| Modifier and Type | Class and Description |
|---|---|
| public static class | PrivateKeyCallback.AliasRequest
Request type for private keys that are identified using an alias. |
| public static class | PrivateKeyCallback.DigestRequest
Request type for private keys that are identified using a certificate digest or thumbprint. |
| public static class | PrivateKeyCallback.IssuerSerialNumRequest
Request type for private keys that are identified using an issuer/serial number. |
| public static interface | PrivateKeyCallback.Request
Marker interface for private key request types. |
| public static class | PrivateKeyCallback.SubjectKeyIDRequest
Request type for private keys that are identified using a SubjectKeyID |
| Modifier and Type | Field and Description |
|---|---|
| private Certificate[] | |
| private PrivateKey | |
| private PrivateKeyCallback. |
| Access | Constructor and Description |
|---|---|
| public | PrivateKeyCallback(PrivateKeyCallback.
Identifier for the private key, or null. requestConstructs this PrivateKeyCallback with a private key Request object. |
| Modifier and Type | Method and Description |
|---|---|
| public Certificate[] | Returns: The certificate chain, or null if the chain could not be found.Used to obtain the certificate chain set within the Callback. |
| public PrivateKey | Returns: The private key, or null if the key could not be found.Used to obtain the private key set within the Callback. |
| public PrivateKeyCallback. | Returns: The Request object which identifies the private key to be returned, or null. If null, the handler of the callback relies on its own default.Used by the CallbackHandler to get the Request object that identifies the private key to be returned. |
| public void | setKey(PrivateKey
The private key, or null. key, Certificate[] The corresponding certificate chain, or null. chain)Used by the CallbackHandler to set the requested private key and the corresponding certificate chain within the Callback. |
| chain | back to summary |
|---|---|
| private Certificate[] chain | |
| key | back to summary |
|---|---|
| private PrivateKey key | |
| request | back to summary |
|---|---|
| private PrivateKeyCallback. | |
| PrivateKeyCallback | back to summary |
|---|---|
| public PrivateKeyCallback(PrivateKeyCallback. Constructs this PrivateKeyCallback with a private key Request object. The request object identifies the private key to be returned. The corresponding certificate chain for the private key is also returned. If the request object is null, the handler of the callback relies on its own default.
| |
| getChain | back to summary |
|---|---|
| public Certificate[] getChain() Used to obtain the certificate chain set within the Callback.
| |
| getKey | back to summary |
|---|---|
| public PrivateKey getKey() Used to obtain the private key set within the Callback.
| |
| getRequest | back to summary |
|---|---|
| public PrivateKeyCallback. Used by the CallbackHandler to get the Request object that identifies the private key to be returned.
| |
| setKey | back to summary |
|---|---|
| public void setKey(PrivateKey key, Certificate[] chain) Used by the CallbackHandler to set the requested private key and the corresponding certificate chain within the Callback. If the requested private key or chain could not be found, then both values must be set to null.
| |
| Access | Constructor and Description |
|---|---|
| public | AliasRequest(String
Name identifier for the private key, or null. alias)Construct an AliasRequest with an alias. |
| Modifier and Type | Method and Description |
|---|---|
| public String |
| alias | back to summary |
|---|---|
| private String alias | |
| AliasRequest | back to summary |
|---|---|
| public AliasRequest(String alias) Construct an AliasRequest with an alias. The alias is used to directly identify the private key to be returned. The corresponding certificate chain for the private key is also returned. If the alias is null, the handler of the callback relies on its own default.
| |
| getAlias | back to summary |
|---|---|
| public String getAlias() Get the alias.
| |
| Access | Constructor and Description |
|---|---|
| public | DigestRequest(byte[]
The digest value to use to select the corresponding certificate and private key (or null). digest, String A string value identifying the digest algorithm. The value passed to this parameter may be null. If
it is not null, it must conform to the requirements for the algorithm parameter of
algorithm)java.security.MessageDigest.getInstance().Constructs a DigestRequest with a digest value and algorithm identifier. |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: The identifier of the algorithm used to compute the digest.Get the algorithm identifier. |
| public byte[] | Returns: The digest value which must match the digest of the certificate corresponding to the returned private key.Get the digest value. |
| algorithm | back to summary |
|---|---|
| private String algorithm | |
| digest | back to summary |
|---|---|
| private byte[] digest | |
| DigestRequest | back to summary |
|---|---|
| public DigestRequest(byte[] digest, String algorithm) Constructs a DigestRequest with a digest value and algorithm identifier.
The digest of the certificate whose private key is returned must match the provided digest. The certificate digest is
computed by applying the specified algorithm to the bytes of the certificate. For example:
| |
| getAlgorithm | back to summary |
|---|---|
| public String getAlgorithm() Get the algorithm identifier.
| |
| getDigest | back to summary |
|---|---|
| public byte[] getDigest() Get the digest value.
| |
| Modifier and Type | Field and Description |
|---|---|
| private X500Principal | |
| private BigInteger |
| Access | Constructor and Description |
|---|---|
| public | IssuerSerialNumRequest(X500Principal
The X500Principal name of the certificate issuer, or null. issuer, BigInteger The serial number of the certificate, or null. serialNumber)Constructs a IssuerSerialNumRequest with an issuer/serial number. |
| Modifier and Type | Method and Description |
|---|---|
| public X500Principal | |
| public BigInteger |
| issuer | back to summary |
|---|---|
| private X500Principal issuer | |
| serialNum | back to summary |
|---|---|
| private BigInteger serialNum | |
| IssuerSerialNumRequest | back to summary |
|---|---|
| public IssuerSerialNumRequest(X500Principal issuer, BigInteger serialNumber) Constructs a IssuerSerialNumRequest with an issuer/serial number. The issuer/serial number is used to identify a public key certificate. The corresponding private key is returned in the callback. The corresponding certificate chain for the private key is also returned. If the issuer/serialNumber parameters are null, the handler of the callback relies on its own defaults.
| |
| getIssuer | back to summary |
|---|---|
| public X500Principal getIssuer() Get the issuer.
| |
| getSerialNum | back to summary |
|---|---|
| public BigInteger getSerialNum() Get the serial number.
| |
| Modifier and Type | Field and Description |
|---|---|
| private byte[] |
| Access | Constructor and Description |
|---|---|
| public | SubjectKeyIDRequest(byte[]
Identifier for the private key, or null. subjectKeyID)Construct a SubjectKeyIDRequest with an subjectKeyID. |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] |
| id | back to summary |
|---|---|
| private byte[] id | |
| SubjectKeyIDRequest | back to summary |
|---|---|
| public SubjectKeyIDRequest(byte[] subjectKeyID) Construct a SubjectKeyIDRequest with an subjectKeyID. The subjectKeyID is used to directly identify the private key to be returned. The corresponding certificate chain for the private key is also returned. If the subjectKeyID is null, the handler of the callback relies on its own default.
| |
| getSubjectKeyID | back to summary |
|---|---|
| public byte[] getSubjectKeyID() Get the subjectKeyID.
| |