You've already forked linux-packaging-mono
Imported Upstream version 5.10.0.47
Former-commit-id: d0813289fa2d35e1f8ed77530acb4fb1df441bc0
This commit is contained in:
parent
88ff76fe28
commit
e46a49ecf1
@ -38,11 +38,11 @@ namespace System.ServiceModel.Channels
|
||||
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SR.GetString(SR.MessageHeaderIsNull0)));
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (!LocalAppContextSwitches.DisableAddressHeaderCollectionValidation)
|
||||
{
|
||||
foreach (AddressHeader addressHeader in addressHeaders)
|
||||
{
|
||||
if (addressHeaders == null)
|
||||
if (addressHeader == null)
|
||||
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SR.GetString(SR.MessageHeaderIsNull0)));
|
||||
}
|
||||
}
|
||||
|
@ -466,7 +466,7 @@ namespace System.ServiceModel.Channels
|
||||
|
||||
if (actor.Length == 0 && mustUnderstand == mustUnderstandValue && !relay)
|
||||
{
|
||||
if ((object)to == (object)version.Anonymous)
|
||||
if ((object)to == (object)version.AnonymousUri)
|
||||
{
|
||||
if (version == AddressingVersion.WSAddressing10)
|
||||
return AnonymousTo10;
|
||||
|
@ -302,7 +302,7 @@ namespace System.ServiceModel.Channels
|
||||
{
|
||||
if (this.hashAlgorithm == null)
|
||||
{
|
||||
this.hashAlgorithm = CryptoHelper.CreateHashAlgorithm(SecurityAlgorithms.Sha1Digest);
|
||||
this.hashAlgorithm = CryptoHelper.CreateHashAlgorithm(SecurityAlgorithms.Sha256Digest);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -114,7 +114,7 @@ namespace System.ServiceModel.Channels
|
||||
if (null == errorStrings)
|
||||
{
|
||||
#pragma warning suppress 56523 // Callers (there is only one) handle an invalid handle returned from here.
|
||||
errorStrings = UnsafeNativeMethods.LoadLibrary("MQUTIL.DLL");
|
||||
errorStrings = UnsafeNativeMethods.LoadLibraryEx("MQUTIL.DLL", IntPtr.Zero, UnsafeNativeMethods.LOAD_LIBRARY_AS_DATAFILE | UnsafeNativeMethods.LOAD_LIBRARY_SEARCH_SYSTEM32);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,14 @@
|
||||
namespace System.ServiceModel.Channels
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using Collections.ObjectModel;
|
||||
using System.Security.Principal;
|
||||
using System.ServiceModel.Activation;
|
||||
|
||||
public class NamedPipeTransportBindingElement : ConnectionOrientedTransportBindingElement
|
||||
{
|
||||
List<SecurityIdentifier> allowedUsers;
|
||||
List<SecurityIdentifier> allowedUsers = new List<SecurityIdentifier>();
|
||||
Collection<SecurityIdentifier> allowedUsersCollection;
|
||||
NamedPipeConnectionPoolSettings connectionPoolSettings = new NamedPipeConnectionPoolSettings();
|
||||
NamedPipeSettings settings = new NamedPipeSettings();
|
||||
|
||||
@ -24,7 +26,6 @@ namespace System.ServiceModel.Channels
|
||||
{
|
||||
if (elementToBeCloned.allowedUsers != null)
|
||||
{
|
||||
this.allowedUsers = new List<SecurityIdentifier>(elementToBeCloned.AllowedUsers.Count);
|
||||
foreach (SecurityIdentifier id in elementToBeCloned.allowedUsers)
|
||||
{
|
||||
this.allowedUsers.Add(id);
|
||||
@ -48,6 +49,19 @@ namespace System.ServiceModel.Channels
|
||||
}
|
||||
}
|
||||
|
||||
public Collection<SecurityIdentifier> AllowedSecurityIdentifiers
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.allowedUsersCollection == null)
|
||||
{
|
||||
this.allowedUsersCollection = new Collection<SecurityIdentifier>(this.allowedUsers);
|
||||
}
|
||||
|
||||
return this.allowedUsersCollection;
|
||||
}
|
||||
}
|
||||
|
||||
public NamedPipeConnectionPoolSettings ConnectionPoolSettings
|
||||
{
|
||||
get { return this.connectionPoolSettings; }
|
||||
|
@ -1 +1 @@
|
||||
9b1f4f0e0038ba1cd310aa71fcdbed8bd39085c6
|
||||
16f89740523d779047c60efbcd0d72466c266f9c
|
@ -68,7 +68,7 @@ namespace System.ServiceModel.Channels
|
||||
}
|
||||
}
|
||||
|
||||
[DefaultValue(TransportDefaults.SslProtocols)]
|
||||
[DefaultValue(TransportDefaults.OldDefaultSslProtocols)]
|
||||
public SslProtocols SslProtocols
|
||||
{
|
||||
get
|
||||
|
@ -163,7 +163,8 @@ namespace System.ServiceModel.Channels
|
||||
internal const int MaxPoolSize = 8;
|
||||
internal const MsmqAuthenticationMode MsmqAuthenticationMode = System.ServiceModel.MsmqAuthenticationMode.WindowsDomain;
|
||||
internal const MsmqEncryptionAlgorithm MsmqEncryptionAlgorithm = System.ServiceModel.MsmqEncryptionAlgorithm.RC4Stream;
|
||||
internal const MsmqSecureHashAlgorithm MsmqSecureHashAlgorithm = System.ServiceModel.MsmqSecureHashAlgorithm.Sha1;
|
||||
internal const MsmqSecureHashAlgorithm DefaultMsmqSecureHashAlgorithm = System.ServiceModel.MsmqSecureHashAlgorithm.Sha256;
|
||||
internal static MsmqSecureHashAlgorithm MsmqSecureHashAlgorithm { get { return LocalAppContextSwitches.UseSha1InMsmqEncryptionAlgorithm ? MsmqSecureHashAlgorithm.Sha1 : DefaultMsmqSecureHashAlgorithm; } }
|
||||
internal const ProtectionLevel MsmqProtectionLevel = ProtectionLevel.Sign;
|
||||
internal const ReceiveErrorHandling ReceiveErrorHandling = System.ServiceModel.ReceiveErrorHandling.Fault;
|
||||
internal const int ReceiveRetryCount = 5;
|
||||
@ -202,10 +203,26 @@ namespace System.ServiceModel.Channels
|
||||
internal const bool RequireClientCertificate = false;
|
||||
internal const int MaxFaultSize = MaxBufferSize;
|
||||
internal const int MaxSecurityFaultSize = 16384;
|
||||
|
||||
internal const SslProtocols OldDefaultSslProtocols = System.Security.Authentication.SslProtocols.Tls |
|
||||
System.Security.Authentication.SslProtocols.Tls11 |
|
||||
System.Security.Authentication.SslProtocols.Tls12;
|
||||
|
||||
internal const SslProtocols SslProtocols = System.Security.Authentication.SslProtocols.Tls |
|
||||
System.Security.Authentication.SslProtocols.Tls11 |
|
||||
System.Security.Authentication.SslProtocols.Tls12;
|
||||
internal static SslProtocols SslProtocols
|
||||
{
|
||||
get
|
||||
{
|
||||
if (LocalAppContextSwitches.DontEnableSystemDefaultTlsVersions)
|
||||
{
|
||||
return OldDefaultSslProtocols;
|
||||
}
|
||||
else
|
||||
{
|
||||
// SslProtocols.None uses the default SSL protocol from the OS.
|
||||
return System.Security.Authentication.SslProtocols.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Calling CreateFault on an incoming message can expose some DoS-related security
|
||||
// vulnerabilities when a service is in streaming mode. See MB 47592 for more details.
|
||||
|
@ -465,6 +465,9 @@ namespace System.ServiceModel.Channels
|
||||
|
||||
public const uint MAX_PATH = 260;
|
||||
|
||||
public const uint LOAD_LIBRARY_AS_DATAFILE = 0x00000002;
|
||||
public const uint LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal class SECURITY_ATTRIBUTES
|
||||
{
|
||||
@ -1092,6 +1095,10 @@ namespace System.ServiceModel.Channels
|
||||
[ResourceExposure(ResourceScope.Process)]
|
||||
internal static extern SafeLibraryHandle LoadLibrary(string libFilename);
|
||||
|
||||
[DllImport(KERNEL32, CharSet = CharSet.Auto, SetLastError = true)]
|
||||
[ResourceExposure(ResourceScope.Process)]
|
||||
internal static extern SafeLibraryHandle LoadLibraryEx(string lpModuleName, IntPtr hFile, uint dwFlags);
|
||||
|
||||
// On Vista and higher, check the value of the machine FIPS policy
|
||||
[DllImport(BCRYPT, SetLastError = true)]
|
||||
[ResourceExposure(ResourceScope.None)]
|
||||
@ -1099,7 +1106,6 @@ namespace System.ServiceModel.Channels
|
||||
[MarshalAs(UnmanagedType.U1), Out] out bool pfEnabled
|
||||
);
|
||||
|
||||
|
||||
#if !FEATURE_CORECLR
|
||||
private static IntPtr GetCurrentProcessToken() { return new IntPtr(-4); }
|
||||
|
||||
|
Reference in New Issue
Block a user