mirror of
https://github.com/curl/curl.git
synced 2026-06-02 00:04:15 +03:00
vtls: use consistent signature for _random() implementations
This will make the upcoming multissl backend much easier to implement. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
78b863de7d
commit
dd02a9a341
4 changed files with 9 additions and 7 deletions
|
|
@ -2705,8 +2705,8 @@ bool Curl_darwinssl_data_pending(const struct connectdata *conn,
|
|||
return false;
|
||||
}
|
||||
|
||||
CURLcode Curl_darwinssl_random(unsigned char *entropy,
|
||||
size_t length)
|
||||
CURLcode Curl_darwinssl_random(struct Curl_easy *data UNUSED_PARAM,
|
||||
unsigned char *entropy, size_t length)
|
||||
{
|
||||
/* arc4random_buf() isn't available on cats older than Lion, so let's
|
||||
do this manually for the benefit of the older cats. */
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ int Curl_darwinssl_check_cxn(struct connectdata *conn);
|
|||
bool Curl_darwinssl_data_pending(const struct connectdata *conn,
|
||||
int connindex);
|
||||
|
||||
CURLcode Curl_darwinssl_random(unsigned char *entropy,
|
||||
CURLcode Curl_darwinssl_random(struct Curl_easy *data, unsigned char *entropy,
|
||||
size_t length);
|
||||
void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */
|
||||
size_t tmplen,
|
||||
|
|
@ -91,7 +91,7 @@ bool Curl_darwinssl_false_start(void);
|
|||
#define curlssl_version Curl_darwinssl_version
|
||||
#define curlssl_check_cxn Curl_darwinssl_check_cxn
|
||||
#define curlssl_data_pending(x,y) Curl_darwinssl_data_pending(x, y)
|
||||
#define curlssl_random(x,y,z) ((void)x, Curl_darwinssl_random(y,z))
|
||||
#define curlssl_random(x,y,z) Curl_darwinssl_random(x, y,z)
|
||||
#define curlssl_md5sum(a,b,c,d) Curl_darwinssl_md5sum(a,b,c,d)
|
||||
#define curlssl_sha256sum(a,b,c,d) \
|
||||
Curl_darwinssl_sha256sum((unsigned char *)a, b, c, d)
|
||||
|
|
|
|||
|
|
@ -1568,7 +1568,8 @@ size_t Curl_schannel_version(char *buffer, size_t size)
|
|||
return size;
|
||||
}
|
||||
|
||||
CURLcode Curl_schannel_random(unsigned char *entropy, size_t length)
|
||||
CURLcode Curl_schannel_random(struct Curl_easy *data UNUSED_PARAM,
|
||||
unsigned char *entropy, size_t length)
|
||||
{
|
||||
HCRYPTPROV hCryptProv = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,8 @@ int Curl_schannel_init(void);
|
|||
void Curl_schannel_cleanup(void);
|
||||
size_t Curl_schannel_version(char *buffer, size_t size);
|
||||
|
||||
CURLcode Curl_schannel_random(unsigned char *entropy, size_t length);
|
||||
CURLcode Curl_schannel_random(struct Curl_easy *data, unsigned char *entropy,
|
||||
size_t length);
|
||||
|
||||
/* Set the API backend definition to Schannel */
|
||||
#define CURL_SSL_BACKEND CURLSSLBACKEND_SCHANNEL
|
||||
|
|
@ -115,7 +116,7 @@ CURLcode Curl_schannel_random(unsigned char *entropy, size_t length);
|
|||
#define curlssl_version Curl_schannel_version
|
||||
#define curlssl_check_cxn(x) ((void)x, -1)
|
||||
#define curlssl_data_pending Curl_schannel_data_pending
|
||||
#define curlssl_random(x,y,z) ((void)x, Curl_schannel_random(y,z))
|
||||
#define curlssl_random(x,y,z) Curl_schannel_random(x,y,z)
|
||||
|
||||
#endif /* USE_SCHANNEL */
|
||||
#endif /* HEADER_CURL_SCHANNEL_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue