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

@ -75,7 +75,7 @@ char *xiso8601ts(struct timespec *) mallocesque;
cosmopolitan § eXtended apis » input / output
*/
char *xslurp(const char *, size_t *)
void *xslurp(const char *, size_t *)
paramsnonnull((1)) returnspointerwithnoaliases
returnsaligned((PAGESIZE)) nodiscard;
int xbarf(const char *, const void *, size_t);

View file

@ -30,7 +30,7 @@
* @return NUL-terminated malloc'd contents, or NULL w/ errno
* @note this is uninterruptible
*/
char *xslurp(const char *path, size_t *opt_out_size) {
void *xslurp(const char *path, size_t *opt_out_size) {
int fd;
ssize_t rc;
size_t i, got;