Skip to content

Commit

Permalink
Merge pull request #75 from madroach/asn1_time_to_tm
Browse files Browse the repository at this point in the history
ASN1_TIME_to_tm not implemented in LibreSSL
  • Loading branch information
smimram authored Jan 6, 2022
2 parents cdf9fe6 + 4960600 commit b711cd4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/ssl_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,7 @@ static value alloc_tm(struct tm *tm)
return res;
}

#ifdef ASN1_TIME_to_tm
CAMLprim value ocaml_ssl_get_start_date(value certificate)
{
CAMLparam1(certificate);
Expand All @@ -1200,6 +1201,18 @@ CAMLprim value ocaml_ssl_get_expiration_date(value certificate)

CAMLreturn(alloc_tm(&t));
}
#else
CAMLprim value ocaml_ssl_get_start_date(value ignored)
{
caml_invalid_argument ("SSL.get_start_date not implemented");
}

CAMLprim value ocaml_ssl_get_expiration_date(value ignored)
{
caml_invalid_argument ("SSL.get_expiration_date not implemented");
}
#endif


CAMLprim value ocaml_ssl_ctx_load_verify_locations(value context, value ca_file, value ca_path)
{
Expand Down

0 comments on commit b711cd4

Please sign in to comment.