java.lang.Objectjavax.naming.ldap.StartTlsResponse
public abstract class StartTlsResponse
This class implements the LDAPv3 Extended Response for StartTLS as defined in Lightweight Directory Access Protocol (v3): Extension for Transport Layer Security The object identifier for StartTLS is 1.3.6.1.4.1.1466.20037 and no extended response value is defined.
The Start TLS extended request and response are used to establish a TLS connection over the existing LDAP connection associated with the JNDI context on which extendedOperation() is invoked. Typically, a JNDI program uses the StartTLS extended request and response classes as follows.
import javax.naming.ldap.*; // Open an LDAP association // Perform a StartTLS extended operation StartTlsResponse tls = // Open a TLS connection (over the existing LDAP association) and get details // of the negotiated TLS session: cipher suite, peer certificate, ... // ... use ctx to perform protected LDAP operations // Close the TLS connection (revert back to the underlying LDAP association) tls.close(); // ... use ctx to perform unprotected LDAP operations // Close the LDAP association ctx.close;
StartTlsRequest,
Serialized Form| Field Summary | |
|---|---|
static String |
OID
The StartTLS extended response's assigned object identifier is 1.3.6.1.4.1.1466.20037. |
| Constructor Summary | |
|---|---|
protected |
StartTlsResponse()
Constructs a StartTLS extended response. |
| Method Summary | |
|---|---|
abstract void |
close()
Closes the TLS connection gracefully and reverts back to the underlying connection. |
byte[] |
getEncodedValue()
Retrieves the StartTLS response's ASN.1 BER encoded value. |
String |
getID()
Retrieves the StartTLS response's object identifier string. |
abstract SSLSession |
negotiate()
Negotiates a TLS session using the default SSL socket factory. |
abstract SSLSession |
negotiate(SSLSocketFactory factory)
Negotiates a TLS session using an SSL socket factory. |
abstract void |
setEnabledCipherSuites(String[] suites)
Overrides the default list of cipher suites enabled for use on the TLS connection. |
abstract void |
setHostnameVerifier(HostnameVerifier verifier)
Sets the hostname verifier used by negotiate() after the TLS handshake has completed and the default hostname verification has failed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String OID
| Constructor Detail |
|---|
protected StartTlsResponse()
| Method Detail |
|---|
public String getID()
getID in interface ExtendedResponsepublic byte[] getEncodedValue()
getEncodedValue in interface ExtendedResponsepublic abstract void setEnabledCipherSuites(String[] suites)
suites - The non-null list of names of all the cipher suites to
enable.negotiate()public abstract void setHostnameVerifier(HostnameVerifier verifier)
verifier - The non-null hostname verifier callback.negotiate()public abstract SSLSession negotiate() throws IOException
This method is equivalent to negotiate(null).
IOException - If an IO error was encountered while establishing
the TLS session.setEnabledCipherSuites(java.lang.String[]),
setHostnameVerifier(javax.net.ssl.HostnameVerifier)public abstract SSLSession negotiate(SSLSocketFactory factory) throws IOException
Creates an SSL socket using the supplied SSL socket factory and attaches it to the existing connection. Performs the TLS handshake and returns the negotiated session information.
If cipher suites have been set via setEnabledCipherSuites then they are enabled before the TLS handshake begins.
Hostname verification is performed after the TLS handshake completes. The default hostname verification performs a match of the server's hostname against the hostname information found in the server's certificate. If this verification fails and no callback has been set via setHostnameVerifier then the negotiation fails. If this verification fails and a callback has been set via setHostnameVerifier, then the callback is used to determine whether the negotiation succeeds.
If an error occurs then the SSL socket is closed and an IOException is thrown. The underlying connection remains intact.
factory - The possibly null SSL socket factory to use.
If null, the default SSL socket factory is used.
IOException - If an IO error was encountered while establishing
the TLS session.setEnabledCipherSuites(java.lang.String[]),
setHostnameVerifier(javax.net.ssl.HostnameVerifier)
public abstract void close()
throws IOException
IOException - If an IO error was encountered while closing the
TLS connectionCes informations proviennent du site de http://java.sun.com
Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :
Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.
Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.
Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.
Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.
Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.
La base de données est temporairement indisponible
Le site rencontre momentanément quelques problèmes...
La base de données est temporairement indisponible (), ce qui explique que de nombreuses fonctions ne soient temporairement pas accessibles (par exemple les liens de navigation, les sommaires, etc.) et que l'affichage des pages soit beaucoup plus lent.
Veuillez réessayer dans quelques minutes (les tests automatiques sont effectués toutes les 15 minutes).
Je vous présente mes excuses pour le désagrément que cela engendre.
Steph.
Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.
Recherche (afficher)
Utilisateur (afficher)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
Citation (masquer)