How to code sign applications using .pem file on Linux

Posted on 2012-08-27
Last Modified: 2012-09-02
I need to sign my application(dll, exe) using  the digital certificate. The certificate format is .pem.

My Setup build machine is on Linux. The certificate request also generated on Linux.

My build/Setup environment:

1. DLLs and EXEs are build on two different machines for Win32 bit and win64 bit. Both 32 bit and 64 bit built dll and Exes need to be signed,
2. DLLs and EXEs will be copied to the Linux machine
3. The setup.exe is built on Linux machine. This need to be signed.

Thanks in advance.
Question by:HPFE455
    LVL 60

    Accepted Solution

    you need private key to digitally sign. e.g. where
    openssl pkcs12 -inkey bob_key.pem -in bob_cert.cert -export -out bob_pfx.pfx

    there is windows openssl too. typically for win exe/dll, the signtool is used with pfx.
    LVL 60

    Expert Comment


    Assisted Solution

    Thanks breadtan. The below code worked for me.

    openssl pkcs12 -inkey privatekey.key -in bob_key.pem -in bob_cert.cert -export -out bob_pfx.pfx

    Author Closing Comment

    we need to pass the private key also.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Today, security is a big concern in an organization to prevent sensitive data leakage. In Outlook you can secure your Outlook items (emails, calendars, contacts and other stuff) using various techniques like by marking item as private, or you can pu…
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now