Skip to content

Commit

Permalink
Update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Rans4ckeR committed Aug 14, 2023
1 parent 7cc7d89 commit d3cd97f
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 68 deletions.
10 changes: 5 additions & 5 deletions CipherPunk.UI/CipherPunk.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.0" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.2-beta">
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.18-beta">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.Win32Docs" Version="0.1.41-alpha">
<PackageReference Include="Microsoft.Windows.SDK.Win32Docs" Version="0.1.42-alpha">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.Win32Metadata" Version="52.0.65-preview">
<PackageReference Include="Microsoft.Windows.SDK.Win32Metadata" Version="54.0.44-preview">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.WDK.Win32Metadata" Version="0.7.3-experimental">
<PackageReference Include="Microsoft.Windows.WDK.Win32Metadata" Version="0.8.2-experimental">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
8 changes: 4 additions & 4 deletions CipherPunk/CipherPunk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@
<None Include="..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.2-beta">
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.18-beta">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.Win32Docs" Version="0.1.41-alpha">
<PackageReference Include="Microsoft.Windows.SDK.Win32Docs" Version="0.1.42-alpha">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.Win32Metadata" Version="52.0.65-preview">
<PackageReference Include="Microsoft.Windows.SDK.Win32Metadata" Version="54.0.44-preview">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.WDK.Win32Metadata" Version="0.7.3-experimental">
<PackageReference Include="Microsoft.Windows.WDK.Win32Metadata" Version="0.8.2-experimental">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
4 changes: 1 addition & 3 deletions CipherPunk/NativeMethods.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ CALG_*
CRYPT_*
BCRYPT_*
NCRYPT_*
GPO_OPEN_*
GPO_SECTION_*
HKEY_*
REG_VALUE_TYPE
REGISTRY_EXTENSION_GUID
WER_REPORT_INFORMATION
10 changes: 5 additions & 5 deletions CipherPunk/NativeMethods/CRYPT_OID_INFO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ namespace Security.Cryptography
{
/// <summary>Contains information about an object identifier (OID).</summary>
/// <remarks>
/// <para><see href="https://docs.microsoft.com/windows/win32/api/wincrypt/ns-wincrypt-crypt_oid_info">Learn more about this API from docs.microsoft.com</see>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/wincrypt/ns-wincrypt-crypt_oid_info">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.2-beta+d18600d19b")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.18-beta+dc807e7787")]
internal struct CRYPT_OID_INFO
{
/// <summary>The size, in bytes, of this structure.</summary>
Expand All @@ -40,7 +40,7 @@ internal struct CRYPT_OID_INFO
/// <para>The group identifier value associated with this OID information.</para>
/// <para>This member can be one of the following <b>dwGroupId</b> group identifiers. </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://docs.microsoft.com/windows/win32/api/wincrypt/ns-wincrypt-crypt_oid_info#members">Read more on docs.microsoft.com</see>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/wincrypt/ns-wincrypt-crypt_oid_info#members">Read more on docs.microsoft.com</see>.</para>
/// </summary>
internal uint dwGroupId;

Expand All @@ -50,12 +50,12 @@ internal struct CRYPT_OID_INFO
/// <para>Extra information used to find or register OID information. This member applies for the following values of <b>dwGroupId</b>:</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://docs.microsoft.com/windows/win32/api/wincrypt/ns-wincrypt-crypt_oid_info#members">Read more on docs.microsoft.com</see>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/wincrypt/ns-wincrypt-crypt_oid_info#members">Read more on docs.microsoft.com</see>.</para>
/// </summary>
internal winmdroot.Security.Cryptography.CRYPT_INTEGER_BLOB ExtraInfo;

[StructLayout(LayoutKind.Explicit)]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.2-beta+d18600d19b")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.18-beta+dc807e7787")]
internal partial struct _Anonymous_e__Union
{
[FieldOffset(0)]
Expand Down
20 changes: 0 additions & 20 deletions CipherPunk/NativeMethods/GPO_OPEN.cs

This file was deleted.

21 changes: 0 additions & 21 deletions CipherPunk/NativeMethods/GPO_SECTION.cs

This file was deleted.

2 changes: 0 additions & 2 deletions CipherPunk/NativeMethods/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ namespace Windows.Win32;

internal static partial class PInvoke
{
internal static readonly global::System.Guid REGISTRY_EXTENSION_GUID = new Guid(0x35378EAC, 0x683F, 0x11D2, 0xA8, 0x9A, 0x00, 0xC0, 0x4F, 0xBB, 0xCF, 0xA2);

[DllImport("ncrypt.dll", ExactSpelling = true)]
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
Expand Down
2 changes: 1 addition & 1 deletion CipherPunk/Services/EllipticCurveService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

internal sealed class EllipticCurveService : IEllipticCurveService
{
private const string NcryptSchannelInterfaceSslKey = "SYSTEM\\CurrentControlSet\\Control\\Cryptography\\Configuration\\Local\\SSL\\00010002";
private const string NcryptSchannelInterfaceSslKey = @"SYSTEM\CurrentControlSet\Control\Cryptography\Configuration\Local\SSL\00010002";
private const string CurveOrderValueName = "EccCurves";
private const ushort ListMaximumCharacters = 1023;

Expand Down
12 changes: 6 additions & 6 deletions CipherPunk/Services/GroupPolicyService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

internal sealed class GroupPolicyService : IGroupPolicyService
{
private const string MicrosoftPoliciesCipherStrengthPolicyDefinitionResourcesFile = "{0}\\PolicyDefinitions\\{1}\\CipherSuiteOrder.adml";
private const string MicrosoftPoliciesCipherStrengthPolicyDefinitionResourcesFile = @"{0}\PolicyDefinitions\{1}\CipherSuiteOrder.adml";
private const string MicrosoftPoliciesCipherStrengthPolicyDefinitionResourcesFileXmlNamespace = "http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions";
private const string SslConfigurationPolicyKey = "SOFTWARE\\Policies\\Microsoft\\Cryptography\\Configuration\\SSL\\00010002";
private const string SslConfigurationPolicyKey = @"SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL\00010002";
private const string SslCipherSuiteOrderValueName = "Functions";
private const string SslCurveOrderValueName = "EccCurves";
private const ushort ListMaximumCharacters = 1023;
Expand Down Expand Up @@ -112,11 +112,11 @@ private static void UpdateOrderPolicy(string valueData, string valueName, REG_VA
if (coCreateInstanceResult.Failed)
throw Marshal.GetExceptionForHR(coCreateInstanceResult)!;

ppv.OpenLocalMachineGPO((uint)GPO_OPEN.GPO_OPEN_LOAD_REGISTRY);
ppv.OpenLocalMachineGPO(GPO_OPEN_FLAGS.GPO_OPEN_LOAD_REGISTRY);

HKEY machineKey = default;

ppv.GetRegistryKey((uint)GPO_SECTION.GPO_SECTION_MACHINE, ref machineKey);
ppv.GetRegistryKey(GPO_SECTION.GPO_SECTION_MACHINE, ref machineKey);

using var hKey = new SafeRegistryHandle(machineKey, true);

Expand Down Expand Up @@ -172,11 +172,11 @@ private static void UpdateOrderPolicy(string valueData, string valueName, REG_VA
if (coCreateInstanceResult.Failed)
throw Marshal.GetExceptionForHR(coCreateInstanceResult)!;

ppv.OpenLocalMachineGPO((uint)GPO_OPEN.GPO_OPEN_LOAD_REGISTRY);
ppv.OpenLocalMachineGPO(GPO_OPEN_FLAGS.GPO_OPEN_LOAD_REGISTRY);

HKEY machineKey = default;

ppv.GetRegistryKey((uint)GPO_SECTION.GPO_SECTION_MACHINE, ref machineKey);
ppv.GetRegistryKey(GPO_SECTION.GPO_SECTION_MACHINE, ref machineKey);

using var hKey = new SafeRegistryHandle(machineKey, true);
WIN32_ERROR regOpenKeyExResult = PInvoke.RegOpenKeyEx(hKey, SslConfigurationPolicyKey, 0U, REG_SAM_FLAGS.KEY_QUERY_VALUE, out SafeRegistryHandle phkResult);
Expand Down
2 changes: 1 addition & 1 deletion CipherPunk/Services/SchannelService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
internal sealed class SchannelService : ISchannelService
{
// https://learn.microsoft.com/en-us/windows-server/security/tls/tls-registry-settings
private const string SchannelPath = "SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\SCHANNEL\\";
private const string SchannelPath = @"SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\";
private const string SchannelProtocolsPath = SchannelPath + "Protocols\\";
private const string SchannelProtocolsClientPath = "\\Client";
private const string SchannelProtocolsServerPath = "\\Server";
Expand Down

0 comments on commit d3cd97f

Please sign in to comment.