Skip to content

Commit 1dfd63a

Browse files
committed
5.2.8.2
1 parent 54e4831 commit 1dfd63a

31 files changed

+2518
-1150
lines changed

Bin/arm64/FilterAPI.dll

-8 Bytes
Binary file not shown.

Bin/win32/EaseFlt.sys

384 Bytes
Binary file not shown.

Bin/win32/FilterAPI.dll

0 Bytes
Binary file not shown.

Bin/x64/EaseFlt.sys

504 Bytes
Binary file not shown.

Bin/x64/FilterAPI.dll

-8 Bytes
Binary file not shown.

CommonObjects.dll

55.5 KB
Binary file not shown.

FileProtector.exe

-25 KB
Binary file not shown.

FileProtector/CommonObjects/CommonObjects.csproj

+24-48
Original file line numberDiff line numberDiff line change
@@ -12,71 +12,29 @@
1212
<AssemblyName>CommonObjects</AssemblyName>
1313
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
15-
<SccProjectName>
16-
</SccProjectName>
17-
<SccLocalPath>
18-
</SccLocalPath>
19-
<SccAuxPath>
20-
</SccAuxPath>
21-
<SccProvider>
22-
</SccProvider>
15+
<SccProjectName>SAK</SccProjectName>
16+
<SccLocalPath>SAK</SccLocalPath>
17+
<SccAuxPath>SAK</SccAuxPath>
18+
<SccProvider>SAK</SccProvider>
2319
</PropertyGroup>
2420
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2521
<DebugSymbols>true</DebugSymbols>
2622
<DebugType>full</DebugType>
2723
<Optimize>false</Optimize>
28-
<OutputPath>..\..\debug\</OutputPath>
24+
<OutputPath>..\debug\</OutputPath>
2925
<DefineConstants>DEBUG;TRACE</DefineConstants>
3026
<ErrorReport>prompt</ErrorReport>
3127
<WarningLevel>4</WarningLevel>
3228
</PropertyGroup>
3329
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
3430
<DebugType>pdbonly</DebugType>
3531
<Optimize>true</Optimize>
36-
<OutputPath>..\..\release\</OutputPath>
32+
<OutputPath>..\release\</OutputPath>
3733
<DefineConstants>TRACE</DefineConstants>
3834
<ErrorReport>prompt</ErrorReport>
3935
<WarningLevel>4</WarningLevel>
4036
<UseVSHostingProcess>false</UseVSHostingProcess>
4137
</PropertyGroup>
42-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
43-
<DebugSymbols>true</DebugSymbols>
44-
<OutputPath>..\..\debug\</OutputPath>
45-
<DefineConstants>DEBUG;TRACE</DefineConstants>
46-
<DebugType>full</DebugType>
47-
<PlatformTarget>x64</PlatformTarget>
48-
<LangVersion>7.3</LangVersion>
49-
<ErrorReport>prompt</ErrorReport>
50-
</PropertyGroup>
51-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
52-
<OutputPath>..\..\release\</OutputPath>
53-
<DefineConstants>TRACE</DefineConstants>
54-
<Optimize>true</Optimize>
55-
<DebugType>pdbonly</DebugType>
56-
<PlatformTarget>x64</PlatformTarget>
57-
<UseVSHostingProcess>false</UseVSHostingProcess>
58-
<LangVersion>7.3</LangVersion>
59-
<ErrorReport>prompt</ErrorReport>
60-
</PropertyGroup>
61-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
62-
<DebugSymbols>true</DebugSymbols>
63-
<OutputPath>..\..\debug\</OutputPath>
64-
<DefineConstants>DEBUG;TRACE</DefineConstants>
65-
<DebugType>full</DebugType>
66-
<PlatformTarget>x86</PlatformTarget>
67-
<LangVersion>7.3</LangVersion>
68-
<ErrorReport>prompt</ErrorReport>
69-
</PropertyGroup>
70-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
71-
<OutputPath>..\..\release\</OutputPath>
72-
<DefineConstants>TRACE</DefineConstants>
73-
<Optimize>true</Optimize>
74-
<DebugType>pdbonly</DebugType>
75-
<PlatformTarget>x86</PlatformTarget>
76-
<UseVSHostingProcess>false</UseVSHostingProcess>
77-
<LangVersion>7.3</LangVersion>
78-
<ErrorReport>prompt</ErrorReport>
79-
</PropertyGroup>
8038
<ItemGroup>
8139
<Reference Include="System" />
8240
<Reference Include="System.configuration" />
@@ -94,7 +52,19 @@
9452
</ItemGroup>
9553
<ItemGroup>
9654
<Compile Include="ConfigSetting.cs" />
55+
<Compile Include="InputForm.cs">
56+
<SubType>Form</SubType>
57+
</Compile>
58+
<Compile Include="InputForm.Designer.cs">
59+
<DependentUpon>InputForm.cs</DependentUpon>
60+
</Compile>
9761
<Compile Include="ProcessFilterRuleSection.cs" />
62+
<Compile Include="ProcessFilterSetting.cs">
63+
<SubType>Form</SubType>
64+
</Compile>
65+
<Compile Include="ProcessFilterSetting.Designer.cs">
66+
<DependentUpon>ProcessFilterSetting.cs</DependentUpon>
67+
</Compile>
9868
<Compile Include="Properties\Resources.Designer.cs">
9969
<AutoGen>True</AutoGen>
10070
<DesignTime>True</DesignTime>
@@ -156,9 +126,15 @@
156126
<EmbeddedResource Include="ControlFilterRuleSettigs.resx">
157127
<DependentUpon>ControlFilterRuleSettigs.cs</DependentUpon>
158128
</EmbeddedResource>
129+
<EmbeddedResource Include="InputForm.resx">
130+
<DependentUpon>InputForm.cs</DependentUpon>
131+
</EmbeddedResource>
159132
<EmbeddedResource Include="OptionForm.resx">
160133
<DependentUpon>OptionForm.cs</DependentUpon>
161134
</EmbeddedResource>
135+
<EmbeddedResource Include="ProcessFilterSetting.resx">
136+
<DependentUpon>ProcessFilterSetting.cs</DependentUpon>
137+
</EmbeddedResource>
162138
<EmbeddedResource Include="Properties\Resources.resx">
163139
<Generator>ResXFileCodeGenerator</Generator>
164140
<LastGenOutput>Resources.Designer.cs</LastGenOutput>

