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

How to Grant permission to user on Certificate private key using powershell?

Here is the Answer. Created a powershell script file AddUserToCertificate.ps1 Here is the content for script file. param( [string]$userName, [string]$permission, [string]$certStoreLocation, [string]$certThumbprint ); # check if certificate is already installed $certificateInstalled = Get-ChildItem cert:$certStoreLocation | Where thumbprint -eq $certThumbprint # download & install only if certificate is not already installed on machine if ($certificateInstalled -eq … Read more

Best way to initiate RSACryptoServiceProvider from x509Certificate2?

Note: While this is the accepted answer and was valid back in 2011, this code won’t work now under .NET Core. See this answer if you are using .NET Framework 4.6+, or .NET Core / .NET. RSACryptoServiceProvider publicKeyProvider = (RSACryptoServiceProvider)certificate.PublicKey.Key; and RSACryptoServiceProvider privateKeyProvider = (RSACryptoServiceProvider)certificate.PrivateKey; The key property on the public or private key property … Read more

“The password you entered is incorrect” when importing .pfx files to Windows certificate store

I ran into the same problem with OpenSSL 3 and Windows Server 2012 R2. However, I eventually put together the correct combination of parameters. This seems to work: openssl pkcs12 -export -certpbe PBE-SHA1-3DES -keypbe PBE-SHA1-3DES -nomac -inkey contoso.com.key -in contoso.com.crt -out contoso.com-legacy.pfx

Getting RSA private key from PEM BASE64 Encoded private key file

This is PKCS#1 format of a private key. Try this code. It doesn’t use Bouncy Castle or other third-party crypto providers. Just java.security and sun.security for DER sequece parsing. Also it supports parsing of a private key in PKCS#8 format (PEM file that has a header “—–BEGIN PRIVATE KEY—–“). import sun.security.util.DerInputStream; import sun.security.util.DerValue; import java.io.File; … Read more

Google play services returning a token signed with a non-Google key

A bit late, but for anyone experiencing the same, I would suggest to check the Installer of your app. Using PackageManager.getInstallerPackageName() getInstallerPackageName (String packageName) Retrieve the package name of the application that installed a package. This identifies which market the package came from If the value is “com.android.vending” then the app was installed from the … Read more

Wrong version of keystore on android call

You need to change the type of the keystore, from BKS to BKS-v1 (BKS-v1 is an older version of BKS). Because the BKS version changed as said here There is another solution, that is much much easier: Using Portecle: Downloads Portecle http://portecle.sourceforge.net/ Open your bks file with the password and portecle Do Tools>>Change Keystore Type>>BKS-v1 … Read more

How to create a working trusted and or self-signed certificate for a Windows 10 UWP application via Visual Studio 2019, 2017 and 2015

The answer provided by @nico has correct statements but made me realize there was more to the issue than I was initially describing. So I cleaned up the question title and question to provide a better question and subsequent answer. Scouring the web I found many of these answers in so many different places, e.g. … Read more

How do I create an ECDSA certificate with the OpenSSL command-line

If you haven’t chosen a curve, you can list them with this command: openssl ecparam -list_curves I picked secp256r1 for this example. Use this to generate an EC private key if you don’t have one already: openssl ecparam -out ec_key.pem -name secp256r1 -genkey And then generate the certificate. Your certificate will be in cert.pem. openssl … Read more

Code signing (Microsoft Authenticode) [closed]

Comodo is a good starting point to find the cheapest code signing certificate, but one receive the best price from a reseller. I just now verified the prices from https://author.tucows.com/. They are: Comodo Code Signing Certificate – 1 year: US$75 Comodo Code Signing Certificate – 2 year: US$140 Comodo Code Signing Certificate – 3 year: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)