VirtualBox

source: vbox/trunk/src/libs/openssl-3.1.0/doc/man7/migration_guide.pod@ 99507

最後變更 在這個檔案從99507是 99366,由 vboxsync 提交於 2 年 前

openssl-3.1.0: Applied and adjusted our OpenSSL changes to 3.0.7. bugref:10418

檔案大小: 78.7 KB
 
1=pod
2
3=head1 NAME
4
5migration_guide - OpenSSL migration guide
6
7=head1 SYNOPSIS
8
9See the individual manual pages for details.
10
11=head1 DESCRIPTION
12
13This guide details the changes required to migrate to new versions of OpenSSL.
14Currently this covers OpenSSL 3.0 & 3.1. For earlier versions refer to
15L<https://github.com/openssl/openssl/blob/master/CHANGES.md>.
16For an overview of some of the key concepts introduced in OpenSSL 3.0 see
17L<crypto(7)>.
18
19=head1 OPENSSL 3.1
20
21=head2 Main Changes from OpenSSL 3.0
22
23The FIPS provider in OpenSSL 3.1 includes some non-FIPS validated algorithms,
24consequently the property query C<fips=yes> is mandatory for applications that
25want to operate in a FIPS approved manner. The algorithms are:
26
27=over 4
28
29=item Triple DES ECB
30
31=item Triple DES CBC
32
33=item EdDSA
34
35=back
36
37There are no other changes requiring additional migration measures since OpenSSL 3.0.
38
39=head1 OPENSSL 3.0
40
41=head2 Main Changes from OpenSSL 1.1.1
42
43=head3 Major Release
44
45OpenSSL 3.0 is a major release and consequently any application that currently
46uses an older version of OpenSSL will at the very least need to be recompiled in
47order to work with the new version. It is the intention that the large majority
48of applications will work unchanged with OpenSSL 3.0 if those applications
49previously worked with OpenSSL 1.1.1. However this is not guaranteed and some
50changes may be required in some cases. Changes may also be required if
51applications need to take advantage of some of the new features available in
52OpenSSL 3.0 such as the availability of the FIPS module.
53
54=head3 License Change
55
56In previous versions, OpenSSL was licensed under the L<dual OpenSSL and SSLeay
57licenses|https://www.openssl.org/source/license-openssl-ssleay.txt>
58(both licenses apply). From OpenSSL 3.0 this is replaced by the
59L<Apache License v2|https://www.openssl.org/source/apache-license-2.0.txt>.
60
61=head3 Providers and FIPS support
62
63One of the key changes from OpenSSL 1.1.1 is the introduction of the Provider
64concept. Providers collect together and make available algorithm implementations.
65With OpenSSL 3.0 it is possible to specify, either programmatically or via a
66config file, which providers you want to use for any given application.
67OpenSSL 3.0 comes with 5 different providers as standard. Over time third
68parties may distribute additional providers that can be plugged into OpenSSL.
69All algorithm implementations available via providers are accessed through the
70"high level" APIs (for example those functions prefixed with C<EVP>). They cannot
71be accessed using the L</Low Level APIs>.
72
73One of the standard providers available is the FIPS provider. This makes
74available FIPS validated cryptographic algorithms.
75The FIPS provider is disabled by default and needs to be enabled explicitly
76at configuration time using the C<enable-fips> option. If it is enabled,
77the FIPS provider gets built and installed in addition to the other standard
78providers. No separate installation procedure is necessary.
79There is however a dedicated C<install_fips> make target, which serves the
80special purpose of installing only the FIPS provider into an existing
81OpenSSL installation.
82
83Not all algorithms may be available for the application at a particular moment.
84If the application code uses any digest or cipher algorithm via the EVP interface,
85the application should verify the result of the L<EVP_EncryptInit(3)>,
86L<EVP_EncryptInit_ex(3)>, and L<EVP_DigestInit(3)> functions. In case when
87the requested algorithm is not available, these functions will fail.
88
89See also L</Legacy Algorithms> for information on the legacy provider.
90
91See also L</Completing the installation of the FIPS Module> and
92L</Using the FIPS Module in applications>.
93
94=head3 Low Level APIs
95
96OpenSSL has historically provided two sets of APIs for invoking cryptographic
97algorithms: the "high level" APIs (such as the C<EVP> APIs) and the "low level"
98APIs. The high level APIs are typically designed to work across all algorithm
99types. The "low level" APIs are targeted at a specific algorithm implementation.
100For example, the EVP APIs provide the functions L<EVP_EncryptInit_ex(3)>,
101L<EVP_EncryptUpdate(3)> and L<EVP_EncryptFinal(3)> to perform symmetric
102encryption. Those functions can be used with the algorithms AES, CHACHA, 3DES etc.
103On the other hand, to do AES encryption using the low level APIs you would have
104to call AES specific functions such as L<AES_set_encrypt_key(3)>,
105L<AES_encrypt(3)>, and so on. The functions for 3DES are different.
106Use of the low level APIs has been informally discouraged by the OpenSSL
107development team for a long time. However in OpenSSL 3.0 this is made more
108formal. All such low level APIs have been deprecated. You may still use them in
109your applications, but you may start to see deprecation warnings during
110compilation (dependent on compiler support for this). Deprecated APIs may be
111removed from future versions of OpenSSL so you are strongly encouraged to update
112your code to use the high level APIs instead.
113
114This is described in more detail in L</Deprecation of Low Level Functions>
115
116=head3 Legacy Algorithms
117
118Some cryptographic algorithms such as B<MD2> and B<DES> that were available via
119the EVP APIs are now considered legacy and their use is strongly discouraged.
120These legacy EVP algorithms are still available in OpenSSL 3.0 but not by
121default. If you want to use them then you must load the legacy provider.
122This can be as simple as a config file change, or can be done programmatically.
123See L<OSSL_PROVIDER-legacy(7)> for a complete list of algorithms.
124Applications using the EVP APIs to access these algorithms should instead use
125more modern algorithms. If that is not possible then these applications
126should ensure that the legacy provider has been loaded. This can be achieved
127either programmatically or via configuration. See L<crypto(7)> man page for
128more information about providers.
129
130=head3 Engines and "METHOD" APIs
131
132The refactoring to support Providers conflicts internally with the APIs used to
133support engines, including the ENGINE API and any function that creates or
134modifies custom "METHODS" (for example L<EVP_MD_meth_new(3)>,
135L<EVP_CIPHER_meth_new(3)>, L<EVP_PKEY_meth_new(3)>, L<RSA_meth_new(3)>,
136L<EC_KEY_METHOD_new(3)>, etc.). These functions are being deprecated in
137OpenSSL 3.0, and users of these APIs should know that their use can likely
138bypass provider selection and configuration, with unintended consequences.
139This is particularly relevant for applications written to use the OpenSSL 3.0
140FIPS module, as detailed below. Authors and maintainers of external engines are
141strongly encouraged to refactor their code transforming engines into providers
142using the new Provider API and avoiding deprecated methods.
143
144=head3 Support of legacy engines
145
146If openssl is not built without engine support or deprecated API support, engines
147will still work. However, their applicability will be limited.
148
149New algorithms provided via engines will still work.
150
151Engine-backed keys can be loaded via custom B<OSSL_STORE> implementation.
152In this case the B<EVP_PKEY> objects created via L<ENGINE_load_private_key(3)>
153will be considered legacy and will continue to work.
154
155To ensure the future compatibility, the engines should be turned to providers.
156To prefer the provider-based hardware offload, you can specify the default
157properties to prefer your provider.
158
159=head3 Versioning Scheme
160
161The OpenSSL versioning scheme has changed with the OpenSSL 3.0 release. The new
162versioning scheme has this format:
163
164MAJOR.MINOR.PATCH
165
166For OpenSSL 1.1.1 and below, different patch levels were indicated by a letter
167at the end of the release version number. This will no longer be used and
168instead the patch level is indicated by the final number in the version. A
169change in the second (MINOR) number indicates that new features may have been
170added. OpenSSL versions with the same major number are API and ABI compatible.
171If the major number changes then API and ABI compatibility is not guaranteed.
172
173For more information, see L<OpenSSL_version(3)>.
174
175=head3 Other major new features
176
177=head4 Certificate Management Protocol (CMP, RFC 4210)
178
179This also covers CRMF (RFC 4211) and HTTP transfer (RFC 6712)
180See L<openssl-cmp(1)> and L<OSSL_CMP_exec_certreq(3)> as starting points.
181
182=head4 HTTP(S) client
183
184A proper HTTP(S) client that supports GET and POST, redirection, plain and
185ASN.1-encoded contents, proxies, and timeouts.
186
187=head4 Key Derivation Function API (EVP_KDF)
188
189This simplifies the process of adding new KDF and PRF implementations.
190
191Previously KDF algorithms had been shoe-horned into using the EVP_PKEY object
192which was not a logical mapping.
193Existing applications that use KDF algorithms using EVP_PKEY
194(scrypt, TLS1 PRF and HKDF) may be slower as they use an EVP_KDF bridge
195internally.
196All new applications should use the new L<EVP_KDF(3)> interface.
197See also L<OSSL_PROVIDER-default(7)/Key Derivation Function (KDF)> and
198L<OSSL_PROVIDER-FIPS(7)/Key Derivation Function (KDF)>.
199
200=head4 Message Authentication Code API (EVP_MAC)
201
202This simplifies the process of adding MAC implementations.
203
204This includes a generic EVP_PKEY to EVP_MAC bridge, to facilitate the continued
205use of MACs through raw private keys in functionality such as
206L<EVP_DigestSign(3)> and L<EVP_DigestVerify(3)>.
207
208All new applications should use the new L<EVP_MAC(3)> interface.
209See also L<OSSL_PROVIDER-default(7)/Message Authentication Code (MAC)>
210and L<OSSL_PROVIDER-FIPS(7)/Message Authentication Code (MAC)>.
211
212=head4 Algorithm Fetching
213
214Using calls to convenience functions such as EVP_sha256() and EVP_aes_256_gcm() may
215incur a performance penalty when using providers.
216Retrieving algorithms from providers involves searching for an algorithm by name.
217This is much slower than directly accessing a method table.
218It is recommended to prefetch algorithms if an algorithm is used many times.
219See L<crypto(7)/Performance>, L<crypto(7)/Explicit fetching> and L<crypto(7)/Implicit fetching>.
220
221=head4 Support for Linux Kernel TLS
222
223In order to use KTLS, support for it must be compiled in using the
224C<enable-ktls> configuration option. It must also be enabled at run time using
225the B<SSL_OP_ENABLE_KTLS> option.
226
227=head4 New Algorithms
228
229=over 4
230
231=item *
232
233KDF algorithms "SINGLE STEP" and "SSH"
234
235See L<EVP_KDF-SS(7)> and L<EVP_KDF-SSHKDF(7)>
236
237=item *
238
239MAC Algorithms "GMAC" and "KMAC"
240
241See L<EVP_MAC-GMAC(7)> and L<EVP_MAC-KMAC(7)>.
242
243=item *
244
245KEM Algorithm "RSASVE"
246
247See L<EVP_KEM-RSA(7)>.
248
249=item *
250
251Cipher Algorithm "AES-SIV"
252
253See L<EVP_EncryptInit(3)/SIV Mode>.
254
255=item *
256
257AES Key Wrap inverse ciphers supported by EVP layer.
258
259The inverse ciphers use AES decryption for wrapping, and AES encryption for
260unwrapping. The algorithms are: "AES-128-WRAP-INV", "AES-192-WRAP-INV",
261"AES-256-WRAP-INV", "AES-128-WRAP-PAD-INV", "AES-192-WRAP-PAD-INV" and
262"AES-256-WRAP-PAD-INV".
263
264=item *
265
266CTS ciphers added to EVP layer.
267
268The algorithms are "AES-128-CBC-CTS", "AES-192-CBC-CTS", "AES-256-CBC-CTS",
269"CAMELLIA-128-CBC-CTS", "CAMELLIA-192-CBC-CTS" and "CAMELLIA-256-CBC-CTS".
270CS1, CS2 and CS3 variants are supported.
271
272=back
273
274=head4 CMS and PKCS#7 updates
275
276=over 4
277
278=item *
279
280Added CAdES-BES signature verification support.
281
282=item *
283
284Added CAdES-BES signature scheme and attributes support (RFC 5126) to CMS API.
285
286=item *
287
288Added AuthEnvelopedData content type structure (RFC 5083) using AES_GCM
289
290This uses the AES-GCM parameter (RFC 5084) for the Cryptographic Message Syntax.
291Its purpose is to support encryption and decryption of a digital envelope that
292is both authenticated and encrypted using AES GCM mode.
293
294=item *
295
296L<PKCS7_get_octet_string(3)> and L<PKCS7_type_is_other(3)> were made public.
297
298=back
299
300=head4 PKCS#12 API updates
301
302The default algorithms for pkcs12 creation with the PKCS12_create() function
303were changed to more modern PBKDF2 and AES based algorithms. The default
304MAC iteration count was changed to PKCS12_DEFAULT_ITER to make it equal
305with the password-based encryption iteration count. The default digest
306algorithm for the MAC computation was changed to SHA-256. The pkcs12
307application now supports -legacy option that restores the previous
308default algorithms to support interoperability with legacy systems.
309
310Added enhanced PKCS#12 APIs which accept a library context B<OSSL_LIB_CTX>
311and (where relevant) a property query. Other APIs which handle PKCS#7 and
312PKCS#8 objects have also been enhanced where required. This includes:
313
314L<PKCS12_add_key_ex(3)>, L<PKCS12_add_safe_ex(3)>, L<PKCS12_add_safes_ex(3)>,
315L<PKCS12_create_ex(3)>, L<PKCS12_decrypt_skey_ex(3)>, L<PKCS12_init_ex(3)>,
316L<PKCS12_item_decrypt_d2i_ex(3)>, L<PKCS12_item_i2d_encrypt_ex(3)>,
317L<PKCS12_key_gen_asc_ex(3)>, L<PKCS12_key_gen_uni_ex(3)>, L<PKCS12_key_gen_utf8_ex(3)>,
318L<PKCS12_pack_p7encdata_ex(3)>, L<PKCS12_pbe_crypt_ex(3)>, L<PKCS12_PBE_keyivgen_ex(3)>,
319L<PKCS12_SAFEBAG_create_pkcs8_encrypt_ex(3)>, L<PKCS5_pbe2_set_iv_ex(3)>,
320L<PKCS5_pbe_set0_algor_ex(3)>, L<PKCS5_pbe_set_ex(3)>, L<PKCS5_pbkdf2_set_ex(3)>,
321L<PKCS5_v2_PBE_keyivgen_ex(3)>, L<PKCS5_v2_scrypt_keyivgen_ex(3)>,
322L<PKCS8_decrypt_ex(3)>, L<PKCS8_encrypt_ex(3)>, L<PKCS8_set0_pbe_ex(3)>.
323
324As part of this change the EVP_PBE_xxx APIs can also accept a library
325context and property query and will call an extended version of the key/IV
326derivation function which supports these parameters. This includes
327L<EVP_PBE_CipherInit_ex(3)>, L<EVP_PBE_find_ex(3)> and L<EVP_PBE_scrypt_ex(3)>.
328
329=head4 Windows thread synchronization changes
330
331Windows thread synchronization uses read/write primitives (SRWLock) when
332supported by the OS, otherwise CriticalSection continues to be used.
333
334=head4 Trace API
335
336A new generic trace API has been added which provides support for enabling
337instrumentation through trace output. This feature is mainly intended as an aid
338for developers and is disabled by default. To utilize it, OpenSSL needs to be
339configured with the C<enable-trace> option.
340
341If the tracing API is enabled, the application can activate trace output by
342registering BIOs as trace channels for a number of tracing and debugging
343categories. See L<OSSL_trace_enabled(3)>.
344
345=head4 Key validation updates
346
347L<EVP_PKEY_public_check(3)> and L<EVP_PKEY_param_check(3)> now work for
348more key types. This includes RSA, DSA, ED25519, X25519, ED448 and X448.
349Previously (in 1.1.1) they would return -2. For key types that do not have
350parameters then L<EVP_PKEY_param_check(3)> will always return 1.
351
352=head3 Other notable deprecations and changes
353
354=head4 The function code part of an OpenSSL error code is no longer relevant
355
356This code is now always set to zero. Related functions are deprecated.
357
358=head4 STACK and HASH macros have been cleaned up
359
360The type-safe wrappers are declared everywhere and implemented once.
361See L<DEFINE_STACK_OF(3)> and L<DEFINE_LHASH_OF_EX(3)>.
362
363=head4 The RAND_DRBG subsystem has been removed
364
365The new L<EVP_RAND(3)> is a partial replacement: the DRBG callback framework is
366absent. The RAND_DRBG API did not fit well into the new provider concept as
367implemented by EVP_RAND and EVP_RAND_CTX.
368
369=head4 Removed FIPS_mode() and FIPS_mode_set()
370
371These functions are legacy APIs that are not applicable to the new provider
372model. Applications should instead use
373L<EVP_default_properties_is_fips_enabled(3)> and
374L<EVP_default_properties_enable_fips(3)>.
375
376=head4 Key generation is slower
377
378The Miller-Rabin test now uses 64 rounds, which is used for all prime generation,
379including RSA key generation. This affects the time for larger keys sizes.
380
381The default key generation method for the regular 2-prime RSA keys was changed
382to the FIPS186-4 B.3.6 method (Generation of Probable Primes with Conditions
383Based on Auxiliary Probable Primes). This method is slower than the original
384method.
385
386=head4 Change PBKDF2 to conform to SP800-132 instead of the older PKCS5 RFC2898
387
388This checks that the salt length is at least 128 bits, the derived key length is
389at least 112 bits, and that the iteration count is at least 1000.
390For backwards compatibility these checks are disabled by default in the
391default provider, but are enabled by default in the FIPS provider.
392
393To enable or disable the checks see B<OSSL_KDF_PARAM_PKCS5> in
394L<EVP_KDF-PBKDF2(7)>. The parameter can be set using L<EVP_KDF_derive(3)>.
395
396=head4 Enforce a minimum DH modulus size of 512 bits
397
398Smaller sizes now result in an error.
399
400=head4 SM2 key changes
401
402EC EVP_PKEYs with the SM2 curve have been reworked to automatically become
403EVP_PKEY_SM2 rather than EVP_PKEY_EC.
404
405Unlike in previous OpenSSL versions, this means that applications cannot
406call C<EVP_PKEY_set_alias_type(pkey, EVP_PKEY_SM2)> to get SM2 computations.
407
408Parameter and key generation is also reworked to make it possible
409to generate EVP_PKEY_SM2 parameters and keys. Applications must now generate
410SM2 keys directly and must not create an EVP_PKEY_EC key first. It is no longer
411possible to import an SM2 key with domain parameters other than the SM2 elliptic
412curve ones.
413
414Validation of SM2 keys has been separated from the validation of regular EC
415keys, allowing to improve the SM2 validation process to reject loaded private
416keys that are not conforming to the SM2 ISO standard.
417In particular, a private scalar I<k> outside the range I<< 1 <= k < n-1 >> is
418now correctly rejected.
419
420=head4 EVP_PKEY_set_alias_type() method has been removed
421
422This function made a B<EVP_PKEY> object mutable after it had been set up. In
423OpenSSL 3.0 it was decided that a provided key should not be able to change its
424type, so this function has been removed.
425
426=head4 Functions that return an internal key should be treated as read only
427
428Functions such as L<EVP_PKEY_get0_RSA(3)> behave slightly differently in
429OpenSSL 3.0. Previously they returned a pointer to the low-level key used
430internally by libcrypto. From OpenSSL 3.0 this key may now be held in a
431provider. Calling these functions will only return a handle on the internal key
432where the EVP_PKEY was constructed using this key in the first place, for
433example using a function or macro such as L<EVP_PKEY_assign_RSA(3)>,
434L<EVP_PKEY_set1_RSA(3)>, etc.
435Where the EVP_PKEY holds a provider managed key, then these functions now return
436a cached copy of the key. Changes to the internal provider key that take place
437after the first time the cached key is accessed will not be reflected back in
438the cached copy. Similarly any changes made to the cached copy by application
439code will not be reflected back in the internal provider key.
440
441For the above reasons the keys returned from these functions should typically be
442treated as read-only. To emphasise this the value returned from
443L<EVP_PKEY_get0_RSA(3)>, L<EVP_PKEY_get0_DSA(3)>, L<EVP_PKEY_get0_EC_KEY(3)> and
444L<EVP_PKEY_get0_DH(3)> have been made const. This may break some existing code.
445Applications broken by this change should be modified. The preferred solution is
446to refactor the code to avoid the use of these deprecated functions. Failing
447this the code should be modified to use a const pointer instead.
448The L<EVP_PKEY_get1_RSA(3)>, L<EVP_PKEY_get1_DSA(3)>, L<EVP_PKEY_get1_EC_KEY(3)>
449and L<EVP_PKEY_get1_DH(3)> functions continue to return a non-const pointer to
450enable them to be "freed". However they should also be treated as read-only.
451
452=head4 The public key check has moved from EVP_PKEY_derive() to EVP_PKEY_derive_set_peer()
453
454This may mean result in an error in L<EVP_PKEY_derive_set_peer(3)> rather than
455during L<EVP_PKEY_derive(3)>.
456To disable this check use EVP_PKEY_derive_set_peer_ex(dh, peer, 0).
457
458=head4 The print format has cosmetic changes for some functions
459
460The output from numerous "printing" functions such as L<X509_signature_print(3)>,
461L<X509_print_ex(3)>, L<X509_CRL_print_ex(3)>, and other similar functions has been
462amended such that there may be cosmetic differences between the output
463observed in 1.1.1 and 3.0. This also applies to the B<-text> output from the
464B<openssl x509> and B<openssl crl> applications.
465
466=head4 Interactive mode from the B<openssl> program has been removed
467
468From now on, running it without arguments is equivalent to B<openssl help>.
469
470=head4 The error return values from some control calls (ctrl) have changed
471
472One significant change is that controls which used to return -2 for
473invalid inputs, now return -1 indicating a generic error condition instead.
474
475=head4 DH and DHX key types have different settable parameters
476
477Previously (in 1.1.1) these conflicting parameters were allowed, but will now
478result in errors. See L<EVP_PKEY-DH(7)> for further details. This affects the
479behaviour of L<openssl-genpkey(1)> for DH parameter generation.
480
481=head4 EVP_CIPHER_CTX_set_flags() ordering change
482
483If using a cipher from a provider the B<EVP_CIPH_FLAG_LENGTH_BITS> flag can only
484be set B<after> the cipher has been assigned to the cipher context.
485See L<EVP_EncryptInit(3)/FLAGS> for more information.
486
487=head4 Validation of operation context parameters
488
489Due to move of the implementation of cryptographic operations to the
490providers, validation of various operation parameters can be postponed until
491the actual operation is executed where previously it happened immediately
492when an operation parameter was set.
493
494For example when setting an unsupported curve with
495EVP_PKEY_CTX_set_ec_paramgen_curve_nid() this function call will not fail
496but later keygen operations with the EVP_PKEY_CTX will fail.
497
498=head4 Removal of function code from the error codes
499
500The function code part of the error code is now always set to 0. For that
501reason the ERR_GET_FUNC() macro was removed. Applications must resolve
502the error codes only using the library number and the reason code.
503
504=head4 ChaCha20-Poly1305 cipher does not allow a truncated IV length to be used
505
506In OpenSSL 3.0 setting the IV length to any value other than 12 will result in an
507error.
508Prior to OpenSSL 3.0 the ivlen could be smaller that the required 12 byte length,
509using EVP_CIPHER_CTX_ctrl(ctx, EVP_CRTL_AEAD_SET_IVLEN, ivlen, NULL). This resulted
510in an IV that had leading zero padding.
511
512=head2 Installation and Compilation
513
514Please refer to the INSTALL.md file in the top of the distribution for
515instructions on how to build and install OpenSSL 3.0. Please also refer to the
516various platform specific NOTES files for your specific platform.
517
518=head2 Upgrading from OpenSSL 1.1.1
519
520Upgrading to OpenSSL 3.0 from OpenSSL 1.1.1 should be relatively straight
521forward in most cases. The most likely area where you will encounter problems
522is if you have used low level APIs in your code (as discussed above). In that
523case you are likely to start seeing deprecation warnings when compiling your
524application. If this happens you have 3 options:
525
526=over 4
527
528=item 1.
529
530Ignore the warnings. They are just warnings. The deprecated functions are still present and you may still use them. However be aware that they may be removed from a future version of OpenSSL.
531
532=item 2.
533
534Suppress the warnings. Refer to your compiler documentation on how to do this.
535
536=item 3.
537
538Remove your usage of the low level APIs. In this case you will need to rewrite your code to use the high level APIs instead
539
540=back
541
542=head3 Error code changes
543
544As OpenSSL 3.0 provides a brand new Encoder/Decoder mechanism for working with
545widely used file formats, application code that checks for particular error
546reason codes on key loading failures might need an update.
547
548Password-protected keys may deserve special attention. If only some errors
549are treated as an indicator that the user should be asked about the password again,
550it's worth testing these scenarios and processing the newly relevant codes.
551
552There may be more cases to treat specially, depending on the calling application code.
553
554=head2 Upgrading from OpenSSL 1.0.2
555
556Upgrading to OpenSSL 3.0 from OpenSSL 1.0.2 is likely to be significantly more
557difficult. In addition to the issues discussed above in the section about
558L</Upgrading from OpenSSL 1.1.1>, the main things to be aware of are:
559
560=over 4
561
562=item 1.
563
564The build and installation procedure has changed significantly.
565
566Check the file INSTALL.md in the top of the installation for instructions on how
567to build and install OpenSSL for your platform. Also read the various NOTES
568files in the same directory, as applicable for your platform.
569
570=item 2.
571
572Many structures have been made opaque in OpenSSL 3.0.
573
574The structure definitions have been removed from the public header files and
575moved to internal header files. In practice this means that you can no longer
576stack allocate some structures. Instead they must be heap allocated through some
577function call (typically those function names have a C<_new> suffix to them).
578Additionally you must use "setter" or "getter" functions to access the fields
579within those structures.
580
581For example code that previously looked like this:
582
583 EVP_MD_CTX md_ctx;
584
585 /* This line will now generate compiler errors */
586 EVP_MD_CTX_init(&md_ctx);
587
588The code needs to be amended to look like this:
589
590 EVP_MD_CTX *md_ctx;
591
592 md_ctx = EVP_MD_CTX_new();
593 ...
594 ...
595 EVP_MD_CTX_free(md_ctx);
596
597=item 3.
598
599Support for TLSv1.3 has been added.
600
601This has a number of implications for SSL/TLS applications. See the
602L<TLS1.3 page|https://wiki.openssl.org/index.php/TLS1.3> for further details.
603
604=back
605
606More details about the breaking changes between OpenSSL versions 1.0.2 and 1.1.0
607can be found on the
608L<OpenSSL 1.1.0 Changes page|https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes>.
609
610=head3 Upgrading from the OpenSSL 2.0 FIPS Object Module
611
612The OpenSSL 2.0 FIPS Object Module was a separate download that had to be built
613separately and then integrated into your main OpenSSL 1.0.2 build.
614In OpenSSL 3.0 the FIPS support is fully integrated into the mainline version of
615OpenSSL and is no longer a separate download. For further information see
616L</Completing the installation of the FIPS Module>.
617
618The function calls FIPS_mode() and FIPS_mode_set() have been removed
619from OpenSSL 3.0. You should rewrite your application to not use them.
620See L<fips_module(7)> and L<OSSL_PROVIDER-FIPS(7)> for details.
621
622=head2 Completing the installation of the FIPS Module
623
624The FIPS Module will be built and installed automatically if FIPS support has
625been configured. The current documentation can be found in the
626L<README-FIPS|https://github.com/openssl/openssl/blob/master/README-FIPS.md> file.
627
628=head2 Programming
629
630Applications written to work with OpenSSL 1.1.1 will mostly just work with
631OpenSSL 3.0. However changes will be required if you want to take advantage of
632some of the new features that OpenSSL 3.0 makes available. In order to do that
633you need to understand some new concepts introduced in OpenSSL 3.0.
634Read L<crypto(7)/Library contexts> for further information.
635
636=head3 Library Context
637
638A library context allows different components of a complex application to each
639use a different library context and have different providers loaded with
640different configuration settings.
641See L<crypto(7)/Library contexts> for further info.
642
643If the user creates an B<OSSL_LIB_CTX> via L<OSSL_LIB_CTX_new(3)> then many
644functions may need to be changed to pass additional parameters to handle the
645library context.
646
647=head4 Using a Library Context - Old functions that should be changed
648
649If a library context is needed then all EVP_* digest functions that return a
650B<const EVP_MD *> such as EVP_sha256() should be replaced with a call to
651L<EVP_MD_fetch(3)>. See L<crypto(7)/ALGORITHM FETCHING>.
652
653If a library context is needed then all EVP_* cipher functions that return a
654B<const EVP_CIPHER *> such as EVP_aes_128_cbc() should be replaced vith a call to
655L<EVP_CIPHER_fetch(3)>. See L<crypto(7)/ALGORITHM FETCHING>.
656
657Some functions can be passed an object that has already been set up with a library
658context such as L<d2i_X509(3)>, L<d2i_X509_CRL(3)>, L<d2i_X509_REQ(3)> and
659L<d2i_X509_PUBKEY(3)>. If NULL is passed instead then the created object will be
660set up with the default library context. Use L<X509_new_ex(3)>,
661L<X509_CRL_new_ex(3)>, L<X509_REQ_new_ex(3)> and L<X509_PUBKEY_new_ex(3)> if a
662library context is required.
663
664All functions listed below with a I<NAME> have a replacement function I<NAME_ex>
665that takes B<OSSL_LIB_CTX> as an additional argument. Functions that have other
666mappings are listed along with the respective name.
667
668=over 4
669
670=item *
671
672L<ASN1_item_new(3)>, L<ASN1_item_d2i(3)>, L<ASN1_item_d2i_fp(3)>,
673L<ASN1_item_d2i_bio(3)>, L<ASN1_item_sign(3)> and L<ASN1_item_verify(3)>
674
675=item *
676
677L<BIO_new(3)>
678
679=item *
680
681b2i_RSA_PVK_bio() and i2b_PVK_bio()
682
683=item *
684
685L<BN_CTX_new(3)> and L<BN_CTX_secure_new(3)>
686
687=item *
688
689L<CMS_AuthEnvelopedData_create(3)>, L<CMS_ContentInfo_new(3)>, L<CMS_data_create(3)>,
690L<CMS_digest_create(3)>, L<CMS_EncryptedData_encrypt(3)>, L<CMS_encrypt(3)>,
691L<CMS_EnvelopedData_create(3)>, L<CMS_ReceiptRequest_create0(3)> and L<CMS_sign(3)>
692
693=item *
694
695L<CONF_modules_load_file(3)>
696
697=item *
698
699L<CTLOG_new(3)>, L<CTLOG_new_from_base64(3)> and L<CTLOG_STORE_new(3)>
700
701=item *
702
703L<CT_POLICY_EVAL_CTX_new(3)>
704
705=item *
706
707L<d2i_AutoPrivateKey(3)>, L<d2i_PrivateKey(3)> and L<d2i_PUBKEY(3)>
708
709=item *
710
711L<d2i_PrivateKey_bio(3)> and L<d2i_PrivateKey_fp(3)>
712
713Use L<d2i_PrivateKey_ex_bio(3)> and L<d2i_PrivateKey_ex_fp(3)>
714
715=item *
716
717L<EC_GROUP_new(3)>
718
719Use L<EC_GROUP_new_by_curve_name_ex(3)> or L<EC_GROUP_new_from_params(3)>.
720
721=item *
722
723L<EVP_DigestSignInit(3)> and L<EVP_DigestVerifyInit(3)>
724
725=item *
726
727L<EVP_PBE_CipherInit(3)>, L<EVP_PBE_find(3)> and L<EVP_PBE_scrypt(3)>
728
729=item *
730
731L<PKCS5_PBE_keyivgen(3)>
732
733=item *
734
735L<EVP_PKCS82PKEY(3)>
736
737=item *
738
739L<EVP_PKEY_CTX_new_id(3)>
740
741Use L<EVP_PKEY_CTX_new_from_name(3)>
742
743=item *
744
745L<EVP_PKEY_derive_set_peer(3)>, L<EVP_PKEY_new_raw_private_key(3)>
746and L<EVP_PKEY_new_raw_public_key(3)>
747
748=item *
749
750L<EVP_SignFinal(3)> and L<EVP_VerifyFinal(3)>
751
752=item *
753
754L<NCONF_new(3)>
755
756=item *
757
758L<OCSP_RESPID_match(3)> and L<OCSP_RESPID_set_by_key(3)>
759
760=item *
761
762L<OPENSSL_thread_stop(3)>
763
764=item *
765
766L<OSSL_STORE_open(3)>
767
768=item *
769
770L<PEM_read_bio_Parameters(3)>, L<PEM_read_bio_PrivateKey(3)>, L<PEM_read_bio_PUBKEY(3)>,
771L<PEM_read_PrivateKey(3)> and L<PEM_read_PUBKEY(3)>
772
773=item *
774
775L<PEM_write_bio_PrivateKey(3)>, L<PEM_write_bio_PUBKEY(3)>, L<PEM_write_PrivateKey(3)>
776and L<PEM_write_PUBKEY(3)>
777
778=item *
779
780L<PEM_X509_INFO_read_bio(3)> and L<PEM_X509_INFO_read(3)>
781
782=item *
783
784L<PKCS12_add_key(3)>, L<PKCS12_add_safe(3)>, L<PKCS12_add_safes(3)>,
785L<PKCS12_create(3)>, L<PKCS12_decrypt_skey(3)>, L<PKCS12_init(3)>, L<PKCS12_item_decrypt_d2i(3)>,
786L<PKCS12_item_i2d_encrypt(3)>, L<PKCS12_key_gen_asc(3)>, L<PKCS12_key_gen_uni(3)>,
787L<PKCS12_key_gen_utf8(3)>, L<PKCS12_pack_p7encdata(3)>, L<PKCS12_pbe_crypt(3)>,
788L<PKCS12_PBE_keyivgen(3)>, L<PKCS12_SAFEBAG_create_pkcs8_encrypt(3)>
789
790=item *
791
792L<PKCS5_pbe_set0_algor(3)>, L<PKCS5_pbe_set(3)>, L<PKCS5_pbe2_set_iv(3)>,
793L<PKCS5_pbkdf2_set(3)> and L<PKCS5_v2_scrypt_keyivgen(3)>
794
795=item *
796
797L<PKCS7_encrypt(3)>, L<PKCS7_new(3)> and L<PKCS7_sign(3)>
798
799=item *
800
801L<PKCS8_decrypt(3)>, L<PKCS8_encrypt(3)> and L<PKCS8_set0_pbe(3)>
802
803=item *
804
805L<RAND_bytes(3)> and L<RAND_priv_bytes(3)>
806
807=item *
808
809L<SMIME_write_ASN1(3)>
810
811=item *
812
813L<SSL_load_client_CA_file(3)>
814
815=item *
816
817L<SSL_CTX_new(3)>
818
819=item *
820
821L<TS_RESP_CTX_new(3)>
822
823=item *
824
825L<X509_CRL_new(3)>
826
827=item *
828
829L<X509_load_cert_crl_file(3)> and L<X509_load_cert_file(3)>
830
831=item *
832
833L<X509_LOOKUP_by_subject(3)> and L<X509_LOOKUP_ctrl(3)>
834
835=item *
836
837L<X509_NAME_hash(3)>
838
839=item *
840
841L<X509_new(3)>
842
843=item *
844
845L<X509_REQ_new(3)> and L<X509_REQ_verify(3)>
846
847=item *
848
849L<X509_STORE_CTX_new(3)>, L<X509_STORE_set_default_paths(3)>, L<X509_STORE_load_file(3)>,
850L<X509_STORE_load_locations(3)> and L<X509_STORE_load_store(3)>
851
852=back
853
854=head4 New functions that use a Library context
855
856The following functions can be passed a library context if required.
857Passing NULL will use the default library context.
858
859=over 4
860
861=item *
862
863L<BIO_new_from_core_bio(3)>
864
865=item *
866
867L<EVP_ASYM_CIPHER_fetch(3)> and L<EVP_ASYM_CIPHER_do_all_provided(3)>
868
869=item *
870
871L<EVP_CIPHER_fetch(3)> and L<EVP_CIPHER_do_all_provided(3)>
872
873=item *
874
875L<EVP_default_properties_enable_fips(3)> and
876L<EVP_default_properties_is_fips_enabled(3)>
877
878=item *
879
880L<EVP_KDF_fetch(3)> and L<EVP_KDF_do_all_provided(3)>
881
882=item *
883
884L<EVP_KEM_fetch(3)> and L<EVP_KEM_do_all_provided(3)>
885
886=item *
887
888L<EVP_KEYEXCH_fetch(3)> and L<EVP_KEYEXCH_do_all_provided(3)>
889
890=item *
891
892L<EVP_KEYMGMT_fetch(3)> and L<EVP_KEYMGMT_do_all_provided(3)>
893
894=item *
895
896L<EVP_MAC_fetch(3)> and L<EVP_MAC_do_all_provided(3)>
897
898=item *
899
900L<EVP_MD_fetch(3)> and L<EVP_MD_do_all_provided(3)>
901
902=item *
903
904L<EVP_PKEY_CTX_new_from_pkey(3)>
905
906=item *
907
908L<EVP_PKEY_Q_keygen(3)>
909
910=item *
911
912L<EVP_Q_mac(3)> and L<EVP_Q_digest(3)>
913
914=item *
915
916L<EVP_RAND(3)> and L<EVP_RAND_do_all_provided(3)>
917
918=item *
919
920L<EVP_set_default_properties(3)>
921
922=item *
923
924L<EVP_SIGNATURE_fetch(3)> and L<EVP_SIGNATURE_do_all_provided(3)>
925
926=item *
927
928L<OSSL_CMP_CTX_new(3)> and L<OSSL_CMP_SRV_CTX_new(3)>
929
930=item *
931
932L<OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(3)>
933
934=item *
935
936L<OSSL_CRMF_MSG_create_popo(3)> and L<OSSL_CRMF_MSGS_verify_popo(3)>
937
938=item *
939
940L<OSSL_CRMF_pbm_new(3)> and L<OSSL_CRMF_pbmp_new(3)>
941
942=item *
943
944L<OSSL_DECODER_CTX_add_extra(3)> and L<OSSL_DECODER_CTX_new_for_pkey(3)>
945
946=item *
947
948L<OSSL_DECODER_fetch(3)> and L<OSSL_DECODER_do_all_provided(3)>
949
950=item *
951
952L<OSSL_ENCODER_CTX_add_extra(3)>
953
954=item *
955
956L<OSSL_ENCODER_fetch(3)> and L<OSSL_ENCODER_do_all_provided(3)>
957
958=item *
959
960L<OSSL_LIB_CTX_free(3)>, L<OSSL_LIB_CTX_load_config(3)> and L<OSSL_LIB_CTX_set0_default(3)>
961
962=item *
963
964L<OSSL_PROVIDER_add_builtin(3)>, L<OSSL_PROVIDER_available(3)>,
965L<OSSL_PROVIDER_do_all(3)>, L<OSSL_PROVIDER_load(3)>,
966L<OSSL_PROVIDER_set_default_search_path(3)> and L<OSSL_PROVIDER_try_load(3)>
967
968=item *
969
970L<OSSL_SELF_TEST_get_callback(3)> and L<OSSL_SELF_TEST_set_callback(3)>
971
972=item *
973
974L<OSSL_STORE_attach(3)>
975
976=item *
977
978L<OSSL_STORE_LOADER_fetch(3)> and L<OSSL_STORE_LOADER_do_all_provided(3)>
979
980=item *
981
982L<RAND_get0_primary(3)>, L<RAND_get0_private(3)>, L<RAND_get0_public(3)>,
983L<RAND_set_DRBG_type(3)> and L<RAND_set_seed_source_type(3)>
984
985=back
986
987=head3 Providers
988
989Providers are described in detail here L<crypto(7)/Providers>.
990See also L<crypto(7)/OPENSSL PROVIDERS>.
991
992=head3 Fetching algorithms and property queries
993
994Implicit and Explicit Fetching is described in detail here
995L<crypto(7)/ALGORITHM FETCHING>.
996
997=head3 Mapping EVP controls and flags to provider L<OSSL_PARAM(3)> parameters
998
999The existing functions for controls (such as L<EVP_CIPHER_CTX_ctrl(3)>) and
1000manipulating flags (such as L<EVP_MD_CTX_set_flags(3)>)internally use
1001B<OSSL_PARAMS> to pass information to/from provider objects.
1002See L<OSSL_PARAM(3)> for additional information related to parameters.
1003
1004For ciphers see L<EVP_EncryptInit(3)/CONTROLS>, L<EVP_EncryptInit(3)/FLAGS> and
1005L<EVP_EncryptInit(3)/PARAMETERS>.
1006
1007For digests see L<EVP_DigestInit(3)/CONTROLS>, L<EVP_DigestInit(3)/FLAGS> and
1008L<EVP_DigestInit(3)/PARAMETERS>.
1009
1010=head3 Deprecation of Low Level Functions
1011
1012A significant number of APIs have been deprecated in OpenSSL 3.0.
1013This section describes some common categories of deprecations.
1014See L</Deprecated function mappings> for the list of deprecated functions
1015that refer to these categories.
1016
1017=head4 Providers are a replacement for engines and low-level method overrides
1018
1019Any accessor that uses an ENGINE is deprecated (such as EVP_PKEY_set1_engine()).
1020Applications using engines should instead use providers.
1021
1022Before providers were added algorithms were overridden by changing the methods
1023used by algorithms. All these methods such as RSA_new_method() and RSA_meth_new()
1024are now deprecated and can be replaced by using providers instead.
1025
1026=head4 Deprecated i2d and d2i functions for low-level key types
1027
1028Any i2d and d2i functions such as d2i_DHparams() that take a low-level key type
1029have been deprecated. Applications should instead use the L<OSSL_DECODER(3)> and
1030L<OSSL_ENCODER(3)> APIs to read and write files.
1031See L<d2i_RSAPrivateKey(3)/Migration> for further details.
1032
1033=head4 Deprecated low-level key object getters and setters
1034
1035Applications that set or get low-level key objects (such as EVP_PKEY_set1_DH()
1036or EVP_PKEY_get0()) should instead use the OSSL_ENCODER
1037(See L<OSSL_ENCODER_to_bio(3)>) or OSSL_DECODER (See L<OSSL_DECODER_from_bio(3)>)
1038APIs, or alternatively use L<EVP_PKEY_fromdata(3)> or L<EVP_PKEY_todata(3)>.
1039
1040=head4 Deprecated low-level key parameter getters
1041
1042Functions that access low-level objects directly such as L<RSA_get0_n(3)> are now
1043deprecated. Applications should use one of L<EVP_PKEY_get_bn_param(3)>,
1044L<EVP_PKEY_get_int_param(3)>, l<EVP_PKEY_get_size_t_param(3)>,
1045L<EVP_PKEY_get_utf8_string_param(3)>, L<EVP_PKEY_get_octet_string_param(3)> or
1046L<EVP_PKEY_get_params(3)> to access fields from an EVP_PKEY.
1047Gettable parameters are listed in L<EVP_PKEY-RSA(7)/Common RSA parameters>,
1048L<EVP_PKEY-DH(7)/DH parameters>, L<EVP_PKEY-DSA(7)/DSA parameters>,
1049L<EVP_PKEY-FFC(7)/FFC parameters>, L<EVP_PKEY-EC(7)/Common EC parameters> and
1050L<EVP_PKEY-X25519(7)/Common X25519, X448, ED25519 and ED448 parameters>.
1051Applications may also use L<EVP_PKEY_todata(3)> to return all fields.
1052
1053=head4 Deprecated low-level key parameter setters
1054
1055Functions that access low-level objects directly such as L<RSA_set0_crt_params(3)>
1056are now deprecated. Applications should use L<EVP_PKEY_fromdata(3)> to create
1057new keys from user provided key data. Keys should be immutable once they are
1058created, so if required the user may use L<EVP_PKEY_todata(3)>, L<OSSL_PARAM_merge(3)>,
1059and L<EVP_PKEY_fromdata(3)> to create a modified key.
1060See L<EVP_PKEY-DH(7)/Examples> for more information.
1061See L</Deprecated low-level key generation functions> for information on
1062generating a key using parameters.
1063
1064=head4 Deprecated low-level object creation
1065
1066Low-level objects were created using methods such as L<RSA_new(3)>,
1067L<RSA_up_ref(3)> and L<RSA_free(3)>. Applications should instead use the
1068high-level EVP_PKEY APIs, e.g. L<EVP_PKEY_new(3)>, L<EVP_PKEY_up_ref(3)> and
1069L<EVP_PKEY_free(3)>.
1070See also L<EVP_PKEY_CTX_new_from_name(3)> and L<EVP_PKEY_CTX_new_from_pkey(3)>.
1071
1072EVP_PKEYs may be created in a variety of ways:
1073See also L</Deprecated low-level key generation functions>,
1074L</Deprecated low-level key reading and writing functions> and
1075L</Deprecated low-level key parameter setters>.
1076
1077=head4 Deprecated low-level encryption functions
1078
1079Low-level encryption functions such as L<AES_encrypt(3)> and L<AES_decrypt(3)>
1080have been informally discouraged from use for a long time. Applications should
1081instead use the high level EVP APIs L<EVP_EncryptInit_ex(3)>,
1082L<EVP_EncryptUpdate(3)>, and L<EVP_EncryptFinal_ex(3)> or
1083L<EVP_DecryptInit_ex(3)>, L<EVP_DecryptUpdate(3)> and L<EVP_DecryptFinal_ex(3)>.
1084
1085=head4 Deprecated low-level digest functions
1086
1087Use of low-level digest functions such as L<SHA1_Init(3)> have been
1088informally discouraged from use for a long time. Applications should instead
1089use the the high level EVP APIs L<EVP_DigestInit_ex(3)>, L<EVP_DigestUpdate(3)>
1090and L<EVP_DigestFinal_ex(3)>, or the quick one-shot L<EVP_Q_digest(3)>.
1091
1092Note that the functions L<SHA1(3)>, L<SHA224(3)>, L<SHA256(3)>, L<SHA384(3)>
1093and L<SHA512(3)> have changed to macros that use L<EVP_Q_digest(3)>.
1094
1095=head4 Deprecated low-level signing functions
1096
1097Use of low-level signing functions such as L<DSA_sign(3)> have been
1098informally discouraged for a long time. Instead applications should use
1099L<EVP_DigestSign(3)> and L<EVP_DigestVerify(3)>.
1100See also L<EVP_SIGNATURE-RSA(7)>, L<EVP_SIGNATURE-DSA(7)>,
1101L<EVP_SIGNATURE-ECDSA(7)> and L<EVP_SIGNATURE-ED25519(7)>.
1102
1103=head4 Deprecated low-level MAC functions
1104
1105Low-level mac functions such as L<CMAC_Init(3)> are deprecated.
1106Applications should instead use the new L<EVP_MAC(3)> interface, using
1107L<EVP_MAC_CTX_new(3)>, L<EVP_MAC_CTX_free(3)>, L<EVP_MAC_init(3)>,
1108L<EVP_MAC_update(3)> and L<EVP_MAC_final(3)> or the single-shot MAC function
1109L<EVP_Q_mac(3)>.
1110See L<EVP_MAC(3)>, L<EVP_MAC-HMAC(7)>, L<EVP_MAC-CMAC(7)>, L<EVP_MAC-GMAC(7)>,
1111L<EVP_MAC-KMAC(7)>, L<EVP_MAC-BLAKE2(7)>, L<EVP_MAC-Poly1305(7)> and
1112L<EVP_MAC-Siphash(7)> for additional information.
1113
1114Note that the one-shot method HMAC() is still available for compatibility purposes,
1115but this can also be replaced by using EVP_Q_MAC if a library context is required.
1116
1117=head4 Deprecated low-level validation functions
1118
1119Low-level validation functions such as L<DH_check(3)> have been informally
1120discouraged from use for a long time. Applications should instead use the high-level
1121EVP_PKEY APIs such as L<EVP_PKEY_check(3)>, L<EVP_PKEY_param_check(3)>,
1122L<EVP_PKEY_param_check_quick(3)>, L<EVP_PKEY_public_check(3)>,
1123L<EVP_PKEY_public_check_quick(3)>, L<EVP_PKEY_private_check(3)>,
1124and L<EVP_PKEY_pairwise_check(3)>.
1125
1126=head4 Deprecated low-level key exchange functions
1127
1128Many low-level functions have been informally discouraged from use for a long
1129time. Applications should instead use L<EVP_PKEY_derive(3)>.
1130See L<EVP_KEYEXCH-DH(7)>, L<EVP_KEYEXCH-ECDH(7)> and L<EVP_KEYEXCH-X25519(7)>.
1131
1132=head4 Deprecated low-level key generation functions
1133
1134Many low-level functions have been informally discouraged from use for a long
1135time. Applications should instead use L<EVP_PKEY_keygen_init(3)> and
1136L<EVP_PKEY_generate(3)> as described in L<EVP_PKEY-DSA(7)>, L<EVP_PKEY-DH(7)>,
1137L<EVP_PKEY-RSA(7)>, L<EVP_PKEY-EC(7)> and L<EVP_PKEY-X25519(7)>.
1138The 'quick' one-shot function L<EVP_PKEY_Q_keygen(3)> and macros for the most
1139common cases: <EVP_RSA_gen(3)> and L<EVP_EC_gen(3)> may also be used.
1140
1141=head4 Deprecated low-level key reading and writing functions
1142
1143Use of low-level objects (such as DSA) has been informally discouraged from use
1144for a long time. Functions to read and write these low-level objects (such as
1145PEM_read_DSA_PUBKEY()) should be replaced. Applications should instead use
1146L<OSSL_ENCODER_to_bio(3)> and L<OSSL_DECODER_from_bio(3)>.
1147
1148=head4 Deprecated low-level key printing functions
1149
1150Use of low-level objects (such as DSA) has been informally discouraged from use
1151for a long time. Functions to print these low-level objects such as
1152DSA_print() should be replaced with the equivalent EVP_PKEY functions.
1153Application should use one of L<EVP_PKEY_print_public(3)>,
1154L<EVP_PKEY_print_private(3)>, L<EVP_PKEY_print_params(3)>,
1155L<EVP_PKEY_print_public_fp(3)>, L<EVP_PKEY_print_private_fp(3)> or
1156L<EVP_PKEY_print_params_fp(3)>. Note that internally these use
1157L<OSSL_ENCODER_to_bio(3)> and L<OSSL_DECODER_from_bio(3)>.
1158
1159=head3 Deprecated function mappings
1160
1161The following functions have been deprecated in 3.0.
1162
1163=over 4
1164
1165=item *
1166
1167AES_bi_ige_encrypt() and AES_ige_encrypt()
1168
1169There is no replacement for the IGE functions. New code should not use these modes.
1170These undocumented functions were never integrated into the EVP layer.
1171They implemented the AES Infinite Garble Extension (IGE) mode and AES
1172Bi-directional IGE mode. These modes were never formally standardised and
1173usage of these functions is believed to be very small. In particular
1174AES_bi_ige_encrypt() has a known bug. It accepts 2 AES keys, but only one
1175is ever used. The security implications are believed to be minimal, but
1176this issue was never fixed for backwards compatibility reasons.
1177
1178=item *
1179
1180AES_encrypt(), AES_decrypt(), AES_set_encrypt_key(), AES_set_decrypt_key(),
1181AES_cbc_encrypt(), AES_cfb128_encrypt(), AES_cfb1_encrypt(), AES_cfb8_encrypt(),
1182AES_ecb_encrypt(), AES_ofb128_encrypt()
1183
1184=item *
1185
1186AES_unwrap_key(), AES_wrap_key()
1187
1188See L</Deprecated low-level encryption functions>
1189
1190=item *
1191
1192AES_options()
1193
1194There is no replacement. It returned a string indicating if the AES code was unrolled.
1195
1196=item *
1197
1198ASN1_digest(), ASN1_sign(), ASN1_verify()
1199
1200There are no replacements. These old functions are not used, and could be
1201disabled with the macro NO_ASN1_OLD since OpenSSL 0.9.7.
1202
1203=item *
1204
1205ASN1_STRING_length_set()
1206
1207Use L<ASN1_STRING_set(3)> or L<ASN1_STRING_set0(3)> instead.
1208This was a potentially unsafe function that could change the bounds of a
1209previously passed in pointer.
1210
1211=item *
1212
1213BF_encrypt(), BF_decrypt(), BF_set_key(), BF_cbc_encrypt(), BF_cfb64_encrypt(),
1214BF_ecb_encrypt(), BF_ofb64_encrypt()
1215
1216See L</Deprecated low-level encryption functions>.
1217The Blowfish algorithm has been moved to the L<Legacy Provider|/Legacy Algorithms>.
1218
1219=item *
1220
1221BF_options()
1222
1223There is no replacement. This option returned a constant string.
1224
1225=item *
1226
1227BIO_get_callback(), BIO_set_callback(), BIO_debug_callback()
1228
1229Use the respective non-deprecated _ex() functions.
1230
1231=item *
1232
1233BN_is_prime_ex(), BN_is_prime_fasttest_ex()
1234
1235Use L<BN_check_prime(3)> which avoids possible misuse and always uses at least
123664 rounds of the Miller-Rabin primality test.
1237
1238=item *
1239
1240BN_pseudo_rand(), BN_pseudo_rand_range()
1241
1242Use L<BN_rand(3)> and L<BN_rand_range(3)>.
1243
1244=item *
1245
1246BN_X931_derive_prime_ex(), BN_X931_generate_prime_ex(), BN_X931_generate_Xpq()
1247
1248There are no replacements for these low-level functions. They were used internally
1249by RSA_X931_derive_ex() and RSA_X931_generate_key_ex() which are also deprecated.
1250Use L<EVP_PKEY_keygen(3)> instead.
1251
1252=item *
1253
1254Camellia_encrypt(), Camellia_decrypt(), Camellia_set_key(),
1255Camellia_cbc_encrypt(), Camellia_cfb128_encrypt(), Camellia_cfb1_encrypt(),
1256Camellia_cfb8_encrypt(), Camellia_ctr128_encrypt(), Camellia_ecb_encrypt(),
1257Camellia_ofb128_encrypt()
1258
1259See L</Deprecated low-level encryption functions>.
1260
1261=item *
1262
1263CAST_encrypt(), CAST_decrypt(), CAST_set_key(), CAST_cbc_encrypt(),
1264CAST_cfb64_encrypt(), CAST_ecb_encrypt(), CAST_ofb64_encrypt()
1265
1266See L</Deprecated low-level encryption functions>.
1267The CAST algorithm has been moved to the L<Legacy Provider|/Legacy Algorithms>.
1268
1269=item *
1270
1271CMAC_CTX_new(), CMAC_CTX_cleanup(), CMAC_CTX_copy(), CMAC_CTX_free(),
1272CMAC_CTX_get0_cipher_ctx()
1273
1274See L</Deprecated low-level MAC functions>.
1275
1276=item *
1277
1278CMAC_Init(), CMAC_Update(), CMAC_Final(), CMAC_resume()
1279
1280See L</Deprecated low-level MAC functions>.
1281
1282=item *
1283
1284CRYPTO_mem_ctrl(), CRYPTO_mem_debug_free(), CRYPTO_mem_debug_malloc(),
1285CRYPTO_mem_debug_pop(), CRYPTO_mem_debug_push(), CRYPTO_mem_debug_realloc(),
1286CRYPTO_mem_leaks(), CRYPTO_mem_leaks_cb(), CRYPTO_mem_leaks_fp(),
1287CRYPTO_set_mem_debug()
1288
1289Memory-leak checking has been deprecated in favor of more modern development
1290tools, such as compiler memory and leak sanitizers or Valgrind.
1291
1292=item *
1293
1294CRYPTO_cts128_encrypt_block(), CRYPTO_cts128_encrypt(),
1295CRYPTO_cts128_decrypt_block(), CRYPTO_cts128_decrypt(),
1296CRYPTO_nistcts128_encrypt_block(), CRYPTO_nistcts128_encrypt(),
1297CRYPTO_nistcts128_decrypt_block(), CRYPTO_nistcts128_decrypt()
1298
1299Use the higher level functions EVP_CipherInit_ex2(), EVP_CipherUpdate() and
1300EVP_CipherFinal_ex() instead.
1301See the "cts_mode" parameter in
1302L<EVP_EncryptInit(3)/Gettable and Settable EVP_CIPHER_CTX parameters>.
1303See L<EVP_EncryptInit(3)/EXAMPLES> for a AES-256-CBC-CTS example.
1304
1305=item *
1306
1307d2i_DHparams(), d2i_DHxparams(), d2i_DSAparams(), d2i_DSAPrivateKey(),
1308d2i_DSAPrivateKey_bio(), d2i_DSAPrivateKey_fp(), d2i_DSA_PUBKEY(),
1309d2i_DSA_PUBKEY_bio(), d2i_DSA_PUBKEY_fp(), d2i_DSAPublicKey(),
1310d2i_ECParameters(), d2i_ECPrivateKey(), d2i_ECPrivateKey_bio(),
1311d2i_ECPrivateKey_fp(), d2i_EC_PUBKEY(), d2i_EC_PUBKEY_bio(),
1312d2i_EC_PUBKEY_fp(), o2i_ECPublicKey(), d2i_RSAPrivateKey(),
1313d2i_RSAPrivateKey_bio(), d2i_RSAPrivateKey_fp(), d2i_RSA_PUBKEY(),
1314d2i_RSA_PUBKEY_bio(), d2i_RSA_PUBKEY_fp(), d2i_RSAPublicKey(),
1315d2i_RSAPublicKey_bio(), d2i_RSAPublicKey_fp()
1316
1317See L</Deprecated i2d and d2i functions for low-level key types>
1318
1319=item *
1320
1321DES_crypt(), DES_fcrypt(), DES_encrypt1(), DES_encrypt2(), DES_encrypt3(),
1322DES_decrypt3(), DES_ede3_cbc_encrypt(), DES_ede3_cfb64_encrypt(),
1323DES_ede3_cfb_encrypt(),DES_ede3_ofb64_encrypt(),
1324DES_ecb_encrypt(), DES_ecb3_encrypt(), DES_ofb64_encrypt(), DES_ofb_encrypt(),
1325DES_cfb64_encrypt DES_cfb_encrypt(), DES_cbc_encrypt(), DES_ncbc_encrypt(),
1326DES_pcbc_encrypt(), DES_xcbc_encrypt(), DES_cbc_cksum(), DES_quad_cksum(),
1327DES_check_key_parity(), DES_is_weak_key(), DES_key_sched(), DES_options(),
1328DES_random_key(), DES_set_key(), DES_set_key_checked(), DES_set_key_unchecked(),
1329DES_set_odd_parity(), DES_string_to_2keys(), DES_string_to_key()
1330
1331See L</Deprecated low-level encryption functions>.
1332Algorithms for "DESX-CBC", "DES-ECB", "DES-CBC", "DES-OFB", "DES-CFB",
1333"DES-CFB1" and "DES-CFB8" have been moved to the L<Legacy Provider|/Legacy Algorithms>.
1334
1335=item *
1336
1337DH_bits(), DH_security_bits(), DH_size()
1338
1339Use L<EVP_PKEY_get_bits(3)>, L<EVP_PKEY_get_security_bits(3)> and
1340L<EVP_PKEY_get_size(3)>.
1341
1342=item *
1343
1344DH_check(), DH_check_ex(), DH_check_params(), DH_check_params_ex(),
1345DH_check_pub_key(), DH_check_pub_key_ex()
1346
1347See L</Deprecated low-level validation functions>
1348
1349=item *
1350
1351DH_clear_flags(), DH_test_flags(), DH_set_flags()
1352
1353The B<DH_FLAG_CACHE_MONT_P> flag has been deprecated without replacement.
1354The B<DH_FLAG_TYPE_DH> and B<DH_FLAG_TYPE_DHX> have been deprecated.
1355Use EVP_PKEY_is_a() to determine the type of a key.
1356There is no replacement for setting these flags.
1357
1358=item *
1359
1360DH_compute_key() DH_compute_key_padded()
1361
1362See L</Deprecated low-level key exchange functions>.
1363
1364=item *
1365
1366DH_new(), DH_new_by_nid(), DH_free(), DH_up_ref()
1367
1368See L</Deprecated low-level object creation>
1369
1370=item *
1371
1372DH_generate_key(), DH_generate_parameters_ex()
1373
1374See L</Deprecated low-level key generation functions>.
1375
1376=item *
1377
1378DH_get0_pqg(), DH_get0_p(), DH_get0_q(), DH_get0_g(), DH_get0_key(),
1379DH_get0_priv_key(), DH_get0_pub_key(), DH_get_length(), DH_get_nid()
1380
1381See L</Deprecated low-level key parameter getters>
1382
1383=item *
1384
1385DH_get_1024_160(), DH_get_2048_224(), DH_get_2048_256()
1386
1387Applications should instead set the B<OSSL_PKEY_PARAM_GROUP_NAME> as specified in
1388L<EVP_PKEY-DH(7)/DH parameters>) to one of "dh_1024_160", "dh_2048_224" or
1389"dh_2048_256" when generating a DH key.
1390
1391=item *
1392
1393DH_KDF_X9_42()
1394
1395Applications should use L<EVP_PKEY_CTX_set_dh_kdf_type(3)> instead.
1396
1397=item *
1398
1399DH_get_default_method(), DH_get0_engine(), DH_meth_*(), DH_new_method(),
1400DH_OpenSSL(), DH_get_ex_data(), DH_set_default_method(), DH_set_method(),
1401DH_set_ex_data()
1402
1403See L</Providers are a replacement for engines and low-level method overrides>
1404
1405=item *
1406
1407DHparams_print(), DHparams_print_fp()
1408
1409See L</Deprecated low-level key printing functions>
1410
1411=item *
1412
1413DH_set0_key(), DH_set0_pqg(), DH_set_length()
1414
1415See L</Deprecated low-level key parameter setters>
1416
1417=item *
1418
1419DSA_bits(), DSA_security_bits(), DSA_size()
1420
1421Use L<EVP_PKEY_get_bits(3)>, L<EVP_PKEY_get_security_bits(3)> and
1422L<EVP_PKEY_get_size(3)>.
1423
1424=item *
1425
1426DHparams_dup(), DSA_dup_DH()
1427
1428There is no direct replacement. Applications may use L<EVP_PKEY_copy_parameters(3)>
1429and L<EVP_PKEY_dup(3)> instead.
1430
1431=item *
1432
1433DSA_generate_key(), DSA_generate_parameters_ex()
1434
1435See L</Deprecated low-level key generation functions>.
1436
1437=item *
1438
1439DSA_get0_engine(), DSA_get_default_method(), DSA_get_ex_data(),
1440DSA_get_method(), DSA_meth_*(), DSA_new_method(), DSA_OpenSSL(),
1441DSA_set_default_method(), DSA_set_ex_data(), DSA_set_method()
1442
1443See L</Providers are a replacement for engines and low-level method overrides>.
1444
1445=item *
1446
1447DSA_get0_p(), DSA_get0_q(), DSA_get0_g(), DSA_get0_pqg(), DSA_get0_key(),
1448DSA_get0_priv_key(), DSA_get0_pub_key()
1449
1450See L</Deprecated low-level key parameter getters>.
1451
1452=item *
1453
1454DSA_new(), DSA_free(), DSA_up_ref()
1455
1456See L</Deprecated low-level object creation>
1457
1458=item *
1459
1460DSAparams_dup()
1461
1462There is no direct replacement. Applications may use L<EVP_PKEY_copy_parameters(3)>
1463and L<EVP_PKEY_dup(3)> instead.
1464
1465=item *
1466
1467DSAparams_print(), DSAparams_print_fp(), DSA_print(), DSA_print_fp()
1468
1469See L</Deprecated low-level key printing functions>
1470
1471=item *
1472
1473DSA_set0_key(), DSA_set0_pqg()
1474
1475See L</Deprecated low-level key parameter setters>
1476
1477=item *
1478
1479DSA_set_flags(), DSA_clear_flags(), DSA_test_flags()
1480
1481The B<DSA_FLAG_CACHE_MONT_P> flag has been deprecated without replacement.
1482
1483=item *
1484
1485DSA_sign(), DSA_do_sign(), DSA_sign_setup(), DSA_verify(), DSA_do_verify()
1486
1487See L</Deprecated low-level signing functions>.
1488
1489=item *
1490
1491ECDH_compute_key()
1492
1493See L</Deprecated low-level key exchange functions>.
1494
1495=item *
1496
1497ECDH_KDF_X9_62()
1498
1499Applications may either set this using the helper function
1500L<EVP_PKEY_CTX_set_ecdh_kdf_type(3)> or by setting an L<OSSL_PARAM(3)> using the
1501"kdf-type" as shown in L<EVP_KEYEXCH-ECDH(7)/EXAMPLES>
1502
1503=item *
1504
1505ECDSA_sign(), ECDSA_sign_ex(), ECDSA_sign_setup(), ECDSA_do_sign(),
1506ECDSA_do_sign_ex(), ECDSA_verify(), ECDSA_do_verify()
1507
1508See L</Deprecated low-level signing functions>.
1509
1510=item *
1511
1512ECDSA_size()
1513
1514Applications should use L<EVP_PKEY_get_size(3)>.
1515
1516=item *
1517
1518EC_GF2m_simple_method(), EC_GFp_mont_method(), EC_GFp_nist_method(),
1519EC_GFp_nistp224_method(), EC_GFp_nistp256_method(), EC_GFp_nistp521_method(),
1520EC_GFp_simple_method()
1521
1522There are no replacements for these functions. Applications should rely on the
1523library automatically assigning a suitable method internally when an EC_GROUP
1524is constructed.
1525
1526=item *
1527
1528EC_GROUP_clear_free()
1529
1530Use L<EC_GROUP_free(3)> instead.
1531
1532=item *
1533
1534EC_GROUP_get_curve_GF2m(), EC_GROUP_get_curve_GFp(), EC_GROUP_set_curve_GF2m(),
1535EC_GROUP_set_curve_GFp()
1536
1537Applications should use L<EC_GROUP_get_curve(3)> and L<EC_GROUP_set_curve(3)>.
1538
1539=item *
1540
1541EC_GROUP_have_precompute_mult(), EC_GROUP_precompute_mult(),
1542EC_KEY_precompute_mult()
1543
1544These functions are not widely used. Applications should instead switch to
1545named curves which OpenSSL has hardcoded lookup tables for.
1546
1547=item *
1548
1549EC_GROUP_new(), EC_GROUP_method_of(), EC_POINT_method_of()
1550
1551EC_METHOD is now an internal-only concept and a suitable EC_METHOD is assigned
1552internally without application intervention.
1553Users of EC_GROUP_new() should switch to a different suitable constructor.
1554
1555=item *
1556
1557EC_KEY_can_sign()
1558
1559Applications should use L<EVP_PKEY_can_sign(3)> instead.
1560
1561=item *
1562
1563EC_KEY_check_key()
1564
1565See L</Deprecated low-level validation functions>
1566
1567=item *
1568
1569EC_KEY_set_flags(), EC_KEY_get_flags(), EC_KEY_clear_flags()
1570
1571See L<EVP_PKEY-EC(7)/Common EC parameters> which handles flags as separate
1572parameters for B<OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT>,
1573B<OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE>, B<OSSL_PKEY_PARAM_EC_ENCODING>,
1574B<OSSL_PKEY_PARAM_USE_COFACTOR_ECDH> and
1575B<OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC>.
1576See also L<EVP_PKEY-EC(7)/EXAMPLES>
1577
1578=item *
1579
1580EC_KEY_dup(), EC_KEY_copy()
1581
1582There is no direct replacement. Applications may use L<EVP_PKEY_copy_parameters(3)>
1583and L<EVP_PKEY_dup(3)> instead.
1584
1585=item *
1586
1587EC_KEY_decoded_from_explicit_params()
1588
1589There is no replacement.
1590
1591=item *
1592
1593EC_KEY_generate_key()
1594
1595See L</Deprecated low-level key generation functions>.
1596
1597=item *
1598
1599EC_KEY_get0_group(), EC_KEY_get0_private_key(), EC_KEY_get0_public_key(),
1600EC_KEY_get_conv_form(), EC_KEY_get_enc_flags()
1601
1602See L</Deprecated low-level key parameter getters>.
1603
1604=item *
1605
1606EC_KEY_get0_engine(), EC_KEY_get_default_method(), EC_KEY_get_method(),
1607EC_KEY_new_method(), EC_KEY_get_ex_data(), EC_KEY_OpenSSL(),
1608EC_KEY_set_ex_data(), EC_KEY_set_default_method(), EC_KEY_METHOD_*(),
1609EC_KEY_set_method()
1610
1611See L</Providers are a replacement for engines and low-level method overrides>
1612
1613=item *
1614
1615EC_METHOD_get_field_type()
1616
1617Use L<EC_GROUP_get_field_type(3)> instead.
1618See L</Providers are a replacement for engines and low-level method overrides>
1619
1620=item *
1621
1622EC_KEY_key2buf(), EC_KEY_oct2key(), EC_KEY_oct2priv(), EC_KEY_priv2buf(),
1623EC_KEY_priv2oct()
1624
1625There are no replacements for these.
1626
1627=item *
1628
1629EC_KEY_new(), EC_KEY_new_by_curve_name(), EC_KEY_free(), EC_KEY_up_ref()
1630
1631See L</Deprecated low-level object creation>
1632
1633=item *
1634
1635EC_KEY_print(), EC_KEY_print_fp()
1636
1637See L</Deprecated low-level key printing functions>
1638
1639=item *
1640
1641EC_KEY_set_asn1_flag(), EC_KEY_set_conv_form(), EC_KEY_set_enc_flags()
1642
1643See L</Deprecated low-level key parameter setters>.
1644
1645=item *
1646
1647EC_KEY_set_group(), EC_KEY_set_private_key(), EC_KEY_set_public_key(),
1648EC_KEY_set_public_key_affine_coordinates()
1649
1650See L</Deprecated low-level key parameter setters>.
1651
1652=item *
1653
1654ECParameters_print(), ECParameters_print_fp(), ECPKParameters_print(),
1655ECPKParameters_print_fp()
1656
1657See L</Deprecated low-level key printing functions>
1658
1659=item *
1660
1661EC_POINT_bn2point(), EC_POINT_point2bn()
1662
1663These functions were not particularly useful, since EC point serialization
1664formats are not individual big-endian integers.
1665
1666=item *
1667
1668EC_POINT_get_affine_coordinates_GF2m(), EC_POINT_get_affine_coordinates_GFp(),
1669EC_POINT_set_affine_coordinates_GF2m(), EC_POINT_set_affine_coordinates_GFp()
1670
1671Applications should use L<EC_POINT_get_affine_coordinates(3)> and
1672L<EC_POINT_set_affine_coordinates(3)> instead.
1673
1674=item *
1675
1676EC_POINT_get_Jprojective_coordinates_GFp(), EC_POINT_set_Jprojective_coordinates_GFp()
1677
1678These functions are not widely used. Applications should instead use the
1679L<EC_POINT_set_affine_coordinates(3)> and L<EC_POINT_get_affine_coordinates(3)>
1680functions.
1681
1682=item *
1683
1684EC_POINT_make_affine(), EC_POINTs_make_affine()
1685
1686There is no replacement. These functions were not widely used, and OpenSSL
1687automatically performs this conversion when needed.
1688
1689=item *
1690
1691EC_POINT_set_compressed_coordinates_GF2m(), EC_POINT_set_compressed_coordinates_GFp()
1692
1693Applications should use L<EC_POINT_set_compressed_coordinates(3)> instead.
1694
1695=item *
1696
1697EC_POINTs_mul()
1698
1699This function is not widely used. Applications should instead use the
1700L<EC_POINT_mul(3)> function.
1701
1702=item *
1703
1704B<ENGINE_*()>
1705
1706All engine functions are deprecated. An engine should be rewritten as a provider.
1707See L</Providers are a replacement for engines and low-level method overrides>.
1708
1709=item *
1710
1711B<ERR_load_*()>, ERR_func_error_string(), ERR_get_error_line(),
1712ERR_get_error_line_data(), ERR_get_state()
1713
1714OpenSSL now loads error strings automatically so these functions are not needed.
1715
1716=item *
1717
1718ERR_peek_error_line_data(), ERR_peek_last_error_line_data()
1719
1720The new functions are L<ERR_peek_error_func(3)>, L<ERR_peek_last_error_func(3)>,
1721L<ERR_peek_error_data(3)>, L<ERR_peek_last_error_data(3)>, L<ERR_get_error_all(3)>,
1722L<ERR_peek_error_all(3)> and L<ERR_peek_last_error_all(3)>.
1723Applications should use L<ERR_get_error_all(3)>, or pick information
1724with ERR_peek functions and finish off with getting the error code by using
1725L<ERR_get_error(3)>.
1726
1727=item *
1728
1729EVP_CIPHER_CTX_iv(), EVP_CIPHER_CTX_iv_noconst(), EVP_CIPHER_CTX_original_iv()
1730
1731Applications should instead use L<EVP_CIPHER_CTX_get_updated_iv(3)>,
1732L<EVP_CIPHER_CTX_get_updated_iv(3)> and L<EVP_CIPHER_CTX_get_original_iv(3)>
1733respectively.
1734See L<EVP_CIPHER_CTX_get_original_iv(3)> for further information.
1735
1736=item *
1737
1738B<EVP_CIPHER_meth_*()>, EVP_MD_CTX_set_update_fn(), EVP_MD_CTX_update_fn(),
1739B<EVP_MD_meth_*()>
1740
1741See L</Providers are a replacement for engines and low-level method overrides>.
1742
1743=item *
1744
1745EVP_PKEY_CTRL_PKCS7_ENCRYPT(), EVP_PKEY_CTRL_PKCS7_DECRYPT(),
1746EVP_PKEY_CTRL_PKCS7_SIGN(), EVP_PKEY_CTRL_CMS_ENCRYPT(),
1747EVP_PKEY_CTRL_CMS_DECRYPT(), and EVP_PKEY_CTRL_CMS_SIGN()
1748
1749These control operations are not invoked by the OpenSSL library anymore and
1750are replaced by direct checks of the key operation against the key type
1751when the operation is initialized.
1752
1753=item *
1754
1755EVP_PKEY_CTX_get0_dh_kdf_ukm(), EVP_PKEY_CTX_get0_ecdh_kdf_ukm()
1756
1757See the "kdf-ukm" item in L<EVP_KEYEXCH-DH(7)/DH key exchange parameters> and
1758L<EVP_KEYEXCH-ECDH(7)/ECDH Key Exchange parameters>.
1759These functions are obsolete and should not be required.
1760
1761=item *
1762
1763EVP_PKEY_CTX_set_rsa_keygen_pubexp()
1764
1765Applications should use L<EVP_PKEY_CTX_set1_rsa_keygen_pubexp(3)> instead.
1766
1767=item *
1768
1769EVP_PKEY_cmp(), EVP_PKEY_cmp_parameters()
1770
1771Applications should use L<EVP_PKEY_eq(3)> and L<EVP_PKEY_parameters_eq(3)> instead.
1772See L<EVP_PKEY_copy_parameters(3)> for further details.
1773
1774=item *
1775
1776EVP_PKEY_encrypt_old(), EVP_PKEY_decrypt_old(),
1777
1778Applications should use L<EVP_PKEY_encrypt_init(3)> and L<EVP_PKEY_encrypt(3)> or
1779L<EVP_PKEY_decrypt_init(3)> and L<EVP_PKEY_decrypt(3)> instead.
1780
1781=item *
1782
1783EVP_PKEY_get0()
1784
1785This function returns NULL if the key comes from a provider.
1786
1787=item *
1788
1789EVP_PKEY_get0_DH(), EVP_PKEY_get0_DSA(), EVP_PKEY_get0_EC_KEY(), EVP_PKEY_get0_RSA(),
1790EVP_PKEY_get1_DH(), EVP_PKEY_get1_DSA(), EVP_PKEY_get1_EC_KEY and EVP_PKEY_get1_RSA(),
1791EVP_PKEY_get0_hmac(), EVP_PKEY_get0_poly1305(), EVP_PKEY_get0_siphash()
1792
1793See L</Functions that return an internal key should be treated as read only>.
1794
1795=item *
1796
1797B<EVP_PKEY_meth_*()>
1798
1799See L</Providers are a replacement for engines and low-level method overrides>.
1800
1801=item *
1802
1803EVP_PKEY_new_CMAC_key()
1804
1805See L</Deprecated low-level MAC functions>.
1806
1807=item *
1808
1809EVP_PKEY_assign(), EVP_PKEY_set1_DH(), EVP_PKEY_set1_DSA(),
1810EVP_PKEY_set1_EC_KEY(), EVP_PKEY_set1_RSA()
1811
1812See L</Deprecated low-level key object getters and setters>
1813
1814=item *
1815
1816EVP_PKEY_set1_tls_encodedpoint() EVP_PKEY_get1_tls_encodedpoint()
1817
1818These functions were previously used by libssl to set or get an encoded public
1819key into/from an EVP_PKEY object. With OpenSSL 3.0 these are replaced by the more
1820generic functions L<EVP_PKEY_set1_encoded_public_key(3)> and
1821L<EVP_PKEY_get1_encoded_public_key(3)>.
1822The old versions have been converted to deprecated macros that just call the
1823new functions.
1824
1825=item *
1826
1827EVP_PKEY_set1_engine(), EVP_PKEY_get0_engine()
1828
1829See L</Providers are a replacement for engines and low-level method overrides>.
1830
1831=item *
1832
1833EVP_PKEY_set_alias_type()
1834
1835This function has been removed. There is no replacement.
1836See L</EVP_PKEY_set_alias_type() method has been removed>
1837
1838=item *
1839
1840HMAC_Init_ex(), HMAC_Update(), HMAC_Final(), HMAC_size()
1841
1842See L</Deprecated low-level MAC functions>.
1843
1844=item *
1845
1846HMAC_CTX_new(), HMAC_CTX_free(), HMAC_CTX_copy(), HMAC_CTX_reset(),
1847HMAC_CTX_set_flags(), HMAC_CTX_get_md()
1848
1849See L</Deprecated low-level MAC functions>.
1850
1851=item *
1852
1853i2d_DHparams(), i2d_DHxparams()
1854
1855See L</Deprecated low-level key reading and writing functions>
1856and L<d2i_RSAPrivateKey(3)/Migration>
1857
1858=item *
1859
1860i2d_DSAparams(), i2d_DSAPrivateKey(), i2d_DSAPrivateKey_bio(),
1861i2d_DSAPrivateKey_fp(), i2d_DSA_PUBKEY(), i2d_DSA_PUBKEY_bio(),
1862i2d_DSA_PUBKEY_fp(), i2d_DSAPublicKey()
1863
1864See L</Deprecated low-level key reading and writing functions>
1865and L<d2i_RSAPrivateKey(3)/Migration>
1866
1867=item *
1868
1869i2d_ECParameters(), i2d_ECPrivateKey(), i2d_ECPrivateKey_bio(),
1870i2d_ECPrivateKey_fp(), i2d_EC_PUBKEY(), i2d_EC_PUBKEY_bio(),
1871i2d_EC_PUBKEY_fp(), i2o_ECPublicKey()
1872
1873See L</Deprecated low-level key reading and writing functions>
1874and L<d2i_RSAPrivateKey(3)/Migration>
1875
1876=item *
1877
1878i2d_RSAPrivateKey(), i2d_RSAPrivateKey_bio(), i2d_RSAPrivateKey_fp(),
1879i2d_RSA_PUBKEY(), i2d_RSA_PUBKEY_bio(), i2d_RSA_PUBKEY_fp(),
1880i2d_RSAPublicKey(), i2d_RSAPublicKey_bio(), i2d_RSAPublicKey_fp()
1881
1882See L</Deprecated low-level key reading and writing functions>
1883and L<d2i_RSAPrivateKey(3)/Migration>
1884
1885=item *
1886
1887IDEA_encrypt(), IDEA_set_decrypt_key(), IDEA_set_encrypt_key(),
1888IDEA_cbc_encrypt(), IDEA_cfb64_encrypt(), IDEA_ecb_encrypt(),
1889IDEA_ofb64_encrypt()
1890
1891See L</Deprecated low-level encryption functions>.
1892IDEA has been moved to the L<Legacy Provider|/Legacy Algorithms>.
1893
1894=item *
1895
1896IDEA_options()
1897
1898There is no replacement. This function returned a constant string.
1899
1900=item *
1901
1902MD2(), MD2_Init(), MD2_Update(), MD2_Final()
1903
1904See L</Deprecated low-level encryption functions>.
1905MD2 has been moved to the L<Legacy Provider|/Legacy Algorithms>.
1906
1907=item *
1908
1909MD2_options()
1910
1911There is no replacement. This function returned a constant string.
1912
1913=item *
1914
1915MD4(), MD4_Init(), MD4_Update(), MD4_Final(), MD4_Transform()
1916
1917See L</Deprecated low-level encryption functions>.
1918MD4 has been moved to the L<Legacy Provider|/Legacy Algorithms>.
1919
1920=item *
1921
1922MDC2(), MDC2_Init(), MDC2_Update(), MDC2_Final()
1923
1924See L</Deprecated low-level encryption functions>.
1925MDC2 has been moved to the L<Legacy Provider|/Legacy Algorithms>.
1926
1927=item *
1928
1929MD5(), MD5_Init(), MD5_Update(), MD5_Final(), MD5_Transform()
1930
1931See L</Deprecated low-level encryption functions>.
1932
1933=item *
1934
1935NCONF_WIN32()
1936
1937This undocumented function has no replacement.
1938See L<config(5)/HISTORY> for more details.
1939
1940=item *
1941
1942OCSP_parse_url()
1943
1944Use L<OSSL_HTTP_parse_url(3)> instead.
1945
1946=item *
1947
1948B<OCSP_REQ_CTX> type and B<OCSP_REQ_CTX_*()> functions
1949
1950These methods were used to collect all necessary data to form a HTTP request,
1951and to perform the HTTP transfer with that request. With OpenSSL 3.0, the
1952type is B<OSSL_HTTP_REQ_CTX>, and the deprecated functions are replaced
1953with B<OSSL_HTTP_REQ_CTX_*()>. See L<OSSL_HTTP_REQ_CTX(3)> for additional
1954details.
1955
1956=item *
1957
1958OPENSSL_fork_child(), OPENSSL_fork_parent(), OPENSSL_fork_prepare()
1959
1960There is no replacement for these functions. These pthread fork support methods
1961were unused by OpenSSL.
1962
1963=item *
1964
1965OSSL_STORE_ctrl(), OSSL_STORE_do_all_loaders(), OSSL_STORE_LOADER_get0_engine(),
1966OSSL_STORE_LOADER_get0_scheme(), OSSL_STORE_LOADER_new(),
1967OSSL_STORE_LOADER_set_attach(), OSSL_STORE_LOADER_set_close(),
1968OSSL_STORE_LOADER_set_ctrl(), OSSL_STORE_LOADER_set_eof(),
1969OSSL_STORE_LOADER_set_error(), OSSL_STORE_LOADER_set_expect(),
1970OSSL_STORE_LOADER_set_find(), OSSL_STORE_LOADER_set_load(),
1971OSSL_STORE_LOADER_set_open(), OSSL_STORE_LOADER_set_open_ex(),
1972OSSL_STORE_register_loader(), OSSL_STORE_unregister_loader(),
1973OSSL_STORE_vctrl()
1974
1975These functions helped applications and engines create loaders for
1976schemes they supported. These are all deprecated and discouraged in favour of
1977provider implementations, see L<provider-storemgmt(7)>.
1978
1979=item *
1980
1981PEM_read_DHparams(), PEM_read_bio_DHparams(),
1982PEM_read_DSAparams(), PEM_read_bio_DSAparams(),
1983PEM_read_DSAPrivateKey(), PEM_read_DSA_PUBKEY(),
1984PEM_read_bio_DSAPrivateKey and PEM_read_bio_DSA_PUBKEY(),
1985PEM_read_ECPKParameters(), PEM_read_ECPrivateKey(), PEM_read_EC_PUBKEY(),
1986PEM_read_bio_ECPKParameters(), PEM_read_bio_ECPrivateKey(), PEM_read_bio_EC_PUBKEY(),
1987PEM_read_RSAPrivateKey(), PEM_read_RSA_PUBKEY(), PEM_read_RSAPublicKey(),
1988PEM_read_bio_RSAPrivateKey(), PEM_read_bio_RSA_PUBKEY(), PEM_read_bio_RSAPublicKey(),
1989PEM_write_bio_DHparams(), PEM_write_bio_DHxparams(), PEM_write_DHparams(), PEM_write_DHxparams(),
1990PEM_write_DSAparams(), PEM_write_DSAPrivateKey(), PEM_write_DSA_PUBKEY(),
1991PEM_write_bio_DSAparams(), PEM_write_bio_DSAPrivateKey(), PEM_write_bio_DSA_PUBKEY(),
1992PEM_write_ECPKParameters(), PEM_write_ECPrivateKey(), PEM_write_EC_PUBKEY(),
1993PEM_write_bio_ECPKParameters(), PEM_write_bio_ECPrivateKey(), PEM_write_bio_EC_PUBKEY(),
1994PEM_write_RSAPrivateKey(), PEM_write_RSA_PUBKEY(), PEM_write_RSAPublicKey(),
1995PEM_write_bio_RSAPrivateKey(), PEM_write_bio_RSA_PUBKEY(),
1996PEM_write_bio_RSAPublicKey(),
1997
1998See L</Deprecated low-level key reading and writing functions>
1999
2000=item *
2001
2002PKCS1_MGF1()
2003
2004See L</Deprecated low-level encryption functions>.
2005
2006=item *
2007
2008RAND_get_rand_method(), RAND_set_rand_method(), RAND_OpenSSL(),
2009RAND_set_rand_engine()
2010
2011Applications should instead use L<RAND_set_DRBG_type(3)>,
2012L<EVP_RAND(3)> and L<EVP_RAND(7)>.
2013See L<RAND_set_rand_method(3)> for more details.
2014
2015=item *
2016
2017RC2_encrypt(), RC2_decrypt(), RC2_set_key(), RC2_cbc_encrypt(), RC2_cfb64_encrypt(),
2018RC2_ecb_encrypt(), RC2_ofb64_encrypt(),
2019RC4(), RC4_set_key(), RC4_options(),
2020RC5_32_encrypt(), RC5_32_set_key(), RC5_32_decrypt(), RC5_32_cbc_encrypt(),
2021RC5_32_cfb64_encrypt(), RC5_32_ecb_encrypt(), RC5_32_ofb64_encrypt()
2022
2023See L</Deprecated low-level encryption functions>.
2024The Algorithms "RC2", "RC4" and "RC5" have been moved to the L<Legacy Provider|/Legacy Algorithms>.
2025
2026=item *
2027
2028RIPEMD160(), RIPEMD160_Init(), RIPEMD160_Update(), RIPEMD160_Final(),
2029RIPEMD160_Transform()
2030
2031See L</Deprecated low-level digest functions>.
2032The RIPE algorithm has been moved to the L<Legacy Provider|/Legacy Algorithms>.
2033
2034=item *
2035
2036RSA_bits(), RSA_security_bits(), RSA_size()
2037
2038Use L<EVP_PKEY_get_bits(3)>, L<EVP_PKEY_get_security_bits(3)> and
2039L<EVP_PKEY_get_size(3)>.
2040
2041=item *
2042
2043RSA_check_key(), RSA_check_key_ex()
2044
2045See L</Deprecated low-level validation functions>
2046
2047=item *
2048
2049RSA_clear_flags(), RSA_flags(), RSA_set_flags(), RSA_test_flags(),
2050RSA_setup_blinding(), RSA_blinding_off(), RSA_blinding_on()
2051
2052All of these RSA flags have been deprecated without replacement:
2053
2054B<RSA_FLAG_BLINDING>, B<RSA_FLAG_CACHE_PRIVATE>, B<RSA_FLAG_CACHE_PUBLIC>,
2055B<RSA_FLAG_EXT_PKEY>, B<RSA_FLAG_NO_BLINDING>, B<RSA_FLAG_THREAD_SAFE>
2056B<RSA_METHOD_FLAG_NO_CHECK>
2057
2058=item *
2059
2060RSA_generate_key_ex(), RSA_generate_multi_prime_key()
2061
2062See L</Deprecated low-level key generation functions>.
2063
2064=item *
2065
2066RSA_get0_engine()
2067
2068See L</Providers are a replacement for engines and low-level method overrides>
2069
2070=item *
2071
2072RSA_get0_crt_params(), RSA_get0_d(), RSA_get0_dmp1(), RSA_get0_dmq1(),
2073RSA_get0_e(), RSA_get0_factors(), RSA_get0_iqmp(), RSA_get0_key(),
2074RSA_get0_multi_prime_crt_params(), RSA_get0_multi_prime_factors(), RSA_get0_n(),
2075RSA_get0_p(), RSA_get0_pss_params(), RSA_get0_q(),
2076RSA_get_multi_prime_extra_count()
2077
2078See L</Deprecated low-level key parameter getters>
2079
2080=item *
2081
2082RSA_new(), RSA_free(), RSA_up_ref()
2083
2084See L</Deprecated low-level object creation>.
2085
2086=item *
2087
2088RSA_get_default_method(), RSA_get_ex_data and RSA_get_method()
2089
2090See L</Providers are a replacement for engines and low-level method overrides>.
2091
2092=item *
2093
2094RSA_get_version()
2095
2096There is no replacement.
2097
2098=item *
2099
2100B<RSA_meth_*()>, RSA_new_method(), RSA_null_method and RSA_PKCS1_OpenSSL()
2101
2102See L</Providers are a replacement for engines and low-level method overrides>.
2103
2104=item *
2105
2106B<RSA_padding_add_*()>, B<RSA_padding_check_*()>
2107
2108See L</Deprecated low-level signing functions> and
2109L</Deprecated low-level encryption functions>.
2110
2111=item *
2112
2113RSA_print(), RSA_print_fp()
2114
2115See L</Deprecated low-level key printing functions>
2116
2117=item *
2118
2119RSA_public_encrypt(), RSA_private_decrypt()
2120
2121See L</Deprecated low-level encryption functions>
2122
2123=item *
2124
2125RSA_private_encrypt(), RSA_public_decrypt()
2126
2127This is equivalent to doing sign and verify recover operations (with a padding
2128mode of none). See L</Deprecated low-level signing functions>.
2129
2130=item *
2131
2132RSAPrivateKey_dup(), RSAPublicKey_dup()
2133
2134There is no direct replacement. Applications may use L<EVP_PKEY_dup(3)>.
2135
2136=item *
2137
2138RSAPublicKey_it(), RSAPrivateKey_it()
2139
2140See L</Deprecated low-level key reading and writing functions>
2141
2142=item *
2143
2144RSA_set0_crt_params(), RSA_set0_factors(), RSA_set0_key(),
2145RSA_set0_multi_prime_params()
2146
2147See L</Deprecated low-level key parameter setters>.
2148
2149=item *
2150
2151RSA_set_default_method(), RSA_set_method(), RSA_set_ex_data()
2152
2153See L</Providers are a replacement for engines and low-level method overrides>
2154
2155=item *
2156
2157RSA_sign(), RSA_sign_ASN1_OCTET_STRING(), RSA_verify(),
2158RSA_verify_ASN1_OCTET_STRING(), RSA_verify_PKCS1_PSS(),
2159RSA_verify_PKCS1_PSS_mgf1()
2160
2161See L</Deprecated low-level signing functions>.
2162
2163=item *
2164
2165RSA_X931_derive_ex(), RSA_X931_generate_key_ex(), RSA_X931_hash_id()
2166
2167There are no replacements for these functions.
2168X931 padding can be set using L<EVP_SIGNATURE-RSA(7)/Signature Parameters>.
2169See B<OSSL_SIGNATURE_PARAM_PAD_MODE>.
2170
2171=item *
2172
2173SEED_encrypt(), SEED_decrypt(), SEED_set_key(), SEED_cbc_encrypt(),
2174SEED_cfb128_encrypt(), SEED_ecb_encrypt(), SEED_ofb128_encrypt()
2175
2176See L</Deprecated low-level encryption functions>.
2177The SEED algorithm has been moved to the L<Legacy Provider|/Legacy Algorithms>.
2178
2179=item *
2180
2181SHA1_Init(), SHA1_Update(), SHA1_Final(), SHA1_Transform(),
2182SHA224_Init(), SHA224_Update(), SHA224_Final(),
2183SHA256_Init(), SHA256_Update(), SHA256_Final(), SHA256_Transform(),
2184SHA384_Init(), SHA384_Update(), SHA384_Final(),
2185SHA512_Init(), SHA512_Update(), SHA512_Final(), SHA512_Transform()
2186
2187See L</Deprecated low-level digest functions>.
2188
2189=item *
2190
2191SRP_Calc_A(), SRP_Calc_B(), SRP_Calc_client_key(), SRP_Calc_server_key(),
2192SRP_Calc_u(), SRP_Calc_x(), SRP_check_known_gN_param(), SRP_create_verifier(),
2193SRP_create_verifier_BN(), SRP_get_default_gN(), SRP_user_pwd_free(), SRP_user_pwd_new(),
2194SRP_user_pwd_set0_sv(), SRP_user_pwd_set1_ids(), SRP_user_pwd_set_gN(),
2195SRP_VBASE_add0_user(), SRP_VBASE_free(), SRP_VBASE_get1_by_user(), SRP_VBASE_init(),
2196SRP_VBASE_new(), SRP_Verify_A_mod_N(), SRP_Verify_B_mod_N()
2197
2198There are no replacements for the SRP functions.
2199
2200=item *
2201
2202SSL_CTX_set_tmp_dh_callback(), SSL_set_tmp_dh_callback(),
2203SSL_CTX_set_tmp_dh(), SSL_set_tmp_dh()
2204
2205These are used to set the Diffie-Hellman (DH) parameters that are to be used by
2206servers requiring ephemeral DH keys. Instead applications should consider using
2207the built-in DH parameters that are available by calling L<SSL_CTX_set_dh_auto(3)>
2208or L<SSL_set_dh_auto(3)>. If custom parameters are necessary then applications can
2209use the alternative functions L<SSL_CTX_set0_tmp_dh_pkey(3)> and
2210L<SSL_set0_tmp_dh_pkey(3)>. There is no direct replacement for the "callback"
2211functions. The callback was originally useful in order to have different
2212parameters for export and non-export ciphersuites. Export ciphersuites are no
2213longer supported by OpenSSL. Use of the callback functions should be replaced
2214by one of the other methods described above.
2215
2216=item *
2217
2218SSL_CTX_set_tlsext_ticket_key_cb()
2219
2220Use the new L<SSL_CTX_set_tlsext_ticket_key_evp_cb(3)> function instead.
2221
2222=item *
2223
2224WHIRLPOOL(), WHIRLPOOL_Init(), WHIRLPOOL_Update(), WHIRLPOOL_Final(),
2225WHIRLPOOL_BitUpdate()
2226
2227See L</Deprecated low-level digest functions>.
2228The Whirlpool algorithm has been moved to the L<Legacy Provider|/Legacy Algorithms>.
2229
2230=item *
2231
2232X509_certificate_type()
2233
2234This was an undocumented function. Applications can use L<X509_get0_pubkey(3)>
2235and L<X509_get0_signature(3)> instead.
2236
2237=item *
2238
2239X509_http_nbio(), X509_CRL_http_nbio()
2240
2241Use L<X509_load_http(3)> and L<X509_CRL_load_http(3)> instead.
2242
2243=back
2244
2245=head2 Using the FIPS Module in applications
2246
2247See L<fips_module(7)> and L<OSSL_PROVIDER-FIPS(7)> for details.
2248
2249=head2 OpenSSL command line application changes
2250
2251=head3 New applications
2252
2253L<B<openssl kdf>|openssl-kdf(1)> uses the new L<EVP_KDF(3)> API.
2254L<B<openssl kdf>|openssl-mac(1)> uses the new L<EVP_MAC(3)> API.
2255
2256=head3 Added options
2257
2258B<-provider_path> and B<-provider> are available to all apps and can be used
2259multiple times to load any providers, such as the 'legacy' provider or third
2260party providers. If used then the 'default' provider would also need to be
2261specified if required. The B<-provider_path> must be specified before the
2262B<-provider> option.
2263
2264The B<list> app has many new options. See L<openssl-list(1)> for more
2265information.
2266
2267B<-crl_lastupdate> and B<-crl_nextupdate> used by B<openssl ca> allows
2268explicit setting of fields in the generated CRL.
2269
2270=head3 Removed options
2271
2272Interactive mode is not longer available.
2273
2274The B<-crypt> option used by B<openssl passwd>.
2275The B<-c> option used by B<openssl x509>, B<openssl dhparam>,
2276B<openssl dsaparam>, and B<openssl ecparam>.
2277
2278=head3 Other Changes
2279
2280The output of Command line applications may have minor changes.
2281These are primarily changes in capitalisation and white space. However, in some
2282cases, there are additional differences.
2283For example, the DH parameters output from B<openssl dhparam> now lists 'P',
2284'Q', 'G' and 'pcounter' instead of 'prime', 'generator', 'subgroup order' and
2285'counter' respectively.
2286
2287The B<openssl> commands that read keys, certificates, and CRLs now
2288automatically detect the PEM or DER format of the input files so it is not
2289necessary to explicitly specify the input format anymore. However if the
2290input format option is used the specified format will be required.
2291
2292B<openssl speed> no longer uses low-level API calls.
2293This implies some of the performance numbers might not be comparable with the
2294previous releases due to higher overhead. This applies particularly to
2295measuring performance on smaller data chunks.
2296
2297b<openssl dhparam>, B<openssl dsa>, B<openssl gendsa>, B<openssl dsaparam>,
2298B<openssl genrsa> and B<openssl rsa> have been modified to use PKEY APIs.
2299B<openssl genrsa> and B<openssl rsa> now write PKCS #8 keys by default.
2300
2301=head3 Default settings
2302
2303"SHA256" is now the default digest for TS query used by B<openssl ts>.
2304
2305=head3 Deprecated apps
2306
2307B<openssl rsautl> is deprecated, use B<openssl pkeyutl> instead.
2308B<openssl dhparam>, B<openssl dsa>, B<openssl gendsa>, B<openssl dsaparam>,
2309B<openssl genrsa>, B<openssl rsa>, B<openssl genrsa> and B<openssl rsa> are
2310now in maintenance mode and no new features will be added to them.
2311
2312=head2 TLS Changes
2313
2314=over 4
2315
2316=item *
2317
2318TLS 1.3 FFDHE key exchange support added
2319
2320This uses DH safe prime named groups.
2321
2322=item *
2323
2324Support for fully "pluggable" TLSv1.3 groups.
2325
2326This means that providers may supply their own group implementations (using
2327either the "key exchange" or the "key encapsulation" methods) which will
2328automatically be detected and used by libssl.
2329
2330=item *
2331
2332SSL and SSL_CTX options are now 64 bit instead of 32 bit.
2333
2334The signatures of the functions to get and set options on SSL and
2335SSL_CTX objects changed from "unsigned long" to "uint64_t" type.
2336
2337This may require source code changes. For example it is no longer possible
2338to use the B<SSL_OP_> macro values in preprocessor C<#if> conditions.
2339However it is still possible to test whether these macros are defined or not.
2340
2341See L<SSL_CTX_get_options(3)>, L<SSL_CTX_set_options(3)>,
2342L<SSL_get_options(3)> and L<SSL_set_options(3)>.
2343
2344=item *
2345
2346SSL_set1_host() and SSL_add1_host() Changes
2347
2348These functions now take IP literal addresses as well as actual hostnames.
2349
2350=item *
2351
2352Added SSL option SSL_OP_CLEANSE_PLAINTEXT
2353
2354If the option is set, openssl cleanses (zeroizes) plaintext bytes from
2355internal buffers after delivering them to the application. Note,
2356the application is still responsible for cleansing other copies
2357(e.g.: data received by L<SSL_read(3)>).
2358
2359=item *
2360
2361Client-initiated renegotiation is disabled by default.
2362
2363To allow it, use the B<-client_renegotiation> option,
2364the B<SSL_OP_ALLOW_CLIENT_RENEGOTIATION> flag, or the C<ClientRenegotiation>
2365config parameter as appropriate.
2366
2367=item *
2368
2369Secure renegotiation is now required by default for TLS connections
2370
2371Support for RFC 5746 secure renegotiation is now required by default for
2372SSL or TLS connections to succeed. Applications that require the ability
2373to connect to legacy peers will need to explicitly set
2374SSL_OP_LEGACY_SERVER_CONNECT. Accordingly, SSL_OP_LEGACY_SERVER_CONNECT
2375is no longer set as part of SSL_OP_ALL.
2376
2377=item *
2378
2379Combining the Configure options no-ec and no-dh no longer disables TLSv1.3
2380
2381Typically if OpenSSL has no EC or DH algorithms then it cannot support
2382connections with TLSv1.3. However OpenSSL now supports "pluggable" groups
2383through providers. Therefore third party providers may supply group
2384implementations even where there are no built-in ones. Attempting to create
2385TLS connections in such a build without also disabling TLSv1.3 at run time or
2386using third party provider groups may result in handshake failures. TLSv1.3
2387can be disabled at compile time using the "no-tls1_3" Configure option.
2388
2389=item *
2390
2391SSL_CTX_set_ciphersuites() and SSL_set_ciphersuites() changes.
2392
2393The methods now ignore unknown ciphers.
2394
2395=item *
2396
2397Security callback change.
2398
2399The security callback, which can be customised by application code, supports
2400the security operation SSL_SECOP_TMP_DH. This is defined to take an EVP_PKEY
2401in the "other" parameter. In most places this is what is passed. All these
2402places occur server side. However there was one client side call of this
2403security operation and it passed a DH object instead. This is incorrect
2404according to the definition of SSL_SECOP_TMP_DH, and is inconsistent with all
2405of the other locations. Therefore this client side call has been changed to
2406pass an EVP_PKEY instead.
2407
2408=item *
2409
2410New SSL option SSL_OP_IGNORE_UNEXPECTED_EOF
2411
2412The SSL option SSL_OP_IGNORE_UNEXPECTED_EOF is introduced. If that option
2413is set, an unexpected EOF is ignored, it pretends a close notify was received
2414instead and so the returned error becomes SSL_ERROR_ZERO_RETURN.
2415
2416=item *
2417
2418The security strength of SHA1 and MD5 based signatures in TLS has been reduced.
2419
2420This results in SSL 3, TLS 1.0, TLS 1.1 and DTLS 1.0 no longer
2421working at the default security level of 1 and instead requires security
2422level 0. The security level can be changed either using the cipher string
2423with C<@SECLEVEL>, or calling L<SSL_CTX_set_security_level(3)>. This also means
2424that where the signature algorithms extension is missing from a ClientHello
2425then the handshake will fail in TLS 1.2 at security level 1. This is because,
2426although this extension is optional, failing to provide one means that
2427OpenSSL will fallback to a default set of signature algorithms. This default
2428set requires the availability of SHA1.
2429
2430=item *
2431
2432X509 certificates signed using SHA1 are no longer allowed at security level 1 and above.
2433
2434In TLS/SSL the default security level is 1. It can be set either using the cipher
2435string with C<@SECLEVEL>, or calling L<SSL_CTX_set_security_level(3)>. If the
2436leaf certificate is signed with SHA-1, a call to L<SSL_CTX_use_certificate(3)>
2437will fail if the security level is not lowered first.
2438Outside TLS/SSL, the default security level is -1 (effectively 0). It can
2439be set using L<X509_VERIFY_PARAM_set_auth_level(3)> or using the B<-auth_level>
2440options of the commands.
2441
2442=back
2443
2444=head1 SEE ALSO
2445
2446L<fips_module(7)>
2447
2448=head1 HISTORY
2449
2450The migration guide was created for OpenSSL 3.0.
2451
2452=head1 COPYRIGHT
2453
2454Copyright 2021-2023 The OpenSSL Project Authors. All Rights Reserved.
2455
2456Licensed under the Apache License 2.0 (the "License"). You may not use
2457this file except in compliance with the License. You can obtain a copy
2458in the file LICENSE in the source distribution or at
2459L<https://www.openssl.org/source/license.html>.
2460
2461=cut
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette