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