mirror of
https://github.com/moparisthebest/curl
synced 2024-11-10 11:35:07 -05:00
openssl: provide defines for argument typecasts to build warning-free
... as OpenSSL >= 1.1.0 and libressl >= 2.7.0 use different argument types.
This commit is contained in:
parent
7c90c93c0b
commit
256b80fe81
@ -112,6 +112,14 @@
|
||||
#define HAVE_OPAQUE_RSA_DSA_DH 1 /* since 1.1.0 -pre5 */
|
||||
#define CONST_EXTS const
|
||||
#define HAVE_ERR_REMOVE_THREAD_STATE_DEPRECATED 1
|
||||
|
||||
/* funny typecast define due to difference in API */
|
||||
#ifdef LIBRESSL_VERSION_NUMBER
|
||||
#define ARG2_X509_signature_print (X509_ALGOR *)
|
||||
#else
|
||||
#define ARG2_X509_signature_print
|
||||
#endif
|
||||
|
||||
#else
|
||||
/* For OpenSSL before 1.1.0 */
|
||||
#define ASN1_STRING_get0_data(x) ASN1_STRING_data(x)
|
||||
@ -2802,7 +2810,7 @@ static CURLcode get_cert_chain(struct connectdata *conn,
|
||||
ASN1_STRING *a = ASN1_STRING_new();
|
||||
if(a) {
|
||||
X509_get0_signature(&psig, &palg, x);
|
||||
X509_signature_print(mem, palg, a);
|
||||
X509_signature_print(mem, ARG2_X509_signature_print palg, a);
|
||||
ASN1_STRING_free(a);
|
||||
|
||||
if(palg) {
|
||||
|
Loading…
Reference in New Issue
Block a user