- java.lang.Object
-
- javax.security.auth.message.callback.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description 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
Constructors Constructor and Description PrivateKeyCallback(PrivateKeyCallback.Request request)
Constructs this PrivateKeyCallback with a private key Request object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Certificate[]
getChain()
Used to obtain the certicicate chain set within the Callback.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(PrivateKey key, Certificate[] chain)
Used by the CallbackHandler to set the requested private key and the corresponding certificate chain within 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.
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/security/auth/message/callback/PrivateKeyCallback.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.