mirror of
https://github.com/curl/curl.git
synced 2026-08-14 09:43:37 +03:00
openssl: drop support for old OpenSSL/LibreSSL versions
Require OpenSSL 1.0.2a (2015-03-19) or LibreSSL 2.9.1 (2019-04-13). Closes #16104
This commit is contained in:
parent
e0fd5790d9
commit
2cc90a679a
5 changed files with 68 additions and 278 deletions
|
|
@ -394,51 +394,11 @@ static struct passwd *vms_getpwuid(uid_t uid)
|
|||
/* that way a newer port will also work if some one has one */
|
||||
#ifdef __VAX
|
||||
|
||||
# if (OPENSSL_VERSION_NUMBER < 0x00907001L)
|
||||
# define des_set_odd_parity DES_SET_ODD_PARITY
|
||||
# define des_set_key DES_SET_KEY
|
||||
# define des_ecb_encrypt DES_ECB_ENCRYPT
|
||||
|
||||
# endif
|
||||
# include <openssl/evp.h>
|
||||
# ifndef OpenSSL_add_all_algorithms
|
||||
# define OpenSSL_add_all_algorithms OPENSSL_ADD_ALL_ALGORITHMS
|
||||
void OPENSSL_ADD_ALL_ALGORITHMS(void);
|
||||
# endif
|
||||
|
||||
/* Curl defines these to lower case and VAX needs them in upper case */
|
||||
/* So we need static routines */
|
||||
# if (OPENSSL_VERSION_NUMBER < 0x00907001L)
|
||||
|
||||
# undef des_set_odd_parity
|
||||
# undef DES_set_odd_parity
|
||||
# undef des_set_key
|
||||
# undef DES_set_key
|
||||
# undef des_ecb_encrypt
|
||||
# undef DES_ecb_encrypt
|
||||
|
||||
static void des_set_odd_parity(des_cblock *key) {
|
||||
DES_SET_ODD_PARITY(key);
|
||||
}
|
||||
|
||||
static int des_set_key(const_des_cblock *key,
|
||||
des_key_schedule schedule) {
|
||||
return DES_SET_KEY(key, schedule);
|
||||
}
|
||||
|
||||
static void des_ecb_encrypt(const_des_cblock *input,
|
||||
des_cblock *output,
|
||||
des_key_schedule ks, int enc) {
|
||||
DES_ECB_ENCRYPT(input, output, ks, enc);
|
||||
}
|
||||
#endif
|
||||
/* Need this to stop a macro redefinition error */
|
||||
#if OPENSSL_VERSION_NUMBER < 0x00907000L
|
||||
# ifdef X509_STORE_set_flags
|
||||
# undef X509_STORE_set_flags
|
||||
# define X509_STORE_set_flags(x,y) Curl_nop_stmt
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* HEADER_CURL_SETUP_VMS_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue