IT. Expert System.

Java Enterprise Edition (EE)

PrivateKeyCallback


javax.security.auth.message.callback
Class PrivateKeyCallback

java.lang.Object
  javax.security.auth.message.callback.PrivateKeyCallback
All Implemented Interfaces:
javax.security.auth.callback.Callback
public class PrivateKeyCallback
extends java.lang.Object
implements javax.security.auth.callback.Callback

Callback for acquiring a Public Key Infrastructure (PKI) private key and its corresponding certificate chain. 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.

Version:
%I%, %G%

Nested Class Summary
static class PrivateKeyCallback.AliasRequest
          Request type for private keys that are identified using an alias.
static class PrivateKeyCallback.DigestRequest
          Request type for private keys that are identified using a certificate digest or thumbprint.
static class PrivateKeyCallback.IssuerSerialNumRequest
          Request type for private keys that are identified using an issuer/serial number.
static interface PrivateKeyCallback.Request
          Marker interface for private key request types.
static class PrivateKeyCallback.SubjectKeyIDRequest
          Request type for private keys that are identified using a SubjectKeyID
 
Constructor Summary
PrivateKeyCallback(PrivateKeyCallback.Request request)
          Constructs this PrivateKeyCallback with a private key Request object.
 
Method Summary
 java.security.cert.Certificate[] getChain()
          Used to obtain the certicicate chain set within the Callback.
 java.security.PrivateKey getKey()
          Used to obtain the private key set within the Callback.
 PrivateKeyCallback.Request getRequest()
          Used by the CallbackHandler to get the Request object that identifies the private key to be returned.
 void setKey(java.security.PrivateKey key, java.security.cert.Certificate[] chain)
          Used by the CallbackHandler to set the requested private key and the corresponding certificate chain within the Callback.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrivateKeyCallback

public PrivateKeyCallback(PrivateKeyCallback.Request request)
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.

Parameters:
request - Identifier for the private key, or null.
Method Detail

getRequest

public PrivateKeyCallback.Request getRequest()
Used by the CallbackHandler to get the Request object that identifies the private key to be returned.

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.

setKey

public void setKey(java.security.PrivateKey key,
                   java.security.cert.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.

Parameters:
key - The private key, or null.
chain - The corresponding certificate chain, or null.

getKey

public java.security.PrivateKey getKey()
Used to obtain the private key set within the Callback.

Returns:
The private key, or null if the key could not be found.

getChain

public java.security.cert.Certificate[] getChain()
Used to obtain the certicicate chain set within the Callback.

Returns:
The certificate chain, or null if the chain could not be found.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1907 / . Delta: 0.00799 с