Files icon indicating copy to clipboard operation
Files copied to clipboard

Featuer: Add digital signatures tab to properties window

Open PMExtra opened this issue 4 years ago • 6 comments

Describe the solution/problem

image

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

PMExtra avatar Feb 25 '21 09:02 PMExtra

@yaichenbaum Please let me know if you'd like to implement it or welcome the PR.

PMExtra avatar Feb 25 '21 09:02 PMExtra

@PMExtra A PR would be great, would you like to work on this?

yaira2 avatar Feb 26 '21 02:02 yaira2

I think we need a design before approving, keeping in planning for now.

yaira2 avatar Oct 12 '22 04:10 yaira2

As far as design goes, we can do something similar to the hashes page.

yaira2 avatar Nov 21 '23 18:11 yaira2

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

0x5bfa avatar Feb 09 '24 01:02 0x5bfa

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

0x5bfa avatar Jun 06 '24 04:06 0x5bfa