Skip to content

Commit

Permalink
Update Bouncy Castle library to fix the following vulnerabilities:
Browse files Browse the repository at this point in the history
  • Loading branch information
lemalcs committed Jul 17, 2024
1 parent 5cabd40 commit efbbf4b
Show file tree
Hide file tree
Showing 30 changed files with 116 additions and 105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Khernet.Core.Common</RootNamespace>
<AssemblyName>Khernet.Core.Common</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions Khernet.Core/Engine/Khernet.Core.Common/app.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>

<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Khernet.Core.Container</RootNamespace>
<AssemblyName>Khernet.Core.Container</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Khernet.Core.Data</RootNamespace>
<AssemblyName>Khernet.Core.Data</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
12 changes: 6 additions & 6 deletions Khernet.Core/Engine/Khernet.Core.Data/app.config
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.8.0" newVersion="2.6.8.0" />
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.6.8.0" newVersion="2.6.8.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.8.0" newVersion="2.6.8.0" />
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.6.8.0" newVersion="2.6.8.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Khernet.Core.Entity</RootNamespace>
<AssemblyName>Khernet.Core.Entity</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Khernet.Core.Host</RootNamespace>
<AssemblyName>Khernet.Core.Host</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Khernet.Core/Engine/Khernet.Core.Host/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ private static System.Security.Cryptography.X509Certificates.X509Certificate2 Co
// Now to convert the Bouncy Castle certificate to a .NET certificate.
// See http://web.archive.org/web/20100504192226/http://www.fkollmann.de/v2/post/Creating-certificates-using-BouncyCastle.aspx
// ...but, basically, we create a PKCS12 store (a .PFX file) in memory, and add the public and private key to that.
var store = new Pkcs12Store();
var store = new Pkcs12StoreBuilder().Build();

// What Bouncy Castle calls "alias" is the same as what Windows terms the "friendly name".

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Khernet.Core.Processor</RootNamespace>
<AssemblyName>Khernet.Core.Processor</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down Expand Up @@ -55,8 +55,8 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.8.9.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
<HintPath>..\..\packages\BouncyCastle.1.8.9\lib\BouncyCastle.Crypto.dll</HintPath>
<Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL">
<HintPath>..\..\..\..\..\..\.nuget\BouncyCastle.Cryptography.2.4.0\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
</Reference>
<Reference Include="Ninject, Version=3.3.4.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
<HintPath>..\..\packages\Ninject.3.3.4\lib\net45\Ninject.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion Khernet.Core/Engine/Khernet.Core.Processor/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
2 changes: 1 addition & 1 deletion Khernet.Core/Engine/Khernet.Core.Processor/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle" version="1.8.9" targetFramework="net452" />
<package id="BouncyCastle.Cryptography" version="2.4.0" targetFramework="net461" />
<package id="Ninject" version="3.3.4" targetFramework="net452" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Khernet.Core.Utility</RootNamespace>
<AssemblyName>Khernet.Core.Utility</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions Khernet.Core/Engine/Khernet.Core.Utility/app.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>

<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Khernet.Services.Client</RootNamespace>
<AssemblyName>Khernet.Services.Client</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Khernet.Services.Common</RootNamespace>
<AssemblyName>Khernet.Services.Common</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Khernet.Services.Contracts</RootNamespace>
<AssemblyName>Khernet.Services.Contracts</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Khernet.Services.Messages</RootNamespace>
<AssemblyName>Khernet.Services.Messages</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Khernet.Services.WCF</RootNamespace>
<AssemblyName>Khernet.Services.WCF</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
20 changes: 10 additions & 10 deletions Khernet.Installer/KhernetInstaller.iss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <idp.iss>

