OPENSSL-ENV(7ossl)

πŸ“¦
version 15.1 Β· 3 versions
, in freebsd 15.1

πŸŽ€ NAME

openssl-env β€” OpenSSL environment variables (this is page OPENSSL-ENV(7ossl) bestie, section 7, the ossl one, we're in the env-var zone πŸ’…)


✨ DESCRIPTION ✨

okay so here's the tea 🍡 β€” the OpenSSL libraries use environment variables to override the compiled-in default paths for all kinds of data. Very "I know a shortcut" of them.

but security moment 🚨: to avoid security risks, the environment is usually not consulted when the executable is set-user-ID or set-group-ID. so if you're in setuid/setgid land, don't expect your cute little env vars to be read. them's the rules.

now the actual variables, one by one, no skips, no cap 🫢


🌈 THE VARIABLES

  • CTLOG_FILE β€” specifies the path to a certificate transparency log list. see CTLOG_STORE_new(3). πŸ”₯
  • OPENSSL β€” specifies the path to the openssl executable. it's used by the rehash script (peep "Script Configuration" in openssl-rehash(1)) and by the CA.pl script (peep "NOTES" in CA.pl(1)).
  • OPENSSL_CONF, OPENSSL_CONF_INCLUDE β€” specifies the path to a configuration file, and the directory for included files. see config(5). πŸŽ€
  • OPENSSL_CONFIG β€” specifies a configuration option and filename for the req and ca commands invoked by the CA.pl script. see CA.pl(1).
  • OPENSSL_ENGINES β€” specifies the directory from which dynamic engines are loaded. see openssl-engine(1). βš™οΈ
  • OPENSSL_MALLOC_FD, OPENSSL_MALLOC_FAILURES β€” if built with debugging, this allows memory allocation to fail. see OPENSSL_malloc(3). (chaos mode, only if you built for it πŸ’€)
  • OPENSSL_MODULES β€” specifies the directory from which cryptographic providers are loaded. equivalently, the generic -provider-path command-line option may be used.
  • OPENSSL_TRACE β€” okay so by default the OpenSSL trace feature is disabled statically. to enable it, OpenSSL must be built with tracing support, which you can configure like this:
./config enable-trace

unless OpenSSL tracing support is generally disabled, you enable trace output of specific parts of the OpenSSL libraries, by name. this output usually makes sense only if you know OpenSSL internals well β€” like, genuinely, it's for the people who live inside the source tree 🧚.

the value of this environment variable is a comma-separated list of names, and the available names are the ones listed below 🌟

  • OPENSSL_RUNNING_UNIT_TESTS β€” this one is used to flag the fact that unit tests are being run (i.e. make test). it's used to detect when OpenSSL 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 πŸ™ˆ β€” like, this is not for you, bestie, this is internal business.

πŸ” the OPENSSL_TRACE name list ✨

(this list is OPENSSL_TRACE's whole thing β€” the manpage just parks it down here after OPENSSL_RUNNING_UNIT_TESTS, which is a lil quirky but iconic of it, so we're keeping it exactly where it is 🫢)

  • TRACE β€” traces the OpenSSL trace API itself. so meta, obsessed. πŸͺž
  • 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 β€” show details about provider and engine configuration.
  • ENGINE_TABLE β€” the function that is 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 of 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, such as messages being sent and received. 🌐

πŸ¦‹ and back to the rest of the variables

  • OPENSSL_WIN32_UTF8 β€” if set, then UI_OpenSSL(3) returns UTF-8 encoded strings rather than 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. this should not be needed in normal use. see RAND_load_file(3).
  • SSL_CERT_DIR, SSL_CERT_FILE β€” specify the default directory or file containing CA certificates. 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 can be used to exert more control over this selection process. see 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, use of the environment variable is predicated on configuring OpenSSL at build time with the enable-sslkeylog feature. the file format standard can be found at https://datatracker.ietf.org/doc/draft-ietf-tls-keylogfile/.
🚨 note: 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. like genuinely, test and debug only, do not ship this, i am begging πŸ›‘πŸ˜­

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 🫢 this one shipped as version 3.5.6, dated 2026-04-07, and it's the OPENSSL-ENV(7ossl) page β€” read it, love it, go set your env vars responsibly πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from