zotonic_ssl_dhfile (zotonic_ssl v2.0.0)

View Source

SSL support functions, ensure the DH file.

Summary

Functions

Check if the DH file does exist, if not then create the DH file. Missing directories are created. The DH group used will be 'ffdhe3072'.

Check if the DH file does exist, if not then create the DH file. Missing directories are created.

Check if the file is a DH file.

Write a DH file, directory must exist. DH group will be 'ffdhe3072'.

Write a DH file. Overwrites any existing file. The file mode will be set to rw for the user.

Types

dhgroup/0

-type dhgroup() :: ffdhe2048 | ffdhe3072 | ffdhe4096.

Functions

ensure_dhfile(Filename)

-spec ensure_dhfile(file:filename_all()) -> ok | {error, term()}.

Check if the DH file does exist, if not then create the DH file. Missing directories are created. The DH group used will be 'ffdhe3072'.

ensure_dhfile(Filename, Group)

-spec ensure_dhfile(file:filename_all(), dhgroup()) -> ok | {error, term()}.

Check if the DH file does exist, if not then create the DH file. Missing directories are created.

is_dhfile(Filename)

-spec is_dhfile(file:filename_all()) -> boolean().

Check if the file is a DH file.

write_dhfile(Filename)

-spec write_dhfile(file:filename_all()) -> ok | {error, term()}.

Write a DH file, directory must exist. DH group will be 'ffdhe3072'.

write_dhfile(Filename, Group)

-spec write_dhfile(file:filename_all(), dhgroup()) -> ok | {error, term()}.

Write a DH file. Overwrites any existing file. The file mode will be set to rw for the user.