Ejemplo n.º 1
0
 /// <summary>Initializes the factory.</summary>
 /// <exception cref="GeneralSecurityException">
 /// thrown if an SSL initialization error
 /// happened.
 /// </exception>
 /// <exception cref="System.IO.IOException">
 /// thrown if an IO error happened while reading the SSL
 /// configuration.
 /// </exception>
 public virtual void Init()
 {
     keystoresFactory.Init(mode);
     context = SSLContext.GetInstance("TLS");
     context.Init(keystoresFactory.GetKeyManagers(), keystoresFactory.GetTrustManagers
                      (), null);
     context.GetDefaultSSLParameters().SetProtocols(enabledProtocols);
     hostnameVerifier = GetHostnameVerifier(conf);
 }