Signing Windows application on Linux-based distros

You can try osslsigncode To sign an EXE or MSI file you can now do: osslsigncode sign -certs <cert-file> -key <der-key-file> \ -n “Your Application” -i http://www.yourwebsite.com/ \ -in yourapp.exe -out yourapp-signed.exe or if you are using a PEM or PVK key file with a password together with a PEM certificate: osslsigncode sign -certs <cert-file> … Read more

Where is the PEM file format specified?

For quite a long time, there was no formal specification of the PEM format with regards to cryptographic exchange of information. PEM is the textual encoding, but what is actually being encoded depends on the context. In April 2015, the IETF approved RFC 7468, which finally documents how various implementations exchange data using PEM textual … Read more

“Warning: unable to build chain to self-signed root for signer” warning in Xcode 9.2

If none of the other solutions work, try adding the intermediate signing certificates to your system keychain. I found this while trying to manually create provisioning profile/certificates as nothing else was working – from the Create a New Certificate step of the New Provisioning Profile process on Apple Developer platform: To use your certificates, you … Read more

Inserting Certificate (with privatekey) in Root, LocalMachine certificate store fails in .NET 4

I had exactly the same problem and the solution turned out to be really simple. All I had to do is to pass X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet to X509Certificate2’s ctor. Now you are using the DotNetUtilities to convert the bouncycastle certificate to the .net one, but the helper method creates the .net cert with the DefaultKeySet … Read more

Get timestamp from Authenticode Signed files in .NET

Back to the original question, I could not find managed way so ended up using pInvoke as follows: public static bool IsTimestamped(string filename) { try { int encodingType; int contentType; int formatType; IntPtr certStore = IntPtr.Zero; IntPtr cryptMsg = IntPtr.Zero; IntPtr context = IntPtr.Zero; if (!WinCrypt.CryptQueryObject( WinCrypt.CERT_QUERY_OBJECT_FILE, Marshal.StringToHGlobalUni(filename), WinCrypt.CERT_QUERY_CONTENT_FLAG_ALL, WinCrypt.CERT_QUERY_FORMAT_FLAG_ALL, 0, out encodingType, out contentType, … Read more