Files
Files copied to clipboard
Featuer: Add digital signatures tab to properties window
Describe the solution/problem

I want to view and verify the digital signatures info in Files. I think we can add a tab in properties and show the signature details directly.
Requirements
- Similar design to hashes page
- Add details button/icon next to each item
- Clicking details should open the same window that File Explorer does
Files version
2.3.12.0
Windows version
10.0.19043.2006
@yaichenbaum Please let me know if you'd like to implement it or welcome the PR.
@PMExtra A PR would be great, would you like to work on this?
I think we need a design before approving, keeping in planning for now.
As far as design goes, we can do something similar to the hashes page.
I found that C# crypt API doesn't work properly; X509Certificate2UI.DisplayCertificate displays different certificate information from the FE one and X509Certificate.CreateFromCertFile is capabble of getting only one signature.
I'll go with CryptUIDlgViewCertificateW in Win32API. API example is here.
For others who will work on this area in the future.
- API exmaple of CryptQueryObject https://gist.githubusercontent.com/dougpuob/1cb6c2f16c95d1e7f324d23e76c80f8e/raw/05693766a2876546dee2b929cf73d0c58ff5f80b/CryptQueryObject.c
- API example to verify certification of a file https://learn.microsoft.com/en-us/windows/win32/seccrypto/example-c-program--verifying-the-signature-of-a-pe-file?redirectedfrom=MSDN
- API to get the certification state https://learn.microsoft.com/en-us/windows/win32/api/wintrust/nf-wintrust-winverifytrust
- OID list to get digest algorithm https://www.ibm.com/docs/en/zos/2.3.0?topic=programming-object-identifiers
- Source code of crypt UI https://github.com/tongzx/nt5src/blob/daad8a087a4e75422ec96b7911f1df4669989611/Source/XPSP1/NT/ds/security/cryptoapi/ui/cryptui/cryptui.rc#L733
- API reference https://stackoverflow.com/questions/1728037/how-to-know-a-file-has-digital-signature-attribute
It seems that Microsoft has improved this tab with a new signing state icon alongside of the signature item in the list and with a new view box for the catalog list on the bottom of the tab, and it will be included in 24H2