javax.net.ssl

Interface X509TrustManager

  • All Superinterfaces:
    TrustManager
    All Known Implementing Classes:
    X509ExtendedTrustManager

    public interface X509TrustManager
    extends TrustManager
    Instance of this interface manage which X509 certificates may be used to authenticate the remote side of a secure socket. Decisions may be based on trusted certificate authorities, certificate revocation lists, online status checking or other means.
    Since:
    1.4
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void checkClientTrusted(X509Certificate[] chain, String authType)
      Given the partial or complete certificate chain provided by the peer, build a certificate path to a trusted root and return if it can be validated and is trusted for client SSL authentication based on the authentication type.
      void checkServerTrusted(X509Certificate[] chain, String authType)
      Given the partial or complete certificate chain provided by the peer, build a certificate path to a trusted root and return if it can be validated and is trusted for server SSL authentication based on the authentication type.
      X509Certificate[] getAcceptedIssuers()
      Return an array of certificate authority certificates which are trusted for authenticating peers.

        

    • Method Detail

      • checkClientTrusted

        void checkClientTrusted(X509Certificate[] chain,
                              String authType)
                                throws CertificateException
        Given the partial or complete certificate chain provided by the peer, build a certificate path to a trusted root and return if it can be validated and is trusted for client SSL authentication based on the authentication type.

        The authentication type is determined by the actual certificate used. For instance, if RSAPublicKey is used, the authType should be "RSA". Checking is case-sensitive.

        Parameters:
        chain - the peer certificate chain
        authType - the authentication type based on the client certificate
        Throws:
        IllegalArgumentException - if null or zero-length chain is passed in for the chain parameter or if null or zero-length string is passed in for the authType parameter
        CertificateException - if the certificate chain is not trusted by this TrustManager.
      • checkServerTrusted

        void checkServerTrusted(X509Certificate[] chain,
                              String authType)
                                throws CertificateException
        Given the partial or complete certificate chain provided by the peer, build a certificate path to a trusted root and return if it can be validated and is trusted for server SSL authentication based on the authentication type.

        The authentication type is the key exchange algorithm portion of the cipher suites represented as a String, such as "RSA", "DHE_DSS". Note: for some exportable cipher suites, the key exchange algorithm is determined at run time during the handshake. For instance, for TLS_RSA_EXPORT_WITH_RC4_40_MD5, the authType should be RSA_EXPORT when an ephemeral RSA key is used for the key exchange, and RSA when the key from the server certificate is used. Checking is case-sensitive.

        Parameters:
        chain - the peer certificate chain
        authType - the key exchange algorithm used
        Throws:
        IllegalArgumentException - if null or zero-length chain is passed in for the chain parameter or if null or zero-length string is passed in for the authType parameter
        CertificateException - if the certificate chain is not trusted by this TrustManager.
      • getAcceptedIssuers

        X509Certificate[] getAcceptedIssuers()
        Return an array of certificate authority certificates which are trusted for authenticating peers.
        Returns:
        a non-null (possibly empty) array of acceptable CA issuer certificates.

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/11/2024 22:04:02 Cette version de la page est en cache (à la date du 21/11/2024 22:04:02) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.

Document créé le 31/08/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/net/ssl/x509trustmanager.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, X509TrustManager

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.

Table des matières Haut