OPENSSL_USER_MACROS(7SSL)
π NAME π
openssl_user_macros, OPENSSL_API_COMPAT, OPENSSL_NO_DEPRECATED β user defined macros, bestie. yes it's giving header-file sorcery and it's literally the manual page (7SSL, sshh, we got you).
β¨ DESCRIPTION β¨
Okay so picture this: user defined macros are the little switches you get to flip that control certain aspects of what the OpenSSL headers actually expose to your code. They're not doing the crypto for you, they're deciding what even shows up at the party. π
π¨ NOTE, and this part is not a vibe, it's a rule: to be effective, a user defined macro must be defined before you include any header file that depends on it. Two ways: in the compilation command (cc -DMACRO=value), or by defining the macro in your source before including any headers. Do it after and it's justβ¦ decorative. π
Also, other manual pages may refer to this page when declarations depend on user defined macros. So when you see a "hey go read OPENSSL_USER_MACROS" in the docs, that's not a threat, that's just the receipt. π§Ύ
π The macros π
OPENSSL_API_COMPATβ this one takes a value that's a version number, and you can write it in one of the following two forms:"0xMNNFF000L"β this is the form that's supported for all versions up to 1.1.x. Break it down:Mis the major number,NNis the minor number, andFFis the fix number, given as a hexadecimal number. So for version 1.1.0, that's0x10100000L. πΈ
You can give any version number you want, but these are the current known major deprecation points, which makes them the most meaningful ones:
0x00908000L(version 0.9.8)0x10000000L(version 1.0.0)0x10100000L(version 1.1.0)
And for convenience, higher numbers are accepted as well, as long as they're feasible. Like, for example, 0x60000000L will work as expected. Slay. However β and the docs are being so real about this β it is recommended to start using the second form instead. π
"mmnnpp"β this form is a simple decimal number, calculated with this formula:
major * 10000 + minor * 100 + patch
where major, minor and patch are the desired major, minor and patch components of the version number. For example:
30000 corresponds to version 3.0.0
10002 corresponds to version 1.0.2
420101 corresponds to version 42.1.1
(yes, 42.1.1. they knew what they were doing. π¦)
If OPENSSL_API_COMPAT is undefined, this default value gets used in its place instead: 40000.
OPENSSL_NO_DEPRECATEDβ if this macro is defined, all deprecated public symbols in all OpenSSL versions up to and including the version given byOPENSSL_API_COMPAT(or the default value given above, whenOPENSSL_API_COMPATisn't defined) will be hidden. Gone. Blocked. Not even a read receipt. πOPENSSL_ENGINE_STUBSβ so the ENGINE API, as defined inopenssl/engine.h, was permanently removed in OpenSSL 4.0. periodt. π
Your user application can use the define OPENSSL_ENGINE_STUBS to enable stub macros for API ENGINE functions. It should temporarily help the easy transition of applications without source code modifications. It's like a little emotional support shim. π«Ά
β οΈ Note that all stub macros emulate API function failures. They will not restore the removed API, even if the OPENSSL_API_COMPAT define is used. So it's a bridge, not a resurrection. π
π COPYRIGHT π
Copyright 2018-2021 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>.
okay that's the whole page bestie, no cap, every flag and every version number accounted for π and if you need the receipts: this is version 4.0.3, dated 2026-09-29, filed under OPENSSL_USER_MACROS(7SSL). now go define your macros before your includes. mwah. π
β¨
π¦ 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