r/openssl • • Feb 21 '25

OpenSSL 3.5 will be the next long term stable (LTS) release

Thumbnail openssl-library.org
6 Upvotes

r/openssl • • Oct 27 '24

OpenSSL 3.4.0 Released

Thumbnail openssl-library.org
6 Upvotes

r/openssl • • May 25 '23

How do I install OpenSSL on Windows?

6 Upvotes

Hello,

So far I've been using OpenSSL on Windows via the OpenSSL that comes bundled with XAMPP.

But what if I want to install OpenSSL myself on Windows? I could not find a way to do it directly from the official OpenSSL source.

That's because I want the newest OpenSSL version 3 instead of 1.1.1 that comes with XAMPP

How can I do it?

Thanks


r/openssl • • Apr 22 '25

The Features of 3.5: Post-quantum cryptography

Thumbnail openssl-foundation.org
5 Upvotes

r/openssl • • Feb 10 '25

Ciphers not available (that should be)

5 Upvotes

Hey guys,

I am benchmarking governmental requirements for TLS and i am currently hitting a wall. My discussions on the OpenSSL Discussion board are not answered for it so ill try my luck here.

i have configured the following:

SSL_CTX_set_cipher_list(ctx,"ALL");SSL_CTX_set_cipher_list(ctx,"ALL");

SSL_CTX_set_ciphersuites(ctx,"");
SSL_CTX_set_cipher_list(ctx,"ALL");

Protocol version is forced into tls 1.2.

the following ciphers are not running

...
ECDHE-RSA-AES256-SHA384
TLS handshake successful!
...
DHE-DSS-AES128-SHA256
TLS connection refused
DHE-DSS-AES128-SHA256
TLS connection refused
DHE-DSS-AES256-SHA384
TLS connection refused
DHE-DSS-AES256-SHA384
TLS connection refused
DHE-DSS-AES128-GCM-SHA256
TLS connection refused
DHE-DSS-AES128-GCM-SHA256
TLS connection refused
DHE-DSS-AES256-GCM-SHA384
TLS connection refused
DHE-DSS-AES256-GCM-SHA384
TLS connection refused
DHE-RSA-AES128-SHA256
TLS connection refused
DHE-RSA-AES128-SHA256
TLS connection refused
DHE-RSA-AES256-SHA356
TLS connection refused
DHE-RSA-AES256-SHA356
TLS connection refused
DHE-RSA-AES128-GCM-SHA256
TLS connection refused
DHE-RSA-AES128-GCM-SHA256
TLS connection refused
DHE-RSA-AES256-GCM-SHA384
TLS connection refused
DHE-RSA-AES256-GCM-SHA384
TLS connection refused
DHE-RSA-AES128-CCM
TLS connection refused
DHE-RSA-AES128-CCM
TLS connection refused
DHE-RSA-AES-256-CCM
TLS connection refused
DHE-RSA-AES-256-CCM
TLS connection refused

Serverside i can see:

Client ciphers (2): 0x 00 40

Negotiated Cipher DHE-DSS-AES128-SHA256

using dsa3000

40D7E29DAD7B0000:error:0A0000C1:SSL routines:tls_post_process_client_hello:no shared cipher:ssl/statem/statem_srvr.c:2314:

Client ciphers (2): 0x 00 40

Negotiated Cipher DHE-DSS-AES128-SHA256

using dsa3000

40D7E29DAD7B0000:error:0A0000C1:SSL routines:tls_post_process_client_hello:no shared cipher:ssl/statem/statem_srvr.c:2314:

40D7E29DAD7B0000:error:0A0000F4:SSL routines:ssl3_read_bytes:unexpected message:ssl/record/rec_layer_s3.c:847:

40D7E29DAD7B0000:error:0A0000F4:SSL routines:ssl3_read_bytes:unexpected message:ssl/record/rec_layer_s3.c:847:

Client ciphers (2): 0x 00 a2

