Fix compilation with VERIFY_ONLY

This commit is contained in:
Frank Denis 2021-10-08 14:40:58 +02:00
parent 1e050e7d0a
commit f6965a0858

View file

@ -457,6 +457,19 @@ verify(PubkeyStruct *pubkey_struct, const char *message_file,
return 0;
}
static char *
append_sig_suffix(const char *message_file)
{
char *sig_file;
size_t message_file_len = strlen(message_file);
sig_file = xmalloc(message_file_len + sizeof SIG_SUFFIX);
memcpy(sig_file, message_file, message_file_len);
memcpy(sig_file + message_file_len, SIG_SUFFIX, sizeof SIG_SUFFIX);
return sig_file;
}
#ifndef VERIFY_ONLY
static char *
default_trusted_comment(const char *message_file)
@ -472,19 +485,6 @@ default_trusted_comment(const char *message_file)
return ret;
}
static char *
append_sig_suffix(const char *message_file)
{
char *sig_file;
size_t message_file_len = strlen(message_file);
sig_file = xmalloc(message_file_len + sizeof SIG_SUFFIX);
memcpy(sig_file, message_file, message_file_len);
memcpy(sig_file + message_file_len, SIG_SUFFIX, sizeof SIG_SUFFIX);
return sig_file;
}
static void
sign(SeckeyStruct *seckey_struct, PubkeyStruct *pubkey_struct,
const char *message_file, const char *sig_file, const char *comment,