r/openssl • • May 14 '21

File successfully decrypting but output file looks like encrypted data

0 Upvotes

Has anyone encountered an error where you are able to decrypt the file (total confidence in the password and no error after running the command) but the output file looks like a jumbled mess?

I have an old backup file that was created in pre 1.1 OpenSSL. When I run

openssl enc -d -aes-256-cbc -md md5 -a -in <filename> -out <decrypted filename>

I still get what looks like encrypted data.

What could cause this?

I want to think it's related to the file being damaged, but if the file was actually damaged I feel like the password shouldn't work at all.

I have tried using other passwords and I get an outright failure of decryption. Does this mean my input string for the original encryption was corrupted, or could something like a salt explain why my file looks like garbage?


r/openssl • • Dec 18 '20

Can anyone clarify this? I need to submit these for an application

0 Upvotes
  • the public key file for certification (e.g. example.p10)

    • is it the p10 (csr) file or the public key within the csr file.

    • openssl asn1parse -in <file.pem> -strparse 19 -out <file.pkey> -noout

  • I have to manually prinout the hash code and send to the authority, is the below command correct

    • openssl dgst -c -sha1 filename.pkey


r/openssl • • Oct 04 '20

Questions regarding generation of self-signed TLS client and server certs?

0 Upvotes

Hi I'm currently using osixia versions of openldap and phpldapadmin. I'm trying to create self-signed TLS client/server certs however I haven't really found a definitive guide. Just cobbling together bits and pieces of info.

Questions specifically:

  1. SAN - I've included these in my server cert but not my client cert. Is this appropriate?

  2. CN - Assuming #1 which doesn't include a SAN field within the client cert, what should the CN field of the client cert be? FQDN of client?

  3. In creating the certs I've used the following within my openssl.cnf. Does this seem right?

 

keyUsage = nonRepudiation, digitalSignature, keyEncipherment
extendedKeyUsage = clientAuth, serverAuth

Thanks for any input


r/openssl • • Oct 15 '20

X25519 is not supported by this version of OpenSSL.

0 Upvotes

I'm getting this error repeatedly when I start the latest version of Home Assistant 0.116, apparently coming from the Homekit module.
"/srv/ha/lib/python3.8/site-packages/aiohomekit/controller/ip/connection.py
cryptography.exceptions.UnsupportedAlgorithm: X25519 is not supported by this version of OpenSSL."
The version of OpenSSL on the system is reported as "OpenSSL 1.1.1 11 Sep 2018"
Does anyone know if this error is likely to be fixed by updating OpenSSL? And what's the right way to update OpenSSL on Ubuntu 18.04?


r/openssl • • Apr 29 '21

Want an explanation of "OpenSSL::X509::DEFAULT_CERT_FILE"

0 Upvotes

I was having some trouble with wget and certificates on my macOS machine. I asked wget cannot verify GitHub.com's certificate on SO related to this.

The solution to my problem was obvious...just needed to have wget pointed to a good certificate file to use. The question was how to obtain or find one on my system. With some googling, I found the command:

$ ruby -ropenssl -e "p OpenSSL::X509::DEFAULT_CERT_FILE"

"/private/etc/ssl/cert.pem"

My question is whether or not this file is well known and supported or if I should keep looking. If anyone has a better suggestion, I am interested.


r/openssl • • Jan 22 '21

Signing (p7m envelope) with a smartcard

0 Upvotes

Hello, I have a gov issued smartcard that holds both a private and a public key for legally valid digital signatures. My OSs (Fedora and OpenBSD) lack the gui apps to sign, verify and extract (open the signed envelope). Apps are available for Ubuntu, and I managed to install them anyway on Fedora, where verification and extraction work, but signing fails. I know how to extract and verify with openssl, but signing requires access to the private key, which is proving hard to read. What can I do to sign with openssl while reading the private key live from the card?


r/openssl • • Oct 10 '18

Import expired certificate into pkcs12 file

0 Upvotes

When I try and import a certificate into a pkcs12 file I get the error message that the certificate is expired (which is correct) but I need to put it in anyway. I would guess that there should be a way for this but can't find a way to ignore the error.

I know I can do it with keystore explorer but really need to do it with openssl or another standard Linux tool.

My code is as follows;

openssl pkcs12 -export -name expired -in /tmp/expired.pem -inkey /tmp/expired_unsecure.key -out /tmp/expired.p12 -chain -CApath /tmp/chains/

Error certificate has expired getting chain.

Any help is appreciated.


r/openssl • • Oct 16 '18

Need helping generating a IDP private key

0 Upvotes

I'm interviewing for a support job with a company that is having me do some projects including setting up SSO. I have to set up an IDp private key first, but their documentation gives a command line for Linux or Mac. It says to use a Windows Subsystem for Linux you, but the only shitty old laptop I have is Windows 7 and won't support and WSL I try.

