From 211db6593052dda88ea64cc3dad2ece57be46793 Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Tue, 23 Nov 2021 19:32:00 +0000 Subject: [PATCH] Improve TLS-Crypt-V2 GROUP-Key Inline-file names Signed-off-by: Richard T Bonhomme --- easytls | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/easytls b/easytls index e9c8411..b4b0584 100755 --- a/easytls +++ b/easytls @@ -4018,12 +4018,13 @@ inline_tls_crypt_v2_group_server () die "Required option(s): " name="${1}" - file_name_stub="${1}-gs" shift group_key="${1}" shift + file_name_stub="${name}-${group_key}" + cmd_opts="" while [ -n "${1}" ]; do case "${1}" in @@ -4175,8 +4176,9 @@ inline_tls_crypt_v2_group_server () # Append TLS-Crypt-V2 key { - "${EASYTLS_PRINTF}" "%s\n" \ - "# metadata Easy-TLS-version ${EASYTLS_VERSION} - TLS-Crypt-v2 key" + "${EASYTLS_PRINTF}" '%s\n%s\n' \ + "# metadata Easy-TLS-version ${EASYTLS_VERSION}" \ + "# metadata TLS-Crypt-v2 GROUP Server Key: ${group_key}" if [ $no_metadata ] then @@ -4256,12 +4258,13 @@ inline_tls_crypt_v2_group_client () die "Required option(s): " name="${1}" - file_name_stub="${1}-gc" shift group_key="${1}" shift + file_name_stub="${name}-${group_key}" + cmd_opts="" while [ -n "${1}" ]; do case "${1}" in @@ -4413,8 +4416,9 @@ inline_tls_crypt_v2_group_client () # Append TLS-Crypt-V2 key { - "${EASYTLS_PRINTF}" "%s\n" \ - "# metadata Easy-TLS-version ${EASYTLS_VERSION} - TLS-Crypt-v2 key" + "${EASYTLS_PRINTF}" '%s\n%s\n' \ + "# metadata Easy-TLS-version ${EASYTLS_VERSION}" \ + "# metadata TLS-Crypt-v2 GROUP Client Key: ${group_key}" if [ $no_metadata ] then