Renamed ServerSslAuthConfiguration class to ServerSslConfiguration class

This commit is contained in:
sta 2014-11-07 11:41:10 +09:00
parent c1d20ec706
commit 214103b7e8
8 changed files with 28 additions and 28 deletions

View File

@ -561,7 +561,7 @@ namespace WebSocketSharp
this TcpClient tcpClient, this TcpClient tcpClient,
string protocol, string protocol,
bool secure, bool secure,
ServerSslAuthConfiguration sslConfig, ServerSslConfiguration sslConfig,
Logger logger) Logger logger)
{ {
return new TcpListenerWebSocketContext (tcpClient, protocol, secure, sslConfig, logger); return new TcpListenerWebSocketContext (tcpClient, protocol, secure, sslConfig, logger);

View File

@ -66,7 +66,7 @@ namespace WebSocketSharp.Net
private Dictionary<HttpListenerPrefix, HttpListener> _prefixes; private Dictionary<HttpListenerPrefix, HttpListener> _prefixes;
private bool _secure; private bool _secure;
private Socket _socket; private Socket _socket;
private ServerSslAuthConfiguration _sslConfig; private ServerSslConfiguration _sslConfig;
private List<HttpListenerPrefix> _unhandled; // host == '*' private List<HttpListenerPrefix> _unhandled; // host == '*'
private Dictionary<HttpConnection, HttpConnection> _unregistered; private Dictionary<HttpConnection, HttpConnection> _unregistered;
private object _unregisteredSync; private object _unregisteredSync;
@ -90,16 +90,16 @@ namespace WebSocketSharp.Net
int port, int port,
bool secure, bool secure,
string certificateFolderPath, string certificateFolderPath,
ServerSslAuthConfiguration sslConfiguration, ServerSslConfiguration sslConfig,
bool reuseAddress) bool reuseAddress)
{ {
if (secure) { if (secure) {
var cert = getCertificate (port, certificateFolderPath, sslConfiguration.ServerCertificate); var cert = getCertificate (port, certificateFolderPath, sslConfig.ServerCertificate);
if (cert == null) if (cert == null)
throw new ArgumentException ("No server certificate could be found."); throw new ArgumentException ("No server certificate could be found.");
_secure = secure; _secure = secure;
_sslConfig = sslConfiguration; _sslConfig = sslConfig;
_sslConfig.ServerCertificate = cert; _sslConfig.ServerCertificate = cert;
} }
@ -132,7 +132,7 @@ namespace WebSocketSharp.Net
} }
} }
public ServerSslAuthConfiguration SslConfiguration { public ServerSslConfiguration SslConfiguration {
get { get {
return _sslConfig; return _sslConfig;
} }

View File

@ -77,7 +77,7 @@ namespace WebSocketSharp.Net
private HttpListenerPrefixCollection _prefixes; private HttpListenerPrefixCollection _prefixes;
private string _realm; private string _realm;
private bool _reuseAddress; private bool _reuseAddress;
private ServerSslAuthConfiguration _sslConfig; private ServerSslConfiguration _sslConfig;
private List<ListenerAsyncResult> _waitQueue; private List<ListenerAsyncResult> _waitQueue;
private object _waitQueueSync; private object _waitQueueSync;
@ -311,16 +311,16 @@ namespace WebSocketSharp.Net
/// optionally the client for secure connection. /// optionally the client for secure connection.
/// </summary> /// </summary>
/// <value> /// <value>
/// A <see cref="ServerSslAuthConfiguration"/> that represents the configuration /// A <see cref="ServerSslConfiguration"/> that represents the configuration used
/// used to authenticate the server and optionally the client for secure connection. /// to authenticate the server and optionally the client for secure connection.
/// </value> /// </value>
/// <exception cref="ObjectDisposedException"> /// <exception cref="ObjectDisposedException">
/// This listener has been closed. /// This listener has been closed.
/// </exception> /// </exception>
public ServerSslAuthConfiguration SslConfiguration { public ServerSslConfiguration SslConfiguration {
get { get {
CheckDisposed (); CheckDisposed ();
return _sslConfig ?? (_sslConfig = new ServerSslAuthConfiguration (null)); return _sslConfig ?? (_sslConfig = new ServerSslConfiguration (null));
} }
set { set {

View File

@ -1,6 +1,6 @@
#region License #region License
/* /*
* ServerSslAuthConfiguration.cs * ServerSslConfiguration.cs
* *
* The MIT License * The MIT License
* *
@ -43,7 +43,7 @@ namespace WebSocketSharp.Net
/// <summary> /// <summary>
/// Stores the parameters used to configure a <see cref="SslStream"/> instance as a server. /// Stores the parameters used to configure a <see cref="SslStream"/> instance as a server.
/// </summary> /// </summary>
public class ServerSslAuthConfiguration public class ServerSslConfiguration
{ {
#region Private Fields #region Private Fields
@ -58,20 +58,20 @@ namespace WebSocketSharp.Net
#region Public Constructors #region Public Constructors
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ServerSslAuthConfiguration"/> class with /// Initializes a new instance of the <see cref="ServerSslConfiguration"/> class with
/// the specified <paramref name="serverCertificate"/>. /// the specified <paramref name="serverCertificate"/>.
/// </summary> /// </summary>
/// <param name="serverCertificate"> /// <param name="serverCertificate">
/// A <see cref="X509Certificate2"/> that represents the certificate used to authenticate /// A <see cref="X509Certificate2"/> that represents the certificate used to authenticate
/// the server. /// the server.
/// </param> /// </param>
public ServerSslAuthConfiguration (X509Certificate2 serverCertificate) public ServerSslConfiguration (X509Certificate2 serverCertificate)
: this (serverCertificate, false, SslProtocols.Default, false) : this (serverCertificate, false, SslProtocols.Default, false)
{ {
} }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ServerSslAuthConfiguration"/> class with /// Initializes a new instance of the <see cref="ServerSslConfiguration"/> class with
/// the specified <paramref name="serverCertificate"/>, /// the specified <paramref name="serverCertificate"/>,
/// <paramref name="clientCertificateRequired"/>, <paramref name="enabledSslProtocols"/>, /// <paramref name="clientCertificateRequired"/>, <paramref name="enabledSslProtocols"/>,
/// and <paramref name="checkCertificateRevocation"/>. /// and <paramref name="checkCertificateRevocation"/>.
@ -92,7 +92,7 @@ namespace WebSocketSharp.Net
/// <c>true</c> if the certificate revocation list is checked during authentication; /// <c>true</c> if the certificate revocation list is checked during authentication;
/// otherwise, <c>false</c>. /// otherwise, <c>false</c>.
/// </param> /// </param>
public ServerSslAuthConfiguration ( public ServerSslConfiguration (
X509Certificate2 serverCertificate, X509Certificate2 serverCertificate,
bool clientCertificateRequired, bool clientCertificateRequired,
SslProtocols enabledSslProtocols, SslProtocols enabledSslProtocols,
@ -183,7 +183,7 @@ namespace WebSocketSharp.Net
} }
/// <summary> /// <summary>
/// Gets or sets the certificate used to authenticate the server on the secure connection. /// Gets or sets the certificate used to authenticate the server for secure connection.
/// </summary> /// </summary>
/// <value> /// <value>
/// A <see cref="X509Certificate2"/> that represents the certificate used to authenticate /// A <see cref="X509Certificate2"/> that represents the certificate used to authenticate

View File

@ -71,7 +71,7 @@ namespace WebSocketSharp.Net.WebSockets
TcpClient tcpClient, TcpClient tcpClient,
string protocol, string protocol,
bool secure, bool secure,
ServerSslAuthConfiguration sslConfig, ServerSslConfiguration sslConfig,
Logger logger) Logger logger)
{ {
_tcpClient = tcpClient; _tcpClient = tcpClient;

View File

@ -339,10 +339,10 @@ namespace WebSocketSharp.Server
/// optionally the client for secure connection. /// optionally the client for secure connection.
/// </summary> /// </summary>
/// <value> /// <value>
/// A <see cref="ServerSslAuthConfiguration"/> that represents the configuration /// A <see cref="ServerSslConfiguration"/> that represents the configuration used
/// used to authenticate the server and optionally the client for secure connection. /// to authenticate the server and optionally the client for secure connection.
/// </value> /// </value>
public ServerSslAuthConfiguration SslConfiguration { public ServerSslConfiguration SslConfiguration {
get { get {
return _listener.SslConfiguration; return _listener.SslConfiguration;
} }

View File

@ -70,7 +70,7 @@ namespace WebSocketSharp.Server
private bool _reuseAddress; private bool _reuseAddress;
private bool _secure; private bool _secure;
private WebSocketServiceManager _services; private WebSocketServiceManager _services;
private ServerSslAuthConfiguration _sslConfig; private ServerSslConfiguration _sslConfig;
private volatile ServerState _state; private volatile ServerState _state;
private object _sync; private object _sync;
private Uri _uri; private Uri _uri;
@ -445,12 +445,12 @@ namespace WebSocketSharp.Server
/// optionally the client for secure connection. /// optionally the client for secure connection.
/// </summary> /// </summary>
/// <value> /// <value>
/// A <see cref="ServerSslAuthConfiguration"/> that represents the configuration /// A <see cref="ServerSslConfiguration"/> that represents the configuration used
/// used to authenticate the server and optionally the client for secure connection. /// to authenticate the server and optionally the client for secure connection.
/// </value> /// </value>
public ServerSslAuthConfiguration SslConfiguration { public ServerSslConfiguration SslConfiguration {
get { get {
return _sslConfig ?? (_sslConfig = new ServerSslAuthConfiguration (null)); return _sslConfig ?? (_sslConfig = new ServerSslConfiguration (null));
} }
set { set {

View File

@ -67,7 +67,6 @@
<Compile Include="CloseEventArgs.cs" /> <Compile Include="CloseEventArgs.cs" />
<Compile Include="ByteOrder.cs" /> <Compile Include="ByteOrder.cs" />
<Compile Include="ErrorEventArgs.cs" /> <Compile Include="ErrorEventArgs.cs" />
<Compile Include="Net\ServerSslAuthConfiguration.cs" />
<Compile Include="WebSocket.cs" /> <Compile Include="WebSocket.cs" />
<Compile Include="Server\WebSocketServer.cs" /> <Compile Include="Server\WebSocketServer.cs" />
<Compile Include="Net\AuthenticationSchemes.cs" /> <Compile Include="Net\AuthenticationSchemes.cs" />
@ -136,6 +135,7 @@
<Compile Include="Server\WebSocketBehavior.cs" /> <Compile Include="Server\WebSocketBehavior.cs" />
<Compile Include="Net\HttpListenerPrefix.cs" /> <Compile Include="Net\HttpListenerPrefix.cs" />
<Compile Include="Net\ClientSslConfiguration.cs" /> <Compile Include="Net\ClientSslConfiguration.cs" />
<Compile Include="Net\ServerSslConfiguration.cs" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup> <ItemGroup>