From 0d81c69b8ebfe1d0852a5f5a80fd6eff69479665 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 26 Mar 2002 14:28:04 +0000 Subject: [PATCH] Add the possibility to enable olde des support, not just disable it, for future support. Redocument --- CHANGES | 27 +++++++++++++++++++-------- crypto/des/des.h | 6 ++++++ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index 67aa57833b..3da1e630e3 100644 --- a/CHANGES +++ b/CHANGES @@ -399,19 +399,30 @@ +) Change all functions with names starting with des_ to be starting with DES_ instead. Add wrappers that are compatible with libdes, but are named _ossl_old_des_*. Finally, add macros that map the - des_* symbols to the corresponding _ossl_old_des_*. + des_* symbols to the corresponding _ossl_old_des_* if libdes + compatibility is desired. If OpenSSL 0.9.6c compatibility is + desired, the des_* symbols will be mapped to DES_*, with one + exception. - All this is done because there are increasing clashes with libdes - and other DES libraries that are currently used by other projects. - The old libdes interface (including crypt()) is provided if - is included. For now, this automatically - happens in unless OPENSSL_DISABLE_OLD_DES_SUPPORT is - defined. Note that crypt() is no longer declared in . + Since we provide two compatibility mappings, the user needs to + define the macro OPENSSL_DES_LIBDES_COMPATIBILITY if libdes + compatibility is desired. The default (i.e., when that macro + isn't defined) is OpenSSL 0.9.6c compatibility. + + There are also macros that enable and disable the support of old + des functions altogether. Those are OPENSSL_ENABLE_OLD_DES_SUPPORT + and OPENSSL_DISABLE_OLD_DES_SUPPORT. If none or both of those + are defined, the default will apply: to support the old des routines. + + In either case, one must include openssl/des.h to get the correct + definitions. Do not try to just include openssl/des_old.h, that + won't work. NOTE: This is a major break of an old API into a new one. Software authors are encouraged to switch to the DES_ style functions. Some time in the future, des_old.h and the libdes compatibility functions - will be completely removed. + will be disable (i.e. OPENSSL_DISABLE_OLD_DES_SUPPORT will be the + default), and then completely removed. [Richard Levitte] *) Fix SSL handshake functions and SSL_clear() such that SSL_clear() diff --git a/crypto/des/des.h b/crypto/des/des.h index a36a8e68a4..4cb9d84fdf 100644 --- a/crypto/des/des.h +++ b/crypto/des/des.h @@ -92,6 +92,12 @@ typedef struct DES_ks } DES_key_schedule; #ifndef OPENSSL_DISABLE_OLD_DES_SUPPORT +# ifndef OPENSSL_ENABLE_OLD_DES_SUPPORT +# define OPENSSL_ENABLE_OLD_DES_SUPPORT +# endif +#endif + +#ifdef OPENSSL_ENABLE_OLD_DES_SUPPORT # include #endif -- 2.25.1