cURL / Mailing Lists / curl-library / Single Mail


Patch to remove use of arc4random_buf from curl_darwinssl.c

From: Nick Zitzmann <>
Date: Sat, 7 Jul 2012 16:16:39 -0600

Happy Caturday!

In revision 7aa95afadd39867dd95fd4f3df316f7e7decac7a, I used arc4random_buf() to generate random data appropriate for cryptography. It just came to my attention that the function is present in iOS 4.3 and Mac OS X 10.7 (Lion), but is not present in older cats*, even though arc4random() is present. So I rewrote the function Curl_darwinssl_random() so it uses arc4random() instead and fills the buffer manually.

I generated this patch using git format-patch as Daniel requested… Can't you tell I'm used to Subversion?

Nick Zitzmann

* Apple names versions of their OS after cat sub-species. Lion is the name of the currently shipping OS, Snow Leopard was the name of the previous OS, etc.

List admin:

Received on 2012-07-08