Skip to content

Commit

Permalink
polarssl: provide a (weak) random function
Browse files Browse the repository at this point in the history
This now provides a weak random function since PolarSSL doesn't have a
quick and easy way to provide a good one. It does however provide the
framework to make one so it _can_ and _should_ be done...
  • Loading branch information
bagder committed Jul 30, 2014
1 parent df52f35 commit 0e811d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/vtls/polarssl.h
Expand Up @@ -63,5 +63,10 @@ int Curl_polarssl_shutdown(struct connectdata *conn, int sockindex);
#define curlssl_check_cxn(x) (x=x, -1)
#define curlssl_data_pending(x,y) (x=x, y=y, 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)

#endif /* USE_POLARSSL */
#endif /* HEADER_CURL_POLARSSL_H */

0 comments on commit 0e811d8

Please sign in to comment.