vtls/*: deprecate have_curlssl_md5sum and set-up default md5sum implementation
This commit is contained in:
parent
476499c75c
commit
8fdf832e5f
@ -51,9 +51,6 @@ void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */
|
|||||||
unsigned char *md5sum, /* output */
|
unsigned char *md5sum, /* output */
|
||||||
size_t md5len);
|
size_t md5len);
|
||||||
|
|
||||||
/* this backend provides these functions: */
|
|
||||||
#define have_curlssl_md5sum 1
|
|
||||||
|
|
||||||
/* API setup for SecureTransport */
|
/* API setup for SecureTransport */
|
||||||
#define curlssl_init() (1)
|
#define curlssl_init() (1)
|
||||||
#define curlssl_cleanup() Curl_nop_stmt
|
#define curlssl_cleanup() Curl_nop_stmt
|
||||||
|
@ -53,9 +53,6 @@ void Curl_gtls_md5sum(unsigned char *tmp, /* input */
|
|||||||
unsigned char *md5sum, /* output */
|
unsigned char *md5sum, /* output */
|
||||||
size_t md5len);
|
size_t md5len);
|
||||||
|
|
||||||
/* this backend provides these functions: */
|
|
||||||
#define have_curlssl_md5sum 1
|
|
||||||
|
|
||||||
/* API setup for GnuTLS */
|
/* API setup for GnuTLS */
|
||||||
#define curlssl_init Curl_gtls_init
|
#define curlssl_init Curl_gtls_init
|
||||||
#define curlssl_cleanup Curl_gtls_cleanup
|
#define curlssl_cleanup Curl_gtls_cleanup
|
||||||
|
@ -60,9 +60,6 @@ void Curl_nss_md5sum(unsigned char *tmp, /* input */
|
|||||||
unsigned char *md5sum, /* output */
|
unsigned char *md5sum, /* output */
|
||||||
size_t md5len);
|
size_t md5len);
|
||||||
|
|
||||||
/* this backend provides these functions: */
|
|
||||||
#define have_curlssl_md5sum 1
|
|
||||||
|
|
||||||
/* this backend supports CURLOPT_CERTINFO */
|
/* this backend supports CURLOPT_CERTINFO */
|
||||||
#define have_curlssl_certinfo 1
|
#define have_curlssl_certinfo 1
|
||||||
|
|
||||||
|
@ -73,9 +73,6 @@ void Curl_ossl_md5sum(unsigned char *tmp, /* input */
|
|||||||
unsigned char *md5sum /* output */,
|
unsigned char *md5sum /* output */,
|
||||||
size_t unused);
|
size_t unused);
|
||||||
|
|
||||||
/* this backend provides these functions: */
|
|
||||||
#define have_curlssl_md5sum 1
|
|
||||||
|
|
||||||
/* this backend supports the CAPATH option */
|
/* this backend supports the CAPATH option */
|
||||||
#define have_curlssl_ca_path 1
|
#define have_curlssl_ca_path 1
|
||||||
|
|
||||||
|
@ -68,6 +68,7 @@
|
|||||||
#include "progress.h"
|
#include "progress.h"
|
||||||
#include "share.h"
|
#include "share.h"
|
||||||
#include "timeval.h"
|
#include "timeval.h"
|
||||||
|
#include "curl_md5.h"
|
||||||
|
|
||||||
#define _MPRINTF_REPLACE /* use our functions only */
|
#define _MPRINTF_REPLACE /* use our functions only */
|
||||||
#include <curl/mprintf.h>
|
#include <curl/mprintf.h>
|
||||||
@ -682,14 +683,21 @@ int Curl_ssl_random(struct SessionHandle *data,
|
|||||||
return curlssl_random(data, entropy, length);
|
return curlssl_random(data, entropy, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef have_curlssl_md5sum
|
|
||||||
void Curl_ssl_md5sum(unsigned char *tmp, /* input */
|
void Curl_ssl_md5sum(unsigned char *tmp, /* input */
|
||||||
size_t tmplen,
|
size_t tmplen,
|
||||||
unsigned char *md5sum, /* output */
|
unsigned char *md5sum, /* output */
|
||||||
size_t md5len)
|
size_t md5len)
|
||||||
{
|
{
|
||||||
|
#ifdef curlssl_md5sum
|
||||||
curlssl_md5sum(tmp, tmplen, md5sum, md5len);
|
curlssl_md5sum(tmp, tmplen, md5sum, md5len);
|
||||||
}
|
#else
|
||||||
|
MD5_context *MD5pw;
|
||||||
|
|
||||||
|
(void) md5len;
|
||||||
|
MD5pw = Curl_MD5_init(Curl_DIGEST_MD5);
|
||||||
|
Curl_MD5_update(MD5pw, tmp, tmplen);
|
||||||
|
Curl_MD5_final(MD5pw, md5sum);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* USE_SSL */
|
#endif /* USE_SSL */
|
||||||
|
@ -112,10 +112,6 @@ void Curl_ssl_md5sum(unsigned char *tmp, /* input */
|
|||||||
|
|
||||||
#define SSL_SHUTDOWN_TIMEOUT 10000 /* ms */
|
#define SSL_SHUTDOWN_TIMEOUT 10000 /* ms */
|
||||||
|
|
||||||
#ifdef have_curlssl_md5sum
|
|
||||||
#define HAVE_CURL_SSL_MD5SUM
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* When SSL support is not present, just define away these function calls */
|
/* When SSL support is not present, just define away these function calls */
|
||||||
#define Curl_ssl_init() 1
|
#define Curl_ssl_init() 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user