Skip to content

Changes

Started by upstream project gerrit-onomondo-eim #3
Started 1 day 2 hr ago
Queued 6.2 sec
Took 22 sec on built-in
certificates: fix certificate location, make sure cert/key files are readable

The certificate and key files are placed in the config directory. This is
an unfortunate location, since it causes a lot of trouble when referencing
those files.

The erlang documentation suggests to place so called auxillary files in a
"priv" directory on the same level as the config directory. The path to
the priv directory can then be located using code:priv_dir.

see also: https://www.erlang.org/docs/26/design_principles/applications.html

Let's adopt this mechanism by adding utility functions that allow us to
resolve the file paths to files inside the priv directory. Let's also
automatically check if the referenced file is readable, so that we get
a proper error in the log in case a certificate or key file is missing

Change-Id: Ie09d746a6e28ac6fee3e00dfa32cb01f8a7b947e
Related: SYS#7093
pmaier@sysmocom.de at