From 8dfd22089cac13f718815eb60581ad392b7f106e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 3 Jun 2014 20:04:46 +0200 Subject: vtls: make the random function mandatory in the TLS backend To force each backend implementation to really attempt to provide proper random. If a proper random function is missing, then we can explicitly make use of the default one we use when TLS support is missing. This commit makes sure it works for darwinssl, gnutls, nss and openssl. --- lib/vtls/openssl.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/vtls/openssl.h') diff --git a/lib/vtls/openssl.h b/lib/vtls/openssl.h index 07448b50b..fecad7f54 100644 --- a/lib/vtls/openssl.h +++ b/lib/vtls/openssl.h @@ -61,20 +61,19 @@ void Curl_ossl_cleanup(void); size_t Curl_ossl_version(char *buffer, size_t size); int Curl_ossl_check_cxn(struct connectdata *cxn); -int Curl_ossl_seed(struct SessionHandle *data); - int Curl_ossl_shutdown(struct connectdata *conn, int sockindex); bool Curl_ossl_data_pending(const struct connectdata *conn, int connindex); -void Curl_ossl_random(struct SessionHandle *data, unsigned char *entropy, - size_t length); + +/* return 0 if a find random is filled in */ +int Curl_ossl_random(struct SessionHandle *data, unsigned char *entropy, + size_t length); void Curl_ossl_md5sum(unsigned char *tmp, /* input */ size_t tmplen, unsigned char *md5sum /* output */, size_t unused); /* this backend provides these functions: */ -#define have_curlssl_random 1 #define have_curlssl_md5sum 1 /* API setup for OpenSSL */ -- cgit v1.2.3