mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
indent: Always use "_(" and not "_ (" to mark translatable strings.
-- This makes greping much easier and we have done that since ever. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
61ef43546b
commit
6cc4702767
@ -397,7 +397,8 @@ gnupg_cipher_is_allowed (enum gnupg_compliance_mode compliance, int producer,
|
|||||||
|
|
||||||
/* Return true if DIGEST is compliant to the given COMPLIANCE mode. */
|
/* Return true if DIGEST is compliant to the given COMPLIANCE mode. */
|
||||||
int
|
int
|
||||||
gnupg_digest_is_compliant (enum gnupg_compliance_mode compliance, digest_algo_t digest)
|
gnupg_digest_is_compliant (enum gnupg_compliance_mode compliance,
|
||||||
|
digest_algo_t digest)
|
||||||
{
|
{
|
||||||
if (! initialized)
|
if (! initialized)
|
||||||
return 0;
|
return 0;
|
||||||
@ -499,7 +500,7 @@ gnupg_parse_compliance_option (const char *string,
|
|||||||
|
|
||||||
if (! ascii_strcasecmp (string, "help"))
|
if (! ascii_strcasecmp (string, "help"))
|
||||||
{
|
{
|
||||||
log_info (_ ("valid values for option '%s':\n"), "--compliance");
|
log_info (_("valid values for option '%s':\n"), "--compliance");
|
||||||
for (i = 0; i < length; i++)
|
for (i = 0; i < length; i++)
|
||||||
log_info (" %s\n", options[i].keyword);
|
log_info (" %s\n", options[i].keyword);
|
||||||
return -1;
|
return -1;
|
||||||
@ -509,9 +510,9 @@ gnupg_parse_compliance_option (const char *string,
|
|||||||
if (! ascii_strcasecmp (string, options[i].keyword))
|
if (! ascii_strcasecmp (string, options[i].keyword))
|
||||||
return options[i].value;
|
return options[i].value;
|
||||||
|
|
||||||
log_error (_ ("invalid value for option '%s'\n"), "--compliance");
|
log_error (_("invalid value for option '%s'\n"), "--compliance");
|
||||||
if (! quiet)
|
if (! quiet)
|
||||||
log_info (_ ("(use \"help\" to list choices)\n"));
|
log_info (_("(use \"help\" to list choices)\n"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ decrypt_data (ctrl_t ctrl, void *procctx, PKT_encrypted *ed, DEK *dek)
|
|||||||
/* Check compliance. */
|
/* Check compliance. */
|
||||||
if (! gnupg_cipher_is_allowed (opt.compliance, 0, dek->algo, GCRY_CIPHER_MODE_CFB))
|
if (! gnupg_cipher_is_allowed (opt.compliance, 0, dek->algo, GCRY_CIPHER_MODE_CFB))
|
||||||
{
|
{
|
||||||
log_error (_ ("you may not use cipher algorithm '%s'"
|
log_error (_("you may not use cipher algorithm '%s'"
|
||||||
" while in %s mode\n"),
|
" while in %s mode\n"),
|
||||||
openpgp_cipher_algo_name (dek->algo),
|
openpgp_cipher_algo_name (dek->algo),
|
||||||
gnupg_compliance_option_string (opt.compliance));
|
gnupg_compliance_option_string (opt.compliance));
|
||||||
|
@ -617,7 +617,7 @@ encrypt_crypt (ctrl_t ctrl, int filefd, const char *filename,
|
|||||||
if (! gnupg_cipher_is_allowed (opt.compliance, 1, cfx.dek->algo,
|
if (! gnupg_cipher_is_allowed (opt.compliance, 1, cfx.dek->algo,
|
||||||
GCRY_CIPHER_MODE_CFB))
|
GCRY_CIPHER_MODE_CFB))
|
||||||
{
|
{
|
||||||
log_error (_ ("you may not use cipher algorithm '%s'"
|
log_error (_("you may not use cipher algorithm '%s'"
|
||||||
" while in %s mode\n"),
|
" while in %s mode\n"),
|
||||||
openpgp_cipher_algo_name (cfx.dek->algo),
|
openpgp_cipher_algo_name (cfx.dek->algo),
|
||||||
gnupg_compliance_option_string (opt.compliance));
|
gnupg_compliance_option_string (opt.compliance));
|
||||||
|
@ -3883,7 +3883,7 @@ main (int argc, char **argv)
|
|||||||
|| cmd == aSignEncrSym,
|
|| cmd == aSignEncrSym,
|
||||||
opt.def_cipher_algo,
|
opt.def_cipher_algo,
|
||||||
GCRY_CIPHER_MODE_NONE))
|
GCRY_CIPHER_MODE_NONE))
|
||||||
log_error (_ ("you may not use cipher algorithm '%s'"
|
log_error (_("you may not use cipher algorithm '%s'"
|
||||||
" while in %s mode\n"),
|
" while in %s mode\n"),
|
||||||
openpgp_cipher_algo_name (opt.def_cipher_algo),
|
openpgp_cipher_algo_name (opt.def_cipher_algo),
|
||||||
gnupg_compliance_option_string (opt.compliance));
|
gnupg_compliance_option_string (opt.compliance));
|
||||||
@ -3896,7 +3896,7 @@ main (int argc, char **argv)
|
|||||||
|| cmd == aSignSym
|
|| cmd == aSignSym
|
||||||
|| cmd == aClearsign,
|
|| cmd == aClearsign,
|
||||||
opt.def_digest_algo))
|
opt.def_digest_algo))
|
||||||
log_error (_ ("you may not use digest algorithm '%s'"
|
log_error (_("you may not use digest algorithm '%s'"
|
||||||
" while in %s mode\n"),
|
" while in %s mode\n"),
|
||||||
gcry_md_algo_name (opt.def_digest_algo),
|
gcry_md_algo_name (opt.def_digest_algo),
|
||||||
gnupg_compliance_option_string (opt.compliance));
|
gnupg_compliance_option_string (opt.compliance));
|
||||||
|
@ -136,7 +136,7 @@ check_signature2 (ctrl_t ctrl,
|
|||||||
else if (! gnupg_digest_is_allowed (opt.compliance, 0, sig->digest_algo))
|
else if (! gnupg_digest_is_allowed (opt.compliance, 0, sig->digest_algo))
|
||||||
{
|
{
|
||||||
/* Compliance failure. */
|
/* Compliance failure. */
|
||||||
log_info (_ ("you may not use digest algorithm '%s'"
|
log_info (_("you may not use digest algorithm '%s'"
|
||||||
" while in %s mode\n"),
|
" while in %s mode\n"),
|
||||||
gcry_md_algo_name (sig->digest_algo),
|
gcry_md_algo_name (sig->digest_algo),
|
||||||
gnupg_compliance_option_string (opt.compliance));
|
gnupg_compliance_option_string (opt.compliance));
|
||||||
|
@ -281,7 +281,7 @@ do_sign (ctrl_t ctrl, PKT_public_key *pksk, PKT_signature *sig,
|
|||||||
/* Check compliance. */
|
/* Check compliance. */
|
||||||
if (! gnupg_digest_is_allowed (opt.compliance, 1, mdalgo))
|
if (! gnupg_digest_is_allowed (opt.compliance, 1, mdalgo))
|
||||||
{
|
{
|
||||||
log_error (_ ("you may not use digest algorithm '%s'"
|
log_error (_("you may not use digest algorithm '%s'"
|
||||||
" while in %s mode\n"),
|
" while in %s mode\n"),
|
||||||
gcry_md_algo_name (mdalgo),
|
gcry_md_algo_name (mdalgo),
|
||||||
gnupg_compliance_option_string (opt.compliance));
|
gnupg_compliance_option_string (opt.compliance));
|
||||||
|
@ -361,7 +361,7 @@ gpgsm_decrypt (ctrl_t ctrl, int in_fd, estream_t out_fp)
|
|||||||
/* Check compliance. */
|
/* Check compliance. */
|
||||||
if (! gnupg_cipher_is_allowed (opt.compliance, 0, algo, mode))
|
if (! gnupg_cipher_is_allowed (opt.compliance, 0, algo, mode))
|
||||||
{
|
{
|
||||||
log_error (_ ("you may not use cipher algorithm '%s'"
|
log_error (_("you may not use cipher algorithm '%s'"
|
||||||
" while in %s mode\n"),
|
" while in %s mode\n"),
|
||||||
gcry_cipher_algo_name (algo),
|
gcry_cipher_algo_name (algo),
|
||||||
gnupg_compliance_option_string (opt.compliance));
|
gnupg_compliance_option_string (opt.compliance));
|
||||||
|
@ -411,7 +411,7 @@ gpgsm_encrypt (ctrl_t ctrl, certlist_t recplist, int data_fd, estream_t out_fp)
|
|||||||
gcry_cipher_map_name (opt.def_cipher_algoid),
|
gcry_cipher_map_name (opt.def_cipher_algoid),
|
||||||
gcry_cipher_mode_from_oid (opt.def_cipher_algoid)))
|
gcry_cipher_mode_from_oid (opt.def_cipher_algoid)))
|
||||||
{
|
{
|
||||||
log_error (_ ("you may not use cipher algorithm '%s'"
|
log_error (_("you may not use cipher algorithm '%s'"
|
||||||
" while in %s mode\n"),
|
" while in %s mode\n"),
|
||||||
opt.def_cipher_algoid,
|
opt.def_cipher_algoid,
|
||||||
gnupg_compliance_option_string (opt.compliance));
|
gnupg_compliance_option_string (opt.compliance));
|
||||||
|
@ -1627,7 +1627,7 @@ main ( int argc, char **argv)
|
|||||||
cmd == aEncr || cmd == aSignEncr,
|
cmd == aEncr || cmd == aSignEncr,
|
||||||
gcry_cipher_mode_from_oid (opt.def_cipher_algoid),
|
gcry_cipher_mode_from_oid (opt.def_cipher_algoid),
|
||||||
GCRY_CIPHER_MODE_NONE))
|
GCRY_CIPHER_MODE_NONE))
|
||||||
log_error (_ ("you may not use cipher algorithm '%s'"
|
log_error (_("you may not use cipher algorithm '%s'"
|
||||||
" while in %s mode\n"),
|
" while in %s mode\n"),
|
||||||
opt.def_cipher_algoid, gnupg_compliance_option_string (opt.compliance));
|
opt.def_cipher_algoid, gnupg_compliance_option_string (opt.compliance));
|
||||||
|
|
||||||
@ -1637,7 +1637,7 @@ main ( int argc, char **argv)
|
|||||||
|| cmd == aSignEncr
|
|| cmd == aSignEncr
|
||||||
|| cmd == aClearsign,
|
|| cmd == aClearsign,
|
||||||
opt.forced_digest_algo))
|
opt.forced_digest_algo))
|
||||||
log_error (_ ("you may not use digest algorithm '%s'"
|
log_error (_("you may not use digest algorithm '%s'"
|
||||||
" while in %s mode\n"),
|
" while in %s mode\n"),
|
||||||
forced_digest_algo, gnupg_compliance_option_string (opt.compliance));
|
forced_digest_algo, gnupg_compliance_option_string (opt.compliance));
|
||||||
|
|
||||||
@ -1647,7 +1647,7 @@ main ( int argc, char **argv)
|
|||||||
|| cmd == aSignEncr
|
|| cmd == aSignEncr
|
||||||
|| cmd == aClearsign,
|
|| cmd == aClearsign,
|
||||||
opt.extra_digest_algo))
|
opt.extra_digest_algo))
|
||||||
log_error (_ ("you may not use digest algorithm '%s'"
|
log_error (_("you may not use digest algorithm '%s'"
|
||||||
" while in %s mode\n"),
|
" while in %s mode\n"),
|
||||||
forced_digest_algo, gnupg_compliance_option_string (opt.compliance));
|
forced_digest_algo, gnupg_compliance_option_string (opt.compliance));
|
||||||
|
|
||||||
|
@ -464,7 +464,7 @@ gpgsm_sign (ctrl_t ctrl, certlist_t signerlist,
|
|||||||
/* Check compliance. */
|
/* Check compliance. */
|
||||||
if (! gnupg_digest_is_allowed (opt.compliance, 1, cl->hash_algo))
|
if (! gnupg_digest_is_allowed (opt.compliance, 1, cl->hash_algo))
|
||||||
{
|
{
|
||||||
log_error (_ ("you may not use digest algorithm '%s'"
|
log_error (_("you may not use digest algorithm '%s'"
|
||||||
" while in %s mode\n"),
|
" while in %s mode\n"),
|
||||||
gcry_md_algo_name (cl->hash_algo),
|
gcry_md_algo_name (cl->hash_algo),
|
||||||
gnupg_compliance_option_string (opt.compliance));
|
gnupg_compliance_option_string (opt.compliance));
|
||||||
|
@ -467,7 +467,7 @@ gpgsm_verify (ctrl_t ctrl, int in_fd, int data_fd, estream_t out_fp)
|
|||||||
|
|
||||||
if (! gnupg_digest_is_allowed (opt.compliance, 0, sigval_hash_algo))
|
if (! gnupg_digest_is_allowed (opt.compliance, 0, sigval_hash_algo))
|
||||||
{
|
{
|
||||||
log_error (_ ("you may not use digest algorithm '%s'"
|
log_error (_("you may not use digest algorithm '%s'"
|
||||||
" while in %s mode\n"),
|
" while in %s mode\n"),
|
||||||
gcry_md_algo_name (sigval_hash_algo),
|
gcry_md_algo_name (sigval_hash_algo),
|
||||||
gnupg_compliance_option_string (opt.compliance));
|
gnupg_compliance_option_string (opt.compliance));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user