1

I'm working in a vb.net project in which I want to get verification of any given file that it is Digitally signature or not. CAPICOM is the API came in existence after searching on google, but I don't exactly know How can I use CAPICOM in vb.net to get TRUE/FALSE if any given file is Digitally Signatured or not..

Now I'm here to get some help regarding this. Sorry For my bad english.

Thanks & Regards,

Vb Killer
  • 37
  • 4
  • What kinds of digital signatures do you want to find? Signatures in separate signature files? Signature containers (CMS or ASiC) with embedded content? Integrated signatures (e.g. in PDFs)? – mkl Jul 15 '13 at 14:19
  • Hi, Thanks for the reply. Actually that file can be any binary file either exe or pdf. I just want to check if the file is digitally signed or not. Also want to check if the signature is valid or not. Don;t want to match signature with another signature. Regards ! – Vb Killer Jul 15 '13 at 17:42
  • I'm using CAPICOM like Dim signed As New CAPICOM.SignedCode signed.FileName = cFilname Dim cert = signed.Signer.Certificate cert.IsValid.CheckFlag = CAPICOM_CHECK_FLAG.CAPICOM_CHECK_SIGNATURE_VALIDITY If cert.IsValid.Result Then TextBox2.Text &= "VALID" Else TextBox2.Text &= "NOT VALID" End If End Sub BUT its not showing that the file containing a valid signature. Please help me ! – Vb Killer Jul 16 '13 at 07:09
  • Different types of files (executables, PDFs, XMLs, EDIs ...) allow integrated signatures, but for the different types different standards apply and quite often different libraries have to be used to check for the signatures. According to [MSDN](http://msdn.microsoft.com/en-us/library/windows/desktop/aa387712(v=vs.85).aspx) CAPICOM.SignedCode only works for .cab, .cat, .exe, .dll, .vbs, and .ocx files signed with Authenticode technology. – mkl Jul 16 '13 at 09:47
  • Hi, yes exactly I want to get if these file extensions containing a valid digital signature or not by CAPICOM. Thanks again ! – Vb Killer Jul 16 '13 at 12:54
  • @VbKiller You don't need CAPICOM from .NET. And no, you won't be able to use CAPICOM For this. You need a library that supports different kinds of signatures. Our SecureBlackbox ( https://www.eldos.com/sbb/ ) is the most extensive library that covers all popular signature formats. – Eugene Mayevski 'Callback Aug 06 '13 at 19:08

0 Answers0