Skip to content

Commit 0d6f8bb

Browse files
authored
Merge pull request #1830 from mjcheetham/deps-update
Remove old unused upgrader methods and dependencies
2 parents cad7861 + e2a00f5 commit 0d6f8bb

File tree

4 files changed

+0
-33
lines changed

4 files changed

+0
-33
lines changed

GVFS/GVFS.Common/GVFSPlatform.cs

-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ public static void Register(GVFSPlatform platform)
8787
public abstract bool TryGetGVFSHooksVersion(out string hooksVersion, out string error);
8888
public abstract bool TryInstallGitCommandHooks(GVFSContext context, string executingDirectory, string hookName, string commandHookPath, out string errorMessage);
8989

90-
public abstract bool TryVerifyAuthenticodeSignature(string path, out string subject, out string issuer, out string error);
91-
9290
public abstract Dictionary<string, string> GetPhysicalDiskInfo(string path, bool sizeStatsOnly);
9391

9492
public abstract bool IsConsoleOutputRedirectedToFile();

GVFS/GVFS.Platform.Windows/GVFS.Platform.Windows.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
<PackageReference Include="Microsoft.Database.Collections.Generic" Version="1.9.4" />
1515
<PackageReference Include="Microsoft.Database.Isam" Version="1.9.4" />
1616
<PackageReference Include="Microsoft.Windows.ProjFS" Version="1.1.19156.1" />
17-
<PackageReference Include="System.Management.Automation.dll" Version="10.0.10586.0" />
1817
</ItemGroup>
1918

2019
<ItemGroup>

GVFS/GVFS.Platform.Windows/WindowsPlatform.cs

-25
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
using System.IO;
1212
using System.IO.Pipes;
1313
using System.Linq;
14-
using System.Management.Automation;
1514
using System.Security.AccessControl;
1615
using System.Security.Principal;
1716
using System.ServiceProcess;
@@ -294,30 +293,6 @@ public override bool TryInstallGitCommandHooks(GVFSContext context, string execu
294293
return true;
295294
}
296295

297-
public override bool TryVerifyAuthenticodeSignature(string path, out string subject, out string issuer, out string error)
298-
{
299-
using (PowerShell powershell = PowerShell.Create())
300-
{
301-
powershell.AddScript($"Get-AuthenticodeSignature -FilePath {path}");
302-
303-
Collection<PSObject> results = powershell.Invoke();
304-
if (powershell.HadErrors || results.Count <= 0)
305-
{
306-
subject = null;
307-
issuer = null;
308-
error = $"Powershell Get-AuthenticodeSignature failed, could not verify authenticode for {path}.";
309-
return false;
310-
}
311-
312-
Signature signature = results[0].BaseObject as Signature;
313-
bool isValid = signature.Status == SignatureStatus.Valid;
314-
subject = signature.SignerCertificate.SubjectName.Name;
315-
issuer = signature.SignerCertificate.IssuerName.Name;
316-
error = isValid == false ? signature.StatusMessage : null;
317-
return isValid;
318-
}
319-
}
320-
321296
public override string GetCurrentUser()
322297
{
323298
WindowsIdentity identity = WindowsIdentity.GetCurrent();

GVFS/GVFS.UnitTests/Mock/Common/MockPlatform.cs

-5
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ public override bool TryInstallGitCommandHooks(GVFSContext context, string execu
5959
throw new NotSupportedException();
6060
}
6161

62-
public override bool TryVerifyAuthenticodeSignature(string path, out string subject, out string issuer, out string error)
63-
{
64-
throw new NotImplementedException();
65-
}
66-
6762
public override string GetNamedPipeName(string enlistmentRoot)
6863
{
6964
return "GVFS_Mock_PipeName";

0 commit comments

Comments
 (0)