LordTitiKaka LordTitiKaka - 1 month ago 4
C++ Question

Is it possible to set ClientHello random number from outside

I'm new to OpenSSL and trying to extend the API. I would like to create

as custom as possible so to see how my server reacts to it.

My question is: How can I set the
section in
from outside the library (within my program)?

overriding openssl lib settings


There is no interface for this. It is just using RAND_pseudo_bytes to generate the random bytes. But you might try to modify the source code to add your own hooks, probably ssl23_client_hello in ssl/s23_clnt.c.

EDIT: with the large code overhaul done with OpenSSL 1.1.0 the relevant code can be found in ssl/statem/statem_clnt.c function tls_construct_client_hello and it is using ssl_fill_hello_random (ssl/s3_lib.c) to generate the bytes which then calls RAND_bytes.