Imported Upstream version 4.4.2.4

Former-commit-id: 92904c9c5915c37244316e42ba99e7b934ed7ee2
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-07-21 09:40:10 +00:00
parent 589d484eee
commit 0b4a830db1
343 changed files with 9849 additions and 688 deletions

View File

@@ -11,9 +11,13 @@ LIBRARY = System.ServiceModel.Primitives.dll
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.ServiceModel System.Xml
LIB_REFS = System.ServiceModel System System.Xml Facades/System.Security.Cryptography.X509Certificates
LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib
ifneq (2.1, $(FRAMEWORK_VERSION))
LIB_REFS += System.IdentityModel
endif
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes

View File

@@ -1,3 +1,9 @@
TypeForwarders.cs
AssemblyInfo.cs
../../../build/common/MonoTODOAttribute.cs
X509ServiceCertificateAuthentication_mobile.cs
X509CertificateValidator_mobile.cs
X509CertificateValidationMode_mobile.cs
X509CertificateRecipientClientCredential_mobile.cs
X509CertificateInitiatorClientCredential_mobile.cs

View File

@@ -136,6 +136,7 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageContractMemberAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageCredentialType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageHeader<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageHeaderAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageHeaderException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageParameterAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.OperationContext))]
@@ -158,3 +159,16 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.UnknownMessageReceivedEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.XmlSerializerFormatAttribute))]
#if !MOBILE && !XAMMAC_4_5
// TODO: These are implemented as stubs in the facade directly on mobile (contrary to Desktop where they're forwarded to System.ServiceModel.dll/System.IdentityModel.dll).
// I'm not 100% sure this is the right approach, but Marek thinks it's fine so I'm sticking with it for now.
// The problem on mobile is that types like X509CertificateValidator live in System.IdentityModel.dll which is not built for mobile.
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IdentityModel.Selectors.X509CertificateValidator))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateValidationMode))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509ServiceCertificateAuthentication))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateInitiatorClientCredential))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateRecipientClientCredential))]
#endif

View File

@@ -0,0 +1,72 @@
//
// X509CertificateInitiatorClientCredential_mobile.cs
//
// Author:
// Alexander Köplinger (alexander.koeplinger@xamarin.com)
//
// (C) 2016 Xamarin, Inc.
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if MOBILE || XAMMAC_4_5
using System.Security.Cryptography.X509Certificates;
namespace System.ServiceModel.Security
{
public sealed class X509CertificateInitiatorClientCredential
{
[MonoTODO]
public X509Certificate2 Certificate
{
get
{
throw new NotImplementedException ();
}
set
{
throw new NotImplementedException ();
}
}
[MonoTODO]
internal X509CertificateInitiatorClientCredential()
{
throw new NotImplementedException ();
}
[MonoTODO]
public void SetCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void SetCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName)
{
throw new NotImplementedException ();
}
}
}
#endif

View File

@@ -0,0 +1,117 @@
//
// X509CertificateRecipientClientCredential_mobile.cs
//
// Author:
// Alexander Köplinger (alexander.koeplinger@xamarin.com)
//
// (C) 2016 Xamarin, Inc.
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if MOBILE || XAMMAC_4_5
using System;
using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates;
namespace System.ServiceModel.Security
{
public sealed class X509CertificateRecipientClientCredential
{
[MonoTODO]
public X509ServiceCertificateAuthentication Authentication
{
get
{
throw new NotImplementedException ();
}
}
[MonoTODO]
public X509Certificate2 DefaultCertificate
{
get
{
throw new NotImplementedException ();
}
set
{
throw new NotImplementedException ();
}
}
[MonoTODO]
public Dictionary<Uri, X509Certificate2> ScopedCertificates
{
get
{
throw new NotImplementedException ();
}
}
[MonoTODO]
public X509ServiceCertificateAuthentication SslCertificateAuthentication
{
get
{
throw new NotImplementedException ();
}
set
{
throw new NotImplementedException ();
}
}
[MonoTODO]
internal X509CertificateRecipientClientCredential ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public void SetDefaultCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void SetDefaultCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void SetScopedCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue, Uri targetService)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void SetScopedCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName, Uri targetService)
{
throw new NotImplementedException ();
}
}
}
#endif

View File

@@ -0,0 +1,45 @@
//
// X509CertificateValidationMode_mobile.cs
//
// Author:
// Alexander Köplinger (alexander.koeplinger@xamarin.com)
//
// (C) 2016 Xamarin, Inc.
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if MOBILE || XAMMAC_4_5
namespace System.ServiceModel.Security
{
public enum X509CertificateValidationMode
{
None,
PeerTrust,
ChainTrust,
PeerOrChainTrust,
Custom
}
}
#endif

View File

@@ -0,0 +1,43 @@
//
// X509CertificateValidator_mobile.cs
//
// Author:
// Alexander Köplinger (alexander.koeplinger@xamarin.com)
//
// (C) 2016 Xamarin, Inc.
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if MOBILE || XAMMAC_4_5
using System.Security.Cryptography.X509Certificates;
namespace System.IdentityModel.Selectors
{
public abstract class X509CertificateValidator
{
public abstract void Validate (X509Certificate2 certificate);
}
}
#endif

View File

@@ -0,0 +1,95 @@
//
// X509ServiceCertificateAuthentication_mobile.cs
//
// Author:
// Alexander Köplinger (alexander.koeplinger@xamarin.com)
//
// (C) 2016 Xamarin, Inc.
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if MOBILE || XAMMAC_4_5
using System;
using System.IdentityModel.Selectors;
using System.Security.Cryptography.X509Certificates;
namespace System.ServiceModel.Security
{
public sealed class X509ServiceCertificateAuthentication
{
[MonoTODO]
public X509CertificateValidationMode CertificateValidationMode
{
get
{
throw new NotImplementedException ();
}
set
{
throw new NotImplementedException ();
}
}
[MonoTODO]
public X509CertificateValidator CustomCertificateValidator
{
get
{
throw new NotImplementedException ();
}
set
{
throw new NotImplementedException ();
}
}
[MonoTODO]
public X509RevocationMode RevocationMode
{
get
{
throw new NotImplementedException ();
}
set
{
throw new NotImplementedException ();
}
}
[MonoTODO]
public StoreLocation TrustedStoreLocation
{
get
{
throw new NotImplementedException ();
}
set
{
throw new NotImplementedException ();
}
}
}
}
#endif