caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] https and Ocamlnet
@ 2019-09-25 13:49 Alan Schmitt
  2019-09-25 14:52 ` Christophe TROESTLER
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Alan Schmitt @ 2019-09-25 13:49 UTC (permalink / raw)
  To: OCaml Mailing List

[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]

Hello,

I have a small utility that downloads and parses the RSS feed from
ocaml.org to include in the OCaml Weekly News, but a recent change 
to
ocaml.org broke it: it seems to only be served through https. I 
tried to
add a TLS provider, but it's still failing with a cryptic error 
message.

Here is an extract of the code showing the problem:

#+begin_src ocaml
let () = Nettls_gnutls.init()

let site = "https://ocaml.org"
let feed_name = "/feed.xml"

let planet = Nethttp_fs.http_fs site
let feedic = planet # read [] feed_name
let feed_string = Netchannels.string_of_in_obj_channel feedic
let () = feedic # close_in()
#+end_src

I can compile it with

ocamlfind ocamlc -o test -linkpkg -package netclient,nettls-gnutls 
test.ml

but when I run it, I get this error

Fatal error: exception 
Nettls_gnutls.TLS.Error(GNUTLS_E_PUSH_ERROR)

I know nothing of TLS and searching for the error did not point me
toward any solution.

I'm using gnutls 3.6.9 and ocamlnet 4.1.6.

How can I access the site using https?

Thanks,

Alan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-12-29 13:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-25 13:49 [Caml-list] https and Ocamlnet Alan Schmitt
2019-09-25 14:52 ` Christophe TROESTLER
2019-09-25 15:47 ` Gerd Stolpmann
2019-09-26  6:20   ` Alan Schmitt
2019-09-26  6:27     ` Christophe TROESTLER
2019-09-26  6:56       ` Alan Schmitt
2019-09-26 13:41         ` Simon Cruanes
2019-09-26 15:44           ` Gerd Stolpmann
2019-09-27  6:31           ` Alan Schmitt
2019-09-27 13:53             ` Simon Cruanes
2019-09-26 14:39         ` Adrien Nader
2019-09-25 17:38 ` Oliver Bandel
2019-12-29 13:42 ` Oliver Bandel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).