glitchedhttps
Functions
glitchedhttps_cacerts.h File Reference

Trusted CA certificates chain for SSL connections. More...

#include "glitchedhttps_api.h"
#include "chillbuff.h"
#include "stddef.h"
Include dependency graph for glitchedhttps_cacerts.h:

Go to the source code of this file.

Functions

GLITCHEDHTTPS_API const char * glitchedhttps_get_ca_certs ()
 
GLITCHEDHTTPS_API size_t glitchedhttps_get_ca_certs_length ()
 
GLITCHEDHTTPS_API void glitchedhttps_set_custom_ca_certs (char *ca_certs)
 

Detailed Description

Trusted CA certificates chain for SSL connections.

Function Documentation

◆ glitchedhttps_get_ca_certs()

GLITCHEDHTTPS_API const char * glitchedhttps_get_ca_certs ( )

Gets a concatenated string of all trusted CA certificates (NUL-terminated char* string).

Returns
Concatenated string of all trusted CA certificates (NUL-terminated char* string).

◆ glitchedhttps_get_ca_certs_length()

GLITCHEDHTTPS_API size_t glitchedhttps_get_ca_certs_length ( )

Gets the length of the string returned by glitchedhttps_get_ca_certs.

Returns
String length (without the NUL-terminator).

◆ glitchedhttps_set_custom_ca_certs()

GLITCHEDHTTPS_API void glitchedhttps_set_custom_ca_certs ( char *  ca_certs)

Makes GlitchedHTTPS use a custom set of trusted CA certificates.

Check out the source file glitchedhttps_cacerts.c to find out more about how the ca_certs parameter should look like (in terms of format).

Note
If you decide to use this function (and thus provide your own chain of trusted CA certs), call this BEFORE the first call to glitchedhttps_init() !
Parameters
ca_certsConcatenated string of all trusted CA certificates to use for HTTPS requests (NUL-terminated char* string). Pass NULL to revert back to using the default glitchedhttps chain of CA certificates. If this is not NUL-terminated, welcome to undefined behaviour land :D