Skip to content

Commit

Permalink
WinSCP 5.2.3 beta
Browse files Browse the repository at this point in the history
  • Loading branch information
martinprikryl committed Aug 12, 2013
1 parent d54de24 commit c1a1578
Show file tree
Hide file tree
Showing 128 changed files with 1,763 additions and 1,457 deletions.
14 changes: 7 additions & 7 deletions dotnet/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -961,20 +961,20 @@ private string SessionOptionsToOpenSwitches(SessionOptions sessionOptions)
}
}

if (!string.IsNullOrEmpty(sessionOptions.SslHostCertificateFingerprint) ||
sessionOptions.GiveUpSecurityAndAcceptAnySslHostCertificate)
if (!string.IsNullOrEmpty(sessionOptions.TlsHostCertificateFingerprint) ||
sessionOptions.GiveUpSecurityAndAcceptAnyTlsHostCertificate)
{
if (sessionOptions.FtpSecure == FtpSecure.None)
{
throw new ArgumentException("SessionOptions.SslHostCertificateFingerprint or SessionOptions.GiveUpSecurityAndAcceptAnySslHostCertificate is set, but SessionOptions.FtpSecure is FtpSecure.None.");
throw new ArgumentException("SessionOptions.TlsHostCertificateFingerprint or SessionOptions.GiveUpSecurityAndAcceptAnyTlsHostCertificate is set, but SessionOptions.FtpSecure is FtpSecure.None.");
}
string sslHostCertificateFingerprint = sessionOptions.SslHostCertificateFingerprint;
if (sessionOptions.GiveUpSecurityAndAcceptAnySslHostCertificate)
string tlsHostCertificateFingerprint = sessionOptions.TlsHostCertificateFingerprint;
if (sessionOptions.GiveUpSecurityAndAcceptAnyTlsHostCertificate)
{
Logger.WriteLine("WARNING! Giving up security and accepting any certificate as configured");
sslHostCertificateFingerprint = AddStarToList(sslHostCertificateFingerprint);
tlsHostCertificateFingerprint = AddStarToList(tlsHostCertificateFingerprint);
}
switches.Add(FormatSwitch("certificate", sslHostCertificateFingerprint));
switches.Add(FormatSwitch("certificate", tlsHostCertificateFingerprint));
}

if (sessionOptions.Protocol == Protocol.Ftp)
Expand Down
26 changes: 15 additions & 11 deletions dotnet/SessionOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public enum FtpSecure
{
None = 0,
Implicit = 1,
ExplicitSsl = 2,
ExplicitTls = 3,
ExplicitSsl = 2,
}

[Guid("2D4EF368-EE80-4C15-AE77-D12AEAF4B00A")]
Expand Down Expand Up @@ -59,8 +59,12 @@ public SessionOptions()
// FTP
public FtpMode FtpMode { get; set; }
public FtpSecure FtpSecure { get; set; }
public string SslHostCertificateFingerprint { get { return _sslHostCertificateFingerprint; } set { SetHostSslCertificateFingerprint(value); } }
public bool GiveUpSecurityAndAcceptAnySslHostCertificate { get; set; }
public string TlsHostCertificateFingerprint { get { return _tlsHostCertificateFingerprint; } set { SetHostTlsCertificateFingerprint(value); } }
[Obsolete("Use TlsHostCertificateFingerprint")]
public string SslHostCertificateFingerprint { get { return TlsHostCertificateFingerprint; } set { TlsHostCertificateFingerprint = value; } }
public bool GiveUpSecurityAndAcceptAnyTlsHostCertificate { get; set; }
[Obsolete("Use GiveUpSecurityAndAcceptAnyTlsHostCertificate")]
public bool GiveUpSecurityAndAcceptAnySslHostCertificate { get { return GiveUpSecurityAndAcceptAnyTlsHostCertificate; } set { GiveUpSecurityAndAcceptAnyTlsHostCertificate = value; } }

public void AddRawSettings(string setting, string value)
{
Expand All @@ -85,19 +89,19 @@ private void SetSshHostKeyFingerprint(string s)
_sshHostKeyFingerprint = s;
}

private void SetHostSslCertificateFingerprint(string s)
private void SetHostTlsCertificateFingerprint(string s)
{
if (s != null)
{
Match match = _sslCertificateRegex.Match(s);
Match match = _tlsCertificateRegex.Match(s);

if (!match.Success || (match.Length != s.Length))
{
throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "SSL host certificate fingerprint \"{0}\" does not match pattern /{1}/", s, _sslCertificateRegex));
throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "TLS host certificate fingerprint \"{0}\" does not match pattern /{1}/", s, _tlsCertificateRegex));
}
}

_sslHostCertificateFingerprint = s;
_tlsHostCertificateFingerprint = s;
}

