http_get_mbedtls example: Update for howsmyssl.com server-side changes

New letsencrypt CA cert since they left beta, and HTTP server now
expects a Host header.
This commit is contained in:
Angus Gratton 2016-04-20 09:23:00 +10:00
parent 8453445620
commit 1c998a3edf
2 changed files with 33 additions and 32 deletions

View file

@ -41,11 +41,11 @@
#include "mbedtls/error.h"
#include "mbedtls/certs.h"
#define WEB_SERVER "howsmyssl.com"
#define WEB_SERVER "www.howsmyssl.com"
#define WEB_PORT "443"
#define WEB_URL "https://www.howsmyssl.com/a/check"
#define GET_REQUEST "GET "WEB_URL" HTTP/1.1\n\n"
#define GET_REQUEST "GET "WEB_URL" HTTP/1.1\nHost: "WEB_SERVER"\n\n"
/* Root cert for howsmyssl.com, stored in cert.c */
extern const char *server_root_cert;