Module z_ssl_certs

SSL support functions, create self-signed certificates.

Copyright © 2012-2019 Marc Worrell, Maas-Maarten Zeeman

Authors: Marc Worrell (marc@worrell.nl), Maas-Maarten Zeeman (mmzeeman@xs4all.nl).

Description

SSL support functions, create self-signed certificates

Function Index

ensure_self_signed/1Check if all certificates are available in the site's ssl directory.
get_ssl_options/1Fetch the ssi options for the site context.
get_ssl_options/2Fetch the ssl options for the given hostname and site context.
sign/2Sign data using the current private key and sha256.
sni_fun/1Callback for SSL SNI, match the hostname to a set of keys.
sni_self_signed/1
ssl_listener_options/0Return the options to use for non-sni ssl.

Function Details

ensure_self_signed/1

ensure_self_signed(Hostname::string()) -> {ok, [ssl:ssl_option()]} | {error, term()}

Check if all certificates are available in the site's ssl directory

get_ssl_options/1

get_ssl_options(Context::z:context() | undefined) -> [ssl:ssl_option()] | undefined

Fetch the ssi options for the site context.

get_ssl_options/2

get_ssl_options(Hostname::binary(), Context::z:context()) -> [ssl:ssl_option()] | undefined

Fetch the ssl options for the given hostname and site context. If there is is no module observing ssl_options, then return the self signed certificates.

sign/2

sign(Data::iodata(), Context::z:context()) -> {ok, binary()} | {error, term()}

Sign data using the current private key and sha256

sni_fun/1

sni_fun(Hostname::string()) -> [ssl:ssl_option()] | undefined

Callback for SSL SNI, match the hostname to a set of keys

sni_self_signed/1

sni_self_signed(Hostname::string() | binary()) -> [ssl:ssl_option()] | undefined

ssl_listener_options/0

ssl_listener_options() -> [ssl:ssl_option()]

Return the options to use for non-sni ssl


Generated by EDoc