Class X509CertificateCallback

  • All Implemented Interfaces:
    Callback

    public class X509CertificateCallback
    extends Object
    implements Callback
    Underlying security services instantiate and pass an X509CertificateCallback to the invokeCallback method of a CallbackHandler to retrieve the contents of an X.509 Certificate.
    • Constructor Detail

      • X509CertificateCallback

        public X509CertificateCallback​(String prompt)
        Creates X509CertificateCallback object with a prompt.
        Parameters:
        prompt - the prompt used to request the X.509 Certificate.
        Throws:
        IllegalArgumentException - if prompt is null or if prompt has a length of 0 (zero).
      • X509CertificateCallback

        public X509CertificateCallback​(String prompt,
                                       X509Certificate certificate)
        Construct an X509CertificateCallback with a prompt and X.509 Certificate.
        Parameters:
        prompt - the prompt used to request the X.509 Certificate
        certificate - the X.509 Certificate
        Throws:
        IllegalArgumentException - if prompt is null or if prompt has a length of 0 (zero).
    • Method Detail

      • getPrompt

        public String getPrompt()
        Returns the prompt.
        Returns:
        the prompt.
      • setCertificate

        public void setCertificate​(X509Certificate certificate)
        Sets the retrieved certificate.
        Parameters:
        certificate - the retrieved certificate contents (which may be null)
      • getCertificate

        public X509Certificate getCertificate()
        Returns the retrieved certificate.
        Returns:
        the retrieved certificate contents (which may be null).
      • setReqSignature

        public void setReqSignature​(boolean required)
        Sets the required signature flag.
        Parameters:
        required - true if signature is required.
      • getReqSignature

        public boolean getReqSignature()
        Returns the reqSignature flag.
        Returns:
        the retrieved reqSignature flag.
      • getSignature

        public byte[] getSignature()
        Returns the signature.
        Returns:
        the retrieved signature set by sdk client.