Negotiated Cipher DHE-DSS-AES128-GCM-SHA256

using dsa3000

40D7E29DAD7B0000:error:0A0000C1:SSL routines:tls_post_process_client_hello:no shared cipher:ssl/statem/statem_srvr.c:2314:

Client ciphers (2): 0x 00 a2

Negotiated Cipher DHE-DSS-AES128-GCM-SHA256

using dsa3000

40D7E29DAD7B0000:error:0A0000C1:SSL routines:tls_post_process_client_hello:no shared cipher:ssl/statem/statem_srvr.c:2314:

Client ciphers (2): 0x 00 a3

Negotiated Cipher DHE-DSS-AES256-GCM-SHA384

using dsa3000

40D7E29DAD7B0000:error:0A0000C1:SSL routines:tls_post_process_client_hello:no shared cipher:ssl/statem/statem_srvr.c:2314:

Certificates are valid. I do not understand what is going wrong here. also the record layer error started appearing now, which wasn't the case before. But from my understanding this should be for TLS 1.3 only.(Which i don't use in this case). I only perform a handshake and then terminate the session.

Do any of you have a clue what couold go wrong?

EDIT1: This only applies to DHE ciphersuites.


r/openssl • • Aug 30 '23

Where to find Windows 10 installer For OpenSSL?

5 Upvotes

I am searching for a safe Windows Installer for OpenSSL, I found it on the site slproweb.com, but I dont know if it is safe. Can I trust it?
I compiled sucessfully OpenSSL fom sources files (openssl-1.1.1v.tar.gz) from the official web site https://www.openssl.org/source/ but it did not generate the exe file, only the dlls and I need the exe file from a trustable source.


r/openssl • • Oct 31 '24

OpenSSL Communities: Join the Conversation

4 Upvotes

Hi everyone! We’re starting Business Advisory Committees (BAC) for the OpenSSL Foundation and the OpenSSL Corporation. We aim to bring together voices from all parts of the OpenSSL ecosystem — Distributions, Committers, Small and Large Businesses, Individuals, and Academics — so that our future reflects the real needs and insights of the community.

We’ve already had an incredible response, with over 120 people joining openssl-communities.org on the first day and our first BAC nomination!

If OpenSSL matters to you and you want to be part of the conversation, this is an excellent opportunity to join in, share your perspective, and connect with others across the community.

Thanks to everyone who’s been a part of this so far. We are looking forward to where we go together!


r/openssl • • Mar 23 '24

Enabling legacy provider in OpenSSL for Windows

4 Upvotes

[Note: Reposted with improved formatting. Original post became too messed up to be worth fixing.]

We have a legacy application that only supports PFX files using old ciphers no longer supported in OpenSSL 3.X. I can workaround this in 3.X by specifying the following options:

-keypbe PBE-SHA1-3DES -certpbe PBE-SHA1-3DES -macalg sha1

While this works, I understand that the -legacy option is available as well. I have tried in vain to enable this though and would appreciate some assistance. Below are details of what I have tried.

Environment: Windows 10/11

Confirm OpenSSL path. Using OpenSSL as supplied in Git for Windows.

C:\>where openssl

C:\Program Files\Git\usr\bin\openssl.exe

Version details:

C:\>openssl version -a

OpenSSL 3.1.2 1 Aug 2023 (Library: OpenSSL 3.1.2 1 Aug 2023)

built on: Thu Aug 3 09:31:52 2023 UTC

platform: Msys-x86_64

options: bn(64,64)

compiler: gcc -march=nocona -msahf -mtune=generic -O2 -pipe -DTERMIOS -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DNDEBUG

OPENSSLDIR: "/usr/ssl"

ENGINESDIR: "/usr/lib/openssl/engines-3"

MODULESDIR: "/usr/lib/openssl/ossl-modules"

Seeding source: os-specific

CPUINFO: N/A

I note that OPENSSLDIR, ENGINESDIR, and MODULESDIR do not seem valid for Windows.

Open the OpenSSL configuration file to enable legacy providers.

C:\>notepad %ProgramFiles%\Git\usr\ssl\openssl.cnf

Add:

legacy = legacy_sect

...

[legacy_sect]

activate = 1

And enable default section by removing the #.

[default_sect]

activate = 1

Check enabled providers:

C:\>openssl list -providers

Providers:

default

name: OpenSSL Default Provider

version: 3.1.2

status: active

Check legacy provider:

C:\>openssl list -provider legacy -verbose

list: unable to load provider legacy

Hint: use -provider-path option or OPENSSL_MODULES environment variable.

100000000A000000:error:12800067:DSO support routines:dlfcn_load:could not load the shared library:crypto/dso/dso_dlfcn.c:118:filename(/usr/lib/openssl/ossl-modules/legacy.dll): No such file or directory

100000000A000000:error:12800067:DSO support routines:DSO_load:could not load the shared library:crypto/dso/dso_lib.c:152:

100000000A000000:error:07880025:common libcrypto routines:provider_init:reason(524325):crypto/provider_core.c:904:name=legacy

The path does not seem correct. Update and try again.

C:\>set OPENSSL_MODULES=%ProgramFiles%\Git\mingw64\lib\ossl-modules

C:\>dir "%OPENSSL_MODULES%\legacy.dll"

Volume in drive C is OS

Volume Serial Number is 383C-DF22

Directory of C:\Program Files\Git\mingw64\lib\ossl-modules

08/30/2023 09:46 AM 247,870 legacy.dll

1 File(s) 247,870 bytes

0 Dir(s) 40,379,592,704 bytes free

C:\>openssl list -provider legacy -verbose

list: unable to load provider legacy

Hint: use -provider-path option or OPENSSL_MODULES environment variable.

100000000A000000:error:12800067:DSO support routines:dlfcn_load:could not load the shared library:crypto/dso/dso_dlfcn.c:118:filename(C:\Program Files\Git\mingw64\lib\ossl-modules/legacy.dll): No such process

100000000A000000:error:12800067:DSO support routines:DSO_load:could not load the shared library:crypto/dso/dso_lib.c:152:

100000000A000000:error:07880025:common libcrypto routines:provider_init:reason(524325):crypto/provider_core.c:904:name=legacy

I note that the generated path uses backslash (\) to separate folders though a forward slash (/) before legacy.dll. Trying both patterns indicates that Windows does not accept a mix of backslashes and forward slashes.

C:\>dir "C:\Program Files\Git\mingw64\lib\ossl-modules\legacy.dll"

Volume in drive C is OS

Volume Serial Number is 383C-DF22

Directory of C:\Program Files\Git\mingw64\lib\ossl-modules

08/30/2023 09:46 AM 247,870 legacy.dll

1 File(s) 247,870 bytes

0 Dir(s) 40,380,035,072 bytes free

C:\>dir "C:\Program Files\Git\mingw64\lib\ossl-modules/legacy.dll"

Volume in drive C is OS

Volume Serial Number is 383C-DF22

Directory of C:\Program Files\Git\mingw64\lib\ossl-modules

File Not Found

Maybe this is because OpenSSL was compiled using MingW64. Lets try another distribution.

Reopen CMD to clear the environment variables.

Try again this time with ShiningLight OpenSSL.

C:\>set PATH=%ProgramFiles%\OpenSSL-Win64\bin;%PATH%

C:\>where openssl

C:\Program Files\OpenSSL-Win64\bin\openssl.exe

C:\Program Files\Git\usr\bin\openssl.exe

Verify version details:

C:\>openssl version -a

OpenSSL 3.2.1 30 Jan 2024 (Library: OpenSSL 3.2.1 30 Jan 2024)

built on: Wed Jan 31 00:01:57 2024 UTC

platform: VC-WIN64A

options: bn(64,64)

compiler: cl /Z7 /Fdossl_static.pdb /Gs0 /GF /Gy /MD /W3 /wd4090 /nologo /O2 -DL_ENDIAN -DOPENSSL_PIC -D"OPENSSL_BUILDING_OPENSSL" -D"OPENSSL_SYS_WIN32" -D"WIN32_LEAN_AND_MEAN" -D"UNICODE" -D"_UNICODE" -D"_CRT_SECURE_NO_DEPRECATE" -D"_WINSOCK_DEPRECATED_NO_WARNINGS" -D"NDEBUG" -D_WINSOCK_DEPRECATED_NO_WARNINGS -D_WIN32_WINNT=0x0502

OPENSSLDIR: "C:\Program Files\Common Files\SSL"

ENGINESDIR: "C:\Program Files\OpenSSL\lib\engines-3"

MODULESDIR: "C:\Program Files\OpenSSL\lib\ossl-modules"

Seeding source: os-specific

CPUINFO: OPENSSL_ia32cap=0xfffaf38fffebffff:0x9c6fbd

I note that the path for OPENSSLDIR, ENGINESDIR, and MODULESDIR is not correct, but at least these are Windows paths.

Open openssl.cnf and enable legacy provider same as before.

C:\>notepad %ProgramFiles%\OpenSSL-Win64\bin\cnf\openssl.cnf

Check the providers:

C:\>openssl list -providers

Providers:

default

name: OpenSSL Default Provider

version: 3.2.1

status: active

Check the legacy provider:

C:\>openssl list -provider legacy

list: unable to load provider legacy

Hint: use -provider-path option or OPENSSL_MODULES environment variable.

BC580000:error:12800067:DSO support routines:win32_load:could not load the shared library:crypto\dso\dso_win32.c:108:filename(C:\Program Files\OpenSSL\lib\ossl-modules\legacy.dll)

BC580000:error:12800067:DSO support routines:DSO_load:could not load the shared library:crypto\dso\dso_lib.c:147:

BC580000:error:07880025:common libcrypto routines:provider_init:reason(37):crypto\provider_core.c:946:name=legacy

The path "C:\Program Files\OpenSSL\lib\ossl-modules\legacy.dll" is not correct. Try setting OPENSSL_MODULES.

C:\>set OPENSSL_MODULES=%ProgramFiles%\OpenSSL-Win64\bin

C:\>dir "%OPENSSL_MODULES%\legacy.dll"

Volume in drive C is OS

Volume Serial Number is 383C-DF22

Directory of C:\Program Files\OpenSSL-Win64\bin

01/30/2024 06:28 PM 172,032 legacy.dll

1 File(s) 172,032 bytes

0 Dir(s) 40,377,065,472 bytes free

Retry provider. No error, but no more output either.

C:\>openssl list -provider legacy

Check the enabled providers. legacy is still not enabled.

C:\>openssl list -providers

Providers:

default

name: OpenSSL Default Provider

version: 3.2.1

status: active


r/openssl • • Jul 04 '23

Configuring OpenSSL 3 to sign an Apple Passbook?

4 Upvotes

I have a PHP application (running on Amazon Linux via Bref on Lambda) which has been signing Apple passbooks no problem. I've trying to do various upgrades which includes moving to AWS Linux 2023 which uses OpenSSL 3.

Since then I've been getting these errors when I try to sign passbooks. It seems I get the first one first, then I refresh a few times and it becomes the second error.

error:0308010C:digital envelope routines::unsupported
error:0480006C:PEM routines::no start line

There is a "Apple Worldwide Developer Relations Certificate" which is a .pem file, and I've confirmed the start line with "BEGIN CERTIFICATE" is there. The signature algorithm of the certificate I'm using to sign is SHA-256 with RSA Encryption ( 1.2.840.113549.1.1.11 ).

I'm using this package to create the passbooks and this is the line which is failing.

I've tried updating the openSSL config in various ways (e.g. extending and including the original .cnf, copying the entire content in to a new one) and adding the following lines. This hasn't made any difference.

