[Pkg-ocaml-maint-commits] [ocaml-ssl] 02/07: New upstream version 0.5.3
Stéphane Glondu
glondu at moszumanska.debian.org
Tue Jul 18 19:50:21 UTC 2017
This is an automated email from the git hooks/post-receive script.
glondu pushed a commit to branch master
in repository ocaml-ssl.
commit eb2b1e34c64f7f8fead5f30b9a724ee57e79c907
Author: Stephane Glondu <steph at glondu.net>
Date: Tue Jul 18 21:42:57 2017 +0200
New upstream version 0.5.3
---
CHANGES | 6 +++
configure | 18 +++----
configure.ac | 2 +-
doc/html/Ssl.html | 10 +---
doc/html/Ssl_threads.html | 1 +
doc/html/index.html | 1 +
doc/html/index_attributes.html | 1 +
doc/html/index_class_types.html | 1 +
doc/html/index_classes.html | 1 +
doc/html/index_exceptions.html | 1 +
doc/html/index_extensions.html | 1 +
doc/html/index_methods.html | 1 +
doc/html/index_module_types.html | 1 +
doc/html/index_modules.html | 1 +
doc/html/index_types.html | 1 +
doc/html/index_values.html | 1 +
doc/html/type_Ssl.html | 3 +-
doc/html/type_Ssl_threads.html | 1 +
examples/stalkd.ml | 100 +++++++++++++++++++--------------------
src/Makefile.in | 6 +--
src/ssl.mli | 5 +-
src/ssl_stubs.c | 11 ++---
22 files changed, 91 insertions(+), 83 deletions(-)
diff --git a/CHANGES b/CHANGES
index 7b619af..a010a55 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,9 @@
+0.5.3 (2016-11-08)
+=====
+* Remove -ansi flag to be compatible with OCaml 4.04 (thanks Mark Shinwell).
+* Use accessor functions for X509_STORE_CTX.
+* Change CLIBS order to allow static linking.
+
0.5.2 (2015-11-23)
=====
* Add OPENSSL_NO_SSL3 preprocessor flag to disable SSLv3 (thanks Jérémie
diff --git a/configure b/configure
index c80f409..c06e6a5 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ocaml-ssl 0.5.2.
+# Generated by GNU Autoconf 2.69 for ocaml-ssl 0.5.3.
#
# Report bugs to <savonet-users at lists.sourceforge.net>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ocaml-ssl'
PACKAGE_TARNAME='ocaml-ssl'
-PACKAGE_VERSION='0.5.2'
-PACKAGE_STRING='ocaml-ssl 0.5.2'
+PACKAGE_VERSION='0.5.3'
+PACKAGE_STRING='ocaml-ssl 0.5.3'
PACKAGE_BUGREPORT='savonet-users at lists.sourceforge.net'
PACKAGE_URL=''
@@ -1260,7 +1260,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ocaml-ssl 0.5.2 to adapt to many kinds of systems.
+\`configure' configures ocaml-ssl 0.5.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1322,7 +1322,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ocaml-ssl 0.5.2:";;
+ short | recursive ) echo "Configuration of ocaml-ssl 0.5.3:";;
esac
cat <<\_ACEOF
@@ -1411,7 +1411,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ocaml-ssl configure 0.5.2
+ocaml-ssl configure 0.5.3
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1759,7 +1759,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ocaml-ssl $as_me 0.5.2, which was
+It was created by ocaml-ssl $as_me 0.5.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -5355,7 +5355,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ocaml-ssl $as_me 0.5.2, which was
+This file was extended by ocaml-ssl $as_me 0.5.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5408,7 +5408,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ocaml-ssl config.status 0.5.2
+ocaml-ssl config.status 0.5.3
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 853e9a0..9613001 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([ocaml-ssl],[0.5.2],[savonet-users at lists.sourceforge.net])
+AC_INIT([ocaml-ssl],[0.5.3],[savonet-users at lists.sourceforge.net])
VERSION=$PACKAGE_VERSION
AC_MSG_RESULT([configuring $PACKAGE_STRING])
diff --git a/doc/html/Ssl.html b/doc/html/Ssl.html
index 2ef6533..fbeaf45 100644
--- a/doc/html/Ssl.html
+++ b/doc/html/Ssl.html
@@ -3,6 +3,7 @@
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link rel="previous" href="Ssl_threads.html">
<link rel="Up" href="index.html">
@@ -14,7 +15,6 @@
<link title="Ssl" rel="Chapter" href="Ssl.html"><link title="Exceptions and errors" rel="Section" href="#1_Exceptionsanderrors">
<link title="Communication" rel="Section" href="#1_Communication">
<link title="Threads" rel="Subsection" href="#2_Threads">
-<link title="Threads" rel="Subsection" href="#2_Threads">
<link title="Contexts" rel="Subsection" href="#2_Contexts">
<link title="Ciphers" rel="Subsection" href="#2_Ciphers">
<link title="Certificates" rel="Subsection" href="#2_Certificates">
@@ -637,8 +637,6 @@ An SSL abstract socket.<br>
<br>
<h2 id="2_Threads">Threads</h2><br>
<br>
-<h2 id="2_Threads">Threads</h2><br>
-<br>
You should not have to use those functions. They are only here for internal
use (they are needed to make the openssl library thread-safe, see the
<code class="code">Ssl_threads</code> module).<br>
@@ -915,10 +913,6 @@ Get the file descriptor associated with a socket. It is primarly useful for
<code class="code">read sock buf off len</code> receives data from a connected SSL socket.<br>
</div>
-<pre><span id="VALwrite"><span class="keyword">val</span> write</span> : <code class="type"><a href="Ssl.html#TYPEsocket">socket</a> -> string -> int -> int -> int</code></pre><div class="info ">
-<code class="code">write sock buf off len</code> sends data over a connected SSL socket.<br>
-</div>
-
<pre><span id="VALread_into_bigarray"><span class="keyword">val</span> read_into_bigarray</span> : <code class="type"><a href="Ssl.html#TYPEsocket">socket</a> -> <a href="Ssl.html#TYPEbigarray">bigarray</a> -> int -> int -> int</code></pre><div class="info ">
<code class="code">read_into_bigarray sock ba off len</code> receives data from a connected SSL socket.
This function releases the runtime while the read takes place.<br>
@@ -931,7 +925,7 @@ Get the file descriptor associated with a socket. It is primarly useful for
must be used with nonblocking sockets.<br>
</div>
-<pre><span id="VALwrite"><span class="keyword">val</span> write</span> : <code class="type"><a href="Ssl.html#TYPEsocket">socket</a> -> string -> int -> int -> int</code></pre><div class="info ">
+<pre><span id="VALwrite"><span class="keyword">val</span> write</span> : <code class="type"><a href="Ssl.html#TYPEsocket">socket</a> -> Bytes.t -> int -> int -> int</code></pre><div class="info ">
<code class="code">write sock buf off len</code> sends data over a connected SSL socket.<br>
</div>
diff --git a/doc/html/Ssl_threads.html b/doc/html/Ssl_threads.html
index 33bbf57..f789b2b 100644
--- a/doc/html/Ssl_threads.html
+++ b/doc/html/Ssl_threads.html
@@ -3,6 +3,7 @@
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link rel="next" href="Ssl.html">
<link rel="Up" href="index.html">
diff --git a/doc/html/index.html b/doc/html/index.html
index c1fb679..bbdd576 100644
--- a/doc/html/index.html
+++ b/doc/html/index.html
@@ -3,6 +3,7 @@
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
diff --git a/doc/html/index_attributes.html b/doc/html/index_attributes.html
index 08676ee..8171987 100644
--- a/doc/html/index_attributes.html
+++ b/doc/html/index_attributes.html
@@ -2,6 +2,7 @@
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
diff --git a/doc/html/index_class_types.html b/doc/html/index_class_types.html
index cb75b6a..43a4a1f 100644
--- a/doc/html/index_class_types.html
+++ b/doc/html/index_class_types.html
@@ -2,6 +2,7 @@
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
diff --git a/doc/html/index_classes.html b/doc/html/index_classes.html
index 4125baa..e261767 100644
--- a/doc/html/index_classes.html
+++ b/doc/html/index_classes.html
@@ -2,6 +2,7 @@
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
diff --git a/doc/html/index_exceptions.html b/doc/html/index_exceptions.html
index 1f3ef59..f0ccdb7 100644
--- a/doc/html/index_exceptions.html
+++ b/doc/html/index_exceptions.html
@@ -2,6 +2,7 @@
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
diff --git a/doc/html/index_extensions.html b/doc/html/index_extensions.html
index 8bb02fe..ad20797 100644
--- a/doc/html/index_extensions.html
+++ b/doc/html/index_extensions.html
@@ -2,6 +2,7 @@
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
diff --git a/doc/html/index_methods.html b/doc/html/index_methods.html
index 1d64e03..f050e2f 100644
--- a/doc/html/index_methods.html
+++ b/doc/html/index_methods.html
@@ -2,6 +2,7 @@
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
diff --git a/doc/html/index_module_types.html b/doc/html/index_module_types.html
index f79cab6..6a94845 100644
--- a/doc/html/index_module_types.html
+++ b/doc/html/index_module_types.html
@@ -2,6 +2,7 @@
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
diff --git a/doc/html/index_modules.html b/doc/html/index_modules.html
index bc88d65..77e2e63 100644
--- a/doc/html/index_modules.html
+++ b/doc/html/index_modules.html
@@ -2,6 +2,7 @@
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
diff --git a/doc/html/index_types.html b/doc/html/index_types.html
index 40fe8a4..b07740a 100644
--- a/doc/html/index_types.html
+++ b/doc/html/index_types.html
@@ -2,6 +2,7 @@
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
diff --git a/doc/html/index_values.html b/doc/html/index_values.html
index 5aed274..a85519a 100644
--- a/doc/html/index_values.html
+++ b/doc/html/index_values.html
@@ -2,6 +2,7 @@
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
diff --git a/doc/html/type_Ssl.html b/doc/html/type_Ssl.html
index 6fe6bcc..2278dd8 100644
--- a/doc/html/type_Ssl.html
+++ b/doc/html/type_Ssl.html
@@ -1,6 +1,7 @@
<html><head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
@@ -126,7 +127,7 @@
<span class="keyword">val</span> read_into_bigarray : <span class="constructor">Ssl</span>.socket <span class="keywordsign">-></span> <span class="constructor">Ssl</span>.bigarray <span class="keywordsign">-></span> int <span class="keywordsign">-></span> int <span class="keywordsign">-></span> int<br>
<span class="keyword">val</span> read_into_bigarray_blocking :<br>
<span class="constructor">Ssl</span>.socket <span class="keywordsign">-></span> <span class="constructor">Ssl</span>.bigarray <span class="keywordsign">-></span> int <span class="keywordsign">-></span> int <span class="keywordsign">-></span> int<br>
- <span class="keyword">val</span> write : <span class="constructor">Ssl</span>.socket <span class="keywordsign">-></span> string <span class="keywordsign">-></span> int <span class="keywordsign">-></span> int <span class="keywordsign">-></span> int<br>
+ <span class="keyword">val</span> write : <span class="constructor">Ssl</span>.socket <span class="keywordsign">-></span> <span class="constructor">Bytes</span>.t <span class="keywordsign">-></span> int <span class="keywordsign">-></span> int <span class="keywordsign">-></span> int<br>
<span class="keyword">val</span> write_bigarray : <span class="constructor">Ssl</span>.socket <span class="keywordsign">-></span> <span class="constructor">Ssl</span>.bigarray <span class="keywordsign">-></span> int <span class="keywordsign">-></span> int <span class="keywordsign">-></span> int<br>
<span class="keyword">val</span> write_bigarray_blocking :<br>
<span class="constructor">Ssl</span>.socket <span class="keywordsign">-></span> <span class="constructor">Ssl</span>.bigarray <span class="keywordsign">-></span> int <span class="keywordsign">-></span> int <span class="keywordsign">-></span> int<br>
diff --git a/doc/html/type_Ssl_threads.html b/doc/html/type_Ssl_threads.html
index 1860bf5..c48dad6 100644
--- a/doc/html/type_Ssl_threads.html
+++ b/doc/html/type_Ssl_threads.html
@@ -1,6 +1,7 @@
<html><head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
diff --git a/examples/stalkd.ml b/examples/stalkd.ml
index 234d2cb..21084d2 100644
--- a/examples/stalkd.ml
+++ b/examples/stalkd.ml
@@ -25,8 +25,6 @@
* @author Samuel Mimram
*)
-(* $Id$ *)
-
let certfile = ref "cert.pem"
let privkey = ref "privkey.pem"
let port = ref 9876
@@ -39,8 +37,8 @@ let establish_threaded_server server_handler sockaddr nbconn =
log "establishing server";
let domain =
begin match sockaddr with
- | Unix.ADDR_UNIX _ -> Unix.PF_UNIX
- | Unix.ADDR_INET (_, _) -> Unix.PF_INET
+ | Unix.ADDR_UNIX _ -> Unix.PF_UNIX
+ | Unix.ADDR_INET (_, _) -> Unix.PF_INET
end
in
let sock = Unix.socket domain Unix.SOCK_STREAM 0 in
@@ -51,55 +49,55 @@ let establish_threaded_server server_handler sockaddr nbconn =
in
let inet_addr = inet_addr_of_sockaddr caller in
let ip = Unix.string_of_inet_addr inet_addr in
- log (Printf.sprintf "openning connection for [%s]" ip);
- server_handler inet_addr s;
- Ssl.shutdown s
+ log (Printf.sprintf "openning connection for [%s]" ip);
+ server_handler inet_addr s;
+ Ssl.shutdown s
in
let ctx = Ssl.create_context Ssl.SSLv23 Ssl.Server_context in
- if !password <> "" then
- Ssl.set_password_callback ctx (fun _ -> !password);
- Ssl.use_certificate ctx !certfile !privkey;
- Unix.setsockopt sock Unix.SO_REUSEADDR true;
- Unix.bind sock sockaddr;
- Unix.listen sock nbconn;
- let ssl_sock = Ssl.embed_socket sock ctx in
- while true do
- log "listening for connections";
- let (s, caller) = Unix.accept sock in
- let ssl_s = Ssl.embed_socket s ctx in
- Ssl.accept ssl_s;
- ignore (Thread.create handle_connexion (ssl_s, caller));
- done
+ if !password <> "" then
+ Ssl.set_password_callback ctx (fun _ -> !password);
+ Ssl.use_certificate ctx !certfile !privkey;
+ Unix.setsockopt sock Unix.SO_REUSEADDR true;
+ Unix.bind sock sockaddr;
+ Unix.listen sock nbconn;
+ (* let ssl_sock = Ssl.embed_socket sock ctx in *)
+ while true do
+ log "listening for connections";
+ let (s, caller) = Unix.accept sock in
+ let ssl_s = Ssl.embed_socket s ctx in
+ Ssl.accept ssl_s;
+ ignore (Thread.create handle_connexion (ssl_s, caller));
+ done
-let _ =
+let () =
let bufsize = 1024 in
- let buf = String.create bufsize in
+ let buf = Bytes.create bufsize in
let connected_clients = ref [] in
- Ssl_threads.init ();
- Ssl.init ();
- establish_threaded_server
- (fun addr ssl ->
- connected_clients := (addr, ssl) :: !connected_clients;
- log "accepted a new connection";
- let loop = ref true in
- while !loop
- do
- let l = Ssl.read ssl buf 0 bufsize in
- let m = String.sub buf 0 l in
- let msg = String.sub m 0 ((String.length m) - 1) in
- log (Printf.sprintf "revceived '%s'" msg);
- if msg = "exit" then
- (
- log "A client has quit";
- connected_clients := List.filter (fun (_, s) -> s != ssl) !connected_clients;
- Ssl.shutdown ssl;
- loop := false
- )
- else
- List.iter
- (fun (_, s) ->
- ignore (Ssl.output_string s m)
- ) !connected_clients
- done
- )
- (Unix.ADDR_INET(Unix.inet_addr_any, !port)) 100
+ Ssl_threads.init ();
+ Ssl.init ();
+ establish_threaded_server
+ (fun addr ssl ->
+ connected_clients := (addr, ssl) :: !connected_clients;
+ log "accepted a new connection";
+ let loop = ref true in
+ while !loop
+ do
+ let l = Ssl.read ssl buf 0 bufsize in
+ let m = Bytes.sub buf 0 l in
+ let msg = Bytes.sub m 0 ((Bytes.length m) - 1) in
+ log (Printf.sprintf "revceived '%s'" msg);
+ if msg = "exit" then
+ (
+ log "A client has quit";
+ connected_clients := List.filter (fun (_, s) -> s != ssl) !connected_clients;
+ Ssl.shutdown ssl;
+ loop := false
+ )
+ else
+ List.iter
+ (fun (_, s) ->
+ ignore (Ssl.output_string s m)
+ ) !connected_clients
+ done
+ )
+ (Unix.ADDR_INET(Unix.inet_addr_any, !port)) 100
diff --git a/src/Makefile.in b/src/Makefile.in
index c32ce26..843885e 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -25,12 +25,12 @@ export LIBINSTALL_FILES = $(wildcard *.mli *.cmi *.cma *.cmxa *.cmx *$(shell oca
export OCAMLLDFLAGS =
export OCAMLDOCFLAGS = -stars
ifeq (1, $(shell uname -s | grep -c "MINGW"))
- export CLIBS = crypto ssl ws2_32 gdi32 crypt32
+ export CLIBS = ssl crypto ws2_32 gdi32 crypt32
else
- export CLIBS = crypto ssl
+ export CLIBS = ssl crypto
endif
export CC = @CC@
-export CFLAGS = @CFLAGS@ -ansi -DCAML_NAME_SPACE -Wall
+export CFLAGS = @CFLAGS@ -DCAML_NAME_SPACE -Wall
export CLIBFLAGS = @LDFLAGS@
export CPPFLAGS = @CPPFLAGS@
export NO_CUSTOM = yes
diff --git a/src/ssl.mli b/src/ssl.mli
index 4f67dd2..5776328 100644
--- a/src/ssl.mli
+++ b/src/ssl.mli
@@ -395,9 +395,6 @@ val file_descr_of_socket : socket -> Unix.file_descr
(** [read sock buf off len] receives data from a connected SSL socket. *)
val read : socket -> Bytes.t -> int -> int -> int
-(** [write sock buf off len] sends data over a connected SSL socket. *)
-val write : socket -> Bytes.t -> int -> int -> int
-
(** [read_into_bigarray sock ba off len] receives data from a connected SSL socket.
This function releases the runtime while the read takes place. *)
val read_into_bigarray : socket -> bigarray -> int -> int -> int
@@ -409,7 +406,7 @@ val read_into_bigarray : socket -> bigarray -> int -> int -> int
val read_into_bigarray_blocking : socket -> bigarray -> int -> int -> int
(** [write sock buf off len] sends data over a connected SSL socket. *)
-val write : socket -> string -> int -> int -> int
+val write : socket -> Bytes.t -> int -> int -> int
(** [write_bigarray sock ba off len] sends data over a connected SSL socket.
This function releases the runtime while the read takes place.
diff --git a/src/ssl_stubs.c b/src/ssl_stubs.c
index 1b175fa..fa4cbbf 100644
--- a/src/ssl_stubs.c
+++ b/src/ssl_stubs.c
@@ -24,8 +24,6 @@
* @author Samuel Mimram
*/
-/* $Id$ */
-
/*
* WARNING: because of thread callbacks, all ssl functions should be in
* blocking sections.
@@ -656,7 +654,7 @@ CAMLprim value ocaml_ssl_get_cipher_name(value vcipher)
CAMLprim value ocaml_ssl_get_cipher_version(value vcipher)
{
- char *version;
+ const char *version;
SSL_CIPHER *cipher = (SSL_CIPHER*)vcipher;
caml_enter_blocking_section();
@@ -1228,9 +1226,9 @@ static int client_verify_callback(int ok, X509_STORE_CTX *ctx)
int depth, error;
char *xs;
- depth = ctx->error_depth;
- error = ctx->error;
- xs = (char *)X509_STORE_CTX_get_current_cert(ctx);
+ depth = X509_STORE_CTX_get_error_depth(ctx);
+ error = X509_STORE_CTX_get_error(ctx);
+ xs = (char*)X509_STORE_CTX_get_current_cert(ctx);
subject = issuer = NULL;
@@ -1339,6 +1337,7 @@ return_time:
return ok;
}
+
static DH *load_dh_param(const char *dhfile)
{
DH *ret=NULL;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/ocaml-ssl.git
More information about the Pkg-ocaml-maint-commits
mailing list