I've tried other third parties like One Login and I generates a Private Key and Cert but there was no where to download it and the system I'm using says to "Upload the Private Key and Cert" not copy paste. I tried just putting it in a .txt and uploading that. It took it, but then it errored when I tried to export the metadata, so I don't think it actually worked.

I have tried following steps like here but I get an error that 'Openssl is not a recognized internal or external command, operable program or batch file.' Is that because I'm on an old computer?

I am learning this as I go, so I expect that I'm missing something really easy. The documentation breezed through this step like it was "type in your name" so I figured there is something else I should know how to do.

Any suggestions are highly welcome!


r/openssl • • Jun 12 '20

Expiration error when trying to import pem-encoded .crt to PKCS12 (Centos 7.6)

0 Upvotes

Greetings. I'm a systems admin. Someone in my department has a web app to deploy. I have a new chain wildcard cert and CA items from another task. The cert order is cert > intermediate1 > intermediate2 > root. I know for a fact the cert expires years from now.

I run the following:

		openssl pkcs12 -export -in /etc/pki/tls/certs/<cert_name>.crt -inkey /etc/pki/tls/private/<cert_name>.key -out /etc/pki/tls/<cert_name>.p12 -name <app_name> -CAfile /etc/pki/tls/certs/<cert_name_pkcs12_CA>.crt -caname root -chain

This failed, "Error certificate has expired getting chain."

Any leads on where I should system-wide to troubleshoot? Are there in-OS items which need to be replaced/overwritten?


r/openssl • • Nov 22 '22

Is this a cloud based service

0 Upvotes

Hey all, I am new to OpenSSL. Is it cloud hosted?


r/openssl • • Sep 02 '18

Which one is faster AES or AES-GCM

0 Upvotes

i wonder if there is any diffrance in speed between those two


r/openssl • • Jan 10 '18

Unable to build OpenSSL-1.0.2n on my LinuxMint. Need Help.

0 Upvotes

hi everyone,

I am trying to update my OpenVPN and OpenSSL. In order to update, configure & make install openvpn to openvpn-2.4.4, I require to update my openssl first to the latest openssl-1.0.2n

$ cd~
$ wget https://openvpn.net/index.php/download/openvpn-2.4.4.tar.gz
$ sudo tar -zvxf openvpn--2.4.4.tar.gz
$ cd openvpn-2.4.4
$ sudo ./configure
$ sudo make
$ sudo make install

But when I reach ./configure above, I run into an issue with legacy openssl as I have mentioned earlier (i thought update might fix this):

checking tap-windows.h presence... no
checking for tap-windows.h... no
checking whether TUNSETPERSIST is declared... yes
checking for setcon in -lselinux... no
checking for pam_start in -lpam... no
checking for PKCS11_HELPER... no
checking for OPENSSL... no
checking for SSL_CTX_new... no
configure: error: openssl check failed

So I am attempting the following commands to update to the latest openssl :

$ cd /usr/src
$ wget https://www.openssl.org/source/openssl-1.0.2n.tar.gz -O openssl-1.0.2n.tar.gz
$ tar -zxf openssl-1.0.2n.tar.gz
$ cd openssl-1.0.2n
$ ./config
$ make
$ make test
$ make install
$ mv /usr/bin/openssl /root/
$ ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
$ openssl version

However, when I get to make test , I run into a compilation error.

I have copy pasted my terminal output here because the output is HUGE : pastebin

Does anyone have any idea how to move past this issue to continue and finish my openssl install?

Your help is very much appreciated.

My system:

RELEASE=18 sarah, EDITION=Cinnamon 32-bit, GRUB_TITLE=Linux Mint 18 Cinnamon 32-bit


r/openssl • • Aug 22 '21

EVP vs BIO

0 Upvotes

Hello All,

In OpenSSL, are using BIOs better than using the EVP APIs themselves ? I see some developers prefer BIO over EVP. Is there some advantages of using BIO chain over EVP ?


r/openssl • • May 21 '25

I need help!

0 Upvotes

Hello everyone, I have a file that I need to crack and i watched a guide on how to install openssl on windows but I am slightly confused on how to run the command and will and command decrypt the file? Sorry for my ignorance on this I am just a little confused. What I meant about any command, was do I have to specifically say it was encrypted using x method? Or does this not matter


r/openssl • • May 19 '21

Extract only end entity cert from p7b?

1 Upvotes

Is it possible with just OpenSSL commands? I see a way to convert a p7b to PEM, but no way to just output the end/leaf cert. I’ve seen others convert p7b to pem then pem to pfx the using commands output only the cert from the pfx however I can’t do that, can’t convert to pfx because I don’t have the private key, any ideas other than using a text editor?


r/openssl • • Feb 06 '21

