I am trying to verify if a file is digitally signed and if the signature is valid. This is the closest post to my need on SO: How to verify digital signature in C#
The problem I have is how do I get the signature of the signed file in the first place?
UPDATE: Thank you for guidance. Both .exe .js and files are signed with DigiCert Certificate Utility. I found the signature in the .js file itself. Not sure where .exe's is.
I believe the signing algorithm is determined by the certificate.
In the details tab of the Certificate details on windows, can be seen that signature algorithm is sha256RSA, signature hash algorithm is sha256 and public key is RSA(2048 Bits).