On Mon, Mar 4, 2013 at 11:19 PM, Jeffrey Walton <noloa...@gmail.com> wrote:
> Hi All,
>
> OpenSSL 1.0.1e is not loading Intel's hardware random number
> generator. ENGINE_load_rdrand() silently fails:
>
> /*** eng_rand.c ***/
> void ENGINE_load_rdrand (void)
> {
>     extern unsigned int OPENSSL_ia32cap_P[];
>
>     if (OPENSSL_ia32cap_P[1] & (1<<(62-32)))
>     {
>         ENGINE *toadd = ENGINE_rdrand();
>         if(!toadd) return;
>         ENGINE_add(toadd);
>         ENGINE_free(toadd);
>         ERR_clear_error();
>     }
> }
>
> When I check capabilities:
>
> int rdrand = OPENSSL_ia32cap_P[1] & (1<<(62-32));
> if(rdrand)
>     fprintf(stdout, "rdrand is available\n");
> else
>     fprintf(stderr, "rdrand is not available\n");
>
> I receive a message that rdrand is not available.
>
> ...
>
> Any ideas?
The [relatively] new MacBook Pro does not support the instruction
(despite what the folks at Apple claim):

$ sysctl hw.optional.rdrand
hw.optional.rdrand: 0

Jeff
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to