0

I've been looking around, and see that visual studio c++ has some "native" tools to remove a digital signatures.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms680214(v=vs.85).aspx

Of course I am doing this with documents, specifically for pdf files so I don't know how that function would work since it seems intended for images.

If it can remove it, could it also read it and return the signature? Right now I am using c# and wanted to have the program actually capture the digital signature so it can be verified, but one step at a time. Everything I read about System.Security.Cryptography.X509Certificates seems to indicate that it can only do any of its functions once the files are assigned X509Certificates related classes.

I've also never imported c++ code into c#, but I know it is possible. http://social.msdn.microsoft.com/Forums/en-US/f18d1d1c-0d14-4ff2-8244-337f58818ef9/how-to-use-c-code-in-c?forum=vssmartdevicesvbcs

lockgar
  • 79
  • 1
  • 9
  • After posting this, I found this useful line. string filePath = "C:/path/to/file.dll"; Assembly assembly = Assembly.LoadFrom(filePath); Module module = assembly.GetModules().First(); X509Certificate certificate = module.GetSignerCertificate(); Don't know how that would work on byte arrays. – lockgar Jun 11 '14 at 15:58
  • `Image` in those functions mean EXE files. None of that has anything to do with what you want. – SLaks Jun 11 '14 at 16:00
  • 1
    You need to use the PDF file format. – SLaks Jun 11 '14 at 16:02
  • Which ones does that?/How do you do that? – lockgar Jun 11 '14 at 16:09
  • 1
    http://stackoverflow.com/a/379033/34397 – SLaks Jun 11 '14 at 16:13
  • There was issues with iTextSharp, the people I am working with told me to try to avoid using it. However, I will use it if there is no other way. – lockgar Jun 11 '14 at 16:21
  • @lockgar then there's our SecureBlackbox ( https://www.eldos.com/sbb/net-pdf.php ) which does more in regards to PDF signatures and includes support and samples. – Eugene Mayevski 'Callback Jun 12 '14 at 06:02
  • You can also use the [CoSign C# API](http://developer.arx.com/quick-start/sapi-local/) to verify documents. – Larry K Jun 12 '14 at 08:09
  • The issue was with GPL, I can't use anything that has a GPL license. – lockgar Jun 12 '14 at 15:19
  • No of those seem to be able to actually verify a digital signature that has already been signed onto a file.... – lockgar Jun 19 '14 at 15:06

0 Answers0