Skip to content

Commit 80fec19

Browse files
authored
Merge pull request #15 from N6UDP/topic/aes256
Move to use AES256 for CMS
2 parents d40b886 + 5bc4ea9 commit 80fec19

18 files changed

+11
-58
lines changed

.gitignore

+5-8
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
33
################################################################################
44

5-
/.vs
6-
/KeyManagerUI/obj/Release
7-
/KeyManagerUI/obj/Debug
8-
/KeyManagerUI/obj/
9-
/KeyManagerUI/bin/
10-
/KeyManagerUI/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
11-
/KeyManagerUI/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
12-
/KeyManagerUI/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
5+
.vs/
6+
obj/
7+
bin/
8+
*.zip
9+
*.plgx

KeyManagerUI.plgx

-1.89 MB
Binary file not shown.

KeyManagerUI/Certmanager.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ public byte[] EncryptMsg(Byte[] msg, X509Certificate2Collection recipientCerts)
4545
// Instantiate an EnvelopedCms object with the ContentInfo
4646
// above.
4747
// Has default SubjectIdentifierType IssuerAndSerialNumber.
48-
// Has default ContentEncryptionAlgorithm property value
49-
// RSA_DES_EDE3_CBC.
50-
EnvelopedCms envelopedCms = new EnvelopedCms(contentInfo);
48+
// Force usage of AES256 instead of 3DES
49+
Oid aes256 = Oid.FromFriendlyName("aes256", OidGroup.EncryptionAlgorithm);
50+
EnvelopedCms envelopedCms = new EnvelopedCms(contentInfo, new AlgorithmIdentifier(aes256));
5151

5252
// Formulate a CmsRecipient object collection that
5353
// represent information about the recipients

KeyManagerUI/KeyManagerUI.csproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>KeyManagerUI</RootNamespace>
1111
<AssemblyName>KeyManagerUI</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14+
<TargetFrameworkProfile />
1415
</PropertyGroup>
1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1617
<DebugSymbols>true</DebugSymbols>

KeyManagerUI/KeyManagerUIClass.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ byte[] GetExistingKey(IOConnectionInfo ioc)
147147
// fall back on opening a local file
148148
// FUTURE ENHANCEMENT: allow user to enter a URL and name/pwd as well
149149

150-
OpenFileDialog ofd = UIUtil.CreateOpenFileDialog("KeePassX509Provider", UIUtil.CreateFileTypeFilter(CertProtKeyFileExtension, "x05KeyFile", true), 1, CertProtKeyFileExtension, false /* multi-select */, true);
150+
OpenFileDialog ofd = (OpenFileDialog)UIUtil.CreateOpenFileDialog("KeePassX509Provider", UIUtil.CreateFileTypeFilter(CertProtKeyFileExtension, "x05KeyFile", true), 1, CertProtKeyFileExtension, false /* multi-select */, string.Empty).FileDialog;
151151

152152
if (ofd.ShowDialog() != DialogResult.OK)
153153
{

KeyManagerUI/bin/Debug/KeePass.exe

-3.12 MB
Binary file not shown.

KeyManagerUI/bin/Debug/KeePass.exe.config

-23
This file was deleted.
-50 KB
Binary file not shown.
-41.5 KB
Binary file not shown.

KeyManagerUI/obj/Debug/CoreCompileInputs.cache

-1
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.

KeyManagerUI/obj/Debug/KeyManagerUI.csproj.FileListAbsolute.txt

-21
This file was deleted.
Binary file not shown.
-50 KB
Binary file not shown.
-41.5 KB
Binary file not shown.

KeyManagerUI_1.4_beta.zip

-1.88 MB
Binary file not shown.

0 commit comments

Comments
 (0)