mirror of
https://github.com/jedisct1/minisign.git
synced 2025-04-04 11:27:42 +03:00
Fix compilation with VERIFY_ONLY
This commit is contained in:
parent
1e050e7d0a
commit
f6965a0858
1 changed files with 13 additions and 13 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue