# OpenSSL and legacy ciphers

**URL:** <https://forum.crystal-lang.org/t/openssl-and-legacy-ciphers/7950>\
**Category:** Help & Support\
**Created:** [April 11, 2025, 4:34pm UTC](https://forum.crystal-lang.org/t/openssl-and-legacy-ciphers/7950 "2025-04-11T16:34:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BloodFeastMan](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/bloodfeastman/32/2284_2.png) [@BloodFeastMan](https://forum.crystal-lang.org/u/BloodFeastMan)\
**Post date:** [April 11, 2025, 4:34pm UTC](https://forum.crystal-lang.org/t/openssl-and-legacy-ciphers/7950/1 "2025-04-11T16:34:10Z")

</div>

Generic question, is there a way to have the openssl package use ciphers that were moved to legacy library after OpenSSL v3.x?

Edit: I know I can use the legacy ciphers on the openssl command line, not sure why it never occurred to me to make them available in a custom opesnssl.cnf, so .. nevermind, the Crystal openssl package will now do what I’d intended.

---

<div class="post-metadata">

**Author:** ![BloodFeastMan](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/bloodfeastman/32/2284_2.png) [@BloodFeastMan](https://forum.crystal-lang.org/u/BloodFeastMan)\
**Post date:** [April 15, 2025, 12:51pm UTC](https://forum.crystal-lang.org/t/openssl-and-legacy-ciphers/7950/4 "2025-04-15T12:51:15Z")

</div>

I seem to have received two replies to the post I’d made regarding OpenSSL and legacy ciphers that appear in my email, but I don’t see them on the actual forum (?)

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/blacksmoke16/32/1241_2.png) [@Blacksmoke16](https://forum.crystal-lang.org/u/Blacksmoke16)\
**Post date:** [April 15, 2025, 12:58pm UTC](https://forum.crystal-lang.org/t/openssl-and-legacy-ciphers/7950/5 "2025-04-15T12:58:04Z")

</div>

They were removed as were just spam replies.

---

<div class="post-metadata">

**Author:** ![BloodFeastMan](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/bloodfeastman/32/2284_2.png) [@BloodFeastMan](https://forum.crystal-lang.org/u/BloodFeastMan)\
**Post date:** [April 15, 2025, 6:48pm UTC](https://forum.crystal-lang.org/t/openssl-and-legacy-ciphers/7950/6 "2025-04-15T18:48:05Z")

</div>

With regard to this initial post, I have a specific case use for cast5, and making a custom openssl.cnf worked when I tested at home. However, here at work, I use a Windows computer, and I made an environment variable OPENSSL\_CONF to point to a modified openssl.cnf kept in /mingw64/.. I made a --static binary and everything worked fine. However, when I retired that particular environment variable, I get a “cipher not supported” error. I re-establish that env variable, and it works again. I would’ve thought that making a --static binary would’ve written the legacy provider into the program, was I mistaken in that assumption? Also, I’m not a programmer or anything, so I really just don’t know.

---

<div class="post-metadata">

**Author:** ![straight-shoota](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/straight-shoota/32/36_2.png) [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Post date:** [April 15, 2025, 9:03pm UTC](https://forum.crystal-lang.org/t/openssl-and-legacy-ciphers/7950/7 "2025-04-15T21:03:00Z")

</div>

`openssl.cnf` is runtime configuration. It gets evaluated every time your program runs (uses OpenSSL), not at compile time.