#define ApplicationName "Khernet"
#define CurrentVersion "0.21.0.1"
#define CurrentVersion "0.22.0.0"
#define AppDirectoryName "khernet-app"
#define SQLScript "SAVE_TEXT_MESSAGE.sql"
#define IzarcDirectory "izarc"
Expand All @@ -20,7 +20,7 @@
[Setup]
AppName={#ApplicationName}
AppVersion={#CurrentVersion}
VersionInfoCopyright=Copyright © 2023
VersionInfoCopyright=Copyright © 2024
VersionInfoVersion={#CurrentVersion}
VersionInfoProductVersion={#CurrentVersion}
WizardStyle=modern
Expand Down Expand Up @@ -96,16 +96,16 @@ var installed: Boolean; // Indicates whether .NET Framework was successfully ins
function InitializeSetup(): Boolean;
begin
if not IsDotNetInstalled(net452, 0) then
if not IsDotNetInstalled(net461, 0) then
begin
if not IsAdmin() then
begin
MsgBox('Khernet requires .NET Framework 4.5.2, please re-run the installer with administrative privilegies.', mbInformation, MB_OK);
MsgBox('Khernet requires .NET Framework 4.6.1, please re-run the installer with administrative privilegies.', mbInformation, MB_OK);
result := false;
end
else
begin
dotnetInstallerFile := '{tmp}\NetFramework452Installer.exe';
dotnetInstallerFile := '{tmp}\NetFramework461Installer.exe';
result := true;
end
end
Expand All @@ -121,7 +121,7 @@ var
ResultCode: Integer;
begin
StatusText := WizardForm.StatusLabel.Caption;
WizardForm.StatusLabel.Caption := 'Installing .NET Framework 4.5.2. This might take a few minutes...';
WizardForm.StatusLabel.Caption := 'Installing .NET Framework 4.6.1. This might take a few minutes...';
WizardForm.ProgressGauge.Style := npbstMarquee;
try
if not Exec(ExpandConstant(dotnetInstallerFile), '/passive /norestart', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
Expand All @@ -141,7 +141,7 @@ end;
function PrepareToInstall(var NeedsRestart: Boolean): String;
begin
if not IsDotNetInstalled(net452, 0) then
if not IsDotNetInstalled(net461, 0) then
begin
installed := false;
InstallFramework();
Expand All @@ -151,7 +151,7 @@ begin
result := ''; // Successful installation
end
else // Failed installation
result := 'Installation of .NET 4.5.2 failed with error: '+SysErrorMessage(rescode)+' code: '+IntToStr(rescode)+''#13#13
result := 'Installation of .NET 4.6.1 failed with error: '+SysErrorMessage(rescode)+' code: '+IntToStr(rescode)+''#13#13
'Make sure you have administrative privilegies and internet connection.';
end;
end;
Expand Down Expand Up @@ -195,11 +195,11 @@ end;
// Event fired just before the wizard is shown.
procedure InitializeWizard;
begin
if not IsDotNetInstalled(net452, 0) then
if not IsDotNetInstalled(net461, 0) then
begin
if IsAdmin() then
begin
idpAddFile('https://download.microsoft.com/download/E/2/1/E21644B5-2DF2-47C2-91BD-63C560427900/NDP452-KB2901907-x86-x64-AllOS-ENU.exe', ExpandConstant(dotnetInstallerFile));
idpAddFile('https://download.microsoft.com/download/E/4/1/E4173890-A24A-4936-9FC9-AF930FE3FA40/NDP461-KB3102436-x86-x64-AllOS-ENU.exe', ExpandConstant(dotnetInstallerFile));
idpDownloadAfter(wpReady);
end
end;
Expand Down
6 changes: 3 additions & 3 deletions Khernet.UI/Khernet.UI.Container/Khernet.UI.Container.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>library</OutputType>
<RootNamespace>Khernet.UI.Container</RootNamespace>
<AssemblyName>Khernet.UI.Container</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
Expand Down Expand Up @@ -98,11 +98,11 @@
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Khernet.App.UI.1.1.0\build\Khernet.App.UI.targets" Condition="Exists('..\packages\Khernet.App.UI.1.1.0\build\Khernet.App.UI.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Khernet.App.UI.1.1.0\build\Khernet.App.UI.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Khernet.App.UI.1.1.0\build\Khernet.App.UI.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\.nuget\Khernet.App.UI.1.1.0\build\Khernet.App.UI.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\.nuget\Khernet.App.UI.1.1.0\build\Khernet.App.UI.targets'))" />
</Target>
<Import Project="..\..\..\..\..\.nuget\Khernet.App.UI.1.1.0\build\Khernet.App.UI.targets" Condition="Exists('..\..\..\..\..\.nuget\Khernet.App.UI.1.1.0\build\Khernet.App.UI.targets')" />
</Project>
2 changes: 1 addition & 1 deletion Khernet.UI/Khernet.UI.Container/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Khernet.UI.Resources")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit efbbf4b

Please sign in to comment.