2018-12-03 03:37:30 +08:00
|
|
|
=pod
|
|
|
|
|
|
|
|
=head1 NAME
|
|
|
|
|
2020-10-06 22:11:17 +08:00
|
|
|
openssl_user_macros, OPENSSL_API_COMPAT, OPENSSL_NO_DEPRECATED
|
|
|
|
- User defined macros
|
2018-12-03 03:37:30 +08:00
|
|
|
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
|
|
|
User defined macros allow the programmer to control certain aspects of
|
|
|
|
what is exposed by the OpenSSL headers.
|
|
|
|
|
|
|
|
B<NOTE:> to be effective, a user defined macro I<must be defined
|
|
|
|
before including any header file that depends on it>, either in the
|
|
|
|
compilation command (C<cc -DMACRO=value>) or by defining the macro in
|
|
|
|
source before including any headers.
|
|
|
|
|
|
|
|
Other manual pages may refer to this page when declarations depend on
|
|
|
|
user defined macros.
|
|
|
|
|
|
|
|
=head2 The macros
|
|
|
|
|
2019-02-20 03:24:08 +08:00
|
|
|
=over 4
|
2018-12-03 03:37:30 +08:00
|
|
|
|
|
|
|
=item B<OPENSSL_API_COMPAT>
|
|
|
|
|
2020-01-07 02:49:26 +08:00
|
|
|
The value is a version number, given in one of the following two forms:
|
2018-11-30 07:05:03 +08:00
|
|
|
|
2019-02-20 03:24:08 +08:00
|
|
|
=over 4
|
2018-11-30 07:05:03 +08:00
|
|
|
|
|
|
|
=item C<0xMNNFF000L>
|
|
|
|
|
2020-01-07 02:49:26 +08:00
|
|
|
This is the form supported for all versions up to 1.1.x, where C<M>
|
2018-11-30 07:05:03 +08:00
|
|
|
represents the major number, C<NN> represents the minor number, and
|
2020-01-07 02:49:26 +08:00
|
|
|
C<FF> represents the fix number, as a hexadecimal number. For version
|
|
|
|
1.1.0, that's C<0x10100000L>.
|
2018-11-30 07:05:03 +08:00
|
|
|
|
|
|
|
Any version number may be given, but these numbers are
|
2018-12-03 03:37:30 +08:00
|
|
|
the current known major deprecation points, making them the most
|
|
|
|
meaningful:
|
|
|
|
|
2019-02-20 03:24:08 +08:00
|
|
|
=over 4
|
2018-12-03 03:37:30 +08:00
|
|
|
|
|
|
|
=item C<0x00908000L> (version 0.9.8)
|
|
|
|
|
|
|
|
=item C<0x10000000L> (version 1.0.0)
|
|
|
|
|
|
|
|
=item C<0x10100000L> (version 1.1.0)
|
|
|
|
|
|
|
|
=back
|
|
|
|
|
2018-11-30 07:05:03 +08:00
|
|
|
For convenience, higher numbers are accepted as well, as long as
|
|
|
|
feasible. For example, C<0x60000000L> will work as expected.
|
|
|
|
However, it is recommended to start using the second form instead:
|
|
|
|
|
2020-01-07 02:49:26 +08:00
|
|
|
=item C<mmnnpp>
|
|
|
|
|
|
|
|
This form is a simple decimal number calculated with this formula:
|
|
|
|
|
|
|
|
I<major> * 10000 + I<minor> * 100 + I<patch>
|
2018-11-30 07:05:03 +08:00
|
|
|
|
2020-01-07 02:49:26 +08:00
|
|
|
where I<major>, I<minor> and I<patch> are the desired major,
|
|
|
|
minor and patch components of the version number. For example:
|
2018-11-30 07:05:03 +08:00
|
|
|
|
2019-02-20 03:24:08 +08:00
|
|
|
=over 4
|
2018-11-30 07:05:03 +08:00
|
|
|
|
2020-01-07 02:49:26 +08:00
|
|
|
=item 30000 corresponds to version 3.0.0
|
2018-11-30 07:05:03 +08:00
|
|
|
|
2020-01-07 02:49:26 +08:00
|
|
|
=item 10002 corresponds to version 1.0.2
|
2018-11-30 07:05:03 +08:00
|
|
|
|
2020-01-07 02:49:26 +08:00
|
|
|
=item 420101 corresponds to version 42.1.1
|
2018-11-30 07:05:03 +08:00
|
|
|
|
|
|
|
=back
|
|
|
|
|
|
|
|
=back
|
|
|
|
|
2021-06-30 12:31:58 +08:00
|
|
|
If B<OPENSSL_API_COMPAT> is undefined, this default value is used in its
|
|
|
|
place:
|
2018-12-03 03:37:30 +08:00
|
|
|
C<{- join('', map { my @x = split /=/,$_; $x[1] }
|
2020-01-07 02:49:26 +08:00
|
|
|
grep /^OPENSSL_CONFIGURED_API=/, @{$config{openssl_api_defines} // []})
|
2018-12-03 03:37:30 +08:00
|
|
|
|| '0x00000000L'
|
2021-06-30 12:31:58 +08:00
|
|
|
-}>
|
2018-12-03 03:37:30 +08:00
|
|
|
|
2020-01-07 02:49:26 +08:00
|
|
|
=item B<OPENSSL_NO_DEPRECATED>
|
|
|
|
|
|
|
|
If this macro is defined, all deprecated public symbols in all OpenSSL
|
|
|
|
versions up to and including the version given by B<OPENSSL_API_COMPAT>
|
2021-06-30 12:31:58 +08:00
|
|
|
(or the default value given above, when B<OPENSSL_API_COMPAT> isn't defined)
|
2020-01-07 02:49:26 +08:00
|
|
|
will be hidden.
|
|
|
|
|
2018-12-03 03:37:30 +08:00
|
|
|
=back
|
|
|
|
|
|
|
|
=head1 COPYRIGHT
|
|
|
|
|
2021-07-29 22:41:35 +08:00
|
|
|
Copyright 2018-2021 The OpenSSL Project Authors. All Rights Reserved.
|
2018-12-03 03:37:30 +08:00
|
|
|
|
2018-12-06 21:05:22 +08:00
|
|
|
Licensed under the Apache License 2.0 (the "License"). You may not use
|
2018-12-03 03:37:30 +08:00
|
|
|
this file except in compliance with the License. You can obtain a copy
|
|
|
|
in the file LICENSE in the source distribution or at
|
|
|
|
L<https://www.openssl.org/source/license.html>.
|
|
|
|
|
|
|
|
=cut
|