Imported Upstream version 4.6.0.125

Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-08-03 10:59:49 +00:00
parent a569aebcfd
commit e79aa3c0ed
17047 changed files with 3137615 additions and 392334 deletions

View File

@ -1,87 +0,0 @@
2010-07-21 Sebastien Pouliot <sebastien@ximian.com>
* LocalCertificateSelectionCallback.cs:
* SslStream.cs:
Don't use alias in moonlight build (not needed and breaks
compilation otherwise)
2010-06-29 Sebastien Pouliot <sebastien@ximian.com>
* RemoteCertificateValidationCallback.cs: Remove SECURITY_DEP use
2010-05-10 Sebastien Pouliot <sebastien@ximian.com>
* SslStream.cs: Allow Moonlight to build the non-server part
of SslStream
* RemoteCertificateValidationCallback.cs: Adjust visibility for
Moonlight build
2010-03-01 Gonzalo Paniagua Javier <gonzalo@novell.com>
* SslStream.cs: don't do anything if a chain element has
no error.
2009-08-20 Sebastien Pouliot <sebastien@ximian.com>
* SslStream.cs : Always use/provide a X509Chain even if this
duplicates some of the old/existing logic of Mono.Security.
This makes it possible to provide a callback using
ServicePointManager.ServerCertificateValidationCallback
2007-08-24 Atsushi Enomoto <atsushi@ximian.com>
* SslStream.cs : uh, fixed the build.
2007-08-24 Atsushi Enomoto <atsushi@ximian.com>
* SslStream.cs : implemented, based on Mono.Security.
* LocalCertificateSelectionCallback.cs : extern alias is needed.
2006-04-05 Sebastien Pouliot <sebastien@ximian.com>
* RemoteCertValidationCallback.cs: Fix build. X509Chain isn't
available when System.dll is first being build. This needs to be
reviewed since some System.Security.dll classes migrated to System.dll
2006-04-05 Atsushi Enomoto <atsushi@ximian.com>
* SslPolicyErrors.cs : forgot to add.
2006-04-05 Atsushi Enomoto <atsushi@ximian.com>
* AuthenticationLevel.cs,
NegotiateStream.cs,
SslStream.cs,
LocalCertificateSelectionCallback.cs,
RemoteCertificateValidationCallback.cs :
Updated all unimplemented things to 2.0 RTM.
2006-03-21 Miguel de Icaza <miguel@novell.com>
* AuthenticatedStream.cs: Implement Dispose method, remove Close
method, the Close to fix the API.
* NegotiateStream.cs: Implement Dispose method as well, kill
Close, rename the various methods to the new ones.
2006-03-11 Miguel de Icaza <miguel@novell.com>
* AuthenticatedStream.cs: Fixed normative parameter names (yes, we
need to do this everywhere one day).
(Close): actually obey the "leaveInnerStreamOpen" setting from the
constructor.
2006-03-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* SslStream.cs, NegotiateStream.cs: Override CanTimeout,
ReadTimeout and WriteTimeout properties, to avoid warnings.
2005-10-26 Atsushi Enomoto <atsushi@ximian.com>
* ProtectionLevel.cs : fix enumeration.
2004-09-13 Tim Coleman <tim@timcoleman.com>
* AuthenticatedStream.cs AuthenticationLevel.cs LocalCertSelectionCallback.cs
* NegotiateStream.cs ProtectionLevel.cs RemoteCertValidationCallback.cs
* SslStream.cs: New stubs for Fx 2.0

View File

@ -29,10 +29,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if SECURITY_DEP && !MONO_FEATURE_NEW_TLS
#if MONO_X509_ALIAS
extern alias PrebuiltSystem;
using X509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;
#endif
using System.Security.Cryptography.X509Certificates;

View File

@ -33,6 +33,10 @@ using System;
using System.IO;
using System.Net;
using System.Security.Principal;
using System.Security.Permissions;
using System.Security.Authentication.ExtendedProtection;
using System.Threading;
using System.Threading.Tasks;
namespace System.Net.Security
{
@ -272,6 +276,60 @@ namespace System.Net.Security
throw new NotImplementedException ();
}
public virtual Task AuthenticateAsClientAsync()
{
return Task.Factory.FromAsync(BeginAuthenticateAsClient, EndAuthenticateAsClient, null);
}
public virtual Task AuthenticateAsClientAsync(NetworkCredential credential, string targetName)
{
return Task.Factory.FromAsync(BeginAuthenticateAsClient, EndAuthenticateAsClient, credential, targetName, null);
}
public virtual Task AuthenticateAsClientAsync(
NetworkCredential credential, string targetName,
ProtectionLevel requiredProtectionLevel,
TokenImpersonationLevel allowedImpersonationLevel)
{
return Task.Factory.FromAsync((callback, state) => BeginAuthenticateAsClient(credential, targetName, requiredProtectionLevel, allowedImpersonationLevel, callback, state), EndAuthenticateAsClient, null);
}
public virtual Task AuthenticateAsClientAsync(NetworkCredential credential, ChannelBinding binding, string targetName)
{
throw new NotImplementedException ();
}
public virtual Task AuthenticateAsClientAsync(
NetworkCredential credential, ChannelBinding binding,
string targetName, ProtectionLevel requiredProtectionLevel,
TokenImpersonationLevel allowedImpersonationLevel)
{
throw new NotImplementedException ();
}
public virtual Task AuthenticateAsServerAsync()
{
return Task.Factory.FromAsync(BeginAuthenticateAsServer, EndAuthenticateAsServer, null);
}
public virtual Task AuthenticateAsServerAsync(ExtendedProtectionPolicy policy)
{
throw new NotImplementedException ();
}
public virtual Task AuthenticateAsServerAsync(NetworkCredential credential, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
{
throw new NotImplementedException ();
}
public virtual Task AuthenticateAsServerAsync(
NetworkCredential credential, ExtendedProtectionPolicy policy,
ProtectionLevel requiredProtectionLevel,
TokenImpersonationLevel requiredImpersonationLevel)
{
throw new NotImplementedException ();
}
#endregion // Methods
}
}

View File

@ -29,10 +29,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MONO_FEATURE_NEW_TLS
#if MONO_X509_ALIAS
extern alias PrebuiltSystem;
using X509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;
#endif
using System.Security.Cryptography.X509Certificates;

View File

@ -27,9 +27,6 @@
#if !MONO_FEATURE_NEW_TLS
#if SECURITY_DEP
#if MONO_X509_ALIAS
extern alias PrebuiltSystem;
#endif
#if MONO_SECURITY_ALIAS
extern alias MonoSecurity;
#endif
@ -39,13 +36,6 @@ using MonoSecurity::Mono.Security.Interface;
#else
using Mono.Security.Interface;
#endif
#if MONO_X509_ALIAS
using XSslProtocols = PrebuiltSystem::System.Security.Authentication.SslProtocols;
using XX509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;
#else
using XSslProtocols = System.Security.Authentication.SslProtocols;
using XX509CertificateCollection = System.Security.Cryptography.X509Certificates.X509CertificateCollection;
#endif
using CipherAlgorithmType = System.Security.Authentication.CipherAlgorithmType;
using HashAlgorithmType = System.Security.Authentication.HashAlgorithmType;
@ -80,7 +70,7 @@ namespace System.Net.Security
internal delegate X509Certificate LocalCertSelectionCallback (
string targetHost,
XX509CertificateCollection localCertificates,
X509CertificateCollection localCertificates,
X509Certificate remoteCertificate,
string[] acceptableIssuers);
@ -146,9 +136,9 @@ namespace System.Net.Security
Impl.AuthenticateAsClient (targetHost);
}
public virtual void AuthenticateAsClient (string targetHost, XX509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
public virtual void AuthenticateAsClient (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
{
Impl.AuthenticateAsClient (targetHost, (XX509CertificateCollection)(object)clientCertificates, (XSslProtocols)enabledSslProtocols, checkCertificateRevocation);
Impl.AuthenticateAsClient (targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation);
}
// [HostProtection (ExternalThreading=true)]
@ -158,9 +148,9 @@ namespace System.Net.Security
}
// [HostProtection (ExternalThreading=true)]
public virtual IAsyncResult BeginAuthenticateAsClient (string targetHost, XX509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState)
public virtual IAsyncResult BeginAuthenticateAsClient (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState)
{
return Impl.BeginAuthenticateAsClient (targetHost, (XX509CertificateCollection)(object)clientCertificates, (XSslProtocols)enabledSslProtocols, checkCertificateRevocation, asyncCallback, asyncState);
return Impl.BeginAuthenticateAsClient (targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation, asyncCallback, asyncState);
}
public virtual void EndAuthenticateAsClient (IAsyncResult asyncResult)
@ -175,7 +165,7 @@ namespace System.Net.Security
public virtual void AuthenticateAsServer (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
{
Impl.AuthenticateAsServer (serverCertificate, clientCertificateRequired, (XSslProtocols)enabledSslProtocols, checkCertificateRevocation);
Impl.AuthenticateAsServer (serverCertificate, clientCertificateRequired, enabledSslProtocols, checkCertificateRevocation);
}
// [HostProtection (ExternalThreading=true)]
@ -186,7 +176,7 @@ namespace System.Net.Security
public virtual IAsyncResult BeginAuthenticateAsServer (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState)
{
return Impl.BeginAuthenticateAsServer (serverCertificate, clientCertificateRequired, (XSslProtocols)enabledSslProtocols, checkCertificateRevocation, asyncCallback, asyncState);
return Impl.BeginAuthenticateAsServer (serverCertificate, clientCertificateRequired, enabledSslProtocols, checkCertificateRevocation, asyncCallback, asyncState);
}
public virtual void EndAuthenticateAsServer (IAsyncResult asyncResult)
@ -206,9 +196,9 @@ namespace System.Net.Security
return Impl.AuthenticateAsClientAsync (targetHost);
}
public virtual Task AuthenticateAsClientAsync (string targetHost, XX509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
public virtual Task AuthenticateAsClientAsync (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
{
return Impl.AuthenticateAsClientAsync (targetHost, clientCertificates, (XSslProtocols)enabledSslProtocols, checkCertificateRevocation);
return Impl.AuthenticateAsClientAsync (targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation);
}
public virtual Task AuthenticateAsServerAsync (X509Certificate serverCertificate)
@ -218,7 +208,7 @@ namespace System.Net.Security
public virtual Task AuthenticateAsServerAsync (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
{
return Impl.AuthenticateAsServerAsync (serverCertificate, clientCertificateRequired, (XSslProtocols)enabledSslProtocols, checkCertificateRevocation);
return Impl.AuthenticateAsServerAsync (serverCertificate, clientCertificateRequired, enabledSslProtocols, checkCertificateRevocation);
}
public override bool IsAuthenticated {