1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/signaturepdf_ynh.git synced 2024-09-03 20:25:57 +02:00

Fixes for digital signature

This commit is contained in:
tituspijean 2024-08-03 19:10:09 +02:00
parent 800b5d0577
commit 2598621296
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720
2 changed files with 9 additions and 1 deletions

View file

@ -6,11 +6,17 @@ name = "SignaturePDF configuration"
[main.digital_signature]
name = "Set up digital signature"
[main.digital_signature.warning]
type = "alert"
style = "info"
ask.en = "Changing either the nickname or the password will delete the current certificate and generate a new one"
ask.fr = "Changer le surnom ou le mot de passe supprimera le certificat actuel et en génèrera un nouveau"
[main.digital_signature.nss3_nick]
ask.en = "Choose a nickname for the digital signature"
ask.fr = "Choisissez un surnom pour la signature numérique"
type = "string"
pattern.regexp = '[^\.]+'
pattern.regexp = '^[^\.]+$'
pattern.error = "The nickname cannot contain a dot"
bind = ":__INSTALL_DIR__/config/config.ini"

View file

@ -9,6 +9,8 @@ ynh_app_config_validate() {
_ynh_app_config_validate
if [ "${changed[nss3_nick]}" == "true" ] || [ "${changed[nss3_password]}" == "true" ] ]; then
ynh_secure_remove --file="$data_dir/nss"
ynh_exec_as $app mkdir -p "$data_dir/nss"
ynh_exec_as $app bash "$install_dir/tools/create_nss_certs.sh" $data_dir/nss/ $nss3_password $nss3_nick https://$domain$path
fi
}