Questions tagged [openssl]

OpenSSL is an open source software toolkit that implements the SSL/TLS protocol, as well as a general cryptographic library.

OpenSSL is an open source software toolkit that implements the SSL/TLS protocol, as well as a general cryptographic library.

OpenSSL is maintained by the OpenSSL Project, which hosts several project mailing lists.

14146 questions
141
votes
13 answers

Converting a Java Keystore into PEM Format

I am trying to convert from a Java keystore file into a PEM file using keytool and openssl applicactions. But I could not find a good way to do the conversion. Any ideas? Instead of converting the keystore directly into PEM I tried to create a…
Chathuranga Chandrasekara
  • 19,150
  • 28
  • 95
  • 135
135
votes
5 answers

How to extract public key using OpenSSL?

The following command generates a file which contains both public and private key: openssl genrsa -des3 -out privkey.pem 2048 Source: here With OpenSSL, the private key contains the public key information as well, so a public key doesn't need to be…
Jake
  • 14,859
  • 42
  • 114
  • 188
132
votes
3 answers

Converting pfx to pem using openssl

How to generate a .pem CA certificate and client certificate from a PFX file using OpenSSL.
new bie
  • 2,065
  • 5
  • 20
  • 25
127
votes
18 answers

OpenSSL and error in reading openssl.conf file

I am running windows xp 32bit I just downloaded Openssl from the following URL and installed it. http://www.slproweb.com/products/Win32OpenSSL.html and then i tried to create a self signed certificate by using the following command openssl req -x509…
Sreeram
  • 2,880
  • 5
  • 28
  • 44
124
votes
13 answers

You must enable the openssl extension to download files via https

I wanted to install Zend Framework 2. So I downloaded the skeleton application. As mentioned in the ZF2 manual, we have to issue the command php composer.phar install Inside the skeleton. But I'm getting an error You must enable the openssl…
Uttam Dutta
  • 4,850
  • 4
  • 16
  • 20
123
votes
1 answer

How can I generate a self-signed certificate with SubjectAltName using OpenSSL?

I am trying to generate a self-signed certificate with OpenSSL with SubjectAltName in it.While I am generating the csr for the certificate, my guess is I have to use v3 extensions of OpenSSL x509. I am using : openssl req -new -x509 -v3 -key…
mohanjot
  • 1,390
  • 2
  • 10
  • 15
122
votes
6 answers

Convert NSData to String?

I am storing a openssl private Key EVP_PKEY as nsdata. For this I am serializing into a byte stream using the code below unsigned char *buf, *p; int len; len = i2d_PrivateKey(pkey, NULL); buf = OPENSSL_malloc(len); p = buf; i2d_PrivateKey(pkey,…
Zach
  • 9,411
  • 18
  • 63
  • 102
122
votes
14 answers

SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch

I'm not able to setup SSL. I've Googled and I found a few solutions but none of them worked for me. I need some help please... Here's the error I get when I attempt to restart nginx: root@s17925268:~# service nginx restart Restarting nginx: nginx:…
Galou
  • 1,219
  • 2
  • 10
  • 7
117
votes
2 answers

How to generate an openSSL key using a passphrase from the command line?

First - what happens if I don't give a passphrase? Is some sort of pseudo random phrase used? I'm just looking for something "good enough" to keep casual hackers at bay. Second - how do I generate a key pair from the command line, supplying the…
Mawg says reinstate Monica
  • 34,839
  • 92
  • 281
  • 509
116
votes
5 answers

How can I transform between the two styles of public key format, one "BEGIN RSA PUBLIC KEY", the other is "BEGIN PUBLIC KEY"

How can I transform between the two styles of public key format, one format is: -----BEGIN PUBLIC KEY----- ... -----END PUBLIC KEY----- the other format is: -----BEGIN RSA PUBLIC KEY----- ... -----END RSA PUBLIC KEY----- for example I generated…
welkinwalker
  • 1,564
  • 3
  • 13
  • 20
115
votes
5 answers

Load RSA public key from file

I've generated a private key with: openssl genrsa [-out file] –des3 After this I've generated a public key with: openssl rsa –pubout -in private.key [-out file] I want to sign some messages with my private key, and verify some other messages with…
alexey_efimov
  • 1,303
  • 2
  • 11
  • 15
114
votes
2 answers

What is the purpose of the -nodes argument in openssl?

What is the purpose of the -nodes argument in openssl?
user624409
  • 1,161
  • 2
  • 7
  • 6
112
votes
7 answers

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

I need a hash-name for file for posting in Stunnel's CApath directory. I have got some certs in this directory and they are working well. Also, I have a server sert and server key: cert = c:\Program Files (x86)\stunnel\server_cert.pem key =…
lsv
  • 1,507
  • 4
  • 19
  • 28
101
votes
14 answers

Unable to load Private Key. (PEM routines:PEM_read_bio:no start line:pem_lib.c:648:Expecting: ANY PRIVATE KEY)

I have a .key file which is PEM formatted private key file. I didn't make this file but I got this from somewhere. I wanted to see its MD5 hash with openssl tool like below command. openssl rsa -in server.key -modulus -noout But this generates…
tkpl
  • 1,719
  • 2
  • 13
  • 8
100
votes
2 answers

SSL Error: unable to get local issuer certificate

I'm having trouble configuring SSL on a Debian 6.0 32bit server. I'm relatively new with SSL so please bear with me. I'm including as much information as I can. Note: The true domain name has been changed to protect the identity and integrity of the…
Jamie Counsell
  • 6,383
  • 5
  • 36
  • 75