ConstantsΒ§
- CLIENT_
CONFIG - Client configuration file
- CLIENT_
INVITE_ CODE_ FILE - Client connection string file
- CONSENSUS_
CONFIG - Server consensus-only configurable file
- DB_FILE
- Database file name
- ENCRYPTED_
EXT - JSON_
EXT - LOCAL_
CONFIG - Server locally configurable file
- NEW_
VERSION_ FILE_ EXT - PLAINTEXT_
PASSWORD - Plain-text stored password, used to restart the server without having to send a password in via the API
- PRIVATE_
CONFIG - Server encrypted private keys file
- SALT_
FILE - Salt backup for combining with the private key
FunctionsΒ§
- backup_
copy_ path - create_
backup_ copy - encrypted_
json_ πread - Reads an encrypted json file into a struct
- encrypted_
json_ write - Writes struct into an encrypted json file
- finalize_
password_ change - Clean up private config and password file backups after the config has been read successfully for the first time after a password change.
- plaintext_
display_ πwrite - plaintext_
json_ πread - Reads a plaintext json file into a struct
- plaintext_
json_ πwrite - Writes struct into a plaintext json file
- read_
server_ config - Reads the server from the local, private, and consensus cfg files
- recover_
interrupted_ password_ change - If
reencrypt_private_config
was interrupted, this function ensures that the system is in a consistent state, either pre-password change or post-password change. - reencrypt_
private_ config - Re-encrypts the private config with a new password.
- trim_
password - We definitely donβt want leading/trailing newlines in passwords, and a user editing the file manually will probably get a free newline added by the text editor.
- write_
server_ config - Writes the server into configuration files (private keys encrypted)