FileProtector/CommonObjects/ControlFilterRuleSettigs.Designer.cs

+197-236
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

FileProtector/CommonObjects/ControlFilterRuleSettigs.cs

+17-55
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,15 @@ public ControlFilterRuleSettigs(FileFilterRule _filterRule)
5555

5656
SetCheckBoxValue();
5757

58-
if (filterRule.EncryptionKeySize == 16)
58+
if (filterRule.EncryptMethod == (int)FilterAPI.EncryptionMethod.ENCRYPT_FILE_WITH_SAME_KEY_AND_UNIQUE_IV )
5959
{
60-
radioButton_128.Checked = true;
61-
}
62-
else if (filterRule.EncryptionKeySize == 24)
63-
{
64-
radioButton_196.Checked = true;
60+
radioButton_EncryptFileWithSameKey.Checked = true;
61+
radioButton_EncryptFileWithTagData.Checked = false;
6562
}
6663
else
6764
{
68-
radioButton_256.Checked = true;
65+
radioButton_EncryptFileWithSameKey.Checked = false;
66+
radioButton_EncryptFileWithTagData.Checked = true;
6967
}
7068
}
7169

@@ -199,16 +197,6 @@ private void SetCheckBoxValue()
199197
checkBox_AllowReadEncryptedFiles.Checked = false;
200198
}
201199