private void SetTimeout(TimeSpan value)
Expand All @@ -121,16 +125,16 @@ private void SetPortNumber(int value)
}

private string _sshHostKeyFingerprint;
private string _sslHostCertificateFingerprint;
private string _tlsHostCertificateFingerprint;
private TimeSpan _timeout;
private int _portNumber;

private const string _listPattern = @"{0}(;{0})*";
private const string _sshHostKeyPattern = @"(ssh-rsa |ssh-dss )?\d+ ([0-9a-f]{2}:){15}[0-9a-f]{2}";
private static readonly Regex _sshHostKeyRegex =
new Regex(string.Format(CultureInfo.InvariantCulture, _listPattern, _sshHostKeyPattern));
private const string _sslCertificatePattern = @"([0-9a-f]{2}:){19}[0-9a-f]{2}";
private static readonly Regex _sslCertificateRegex =
new Regex(string.Format(CultureInfo.InvariantCulture, _listPattern, _sslCertificatePattern));
private const string _tlsCertificatePattern = @"([0-9a-f]{2}:){19}[0-9a-f]{2}";
private static readonly Regex _tlsCertificateRegex =
new Regex(string.Format(CultureInfo.InvariantCulture, _listPattern, _tlsCertificatePattern));
}
}
11 changes: 8 additions & 3 deletions dotnet/internal/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private void CreateCounters()
private void AddCounter(PerformanceCounter counter)
{
counter.NextValue();
_processorCounters.Add(counter);
_performanceCounters.Add(counter);
}

public void WriteLine(string message)
Expand Down Expand Up @@ -144,6 +144,11 @@ public void Dispose()
_writter.Dispose();
_writter = null;
}

foreach (PerformanceCounter counter in _performanceCounters)
{
counter.Dispose();
}
}
}

Expand All @@ -153,7 +158,7 @@ public void WriteCounters()
{
try
{
foreach (PerformanceCounter counter in _processorCounters)
foreach (PerformanceCounter counter in _performanceCounters)
{
WriteLine("{0}{1}{2} = [{3}]",
counter.CounterName,
Expand Down Expand Up @@ -282,6 +287,6 @@ private void WriteEnvironmentInfo()
private readonly Dictionary<int, int> _indents = new Dictionary<int, int>();
private readonly object _logLock = new object();
private readonly Lock _lock = new Lock();
private List<PerformanceCounter> _processorCounters = new List<PerformanceCounter>();
private List<PerformanceCounter> _performanceCounters = new List<PerformanceCounter>();
}
}
6 changes: 3 additions & 3 deletions dotnet/properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("a0b93468-d98a-4845-a234-8076229ad93f")]

[assembly: AssemblyVersion("1.1.2.0")]
[assembly: AssemblyFileVersion("1.1.2.0")]
[assembly: AssemblyInformationalVersionAttribute("5.2.2.0")]
[assembly: AssemblyVersion("1.1.3.0")]
[assembly: AssemblyFileVersion("1.1.3.0")]
[assembly: AssemblyInformationalVersionAttribute("5.2.3.0")]

[assembly: CLSCompliant(true)]

2 changes: 1 addition & 1 deletion libs/apr/docs/pool-design.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</head>
<body>
<div align="right">
Last modified at [$Date: 2013/04/07 20:33:12 $]
Last modified at [$Date: 2013/08/12 09:54:01 $]
</div>

<h1>Using APR Pools</h1>
Expand Down
2 changes: 1 addition & 1 deletion libs/expat/conftools/ac_c_bigendian_cross.m4
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dnl The implementation will create a binary, and instead of running
dnl the binary it will be grep'ed for some symbols that will look
dnl different for different endianess of the binary.
dnl
dnl @version $Id: ac_c_bigendian_cross.m4,v 1.1 2013/04/07 20:33:22 martinprikryl Exp $
dnl @version $Id: ac_c_bigendian_cross.m4,v 1.2 2013/08/12 09:54:02 martinprikryl Exp $
dnl @author Guido Draheim <[email protected]>
dnl
AC_DEFUN([AC_C_BIGENDIAN_CROSS],
Expand Down
2 changes: 1 addition & 1 deletion libs/expat/conftools/mkinstalldirs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Created: 1993-05-16
# Public domain

# $Id: mkinstalldirs,v 1.1 2013/04/07 20:33:22 martinprikryl Exp $
# $Id: mkinstalldirs,v 1.2 2013/08/12 09:54:02 martinprikryl Exp $

errstatus=0

Expand Down
5 changes: 2 additions & 3 deletions libs/install/openssl/readme_debug
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Debug build:
- do CFLAG pridat
-v -y
-v -y -k -r- -vi-
pro CodeGuard pridat
-vG
a ubrat
-O2
nahradit -O2 za -Od
Loading

0 comments on commit c1a1578

Please sign in to comment.