}
}
- private static class BCryptGetPropertyStrings
- {
- public const string BCRYPT_HASH_LENGTH = "HashDigestLength";
- }
-
private static Exception CreateCryptographicException(NTSTATUS ntStatus)
{
int hr = ((int)ntStatus) | 0x01000000;
public static extern NTSTATUS BCryptImportKey(SafeAlgorithmHandle hAlgorithm, IntPtr hImportKey, string pszBlobType, out SafeKeyHandle hKey, IntPtr pbKeyObject, int cbKeyObject, byte[] pbInput, int cbInput, int dwFlags);
[DllImport(Libraries.BCrypt, CharSet = CharSet.Unicode)]
- public static extern unsafe NTSTATUS BCryptEncrypt(SafeKeyHandle hKey, byte* pbInput, int cbInput, IntPtr paddingInfo, [In,Out] byte [] pbIV, int cbIV, byte* pbOutput, int cbOutput, out int cbResult, int dwFlags);
+ public static extern unsafe NTSTATUS BCryptEncrypt(SafeKeyHandle hKey, byte* pbInput, int cbInput, IntPtr paddingInfo, [In, Out] byte[] pbIV, int cbIV, byte* pbOutput, int cbOutput, out int cbResult, int dwFlags);
[DllImport(Libraries.BCrypt, CharSet = CharSet.Unicode)]
public static extern unsafe NTSTATUS BCryptDecrypt(SafeKeyHandle hKey, byte* pbInput, int cbInput, IntPtr paddingInfo, [In, Out] byte[] pbIV, int cbIV, byte* pbOutput, int cbOutput, out int cbResult, int dwFlags);
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-internal partial class Interop
-{
- internal partial class Kernel32
- {
- internal partial class FileShareMode
- {
- internal const int FILE_SHARE_READ = 0x00000001;
- internal const int FILE_SHARE_WRITE = 0x00000002;
- }
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.ComponentModel.Composition;
-using System.ComponentModel.Composition.Hosting;
-
-namespace Microsoft.Internal
-{
- internal static class AdaptationHelpers
- {
- internal static CompositionResult TryInvoke(Action action)
- {
- try
- {
- action();
- return CompositionResult.SucceededResult;
- }
- catch (CompositionException ex)
- {
- return new CompositionResult(ex.Errors);
- }
- }
-
- internal static CompositionResult<T> TryInvoke<T>(Func<T> action)
- {
- try
- {
- T value = action();
- return new CompositionResult<T>(value);
- }
- catch (CompositionException ex)
- {
- return new CompositionResult<T>(ex.Errors);
- }
- }
-
- internal static TValue GetValueFromAtomicComposition<TValue>(AtomicComposition atomicComposition, object key, TValue defaultResult)
- {
- TValue result;
- if (atomicComposition != null && atomicComposition.TryGetValue(key, out result))
- {
- return result;
- }
-
- return defaultResult;
- }
- }
-}
<Compile Include="TypeForwards.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
- <Compile Include="Microsoft\Internal\AdaptationHelpers.cs" />
<Compile Include="Microsoft\Internal\AttributeServices.cs" />
<Compile Include="Microsoft\Internal\Collections\CollectionServices.cs" />
<Compile Include="Microsoft\Internal\Collections\CollectionServices.CollectionOfObject.cs" />
private const int DefaultSqlServerDacPort = 1434;
private const string SqlServerSpnHeader = "MSSQLSvc";
- internal class SspiClientContextResult
- {
- internal const uint OK = 0;
- internal const uint Failed = 1;
- internal const uint KerberosTicketMissing = 2;
- }
-
public static readonly SNIProxy Singleton = new SNIProxy();
/// <summary>
{
result = handle.SendAsync(clonedPacket, true);
}
-
+
return result;
}
<Compile Include="System\DirectoryServices\AccountManagement\PasswordInfo.cs" />
<Compile Include="System\DirectoryServices\AccountManagement\MatchType.cs" />
<Compile Include="System\DirectoryServices\AccountManagement\CredentialTypes.cs" />
- <Compile Include="System\DirectoryServices\AccountManagement\RejectedClaimChange.cs" />
<Compile Include="System\DirectoryServices\AccountManagement\ContextType.cs" />
<Compile Include="System\DirectoryServices\AccountManagement\ContextOptions.cs" />
<Compile Include="System\DirectoryServices\AccountManagement\SidType.cs" />
namespace System.DirectoryServices.AccountManagement
{
- internal class ConfigurationHandler : IConfigurationSectionHandler
- {
- public virtual object Create(object parent, object configContext, XmlNode section)
- {
- ConfigSettings configSettings = null;
- bool foundDebugging = false;
- System.Enum debugLevelEnum = (System.Enum)GlobalConfig.DefaultDebugLevel;
- string debugLogFile = null;
-
- foreach (XmlNode child in section.ChildNodes)
- {
- switch (child.Name)
- {
-#if DEBUG
- case "Debugging":
- if (foundDebugging)
- throw new ConfigurationErrorsException(
- String.Format(
- CultureInfo.CurrentCulture,
- SR.ConfigHandlerConfigSectionsUnique,
- "Debugging"));
-
- RemoveEnumAttribute(child, "Debugging", "debugLevel", typeof(DebugLevel), ref debugLevelEnum);
- RemoveStringAttribute(child, "Debugging", "debugLogFile", out debugLogFile);
-
- foundDebugging = true;
- break;
-#endif
-
- default:
- throw new ConfigurationErrorsException(
- string.Format(
- CultureInfo.CurrentCulture,
- SR.ConfigHandlerUnknownConfigSection,
- child.Name));
- }
- }
-
- if (foundDebugging)
- configSettings = new ConfigSettings((DebugLevel)debugLevelEnum, debugLogFile);
- else
- configSettings = new ConfigSettings();
-
- // We need to always return an object so if we haven't read the debug section just create a default object.
- return (configSettings);
- }
-
-#if DEBUG
- private void RemoveEnumAttribute(XmlNode node, string sectionName, string attributeName, Type enumType, ref System.Enum value)
- {
- XmlNode attribute = node.Attributes.RemoveNamedItem(attributeName);
- if (null != attribute)
- {
- try
- {
- // case-insensitive, for ease of use
- value = (System.Enum)System.Enum.Parse(enumType, attribute.Value, true);
- }
- catch (ArgumentException)
- {
- throw new ConfigurationErrorsException(
- String.Format(
- CultureInfo.CurrentCulture,
- SR.ConfigHandlerInvalidEnumAttribute,
- attributeName,
- sectionName));
- }
- }
- }
-
- private void RemoveStringAttribute(XmlNode node, string sectionName, string attributeName, out string value)
- {
- value = null;
- XmlNode attribute = node.Attributes.RemoveNamedItem(attributeName);
- if (null != attribute)
- {
- value = attribute.Value as string;
-
- if (value == null)
- throw new ConfigurationErrorsException(
- String.Format(
- CultureInfo.CurrentCulture,
- SR.ConfigHandlerInvalidStringAttribute,
- attributeName,
- sectionName));
-
- // Treat empty string the same as no string
- if (value.Length == 0)
- value = null;
- }
- }
-#endif
- }
-
internal class ConfigSettings
{
public ConfigSettings(DebugLevel debugLevel, string debugLogFile)
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-
-namespace System.DirectoryServices.AccountManagement
-{
- internal enum RejectedClaimChange
- {
- Allowed = 0, // change allowed
- TimeRangeNotAllowed = 1, // change rejected: store doesn't support time-limited claims
- DuplicateTypeNotAllowed = 2, // change rejected: store doesn't allow multiple of this type of claim
- TypeNotAllowed = 3, // change rejected: store doesn't support claims of this type
- NotAllowed = 4 // change rejected: other reason (e.g., removal of a mandatory claim)
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.DirectoryServices.Interop
-{
- internal enum AdsAuthentication
- {
- ADS_SECURE_AUTHENTICATION = 0x1,
- ADS_USE_ENCRYPTION = 0x2,
- ADS_USE_SSL = 0x2,
- ADS_READONLY_SERVER = 0x4,
- ADS_PROMPT_CREDENTIALS = 0x8,
- ADS_NO_AUTHENTICATION = 0x10,
- ADS_FAST_BIND = 0x20,
- ADS_USE_SIGNING = 0x40,
- ADS_USE_SEALING = 0x80
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.DirectoryServices.Interop
-{
- internal enum AdsStatusEnum
- {
- ADS_STATUS_S_OK = 0,
- ADS_STATUS_INVALID_SEARCHPREF = 1,
- ADS_STATUS_INVALID_SEARCHPREFVALUE = 2
- }
-}
<Compile Include="System\DirectoryServices\DirectoryServicesPermissionAttribute.cs" />
<Compile Include="System\DirectoryServices\DirectoryServicesPermissionEntry.cs" />
<Compile Include="System\DirectoryServices\DirectoryServicesPermissionEntryCollection.cs" />
- <Compile Include="Interop\AdsAuthentication.cs" />
<Compile Include="Interop\AdsOptions.cs" />
<Compile Include="Interop\AdsPropertyOperation.cs" />
<Compile Include="Interop\AdsSearchColumn.cs" />
<Compile Include="Interop\AdsSearchPreferenceInfo.cs" />
<Compile Include="Interop\AdsSearchPreferences.cs" />
<Compile Include="Interop\AdsSortKey.cs" />
- <Compile Include="Interop\AdsStatus.cs" />
<Compile Include="Interop\AdsType.cs" />
<Compile Include="Interop\AdsValue2.cs" />
<Compile Include="Interop\AdsValueHelper2.cs" />
ReturnDNSName = 0x40000000,
ReturnFlatName = 0x80000000
}
-
- [Flags]
- internal enum DcEnumFlag : int
- {
- OnlyDoSiteName = 0x01,
- NotifyAfterSiteRecords = 0x02
- }
}
<Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.FileOperations.cs">
<Link>Common\Interop\Windows\Interop.FileOperations.cs</Link>
</Compile>
- <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.FileShareMode.cs">
- <Link>Common\Interop\Windows\Interop.FileShareMode.cs</Link>
- </Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.FlushViewOfFile.cs">
<Link>Common\Interop\Windows\Interop.FlushViewOfFile.cs</Link>
</Compile>
<Compile Include="System\Security\Cryptography\Xml\SymmetricKeyWrap.cs" />
<Compile Include="System\Security\Cryptography\Xml\Transform.cs" />
<Compile Include="System\Security\Cryptography\Xml\TransformChain.cs" />
- <Compile Include="System\Security\Cryptography\Xml\TransformInputType.cs" />
<Compile Include="System\Security\Cryptography\Xml\Utils.cs" />
<Compile Include="System\Security\Cryptography\Xml\XmlDecryptionTransform.cs" />
<Compile Include="System\Security\Cryptography\Xml\XmlDsigBase64Transform.cs" />
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-
-namespace System.Security.Cryptography.Xml
-{
- internal enum TransformInputType
- {
- XmlDocument = 1,
- XmlStream = 2,
- XmlNodeSet = 3
- }
-}
Promote = 5
}
- internal enum EnlistmentCallback
- {
- Done = 0,
- Prepared = 1,
- ForceRollback = 2,
- Committed = 3,
- Aborted = 4,
- InDoubt = 5
- }
internal enum TransactionScopeResult
{
CreatedTransaction = 0,