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.

16384 questions
168
votes
7 answers

Can't open config file: /usr/local/ssl/openssl.cnf on Windows

I have installed OpenSSL 64. I want to use a certificate for my nodejs https server. I ran the following command: openssl genrsa -out subdomain.domain.com.key 1024 But I have got the error: WARNING: can't open config file:…
Himanshu Yadav
  • 13,315
  • 46
  • 162
  • 291
165
votes
21 answers

Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?

The problem is in the question. I've done a thorough investigation for solutions in regards to this and I know there are topics to this and I've followed them too and nothing has worked. That being said I'll list out exactly everything I've done so…
John M
  • 1,813
  • 3
  • 15
  • 12
160
votes
6 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
  • 16,329
  • 50
  • 126
  • 202
156
votes
16 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
  • 20,548
  • 30
  • 97
  • 138
155
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
  • 2,062
  • 3
  • 18
  • 21
151
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
  • 3,160
  • 6
  • 33
  • 44
144
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
  • 38,334
  • 103
  • 306
  • 551
141
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,431
  • 2
  • 10
  • 6
139
votes
1 answer

Proper use of the HsOpenSSL API to implement a TLS Server

I'm trying to figure out how to properly use the OpenSSL.Session API in a concurrent context E.g. assume I want to implement a stunnel-style ssl-wrapper, I'd expect to have the following basic skeleton structure, which implements a naive full-duplex…
hvr
  • 7,775
  • 3
  • 33
  • 47
138
votes
15 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
  • 2,279
  • 2
  • 16
  • 8
138
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,541
  • 2
  • 12
  • 16
133
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,490
  • 2
  • 11
  • 15
129
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,687
  • 4
  • 21
  • 31
127
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,989
  • 19
  • 70
  • 107
127
votes
14 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
  • 5,250
  • 4
  • 18
  • 21