OpenSSL: PEM routines:PEM_read_bio:no start line:pem_lib.c:703:Expecting: TRUSTED CERTIFICATE [closed]

Since you are on Windows, make sure that your certificate in Windows “compatible”, most importantly that it doesn’t have ^M in the end of each line If you open it it will look like this: —–BEGIN CERTIFICATE—–^M MIIDITCCAoqgAwIBAgIQL9+89q6RUm0PmqPfQDQ+mjANBgkqhkiG9w0BAQUFADBM^M To solve “this” open it with Write or Notepad++ and have it convert it to Windows “style” … Read more

How to give ASP.NET access to a private key in a certificate in the certificate store?

Create / Purchase certificate. Make sure it has a private key. Import the certificate into the “Local Computer” account. Best to use Certificates MMC. Make sure to check “Allow private key to be exported” Based upon which, IIS 7.5 Application Pool’s identity use one of the following. IIS 7.5 Website is running under ApplicationPoolIdentity. Open … Read more

Xcode 4 – “Valid signing identity not found” error on provisioning profiles on a new Macintosh install

With Xcode 4.2 and later versions, including Xcode 4.6, there is a better way to migrate your entire developer profile to a new machine. On your existing machine, launch Xcode and do this: Open the Organizer (Shift-Command-2). Select the Devices tab. Choose Developer Profile in the upper-left corner under LIBRARY, which may be under the … Read more

How to create .pfx file from certificate and private key?

You will need to use openssl. openssl pkcs12 -export -out domain.name.pfx -inkey domain.name.key -in domain.name.crt The key file is just a text file with your private key in it. If you have a root CA and intermediate certs, then include them as well using multiple -in params openssl pkcs12 -export -out domain.name.pfx -inkey domain.name.key -in … Read more

How to fix the “java.security.cert.CertificateException: No subject alternative names present” error?

I fixed the problem by disabling HTTPS checks using the approach presented here: I put following code into the the ISomeService class: static { disableSslVerification(); } private static void disableSslVerification() { try { // Create a trust manager that does not validate certificate chains TrustManager[] trustAllCerts = new TrustManager[] {new X509TrustManager() { public java.security.cert.X509Certificate[] getAcceptedIssuers() … Read more