javax.security.auth.message.callback

Class PrivateKeyCallback

  • All Implemented Interfaces:
    Callback

    public class PrivateKeyCallback
    extends Object
    implements 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.
    • 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(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.

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

        public 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 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.

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Version en cache

21/08/2025 20:13:12 Cette version de la page est en cache (à la date du 21/08/2025 20:13:12) afin d'accélérer le traitement.
Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.

Document créé le 11/06/2005, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/security/auth/message/callback/privatekeycallback.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.