예제 #1
0
        private string checkIfCertificateExists()
        {
            if (!_secure)
            {
                return(null);
            }
            bool flag  = _listener.SslConfiguration.ServerCertificate != null;
            bool flag2 = EndPointListener.CertificateExists(_port, _listener.CertificateFolderPath);

            if (flag && flag2)
            {
                _logger.Warn("The server certificate associated with the port number already exists.");
                return(null);
            }
            return((flag || flag2) ? null : "The secure connection requires a server certificate.");
        }
예제 #2
0
		private string checkIfCertificateExists ()
			{
			if (!_secure)
				return null;

			var usr = _listener.SslConfiguration.ServerCertificate != null;
			var port = EndPointListener.CertificateExists (_port, _listener.CertificateFolderPath);
			if (usr && port)
				{
				_logger.Warn ("The server certificate associated with the port number already exists.");
				return null;
				}

			return !(usr || port)
					? "The secure connection requires a server certificate."
					: null;
			}
예제 #3
0
 private string checkIfCertExists()
 {
     return((!this._secure || EndPointListener.CertificateExists(this._port, this._listener.CertificateFolderPath) || this.Certificate != null) ? null : "The secure connection requires a server certificate.");
 }