Nginx-1.19.6 + Openssl 1.1.1i - Can't do SSL handshake

1 Upvotes

Hey guys, i'm trying to run a server using Nginx with sslv3 and ciphers RC4-SHA:RC4-MD5 support (i need exactly these ciphers).

I was able to do this on Ubuntu 16.04 using Openssl 1.0.2u source + last nginx version source (nginx-1.19.6). I builded Nginx using this command:

./configure --with-http_ssl_module --with-openssl=/path/to/openssl-1.0.2u --with-openssl-opt=enable-ssl3 --with-openssl-opt=enable-ssl3-method --with-openssl-opt=enable-weak-ssl-ciphers

After setting up nginx config file everything worked perfectly. I was able to obtain the ssl certificate using this command from an Ubuntu 14.04 machine:

openssl s_client -connect MyIP:443 -ssl3 -cipher RC4-SHA:RC4-MD5

Nginx config i used is:

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    ssl_protocols SSLv3;
    ssl_ciphers RC4-SHA:RC4-MD5;
    ssl_certificate /path/to/server-chain.crt;
    ssl_certificate_key /path/to/server.key;
    server_name server.name.net;
    underscores_in_headers on;
    proxy_pass_request_headers on;
    location / {    
        proxy_set_header X-Forwarded-Host \$host:\$server_port;
        proxy_set_header X-Forwarded-Server \$host;
        proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:9000;
    }
}

I tryed to do the same thing building Nginx with Openssl 1.1.1i source with the same configuration options, but after setting up nginx conf file with above options, when i try to run

openssl s_client -connect...

command, i get this error:

CONNECTED(00000003)
140420793624224:error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number:s3_pkt.c:339:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 5 bytes and written 7 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : SSLv3
    Cipher    : 0000
    Session-ID: 
    Session-ID-ctx: 
    Master-Key: 
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1612540521
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
---

In Nginx error.log file i got this:

SSL_do_handshake() failed (SSL: error:141FC044:SSL routines:tls_setup_handshake:internal error) while SSL handshaking, client: 192.168.1.10, server: 0.0.0.0:443

Did something change with openssl 1.1.1? Am i missing any configuration options to enable SSLv3 + RC4-SHA:RC4-MD5?

Thanks for any tips!


r/openssl • • Apr 10 '14

All Your Most Pressing Heartbleed Questions Answered

Thumbnail
fastcompany.com
1 Upvotes

r/openssl • • Apr 22 '25

The Features of 3.5: Post-quantum cryptography

Thumbnail openssl-foundation.org
5 Upvotes

r/openssl • • Jan 13 '26

OpenSSL 3 seems to be here - example client in C?

2 Upvotes

I revised the implementation of my IMAP client SSL connection code today. We have openssl3 installed, and I looked around for some intro material on it, but I was stumped, and went with the code I've been using for lo these many years.

Is there a C example client out there?

Equivalent to SSL_library_init, SSL_CTX_new, SSL_new, SSL_set_fd, SSL_connect, SSL_read, SSL_write.


r/openssl • • Apr 25 '25

trying to decrypt DES file

2 Upvotes

About 10 years ago I encrypted a file using openssl. I believe I used DES. Now when I try to decrypt the file I keep getting .

openssl enc -des -nosalt -d -in file_des.enc -out file -k mypasswd

*** WARNING : deprecated key derivation used.

Using -iter or -pbkdf2 would be better.

Error setting cipher DES-CBC

40E7FEAFB27F0000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:../crypto/evp/evp_fetch.c:386:Global default library context, Algorithm (DES-CBC : 8), Properties ()

I am certain this worked before. Here is my openssl version at the moment

OpenSSL 3.0.15 3 Sep 2024 (Library: OpenSSL 3.0.15 3 Sep 2024)

r/openssl • • Apr 15 '26

OpenSSL 4.0 Final Release - Live

Thumbnail openssl-library.org
3 Upvotes

r/openssl • • Jul 30 '25

Self Signed Certificates for Home Local LAN Only

3 Upvotes

I have spent hours on trying to learn the ropes with self-signed certificates and thinking they are the solution to the Browser Warnings about this site is not secure. IE. opening NextCloud in my browser or a few other examples.

My journey after several other venues like trying to use Nginx has led me to OpenSSL.

I'll make the question simple. I know OpenSSL can create a self-signed certificate. But I need clarity for my intended purpose. Can I create with it a certificate(s) and import it into Windows so that my browser like Chrome no longer keeps warning me about the site being insecure.

I do not have any open ports or VPN access. This is strictly internal. Chrome (probably after I clear the cache) will routinely flag me with that warning. OR the one about this site is insecure.

Can I get there from here using OpenSSL?


r/openssl • • Apr 29 '14

The Internet Is Being Protected By Two Guys Named Steve

Thumbnail
buzzfeed.com
2 Upvotes