Skip to content

Commit

Permalink
Fix ocaml-ssl in nnpchecker mode (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
kit-ty-kate committed Oct 27, 2022
1 parent 8e2375f commit e42d4cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ssl_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
#endif

static int client_verify_callback(int, X509_STORE_CTX *);
#ifdef NO_NAKED_POINTERS
#if defined(NO_NAKED_POINTERS) || defined(NAKED_POINTERS_CHECKER)
static value vclient_verify_callback = Val_int(0);
#endif
static DH *load_dh_param(const char *dhfile);
Expand Down Expand Up @@ -617,7 +617,7 @@ CAMLprim value ocaml_ssl_digest(value vevp, value vcert)
CAMLprim value ocaml_ssl_get_client_verify_callback_ptr(value unit)
{
CAMLparam1(unit);
#ifdef NO_NAKED_POINTERS
#if defined(NO_NAKED_POINTERS) || defined(NAKED_POINTERS_CHECKER)
if (Is_long(vclient_verify_callback)) {
vclient_verify_callback = caml_alloc_shr(1, Abstract_tag);
*((int(**) (int, X509_STORE_CTX*))Data_abstract_val(vclient_verify_callback)) = client_verify_callback;
Expand Down Expand Up @@ -676,7 +676,7 @@ CAMLprim value ocaml_ssl_ctx_set_verify(value context, value vmode, value vcallb

if (Is_block(vcallback))
{
#ifdef NO_NAKED_POINTERS
#if defined(NO_NAKED_POINTERS) || defined(NAKED_POINTERS_CHECKER)
vcallback = Field(vcallback, 0);
if (!Is_block(vcallback) || Tag_val(vcallback) != Abstract_tag || Wosize_val(vcallback) != 1)
caml_invalid_argument("callback");
Expand Down

0 comments on commit e42d4cd

Please sign in to comment.