/// <summary>Initializes a new instance of the <see cref="Storage" /> class.</summary> /// <param name="connectionString">ConnectionString of the storage.</param> /// <param name="flags">The connection flags.</param> protected Storage(ConnectionString connectionString, ConnectionFlags flags) { ConnectionString = connectionString; AllowUnsafeConnections = flags.HasFlag(ConnectionFlags.AllowUnsafeConnections); LogVerboseMessages = flags.HasFlag(ConnectionFlags.VerboseLogging); if (LogVerboseMessages) { Trace.TraceInformation("Verbose logging <green>enabled!"); } }
public async Task OnDataChannelEncryptionDisabled() { ClientDataConnection.DisableEncryption(); ActionsTracker.ConnectionSecurityChanged(null, new ConnectionSecurityChangedEventArgs() { EndPoint = ClientInitialRemoteEndPoint, Security = ConnectionFlags.HasFlag(ControlConnectionFlags.UsingTLSorSSL) ? ConnectionSecurity.ControlConnectionSecured : ConnectionSecurity.NonSecure }); }
public async Task OnDataChannelEncryptionEnabled() { if (!IsEncryptionSupported) { SendResponse(new FtpReply() { ReplyCode = FtpReplyCode.NotImplemented, Message = "Server is not configured to support SSL/TLS." }, false); return; } ClientDataConnection.ActivateEncryption(); ActionsTracker.ConnectionSecurityChanged(null, new ConnectionSecurityChangedEventArgs() { EndPoint = ClientInitialRemoteEndPoint, Security = ConnectionFlags.HasFlag(ControlConnectionFlags.UsingTLSorSSL) ? ConnectionSecurity.Both : ConnectionSecurity.DataChannelSecured }); Logger.Log($"Enabled encryption for datachannel : {ClientInitialRemoteEndPoint.ToString()}" , RecordKind.Status); }