OPENSSL-ENV(7SSL)
π NAME π
openssl-env β OpenSSL environment variables π aka the little levers you can pull from your shell to make OpenSSL do what you want. (This page is 7SSL, bestie, so you know it's manual section 7.)
β¨ DESCRIPTION β¨
okay so here's the vibe π: the OpenSSL libraries and commands read environment variables to override compiled-in defaults for like, a whole bunch of their behaviour. Cute, right? π
but π¨ listen β to avoid security risks, the environment is not consulted for security-sensitive environment variables when the executable is set-user-ID or set-group-ID. Setuid binaries basically said "not today, bestie" π
Every variable below gets its own lil security vibe check too, so you always know where you stand π«Ά
π CTLOG_FILE
Tells OpenSSL where the certificate transparency log list lives β it's the path to that file. See CTLOG_STORE_new(3).
π¨ This one is a security-sensitive environment variable. Handle with care, queen.
π HOME, SYSTEMROOT, USERPROFILE
This is the path that RAND_file_name(3) uses as the directory for the random seed file name β but only when the RANDFILE environment variable is not set. Important deets:
- on Unix-like systems,
HOMEis the only one of these that even gets looked at; - on Windows platforms,
USERPROFILEandSYSTEMROOTare used as fallbacks.
π¨HOMEis a security-sensitive environment variable. The others in this trio get a pass, butHOME? No ma'am.
π HTTPS_PROXY, HTTP_PROXY, NO_PROXY, https_proxy, http_proxy, no_proxy
Specifies a proxy hostname. That's it, that's the job β¨ See OSSL_HTTP_parse_url(3).
π¨ All of these are security-sensitive environment variables.
πͺ LEGACY_GOST_PKCS12
Changes the way the MAC is generated inside PKCS#12 containers for GOST algorithms. See PKCS12_gen_mac(3).
π¨ Security-sensitive environment variable, bestie.
π§ OPENSSL
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)).
π«Ά This variable is not considered security-sensitive.
π OPENSSL_CONF, OPENSSL_CONF_INCLUDE
Specifies the path to a configuration file, plus the directory for included files. See config(5).
π¨ Both of these are security-sensitive environment variables.
βοΈ OPENSSL_CONFIG
Specifies a configuration option and filename for the req and ca commands when they're invoked by the CA.pl script. See CA.pl(1).
π«Ά This variable is not considered security-sensitive.
π₯οΈ OPENSSL_DEBUG_DECC_INIT
On VMS only: if this variable is set, it enables verbose output of parsing of "DECC$*" logical names β those are the ones that contain C RTL features β during library initialisation ("LIB$INITIALIZE"). And if the value of the variable is more than 1, it outputs information about every processed feature. Very extra, we love that πΈ
π«Ά This variable is not considered security-sensitive.
π§ OPENSSL_MALLOC_FAILURES, OPENSSL_MALLOC_FD, OPENSSL_MALLOC_SEED
If OpenSSL was built with debugging, this trio lets memory allocation fail on purpose. See OPENSSL_malloc(3).
π«Ά These variables are not considered security-sensitive.
π¦ OPENSSL_MODULES
Specifies the directory that cryptographic providers get loaded from. Equivalently, you can use the generic -provider-path command-line option instead β same energy, different door πͺ
π¨ This variable is a security-sensitive environment variable.
π§ͺ OPENSSL_RUNNING_UNIT_TESTS
This one is used to flag the fact that unit tests are being run (i.e. make test). It's how OpenSSL detects when 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, so hands off unless you know why you're here π
This variable is available only when OpenSSL is built with -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION.
π«Ά This variable is not considered security-sensitive.
π OPENSSL_SEC_MEM
Initializes the secure memory at the beginning of the application, which makes the secure memory calls not fall back to regular memory calls πͺ The value indicates the size parameter in bytes. The value can be expressed in binary, octal, decimal and hexadecimal. For formatting see strtol(3). For further restrictions see CRYPTO_secure_malloc_init(3).
π«Ά This variable is not considered security-sensitive.
π OPENSSL_SEC_MEM_MINSIZE
An optional variable used together with OPENSSL_SEC_MEM. The value indicates the minsize parameter in bytes. Same formatting applies as above. The default is 0. For more info see CRYPTO_secure_malloc_init(3).
π«Ά This variable is not considered security-sensitive.
π§« OPENSSL_TEST_LIBCTX
This test-only environment variable, which is recognised by the openssl(1) command, when set to "1", leads to the creation of a nondefault library context by the command β and for that context, the -config option then takes effect π
π«Ά This variable is not considered security-sensitive.
π OPENSSL_TRACE
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 can enable trace output of specific parts of the OpenSSL libraries, by name. Real talk though: this output usually makes sense only if you know OpenSSL internals well π§
The value of this environment variable is a comma-separated list of names, and here's every available one:
ALLβ Traces everything. All of it. The whole buffet πBN_CTXβ TracesBIGNUMcontext operations.CMPβ Traces CMP client and server activity.CONFβ Show details about provider configuration.DECODERβ Traces decoder operations.ENCODERβ Traces encoder operations.HTTPβ Traces the HTTP client and server, such as messages being sent and received.INITβ Traces OpenSSL library initialization and cleanup.PKCS12_DECRYPTβ Traces PKCS#12 decryption.PKCS12_KEYGENβ Traces PKCS#12 key generation.PKCS5V2β Traces PKCS#5 v2 key generation.PROVIDERβ Traces various operations that are performed on OpenSSL providers during their handling by the library (seeprovider(7)), such as initialisation, tear down, parameter and capability retrieval, self-test, and so on.QUERYβ Traces operations related to addition, removal, and fetching of methods in the so-called method store, that holds pointers to functions provided by various providers.REF_COUNTβ Traces reference count changes in various structures, including"BIO","DH","DSA","EC_KEY","ECX_KEY","EVP_PKEY","EVP_SKEY","RSA","SSL","SSL_CTX","SSL_SESSION","X509_CRL","X509_STORE","X509", and some others.STOREβ Traces STORE operations.TLSβ Traces the TLS/SSL protocol.TLS_CIPHERβ Traces the ciphers used by the TLS/SSL protocol.TRACEβ Traces the OpenSSL trace API itself. Trace inception πX509V3_POLICYβ Generates the complete policy tree at various points during X.509 v3 policy evaluation.
π«Ά This variable is not considered security-sensitive.
πͺ 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 π¦ Heads up: this environment variable is only checked on Microsoft Windows platforms.
π‘οΈ OPENSSL_armcap, OPENSSL_ia32cap, OPENSSL_ppccap, OPENSSL_riscvcap, OPENSSL_s390xcap, OPENSSL_sparcv9cap
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).
π«Ά These variables are not considered security-sensitive.
π OSSL_QFILTER
Used to set a QUIC qlog filter specification. See openssl-qlog(7).
π¨ This variable is a security-sensitive environment variable.
π QLOGDIR
Specifies a QUIC qlog output directory. See openssl-qlog(7).
π¨ This variable is a security-sensitive environment variable.
π² RANDFILE
The state file for the random number generator. Real talk: this should not be needed in normal use. See RAND_load_file(3).
π¨ This variable is a security-sensitive environment variable.
π 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 that use of this 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. No cap. Not the vibe for production π
π¨ This variable is a security-sensitive environment variable.
π 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).
π¨ These variables are security-sensitive environment variables β except inopenssl-rehash(1), whereSSL_CERT_DIRis not considered security-sensitive. Special lil exception, we love a plot twist β¨
π SSL_CIPHER
Used by openssl-s_time(1) in case the -cipher option (that's the one that allows modifying the TLSv1.2 and below cipher list sent by the client) is not provided, for specification of the aforementioned ciphers.
π«Ά This variable is not considered security-sensitive.
π TSGET
Additional arguments for the tsget(1) command.
π«Ά This variable is not considered security-sensitive.
π HISTORY π
okay bestie, gather round, this section is the graveyard πͺ¦ β these are environment variables that the OpenSSL libraries and commands do not consider anymore. They're retired. They served their time. We still document them so you're not sitting there like "why is my env doing nothing??" π
π HARNESS_OSSL_PREFIX π
this one lived its little life in OpenSSL versions from 1.1.1 up to 3.5, and it let you specify a prefix that got prepended to every single line that openssl(1) sent to stdout πβ¨. Why tho? Because the test harness used it β it kept the output of the command under test from commingling (yes that's the word, it's giving fancier than "getting mixed up") with the output meant for the TAP consumer π«Ά.
sadly it is no longer considered. rip bozo π
lowkey important note: this variable was not considered security-sensitive. So you can unclench π
π¦ OPENSSL_ENGINES π¦
this one specified the directory that dynamic engines were loaded from π β like, "hey, the engines live here". Support for it was removed in OpenSSL 4.0, so if you're still setting it, that's a β¨nostalgia actβ¨ and nothing more. it does absolutely nothing now, no cap π
π COPYRIGHT π
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, we ate that fr fr πβ¨ this was the OPENSSL-ENV(7SSL) page, from OpenSSL 4.0.3, dated 2026-09-29 β screenshot it, bookmark it, tattoo it, whichever vibe you're on π
π¦ mwah, go forth and read your env vars π
π¦ where this page comes from
- ubuntu stonking: openssl 4.0.3-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms