aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2017-01-14 15:08:18 +0100
committerRobin Krahl <me@robin-krahl.de>2017-01-14 15:08:18 +0100
commit9620638cd3a172eaf071d4f95fc77cc248d719f4 (patch)
tree11dbb5f4c32ae8cf8985a3875096a8fa38484038
parentdac7446aa9c9c77d035e1059d70c95d8c4dd9e06 (diff)
downloaddbfp-9620638cd3a172eaf071d4f95fc77cc248d719f4.tar.gz
dbfp-9620638cd3a172eaf071d4f95fc77cc248d719f4.tar.bz2
dbfp: use HTTPS instead of HTTP
The REST API seems to be no longer available via HTTP, but only via HTTPS. Therefore the URL is changed to the HTTPS scheme, and the CURL initialization is adapted to include SSL initialization.
-rw-r--r--dbfp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dbfp.c b/dbfp.c
index 5b0960d..9bc5b78 100644
--- a/dbfp.c
+++ b/dbfp.c
@@ -13,7 +13,7 @@
#include <stdlib.h>
#include <string.h>
-#define DBFP_BASE_URL "http://open-api.bahn.de/bin/rest.exe"
+#define DBFP_BASE_URL "https://open-api.bahn.de/bin/rest.exe"
#define DBFP_URL_FORMAT "%s/%s?authKey=%s&%s"
#define DBFP_URL_LEN 8000
@@ -79,7 +79,7 @@ int dbfp_init(struct dbfp *dbfp, char *key)
goto cleanup;
}
- curl_global_init(CURL_GLOBAL_ALL ^ CURL_GLOBAL_SSL);
+ curl_global_init(CURL_GLOBAL_ALL);
curl = curl_easy_init();
if (!curl) {
err = DBFP_ERROR_CURL;