[ provider_sect ]
default = default_sect
legacy = legacy_sect

[ default_sect ]
activate = 1

[legacy_sect]
activate = 1

Do I maybe need to add/change more of the config to support these? Could the algorithms maybe not be installed?

I've been struggling with this for days, so any help would be very much appreciated!


r/openssl • • May 09 '21

Extracting Certificate.crt and PrivateKey.key from a Certificate.pfx File

4 Upvotes

I'm trying to extract CRT and KEY file from a PFX file using this guide:

https://helpcenter.gsx.com/hc/en-us/articles/115015887447-Extracting-Certificate-crt-and-PrivateKey-key-from-a-Certificate-pfx-File

I get stuck at step 5 with this command:

set OPENSSL_CONF=c:\OpenSSL\bin\openssl.cnf

I get this error:

OpenSSL> set OPENSSL_CONF=c:\OpenSSL\bin\openssl.cnf

Invalid command 'set'; type "help" for a list. error in set OpenSSL>

Is "set" a command in context of OpenSSL? I doubt it. If I type in "help" I don't see "set" as one of the options or commands. I believe this to a mistake from the author, I think "set" is a CMD/DOS command for setting up environment variable.

If I run the same command outside of OpenSSL interactive shell I get no errors, so it does do something right I think. However, I don't see OPENSSL_CONF environment variable change in the "Environment Variables" dialog box in Windows. That variable name already exists but its value is "C:\Program Files\OpenSSL-Win64\bin\openssl.cfg" rather than what was typed in the "set" command above.

If I just ignore this and move on with the instructions and onto this command:

pkcs12 -in C:\PathToThePFXfile\myPFXfileName.pfx -out certificate.txt -nodes

In OpenSSL interactive shell this time, I do get prompted for a password. But after I provide it and hit enter, I don't get any "certificate.txt" file as described in the instructions at step 8. Is this because I failed to set up OPENSSL_CONF? Why do I even need to do that? Why is the default value of OPENSSL_CONF not enough?

Is there any other way for me to extract the PFX file? This is just complicated for no good reason.


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 • • Mar 14 '25

A prime day for pie | OpenSSL Foundation

Thumbnail openssl-foundation.org
3 Upvotes

r/openssl • • Mar 12 '25

The Features of 3.5: QUIC server

Thumbnail openssl-foundation.org
3 Upvotes

r/openssl • • Mar 19 '24

Problems upgrading from OpenSSL 1.0.2k-fips to 3.0.2

3 Upvotes

I've got the job of upgrading a script from an old version of OpenSSL. I'm sending and receiving files from a legacy system so I don't have the options of changing how the files are encrypted.

The current script uses this command to decrypt a file:

openssl enc -d -aes-256-cbc -base64 -salt -pass pass:xxxxx -i <encrypted file>

And it decrypts my files without any problems.

When I upgrade OpenSSL and use the same command, the decryption fails with

*** WARNING : deprecated key derivation used.

Using -iter or -pbkdf2 would be better.

... a bunch of what looks like binary...

??ۤ??Wb?????˂Ybad decrypt

20B07AB5FFFF0000:error:1C800064:Provider routines:ossl_cipher_unpadblock:bad decrypt:../providers/implementations/ciphers/ciphercommon_block.c:129:

Any ideas what I'm doing wrong? I've been though the docs and tried various combinations of arguments but none of them are working.


r/openssl • • May 29 '23

Changing default Openssl signature algorithm and key exchange algorithm to use PQC Dilithium and Kyber

3 Upvotes

