fix SRTM download (#2098)

the SRTM download page now redirects to https
so enable support for TLS

needs the Debian/Ubuntu package libocamlnet-ssl-ocaml-dev

only load tls lib if netclient version > 4
This commit is contained in:
Felix Ruess
2017-08-07 23:27:08 +02:00
committed by Gautier Hattenberger
parent 12f143a0ee
commit 346ef5a8ab
3 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
description = "Paparazzi UAS package"
requires = "unix,str,pprzlink,xml-light,lablgtk2,glibivy,netclient"
requires = "unix,str,pprzlink,xml-light,lablgtk2,glibivy,netclient,NETTLS_GNUTLS"
version = "1.0"
directory = ""
+4 -2
View File
@@ -56,6 +56,8 @@ NETCLIENT_MINOR1 := $(shell echo $(NETCLIENT_VER) | cut -f2 -d.)
NETCLIENT_MINOR2 := $(shell echo $(NETCLIENT_VER) | cut -f3 -d.)
ifeq ($(shell test $(NETCLIENT_MAJOR) -ge 4; echo $$?),0)
CAMLP4_DEFS += -DNETCLIENT_V_4
NETTLS_GNUTLS = nettls-gnutls
COMMA_NETTLS_GNUTLS = ,$(NETTLS_GNUTLS)
ifeq ($(shell test $(NETCLIENT_MINOR2) -ge 4; echo $$?),0)
CAMLP4_DEFS += -DNETCLIENT_V_404
else ifeq ($(shell test $(NETCLIENT_MINOR1) -g 0; echo $$?),0)
@@ -77,7 +79,7 @@ PP_OPTS = -pp "camlp4o pa_macro.cmo $(CAMLP4_DEFS)"
PP_SRC = http.ml compat.ml
INCLUDES=
PKGCOMMON=pprzlink,xml-light,netclient,glibivy,lablgtk2
PKGCOMMON=pprzlink,xml-light,netclient,glibivy,lablgtk2,$(NETTLS_GNUTLS)
XINCLUDES=
XPKGCOMMON=pprzlink,xml-light,glibivy,$(LABLGTK2GNOMECANVAS),lablgtk2.glade
@@ -203,7 +205,7 @@ gtk_papget_led_editor.ml : widgets.glade
META.pprz: META.pprz.template
@echo COPY $<
$(shell sed -e 's/LABLGTK2GNOMECANVAS/$(LABLGTK2GNOMECANVAS)/g' $< > $@)
$(shell sed -e 's/LABLGTK2GNOMECANVAS/$(LABLGTK2GNOMECANVAS)/g' -e 's/,NETTLS_GNUTLS/$(COMMA_NETTLS_GNUTLS)/g' $< > $@)
clean :
$(Q)rm -f *~ *.cm* *.out *.opt .depend *.a *.o *.so tests gtk_papget_*.ml expr_parser.ml expr_parser.mli expr_lexer.ml expr_lexer.mli META.pprz
+2
View File
@@ -4,6 +4,8 @@ exception Blocked of string
IFDEF NETCLIENT_V_4 THEN
module H = Nethttp_client
let () =
Nettls_gnutls.init()
ELSE
module H = Http_client
END