Example #1
0
 /// <summary>
 /// Enable SSL
 /// </summary>
 public uint EnableSsl(uint options)
 {
     using (TrySNIEventScope.Create(nameof(SNIMarsConnection)))
     {
         return(_lowerHandle.EnableSsl(options));
     }
 }
Example #2
0
 /// <summary>
 /// Enable SSL on a connection
 /// </summary>
 /// <param name="handle">Connection handle</param>
 /// <param name="options"></param>
 /// <returns>SNI error code</returns>
 internal uint EnableSsl(SNIHandle handle, uint options)
 {
     try
     {
         return(handle.EnableSsl(options));
     }
     catch (Exception e)
     {
         return(SNICommon.ReportSNIError(SNIProviders.SSL_PROV, SNICommon.HandshakeFailureError, e));
     }
 }
Example #3
0
        /// <summary>
        /// Enable SSL
        /// </summary>
        public uint EnableSsl(uint options)
        {
            long scopeID = SqlClientEventSource.Log.TrySNIScopeEnterEvent("<sc.SNI.SNIMarsConnection.EnableSsl |SNI|INFO|SCOPE>");

            try
            {
                return(_lowerHandle.EnableSsl(options));
            }
            finally
            {
                SqlClientEventSource.Log.TrySNIScopeLeaveEvent(scopeID);
            }
        }
Example #4
0
 /// <summary>
 /// Enable SSL on a connection
 /// </summary>
 /// <param name="handle">Connection handle</param>
 /// <param name="options"></param>
 /// <returns>SNI error code</returns>
 internal uint EnableSsl(SNIHandle handle, uint options)
 {
     try
     {
         SqlClientEventSource.Log.TryTraceEvent("SNIProxy.EnableSsl | Info | Session Id {0}", handle?.ConnectionId);
         return(handle.EnableSsl(options));
     }
     catch (Exception e)
     {
         SqlClientEventSource.Log.TryTraceEvent("SNIProxy.EnableSsl | Err | Session Id {0}, SNI Handshake failed with exception: {1}", handle?.ConnectionId, e?.Message);
         return(SNICommon.ReportSNIError(SNIProviders.SSL_PROV, SNICommon.HandshakeFailureError, e));
     }
 }
        /// <summary>
        /// Enable SSL
        /// </summary>
        public uint EnableSsl(uint options)
        {
            long scopeID = SqlClientEventSource.Log.TrySNIScopeEnterEvent(s_className);

            try
            {
                return(_lowerHandle.EnableSsl(options));
            }
            finally
            {
                SqlClientEventSource.Log.TrySNIScopeLeaveEvent(scopeID);
            }
        }
        internal override uint EnableSsl(ref uint info)
        {
            SNIHandle handle = Handle;

            try
            {
                SqlClientEventSource.Log.TryTraceEvent("TdsParserStateObjectManaged.EnableSsl | Info | Session Id {0}", handle?.ConnectionId);
                return(handle.EnableSsl(info));
            }
            catch (Exception e)
            {
                SqlClientEventSource.Log.TryTraceEvent("TdsParserStateObjectManaged.EnableSsl | Err | Session Id {0}, SNI Handshake failed with exception: {1}", handle?.ConnectionId, e?.Message);
                return(SNICommon.ReportSNIError(SNIProviders.SSL_PROV, SNICommon.HandshakeFailureError, e));
            }
        }
Example #7
0
 /// <summary>
 /// Enable SSL
 /// </summary>
 public uint EnableSsl(uint options)
 {
     return(_lowerHandle.EnableSsl(options));
 }