Update curl example to support ssl / https

Now that we know our SSL client works, and that it's able to verify
certificates, the next step will be adding it as an API to redbean.

See #97
This commit is contained in:
Justine Tunney 2021-07-06 13:39:18 -07:00
parent e51034bab3
commit 36b2710e1a
4 changed files with 212 additions and 53 deletions

View file

@ -97,6 +97,7 @@
#include "third_party/mbedtls/ecp.h"
#include "third_party/mbedtls/entropy.h"
#include "third_party/mbedtls/entropy_poll.h"
#include "third_party/mbedtls/iana.h"
#include "third_party/mbedtls/md5.h"
#include "third_party/mbedtls/oid.h"
#include "third_party/mbedtls/pk.h"
@ -1464,8 +1465,8 @@ static bool TlsSetup(void) {
DEBUGF("%s SSL shakealert unknown ca", DescribeClient());
return false;
default:
WARNF("%s SSL shakealert %hhu", DescribeClient(),
ssl.fatal_alert);
WARNF("%s SSL shakealert %s", DescribeClient(),
GetAlertDescription(ssl.fatal_alert));
return false;
}
default: