OPENSSL-ENV(7ossl)

πŸ’– OPENSSL-ENV πŸ’–

okay bestie, welcome to the openssl-env page β€” that's section 7ossl of the OpenSSL manual, and honestly? it's the cheat sheet of every environment variable the OpenSSL libraries will peek at. grab a snack, we're going through all of them πŸ’…

✨ NAME ✨

openssl-env β€” OpenSSL environment variables, aka the secret little knobs the libraries read from your shell πŸŽ€

🌸 DESCRIPTION 🌸

so here's the vibe: the OpenSSL libraries use environment variables to override the compiled-in default paths for all kinds of data. cute, right? but β€” and this is the important part β€” to avoid security risks, the environment is usually not consulted when the executable is set-user-ID or set-group-ID. no cap, that's a real thing 🫢


πŸ¦‹ the variables, one by one

  • CTLOG_FILE β€” gives the path to a certificate transparency log list. see CTLOG_STORE_new(3). ⭐
  • OPENSSL β€” gives the path to the openssl executable. it's used by the rehash script (see "Script Configuration" in openssl-rehash(1)) and by the CA.pl script (see "NOTES" in CA.pl(1)).
  • OPENSSL_CONF, OPENSSL_CONF_INCLUDE β€” gives the path to a configuration file, plus the directory for included files. see config(5). πŸ’œ
  • OPENSSL_CONFIG β€” gives a configuration option and filename for the req and ca commands when they're invoked by the CA.pl script. see CA.pl(1).
  • OPENSSL_ENGINES β€” gives the directory that dynamic engines get loaded from. see openssl-engine(1). πŸ”₯
  • OPENSSL_MALLOC_FD, OPENSSL_MALLOC_FAILURES β€” if OpenSSL was built with debugging, this lets memory allocation fail on purpose. see OPENSSL_malloc(3).
  • OPENSSL_MODULES β€” gives the directory that cryptographic providers get loaded from. equivalently, you can use the generic -provider-path command-line option instead. ✨
  • OPENSSL_TRACE β€” by default, the OpenSSL trace feature is disabled statically. to enable it, OpenSSL has to be built with tracing support, which you can configure like this:
./config enable-trace

unless OpenSSL tracing support is generally disabled, you can turn on trace output for specific parts of the OpenSSL libraries by name. this output usually only makes sense if you know OpenSSL internals well πŸ‘‘

the value of this environment variable is a comma-separated list of names, and here's what's available:

  • TRACE β€” traces the OpenSSL trace API itself.
  • INIT β€” traces OpenSSL library initialization and cleanup.
  • TLS β€” traces the TLS/SSL protocol.
  • TLS_CIPHER β€” traces the ciphers used by the TLS/SSL protocol.
  • CONF β€” shows details about provider and engine configuration.
  • ENGINE_TABLE β€” the function that's used by RSA, DSA (etc) code to select registered ENGINEs, cache defaults and functional references (etc), will generate debugging summaries.
  • ENGINE_REF_COUNT β€” reference counts in the ENGINE structure will be monitored with a line generated for each change.
  • PKCS5V2 β€” traces PKCS#5 v2 key generation.
  • PKCS12_KEYGEN β€” traces PKCS#12 key generation.
  • PKCS12_DECRYPT β€” traces PKCS#12 decryption.
  • X509V3_POLICY β€” generates the complete policy tree at various points during X.509 v3 policy evaluation.
  • BN_CTX β€” traces BIGNUM context operations.
  • CMP β€” traces CMP client and server activity.
  • STORE β€” traces STORE operations.
  • DECODER β€” traces decoder operations.
  • ENCODER β€” traces encoder operations.
  • REF_COUNT β€” traces decrementing certain ASN.1 structure references.
  • HTTP β€” traces the HTTP client and server, like messages being sent and received. 🌈
  • OPENSSL_RUNNING_UNIT_TESTS β€” this one flags the fact that unit tests are being run (i.e. make test). it's how OpenSSL detects that it should behave in a special manner during unit tests (i.e. when unit tests are being run on fuzzing builds). it should generally not be set by users, bestie πŸ™ˆ
  • OPENSSL_WIN32_UTF8 β€” if it's set, then UI_OpenSSL(3) returns UTF-8 encoded strings instead of ones encoded in the current code page, and the openssl(1) program also transcodes the command-line parameters from the current code page to UTF-8. this environment variable is only checked on Microsoft Windows platforms. πŸ“
  • RANDFILE β€” the state file for the random number generator. honestly you shouldn't need this in normal use. see RAND_load_file(3).
  • SSL_CERT_DIR, SSL_CERT_FILE β€” specify the default directory or file containing CA certificates. SSL_CERT_DIR can contain multiple directories separated by colons (or semicolons on Windows). see SSL_CTX_load_verify_locations(3). πŸ’–
  • TSGET β€” additional arguments for the tsget(1) command.
  • OPENSSL_ia32cap, OPENSSL_sparcv9cap, OPENSSL_ppccap, OPENSSL_armcap, OPENSSL_s390xcap, OPENSSL_riscvcap β€” OpenSSL supports a number of different algorithm implementations for various machines and, by default, it determines which to use based on the processor capabilities and run time feature enquiry. these environment variables let you exert more control over that selection process. see OPENSSL_armcap(3), OPENSSL_ia32cap(3), OPENSSL_ppccap(3), OPENSSL_riscvcap(3) and OPENSSL_s390xcap(3). ⭐
  • NO_PROXY, HTTPS_PROXY, HTTP_PROXY β€” specify a proxy hostname. see OSSL_HTTP_parse_url(3). 🧚
  • QLOGDIR β€” specifies a QUIC qlog output directory. see openssl-qlog(7).
  • OSSL_QFILTER β€” used to set a QUIC qlog filter specification. see openssl-qlog(7). πŸ’œ
  • SSLKEYLOGFILE β€” used to produce the standard format output file for SSL key logging. optionally set this variable to a filename to log all secrets produced by SSL connections. note: using this environment variable is predicated on configuring OpenSSL at build time with the enable-sslkeylog feature. the file format standard lives at <https://datatracker.ietf.org/doc/draft-ietf-tls-keylogfile/>.
🚨 bestie, real talk: the use of SSLKEYLOGFILE poses an explicit security risk. by recording the exchanged keys during an SSL session, it allows any available party with read access to the file to decrypt application traffic sent over that session. use of this feature should be restricted to test and debug environments only. πŸ’€

Copyright 2019-2026 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>. 🌸


and that's the whole page, bestie β€” you ate that 🫢✨ this was OPENSSL-ENV(7ossl), version 3.5.9, dated 2026-09-29. go forth and configure responsibly, mwah πŸ’…πŸŽ€

πŸ“¦ where this page comes from