Sortix cross-nightly manual
This manual documents Sortix cross-nightly. You can instead view this document in the latest official manual.
NAME
tls_conn_version, tls_conn_cipher, tls_conn_cipher_strength, tls_conn_alpn_selected, tls_conn_servername, tls_conn_session_resumed, tls_peer_cert_provided, tls_peer_cert_contains_name, tls_peer_cert_chain_pem, tls_peer_cert_issuer, tls_peer_cert_subject, tls_peer_cert_hash, tls_peer_cert_notbefore, tls_peer_cert_notafter — inspect an established TLS connectionSYNOPSIS
#include <tls.h>tls_conn_version(struct tls *ctx);
tls_conn_cipher(struct tls *ctx);
tls_conn_cipher_strength(struct tls *ctx);
tls_conn_alpn_selected(struct tls *ctx);
tls_conn_servername(struct tls *ctx);
tls_conn_session_resumed(struct tls *ctx);
tls_peer_cert_provided(struct tls *ctx);
tls_peer_cert_contains_name(struct tls *ctx, const char *name);
tls_peer_cert_chain_pem(struct tls *ctx, size_t *size);
tls_peer_cert_issuer(struct tls *ctx);
tls_peer_cert_subject(struct tls *ctx);
tls_peer_cert_hash(struct tls *ctx);
tls_peer_cert_notbefore(struct tls *ctx);
tls_peer_cert_notafter(struct tls *ctx);
DESCRIPTION
These functions return information about a TLS connection and will only succeed after the handshake is complete (the connection information applies to both clients and servers, unless noted otherwise):h=$(openssl x509 -outform der -in mycert.crt | sha256) printf "SHA256:${h}\n"