Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Check that an EXE file is code signed / digitally signed?

Check that an EXE file is code signed / digitally signed?

Scheduled Pinned Locked Moved C / C++ / MFC
c++securitytutorialquestionannouncement
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mika Larramo
    wrote on last edited by
    #1

    Does anyone know how (from C/C++) check if an EXE file is code signed / digitally signed? And how to get the company name that has signed the file? I need to create a function (in C/C++) that starts an EXE file with a known filename, but for security reasons I must first check that this is the original file (check that nobody has replaced the file with another one with same filename). I know how to get version information from an EXE file, but reading code signing info will make the function much safer.

    C 1 Reply Last reply
    0
    • M Mika Larramo

      Does anyone know how (from C/C++) check if an EXE file is code signed / digitally signed? And how to get the company name that has signed the file? I need to create a function (in C/C++) that starts an EXE file with a known filename, but for security reasons I must first check that this is the original file (check that nobody has replaced the file with another one with same filename). I know how to get version information from an EXE file, but reading code signing info will make the function much safer.

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      Can't you instead generate an MD5 hash code from the exe and check that against a valid value to see if the exe was replaced or not? Anyways, a little googling brought me to this[^], i guess you can go on from there...

      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > "It doesn't work, fix it" does not qualify as a bug report. < > Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <

      modified on Friday, October 15, 2010 4:20 PM

      M 1 Reply Last reply
      0
      • C Code o mat

        Can't you instead generate an MD5 hash code from the exe and check that against a valid value to see if the exe was replaced or not? Anyways, a little googling brought me to this[^], i guess you can go on from there...

        > The problem with computers is that they do what you tell them to do and not what you want them to do. < > "It doesn't work, fix it" does not qualify as a bug report. < > Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <

        modified on Friday, October 15, 2010 4:20 PM

        M Offline
        M Offline
        Mika Larramo
        wrote on last edited by
        #3

        Thank you for your link. I think this will solve my problem. I will take a closer look. :)

        C 1 Reply Last reply
        0
        • M Mika Larramo

          Thank you for your link. I think this will solve my problem. I will take a closer look. :)

          C Offline
          C Offline
          Code o mat
          wrote on last edited by
          #4

          Yourwelcome.

          > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world. Fry: But this is HDTV. It's got better resolution than the real world <

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups