This commit is contained in:
2025-07-20 19:24:03 +02:00
parent dba15c946e
commit 22e9dee5dc
7 changed files with 353 additions and 56 deletions
+14
View File
@@ -3,6 +3,20 @@
#include "basic.h"
// This is an utility to create self-signed certificates
// useful when testing HTTPS servers locally. This is only
// meant to be used by people starting out with a library
// and simplifying the zero to one phase.
//
// The C, O, and CN are respectively country name, organization name,
// and common name of the certificate. For instance:
//
// C="IT"
// O="My Organization"
// CN="my_website.com"
//
// The output is a certificate file in PEM format and a private
// key file with the key used to sign the certificate.
int http_create_test_certificate(HTTP_String C, HTTP_String O, HTTP_String CN,
HTTP_String cert_file, HTTP_String key_file);