1e1051a39Sopenharmony_ci=pod 2e1051a39Sopenharmony_ci 3e1051a39Sopenharmony_ci=head1 NAME 4e1051a39Sopenharmony_ci 5e1051a39Sopenharmony_ciopenssl_user_macros, OPENSSL_API_COMPAT, OPENSSL_NO_DEPRECATED 6e1051a39Sopenharmony_ci- User defined macros 7e1051a39Sopenharmony_ci 8e1051a39Sopenharmony_ci=head1 DESCRIPTION 9e1051a39Sopenharmony_ci 10e1051a39Sopenharmony_ciUser defined macros allow the programmer to control certain aspects of 11e1051a39Sopenharmony_ciwhat is exposed by the OpenSSL headers. 12e1051a39Sopenharmony_ci 13e1051a39Sopenharmony_ciB<NOTE:> to be effective, a user defined macro I<must be defined 14e1051a39Sopenharmony_cibefore including any header file that depends on it>, either in the 15e1051a39Sopenharmony_cicompilation command (C<cc -DMACRO=value>) or by defining the macro in 16e1051a39Sopenharmony_cisource before including any headers. 17e1051a39Sopenharmony_ci 18e1051a39Sopenharmony_ciOther manual pages may refer to this page when declarations depend on 19e1051a39Sopenharmony_ciuser defined macros. 20e1051a39Sopenharmony_ci 21e1051a39Sopenharmony_ci=head2 The macros 22e1051a39Sopenharmony_ci 23e1051a39Sopenharmony_ci=over 4 24e1051a39Sopenharmony_ci 25e1051a39Sopenharmony_ci=item B<OPENSSL_API_COMPAT> 26e1051a39Sopenharmony_ci 27e1051a39Sopenharmony_ciThe value is a version number, given in one of the following two forms: 28e1051a39Sopenharmony_ci 29e1051a39Sopenharmony_ci=over 4 30e1051a39Sopenharmony_ci 31e1051a39Sopenharmony_ci=item C<0xMNNFF000L> 32e1051a39Sopenharmony_ci 33e1051a39Sopenharmony_ciThis is the form supported for all versions up to 1.1.x, where C<M> 34e1051a39Sopenharmony_cirepresents the major number, C<NN> represents the minor number, and 35e1051a39Sopenharmony_ciC<FF> represents the fix number, as a hexadecimal number. For version 36e1051a39Sopenharmony_ci1.1.0, that's C<0x10100000L>. 37e1051a39Sopenharmony_ci 38e1051a39Sopenharmony_ciAny version number may be given, but these numbers are 39e1051a39Sopenharmony_cithe current known major deprecation points, making them the most 40e1051a39Sopenharmony_cimeaningful: 41e1051a39Sopenharmony_ci 42e1051a39Sopenharmony_ci=over 4 43e1051a39Sopenharmony_ci 44e1051a39Sopenharmony_ci=item C<0x00908000L> (version 0.9.8) 45e1051a39Sopenharmony_ci 46e1051a39Sopenharmony_ci=item C<0x10000000L> (version 1.0.0) 47e1051a39Sopenharmony_ci 48e1051a39Sopenharmony_ci=item C<0x10100000L> (version 1.1.0) 49e1051a39Sopenharmony_ci 50e1051a39Sopenharmony_ci=back 51e1051a39Sopenharmony_ci 52e1051a39Sopenharmony_ciFor convenience, higher numbers are accepted as well, as long as 53e1051a39Sopenharmony_cifeasible. For example, C<0x60000000L> will work as expected. 54e1051a39Sopenharmony_ciHowever, it is recommended to start using the second form instead: 55e1051a39Sopenharmony_ci 56e1051a39Sopenharmony_ci=item C<mmnnpp> 57e1051a39Sopenharmony_ci 58e1051a39Sopenharmony_ciThis form is a simple decimal number calculated with this formula: 59e1051a39Sopenharmony_ci 60e1051a39Sopenharmony_ciI<major> * 10000 + I<minor> * 100 + I<patch> 61e1051a39Sopenharmony_ci 62e1051a39Sopenharmony_ciwhere I<major>, I<minor> and I<patch> are the desired major, 63e1051a39Sopenharmony_ciminor and patch components of the version number. For example: 64e1051a39Sopenharmony_ci 65e1051a39Sopenharmony_ci=over 4 66e1051a39Sopenharmony_ci 67e1051a39Sopenharmony_ci=item 30000 corresponds to version 3.0.0 68e1051a39Sopenharmony_ci 69e1051a39Sopenharmony_ci=item 10002 corresponds to version 1.0.2 70e1051a39Sopenharmony_ci 71e1051a39Sopenharmony_ci=item 420101 corresponds to version 42.1.1 72e1051a39Sopenharmony_ci 73e1051a39Sopenharmony_ci=back 74e1051a39Sopenharmony_ci 75e1051a39Sopenharmony_ci=back 76e1051a39Sopenharmony_ci 77e1051a39Sopenharmony_ciIf B<OPENSSL_API_COMPAT> is undefined, this default value is used in its 78e1051a39Sopenharmony_ciplace: 79e1051a39Sopenharmony_ciC<{- join('', map { my @x = split /=/,$_; $x[1] } 80e1051a39Sopenharmony_ci grep /^OPENSSL_CONFIGURED_API=/, @{$config{openssl_api_defines} // []}) 81e1051a39Sopenharmony_ci || '0x00000000L' 82e1051a39Sopenharmony_ci -}> 83e1051a39Sopenharmony_ci 84e1051a39Sopenharmony_ci=item B<OPENSSL_NO_DEPRECATED> 85e1051a39Sopenharmony_ci 86e1051a39Sopenharmony_ciIf this macro is defined, all deprecated public symbols in all OpenSSL 87e1051a39Sopenharmony_civersions up to and including the version given by B<OPENSSL_API_COMPAT> 88e1051a39Sopenharmony_ci(or the default value given above, when B<OPENSSL_API_COMPAT> isn't defined) 89e1051a39Sopenharmony_ciwill be hidden. 90e1051a39Sopenharmony_ci 91e1051a39Sopenharmony_ci=back 92e1051a39Sopenharmony_ci 93e1051a39Sopenharmony_ci=head1 COPYRIGHT 94e1051a39Sopenharmony_ci 95e1051a39Sopenharmony_ciCopyright 2018-2021 The OpenSSL Project Authors. All Rights Reserved. 96e1051a39Sopenharmony_ci 97e1051a39Sopenharmony_ciLicensed under the Apache License 2.0 (the "License"). You may not use 98e1051a39Sopenharmony_cithis file except in compliance with the License. You can obtain a copy 99e1051a39Sopenharmony_ciin the file LICENSE in the source distribution or at 100e1051a39Sopenharmony_ciL<https://www.openssl.org/source/license.html>. 101e1051a39Sopenharmony_ci 102e1051a39Sopenharmony_ci=cut 103