summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/vtls/mbedtls.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-11 14:55:44 (GMT)
committerBrad King <brad.king@kitware.com>2017-05-11 15:27:21 (GMT)
commit299975908ada992800791fac7f3739050e0ae2a9 (patch)
tree38cd8fb04ce84196dfa04d514eb92649900a1bc5 /Utilities/cmcurl/lib/vtls/mbedtls.h
parent5af9c8e2451afd8e63d6b05e69cd141af543a164 (diff)
parentfd7d521c9d70655618db8232d45e5aaf81700f91 (diff)
downloadCMake-299975908ada992800791fac7f3739050e0ae2a9.zip
CMake-299975908ada992800791fac7f3739050e0ae2a9.tar.gz
CMake-299975908ada992800791fac7f3739050e0ae2a9.tar.bz2
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2017-04-19 (d957e218) Resolve conflicts in `CMakeLists.txt` in favor of the upstream version. We will re-apply our logic as needed in following commits.
Diffstat (limited to 'Utilities/cmcurl/lib/vtls/mbedtls.h')
-rw-r--r--Utilities/cmcurl/lib/vtls/mbedtls.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/Utilities/cmcurl/lib/vtls/mbedtls.h b/Utilities/cmcurl/lib/vtls/mbedtls.h
index 1021d54..71d17a4 100644
--- a/Utilities/cmcurl/lib/vtls/mbedtls.h
+++ b/Utilities/cmcurl/lib/vtls/mbedtls.h
@@ -50,9 +50,15 @@ void Curl_mbedtls_session_free(void *ptr);
size_t Curl_mbedtls_version(char *buffer, size_t size);
int Curl_mbedtls_shutdown(struct connectdata *conn, int sockindex);
+CURLcode Curl_mbedtls_random(struct Curl_easy *data, unsigned char *entropy,
+ size_t length);
+
/* this backends supports CURLOPT_PINNEDPUBLICKEY */
#define have_curlssl_pinnedpubkey 1
+/* this backend supports CURLOPT_SSL_CTX_* */
+#define have_curlssl_ssl_ctx 1
+
/* API setup for mbedTLS */
#define curlssl_init() Curl_mbedtls_init()
#define curlssl_cleanup() Curl_mbedtls_cleanup()
@@ -70,11 +76,7 @@ int Curl_mbedtls_shutdown(struct connectdata *conn, int sockindex);
#define curlssl_data_pending(x,y) Curl_mbedtls_data_pending(x, y)
#define CURL_SSL_BACKEND CURLSSLBACKEND_MBEDTLS
#define curlssl_sha256sum(a,b,c,d) mbedtls_sha256(a,b,c,0)
-
-/* This might cause libcurl to use a weeker random!
- TODO: implement proper use of Polarssl's CTR-DRBG or HMAC-DRBG and use that
-*/
-#define curlssl_random(x,y,z) (x=x, y=y, z=z, CURLE_NOT_BUILT_IN)
+#define curlssl_random(x,y,z) Curl_mbedtls_random(x, y, z)
#endif /* USE_MBEDTLS */
#endif /* HEADER_CURL_MBEDTLS_H */