202-
203-
if ((accessFlags & (uint)FilterAPI.AccessFlag.DISABLE_ENCRYPT_DATA_ON_READ) > 0)
204-
{
205-
checkBox_EncryptOnRead.Checked = false;
206-
}
207-
else
208-
{
209-
checkBox_EncryptOnRead.Checked = true;
210-
}
211-
212200
if (GlobalConfig.EnableSendDeniedEvent)
213201
{
214202
checkBox_EnableSendDeniedEvent.Checked = true;
@@ -225,12 +213,20 @@ private void button_SaveControlSettings_Click(object sender, EventArgs e)
225213
uint accessFlags = uint.Parse(textBox_FileAccessFlags.Text);
226214

227215
if (checkBox_Encryption.Checked)
228-
{
229-
filterRule.EncryptMethod = (int)FilterAPI.EncryptionMethod.ENCRYPT_FILE_WITH_SAME_KEY_AND_UNIQUE_IV;
216+
{
230217
encryptionPassPhrase = textBox_PassPhrase.Text;
231218

232219
//enable encryption for this filter rule.
233220
accessFlags = accessFlags | (uint)FilterAPI.AccessFlag.ENABLE_FILE_ENCRYPTION_RULE;
221+
222+
if (radioButton_EncryptFileWithSameKey.Checked)
223+
{
224+
filterRule.EncryptMethod = (int)FilterAPI.EncryptionMethod.ENCRYPT_FILE_WITH_SAME_KEY_AND_UNIQUE_IV;
225+
}
226+
else
227+
{
228+
filterRule.EncryptMethod = (int)FilterAPI.EncryptionMethod.ENCRYPT_FILE_WITH_KEY_IV_AND_TAGDATA_FROM_SERVICE;
229+
}
234230
}
235231

236232
if (textBox_HiddenFilterMask.Text.Trim().Length > 0)
@@ -246,20 +242,8 @@ private void button_SaveControlSettings_Click(object sender, EventArgs e)
246242
else
247243
{
248244
GlobalConfig.EnableSendDeniedEvent = false;
249-
}
250-
251-
if (radioButton_128.Checked)
252-
{
253-
filterRule.EncryptionKeySize = 16;
254-
}
255-
else if (radioButton_196.Checked)
256-
{
257-
filterRule.EncryptionKeySize = 24;
258-
}
259-
else
260-
{
261-
filterRule.EncryptionKeySize = 32;
262-
}
245+
}
246+
263247
filterRule.EncryptionPassPhrase = encryptionPassPhrase;
264248
filterRule.HiddenFileFilterMasks = textBox_HiddenFilterMask.Text;
265249
filterRule.ReparseFileFilterMask = textBox_ReparseFileFilterMask.Text;
@@ -574,28 +558,6 @@ private void checkBox_AllowReadEncryptedFiles_CheckedChanged(object sender, Even
574558
}
575559

576560

577-
private void checkBox_EncryptOnRead_CheckedChanged(object sender, EventArgs e)
578-
{
579-
uint accessFlags = uint.Parse(textBox_FileAccessFlags.Text.Trim());
580-
if (checkBox_EncryptOnRead.Checked)
581-
{
582-
if (!checkBox_Encryption.Checked)
583-
{
584-
MessageBoxHelper.PrepToCenterMessageBoxOnForm(this);
585-
MessageBox.Show("The encryption is not enabled, enable it first.", "EncryptOnRead", MessageBoxButtons.OK, MessageBoxIcon.Warning);
586-
return;
587-
}
588-
589-
accessFlags &= ~(uint)FilterAPI.AccessFlag.DISABLE_ENCRYPT_DATA_ON_READ;
590-
}
591-
else
592-
{
593-
accessFlags |= (uint)FilterAPI.AccessFlag.DISABLE_ENCRYPT_DATA_ON_READ;
594-
}
595-
596-
textBox_FileAccessFlags.Text = accessFlags.ToString();
597-
}
598-
599561
private void checkBox_EnableHidenFile_CheckedChanged(object sender, EventArgs e)
600562
{
601563
uint accessFlags = uint.Parse(textBox_FileAccessFlags.Text);

FileProtector/CommonObjects/FilterRuleForm.Designer.cs

+37-23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

FileProtector/CommonObjects/FilterRuleForm.cs

+10
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,16 @@ private void button_ControlSettings_Click(object sender, EventArgs e)
203203
}
204204
}
205205

206+
private void button_ProcessFilterRule_Click(object sender, EventArgs e)
207+
{
208+
ProcessFilterSetting processSettingForm = new ProcessFilterSetting();
209+
210+
if (processSettingForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
211+
{
212+
ProcessFilterRule processFilterRule = processSettingForm.selectedFilterRule;
213+
}
214+
}
215+
206216
private void button_InfoFilterMask_Click(object sender, EventArgs e)
207217
{
208218
MessageBox.Show("Input managed file filter mask with wild card character '*', it is unique index of the filter rule, to filter map drive file, you can use the filter mask like this: '*\\192.168.1.1\\shareName\\foldername\\*'");

FileProtector/CommonObjects/FilterRuleSection.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ public FileFilter ToFileFilter()
656656
fileFilter.EncryptionKey = Utils.GetKeyByPassPhrase(EncryptionPassPhrase, EncryptionKeySize);
657657
break;
658658
}
659-
case FilterAPI.EncryptionMethod.ENCRYPT_FILE_WITH_KEY_AND_IV_FROM_SERVICE:
659+
case FilterAPI.EncryptionMethod.ENCRYPT_FILE_WITH_KEY_IV_AND_TAGDATA_FROM_SERVICE:
660660
{
661661
//with this setting, to open or create encrypted file, it will request the encryption key and iv from the user mode callback service.
662662
fileFilter.EnableEncryptionKeyFromService = true;

0 commit comments

Comments
 (0)