Skip to content

Commit

Permalink
fix CURL_SSLVERSION_TLSv1_* usage for older libcurl (fix ocaml#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrek committed Sep 23, 2016
1 parent 8cf4928 commit 4aa53d1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 12 additions & 0 deletions curl-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1840,6 +1840,18 @@ SETOPT_STRING( COOKIEFILE)
SETOPT_BOOL( CERTINFO)
#endif

#if !defined(CURL_SSLVERSION_TLSv1_0)
#define CURL_SSLVERSION_TLSv1_0 CURL_SSLVERSION_TLSv1
#endif

#if !defined(CURL_SSLVERSION_TLSv1_1)
#define CURL_SSLVERSION_TLSv1_1 CURL_SSLVERSION_TLSv1
#endif

#if !defined(CURL_SSLVERSION_TLSv1_2)
#define CURL_SSLVERSION_TLSv1_2 CURL_SSLVERSION_TLSv1
#endif

static void handle_SSLVERSION(Connection *conn, value option)
{
CAMLparam1(option);
Expand Down
6 changes: 3 additions & 3 deletions curl.mli
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ type curlSSLVersion =
| SSLVERSION_TLSv1 (** TLSv1.x *)
| SSLVERSION_SSLv2 (** SSLv2 *)
| SSLVERSION_SSLv3 (** SSLv3 *)
| SSLVERSION_TLSv1_0 (** Added in 7.34.0 *)
| SSLVERSION_TLSv1_1 (** Added in 7.34.0 *)
| SSLVERSION_TLSv1_2 (** Added in 7.34.0 *)
| SSLVERSION_TLSv1_0 (** Added in libcurl 7.34.0, will request TLSv1 in previous versions *)
| SSLVERSION_TLSv1_1 (** Added in libcurl 7.34.0, will request TLSv1 in previous versions *)
| SSLVERSION_TLSv1_2 (** Added in libcurl 7.34.0, will request TLSv1 in previous versions *)

type curlTimeCondition =
| TIMECOND_NONE (** since 0.6.1 *)
Expand Down

0 comments on commit 4aa53d1

Please sign in to comment.