25 enum lws_tls_cert_info {
26 LWS_TLS_CERT_INFO_VALIDITY_FROM,
28 LWS_TLS_CERT_INFO_VALIDITY_TO,
30 LWS_TLS_CERT_INFO_COMMON_NAME,
32 LWS_TLS_CERT_INFO_ISSUER_NAME,
34 LWS_TLS_CERT_INFO_USAGE,
36 LWS_TLS_CERT_INFO_VERIFIED,
39 LWS_TLS_CERT_INFO_OPAQUE_PUBLIC_KEY,
45 LWS_TLS_CERT_INFO_DER_RAW,
50 LWS_TLS_CERT_INFO_AUTHORITY_KEY_ID,
52 LWS_TLS_CERT_INFO_AUTHORITY_KEY_ID_ISSUER,
54 LWS_TLS_CERT_INFO_AUTHORITY_KEY_ID_SERIAL,
56 LWS_TLS_CERT_INFO_SUBJECT_KEY_ID,
61 unsigned int verified;
92 LWS_VISIBLE LWS_EXTERN
int
93 lws_x509_create(
struct lws_x509_cert **x509);
111 LWS_VISIBLE LWS_EXTERN
int
112 lws_x509_parse_from_pem(
struct lws_x509_cert *x509,
const void *pem,
size_t len);
126 LWS_VISIBLE LWS_EXTERN
int
127 lws_x509_verify(
struct lws_x509_cert *x509,
struct lws_x509_cert *trusted,
128 const char *common_name);
143 LWS_VISIBLE LWS_EXTERN
int
144 lws_x509_public_to_jwk(
struct lws_jwk *jwk,
struct lws_x509_cert *x509,
145 const char *curves,
int rsabits);
166 LWS_VISIBLE LWS_EXTERN
int
167 lws_x509_jwk_privkey_pem(
struct lws_context *cx,
struct lws_jwk *jwk,
168 void *pem,
size_t len,
const char *passphrase);
177 LWS_VISIBLE LWS_EXTERN
void
178 lws_x509_destroy(
struct lws_x509_cert **x509);
180 LWS_VISIBLE LWS_EXTERN
int
181 lws_x509_info(
struct lws_x509_cert *x509,
enum lws_tls_cert_info type,
201 LWS_VISIBLE LWS_EXTERN
int
202 lws_tls_peer_cert_info(
struct lws *wsi,
enum lws_tls_cert_info type,
222 LWS_VISIBLE LWS_EXTERN
int
223 lws_tls_vhost_cert_info(
struct lws_vhost *vhost,
enum lws_tls_cert_info type,
240 LWS_VISIBLE LWS_EXTERN
int
241 lws_tls_acme_sni_cert_create(
struct lws_vhost *vhost,
const char *san_a,
266 LWS_VISIBLE LWS_EXTERN
int
267 lws_tls_acme_sni_csr_create(
struct lws_context *context,
const char *elements[],
268 uint8_t *csr,
size_t csr_len,
char **privkey_pem,
269 size_t *privkey_len);
288 LWS_VISIBLE LWS_EXTERN
int
289 lws_tls_cert_updated(
struct lws_context *context,
const char *certpath,
291 const char *mem_cert,
size_t len_mem_cert,
292 const char *mem_privkey,
size_t len_mem_privkey);
Definition: lws-x509.h:60