aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls/cyassl.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vtls/cyassl.c')
-rw-r--r--lib/vtls/cyassl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/vtls/cyassl.c b/lib/vtls/cyassl.c
index 56e56e45e..0de589e16 100644
--- a/lib/vtls/cyassl.c
+++ b/lib/vtls/cyassl.c
@@ -54,6 +54,7 @@
#else
#include <cyassl/error.h>
#endif
+#include <cyassl/ctaocrypt/random.h>
/* The last #include file should be: */
#include "memdebug.h"
@@ -638,4 +639,17 @@ Curl_cyassl_connect(struct connectdata *conn,
return CURLE_OK;
}
+int Curl_cyassl_random(struct SessionHandle *data,
+ unsigned char *entropy,
+ size_t length)
+{
+ RNG rng;
+ (void)data;
+ if(InitRng(&rng))
+ return 1;
+ if(RNG_GenerateBlock(&rng, entropy, length))
+ return 1;
+ return 0;
+}
+
#endif