Пример #1
0
 /// <summary>Returns a configured SSLServerSocketFactory.</summary>
 /// <returns>the configured SSLSocketFactory.</returns>
 /// <exception cref="GeneralSecurityException">
 /// thrown if the SSLSocketFactory could not
 /// be initialized.
 /// </exception>
 /// <exception cref="System.IO.IOException">
 /// thrown if and IO error occurred while loading
 /// the server keystore.
 /// </exception>
 public virtual SSLServerSocketFactory CreateSSLServerSocketFactory()
 {
     if (mode != SSLFactory.Mode.Server)
     {
         throw new InvalidOperationException("Factory is in CLIENT mode");
     }
     return(context.GetServerSocketFactory());
 }