savonet/ocaml-ssl — pull request #10 by edwintorok (2014-05-13 09:43:15+00:00)
Title: fix build with old OpenSSL

Fixes this build error with old OpenSSL:

ssl_stubs.c: In function 'ocaml_ssl_create_context':
ssl_stubs.c:366: warning: passing argument 1 of 'SSL_CTX_new' discards qualifiers from pointer target type
ssl_stubs.c: In function 'ocaml_ssl_ctx_init_ec_from_named_curve':
ssl_stubs.c:648: error: 'EC_KEY' undeclared (first use in this function)
ssl_stubs.c:648: error: (Each undeclared identifier is reported only once
ssl_stubs.c:648: error: for each function it appears in.)
ssl_stubs.c:648: error: 'ecdh' undeclared (first use in this function)
ssl_stubs.c:662: warning: implicit declaration of function 'EC_KEY_new_by_curve_name'
ssl_stubs.c:670: warning: implicit declaration of function 'EC_KEY_free'
ssl_stubs.c: In function 'ocaml_ssl_set_client_SNI_hostname':
ssl_stubs.c:870: warning: implicit declaration of function 'SSL_set_tlsext_host_name'

I'm not sure if raising an exception is the right thing to do when the SSL function is missing, but thats what happens for TLS1.1 and TLS1.2 too, no?