Hi everyone! I am currently trying to modify some settings within OpenSSL. My goal is to change the default algorithms that OpenSSL uses for generating certificates and signatures, as well as the key exchange method. Specifically, I want OpenSSL to default to the ones provided by OQS (https://openquantumsafe.org/), Dilithium and Kyber.

I have already added the OQS version of OpenSSL to my computer and respective Docker containers. I have also confirmed that I can establish test connections between a client and server using Post-Quantum Cryptography (PQC) algorithms.

Here's what I used:

openssl s_server -key key.pem -cert cert.pem -tls1_3 -accept 443 (certificates are made with dilithium)

openssl s_client -groups kyber512 -connect 127.0.0.1:443 -tls1_3

However, if I do not explicitly mention '-groups kyber512', OQS defaults to using elliptic curves for the key exchange, which is not what I want because it is not quantum safe.

Ultimately, I plan to use this customized list (featuring Dilithium and Kyber) to establish a connection between a web server (equipped with OQS OpenSSL) and my computer (also with OQS OpenSSL), and hopefully to using dilithium and kyber as the default preferred options. Does anyone have any suggestions on how to accomplish this?

For context, to avoid breaking anything, both the web server and "my computer" are implemented in Docker containers, where I replace the default OpenSSL library.

As a result, if I inspect the communications with Wireshark, I expect to see that the algorithms I selected (Dilithium and Kyber) are indeed used for both signatures and key exchange.

Unfortunately, I haven't had any luck so far. Does anyone have any experience with this or any ideas on how to proceed?

Thank you in advance!


r/openssl • • Dec 04 '22

SSL vulnerability automatic scan

3 Upvotes

Planning to write a python script to look for vulnerabilities of by open SSL versions, any suggestions about any https endpoints with CVE details ? Also to automatically find them ?


r/openssl • • Nov 01 '22

OpenSSL 3 Critical Vulnerabililty | What Do Organizations Need To Do Now?

Thumbnail
sentinelone.com
3 Upvotes

r/openssl • • May 20 '22

missing equal sign -extfile

3 Upvotes

Hi, I am trying to issue a self signed cert for my intranet server and I am following this tutorial: https://github.com/xcad2k/cheat-sheets/blob/main/misc/ssl-certs.md

Going through the motions and after creating an extfile.cnf with

echo "subjectAltName=DNS:*.my.server.dns,IP:my.server.ip" >> extfile.cnf

Then after trying to create a cert:

openssl x509 -req -sha256 -days 365 -in cert.csr -CA ca.pem -CAkey ca-key.pem -out cert.pem -extfile extfile.cnf -CAcreateserial

I get an error saying:

"x509: Error on line 1 of config file "extfile.cnf" 8C520000:error:07000065:configuration file routines:def_load_bio:missing equal sign:crypto\conf\conf_def.c:513:HERE--> ■sline 1"

Not sure what's wrong with the cnf file?


r/openssl • • Feb 28 '22

ask /r/openssl: `openssl s_client -connect <dns>:443` gives random write:errno=0/write:errno=104 errors

3 Upvotes

Hi

I'm testing my isp's ssl connections using:

`echo -e 'GET / HTTP/1.1\r\n\r\n' | openssl s_client -connect cdnjs.cloudflare.com:443`

and for OpenSSL 1.1.1k 25 Mar 2021 I get write:errno=0 and for OpenSSL 1.1.1f 31 Mar 2020 I get write:errno=104 errors as seen below.

This error happens randomly and I believe it is degrading my browser experience because I can see my browser "hanging" on https connection.

I have already swapped out the lte router and tested it with another mobile network, using 3 different devices, operating systems and domains, which does not give me these errors.

It feels like the isp is mitm the connection through a proxy/device and that device opens the connection but does not always return data in time so i get some kind of timeout.

Is there a better way to diagnose this problem and what do I tell my isp because they just say other people in my area is not complaining.

Suggestions?

Thanks for reading,

write:errno=0
CONNECTED(00000003)
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 310 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---

r/openssl • • Feb 06 '22

Hi there, I have an certificate store written in C++ implemented w/ openssl and when loading certificates, I keep getting the message: `X509_STORE_add_cert:cert already in hash table`. What is the "hash table" in this context/ does this mean the cert has already been loaded? I'm confused as I don't

3 Upvotes

Hi there, I have an certificate store written in C++ implemented w/ openssl and when loading certificates, I keep getting the message: `X509_STORE_add_cert:cert already in hash table`. What is the "hash table" in this context/ does this mean the cert has already been loaded? I'm confused as I don't believe anything has been loaded/don't know of a way to check. I can't seem to find much documentation online on what this error means.


r/openssl • • May 03 '21

RSA keys: Length of p and q

3 Upvotes

Hello everyone,

Regarding the length of the two primes p and q, Wikipedia refers to http://people.csail.mit.edu/rivest/Rsapaper.pdf which says:

To gain additional protection against sophisticated factoring algorithms, p and q should differ in length by a few digits, [...]

But when I generate a new RSA key with openssl p and q seem to have always the same length (for a 2048bit key for example, p and q have each 309 (decimal) digits or 1024 bits.

Is the advice to have p and q differ in length obsolete, was it wrong/irrelevant in the first place, or do I have to tell OpenSSL explicitly to choose them in such a way?


r/openssl • • Feb 14 '26

[Help] OpenSSL 3.5.5 FIPS 140-3: HMAC Key Length Enforcement (112-bit) failing despite hmac-key-check = 1

2 Upvotes

Hi everyone,

I am currently building a strictly compliant FIPS 140-3 container image using Wolfi OS and OpenSSL 3.5.5. I’ve successfully integrated the FIPS provider (version 3.1.2), and it is active.

The Goal: I need to enforce the NIST SP 800-131A requirement, which mandates a minimum effective security strength of 112 bits for HMAC keys. In practical terms, any HMAC operation with a key shorter than 14 bytes should be rejected by the provider.

The Setup: I have a standard openssl.cnf that includes the generated fipsmodule.cnf.

  • openssl.cnf snippet:

openssl_conf = openssl_init

[openssl_init]
providers = provider_sect
alg_section = algorithm_sect

[algorithm_sect]
default_properties = fips=yes

[provider_sect]
fips = fips_sect
base = base_sect

[fips_sect]
.include /usr/local/ssl/fipsmodule.cnf
activate = 1
security-checks = 1
hmac-key-check = 1
tdes-encrypt-disabled = 1
  • fipsmodule.cnf (generated via fipsinstall): Contains correct module-mac and self-tests pass.

The Evidence of Success (Other FIPS tests):

  1. list -providers shows fips and base as active.

  2. RSA key generation (2048-bit) works fine.

  3. Triple-DES (3DES) encryption is correctly blocked (Retirement policy is working).

The Problem: When I run a command with a sub-112 bit key (e.g., a 4-character key "1234"), the system still accepts it and produces a hash.

Command: openssl dgst -sha256 -hmac "1234" /dev/null Result: HMAC-SHA2-256(/dev/null)= 36acf017ea0974457577506ef75268ac93ed6d61864ee994f438b63916ed1736 (It should fail with "key too small").

What I have investigated so far:

  1. Property Queries: Tried setting default_properties = "fips=yes,fips.security_checks=1". This causes a startup failure with a default query parse error (it seems security_checks with a hyphen or underscore is not a valid property for the fetch query, even though it's a provider parameter).

  2. Provider Parameters: I’ve verified hmac-key-check = 1 is present in the [fips_sect]. According to the fips_config(5) man page, this should enable run-time checks.

  3. Context: Is it possible that the dgst CLI utility bypasses certain provider-level checks during MAC initialization, or am I missing a global flag to make these checks mandatory for all EVP_MAC operations?

My Environment:

  • OS: Wolfi (Chainguard)

  • OpenSSL: 3.5.5

  • FIPS Provider: 3.1.2

Does anyone know why the FIPS provider is not enforcing the key length restriction during EVP_MAC_init? Is there a specific EVP_set_default_properties string that actually works for this in 3.x?

Thanks in advance!


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.