-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Feature: Added Digital Signatures
tab to the properties window
#17334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
yaira2
merged 12 commits into
files-community:main
from
ferrariofilippo:feature_digital_signatures_2
Jul 30, 2025
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c7cbdc6
Feature: Add "Digital Signatures" tab to the properties window
ferrariofilippo 7d7d386
Retrieve signatures data
ferrariofilippo 03eb522
Support "Details" button & Cleanup
ferrariofilippo 467b6db
Spacing Issues
ferrariofilippo 9b74614
Again spacing
ferrariofilippo ef28600
... spacing
ferrariofilippo eee08c7
Merge branch 'main' into feature_digital_signatures_2
ferrariofilippo 571d0a2
Requested changes
ferrariofilippo fa06511
Use CsWin32
ferrariofilippo ba58d07
Library reference and methods
ferrariofilippo c11b812
Merge branch 'main' into feature_digital_signatures_2
ferrariofilippo a2f583e
Move to helper
ferrariofilippo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) Files Community | ||
// Licensed under the MIT License. | ||
|
||
namespace Files.App.Data.Items | ||
{ | ||
public class CertNodeInfoItem | ||
{ | ||
public string IssuedTo { get; set; } = string.Empty; | ||
|
||
public string IssuedBy { get; set; } = string.Empty; | ||
|
||
public string Version { get; set; } = string.Empty; | ||
|
||
public string ValidFrom { get; set; } = string.Empty; | ||
|
||
public string ValidTo { get; set; } = string.Empty; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
// Copyright (c) Files Community | ||
// Licensed under the MIT License. | ||
|
||
using Files.App.Utils.Signatures; | ||
using System.Windows.Input; | ||
using Windows.Win32.Foundation; | ||
|
||
namespace Files.App.Data.Models | ||
{ | ||
public sealed partial class SignatureInfoItem : ObservableObject | ||
{ | ||
private readonly string _fileName; | ||
|
||
private readonly HWND _hwndParent; | ||
|
||
private readonly int _index; | ||
|
||
private string _Version = string.Empty; | ||
public string Version | ||
{ | ||
get => _Version; | ||
set => SetProperty(ref _Version, value); | ||
} | ||
|
||
private string _IssuedBy = string.Empty; | ||
public string IssuedBy | ||
{ | ||
get => _IssuedBy; | ||
set => SetProperty(ref _IssuedBy, value); | ||
} | ||
|
||
private string _IssuedTo = string.Empty; | ||
public string IssuedTo | ||
{ | ||
get => _IssuedTo; | ||
set => SetProperty(ref _IssuedTo, value); | ||
} | ||
|
||
private string _ValidFromTimestamp = string.Empty; | ||
public string ValidFromTimestamp | ||
{ | ||
get => _ValidFromTimestamp; | ||
set => SetProperty(ref _ValidFromTimestamp, value); | ||
} | ||
|
||
private string _ValidToTimestamp = string.Empty; | ||
public string ValidToTimestamp | ||
{ | ||
get => _ValidToTimestamp; | ||
set => SetProperty(ref _ValidToTimestamp, value); | ||
} | ||
|
||
private string _VerifiedTimestamp = string.Empty; | ||
public string VerifiedTimestamp | ||
{ | ||
get => _VerifiedTimestamp; | ||
set => SetProperty(ref _VerifiedTimestamp, value); | ||
} | ||
|
||
private bool _Verified = false; | ||
public bool Verified | ||
{ | ||
get => _Verified; | ||
set | ||
{ | ||
if (SetProperty(ref _Verified, value)) | ||
OnPropertyChanged(nameof(Glyph)); | ||
} | ||
} | ||
|
||
public List<CertNodeInfoItem> SignChain { get; } | ||
|
||
public string Glyph => Verified ? "\uE930" : "\uEA39"; | ||
|
||
public ICommand OpenDetailsCommand { get; } | ||
|
||
public SignatureInfoItem(string fileName, int index, HWND hWnd, List<CertNodeInfoItem> chain) | ||
{ | ||
_fileName = fileName; | ||
_hwndParent = hWnd; | ||
_index = index; | ||
SignChain = chain ?? new List<CertNodeInfoItem>(); | ||
OpenDetailsCommand = new AsyncRelayCommand(DoOpenDetails); | ||
} | ||
|
||
private Task DoOpenDetails() | ||
{ | ||
DigitalSignaturesUtil.DisplaySignerInfoDialog(_fileName, _hwndParent, _index); | ||
return Task.CompletedTask; | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.