macula_quic_cert (macula v0.14.3)
View SourceMacula QUIC certificate utilities. Provides functions for generating and validating self-signed certificates for QUIC connections via OpenSSL command-line tool.
Summary
Functions
Generate a self-signed certificate and key in a temporary directory. Returns {ok, CertFile, KeyFile} with paths to generated files. The files are created in /tmp/macula_certs_PID for test isolation.
Generate a self-signed certificate and key in the given directory. Returns {ok, {CertFile, KeyFile}} with paths to generated files.
Generate a self-signed certificate with custom options. Options: subject - Certificate subject (default: "/CN=macula.local") validity_days - Validity period in days (default: 365)
Validate that both certificate and key files exist and are readable.
Functions
-spec generate_self_signed() -> {ok, file:filename(), file:filename()} | {error, term()}.
Generate a self-signed certificate and key in a temporary directory. Returns {ok, CertFile, KeyFile} with paths to generated files. The files are created in /tmp/macula_certs_PID for test isolation.
-spec generate_self_signed(file:filename()) -> {ok, {file:filename(), file:filename()}} | {error, term()}.
Generate a self-signed certificate and key in the given directory. Returns {ok, {CertFile, KeyFile}} with paths to generated files.
-spec generate_self_signed(file:filename(), map()) -> {ok, {file:filename(), file:filename()}} | {error, term()}.
Generate a self-signed certificate with custom options. Options: subject - Certificate subject (default: "/CN=macula.local") validity_days - Validity period in days (default: 365)
-spec validate_files(file:filename(), file:filename()) -> ok | {error, term()}.
Validate that both certificate and key files exist and are readable.