indent,i18n: Make some new strings translatable. Wrap too long lines.

--
This commit is contained in:
Werner Koch 2017-06-20 08:31:07 +02:00
parent a68a98233a
commit e0877a98a0
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
7 changed files with 33 additions and 21 deletions

View File

@ -99,7 +99,8 @@ decrypt_data (ctrl_t ctrl, void *procctx, PKT_encrypted *ed, DEK *dek)
}
/* 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'"
" while in %s mode\n"),

View File

@ -630,10 +630,13 @@ encrypt_crypt (ctrl_t ctrl, int filefd, const char *filename,
for (pkr = pk_list; pkr; pkr = pkr->next)
{
PKT_public_key *pk = pkr->pk;
if (! gnupg_pk_is_allowed (opt.compliance, PK_USE_ENCRYPTION, pk->pubkey_algo,
if (! gnupg_pk_is_allowed (opt.compliance, PK_USE_ENCRYPTION,
pk->pubkey_algo,
pk->pkey, nbits_from_pk (pk), NULL))
{
log_error ("key %s not suitable for encryption while in %s mode\n",
log_error (_("key %s not suitable for encryption"
" while in %s mode\n"),
keystr_from_pk (pk),
gnupg_compliance_option_string (opt.compliance));
rc = gpg_error (GPG_ERR_PUBKEY_ALGO);

View File

@ -95,13 +95,14 @@ get_session_key (ctrl_t ctrl, PKT_pubkey_enc * k, DEK * dek)
sk->pubkey_algo,
sk->pkey, nbits_from_pk (sk), NULL))
{
log_info ("key %s not suitable for decryption while in %s mode\n",
keystr_from_pk (sk), gnupg_compliance_option_string (opt.compliance));
free_public_key (sk);
return gpg_error (GPG_ERR_PUBKEY_ALGO);
log_info (_("key %s not suitable for decryption"
" while in %s mode\n"),
keystr_from_pk (sk),
gnupg_compliance_option_string (opt.compliance));
rc = gpg_error (GPG_ERR_PUBKEY_ALGO);
}
rc = get_it (ctrl, k, dek, sk, k->keyid);
else
rc = get_it (ctrl, k, dek, sk, k->keyid);
}
}
else if (opt.skip_hidden_recipients)
@ -135,8 +136,10 @@ get_session_key (ctrl_t ctrl, PKT_pubkey_enc * k, DEK * dek)
sk->pubkey_algo,
sk->pkey, nbits_from_pk (sk), NULL))
{
log_info ("key %s not suitable for decryption while in %s mode\n",
keystr_from_pk (sk), gnupg_compliance_option_string (opt.compliance));
log_info (_("key %s not suitable for decryption"
" while in %s mode\n"),
keystr_from_pk (sk),
gnupg_compliance_option_string (opt.compliance));
continue;
}
@ -153,7 +156,7 @@ get_session_key (ctrl_t ctrl, PKT_pubkey_enc * k, DEK * dek)
enum_secret_keys (ctrl, &enum_context, NULL); /* free context */
}
leave:
leave:
free_public_key (sk);
if (DBG_CLOCK)
log_clock ("get_session_key leave");

View File

@ -292,7 +292,7 @@ do_sign (ctrl_t ctrl, PKT_public_key *pksk, PKT_signature *sig,
if (! gnupg_pk_is_allowed (opt.compliance, PK_USE_SIGNING, pksk->pubkey_algo,
pksk->pkey, nbits_from_pk (pksk), NULL))
{
log_error ("key %s not suitable for signing while in %s mode\n",
log_error (_("key %s not suitable for signing while in %s mode\n"),
keystr_from_pk (pksk),
gnupg_compliance_option_string (opt.compliance));
err = gpg_error (GPG_ERR_PUBKEY_ALGO);

View File

@ -481,7 +481,8 @@ gpgsm_decrypt (ctrl_t ctrl, int in_fd, estream_t out_fp)
int pk_algo = gpgsm_get_key_algo_info (cert, &nbits);
/* Check compliance. */
if (! gnupg_pk_is_allowed (opt.compliance, PK_USE_DECRYPTION,
if (! gnupg_pk_is_allowed (opt.compliance,
PK_USE_DECRYPTION,
pk_algo, NULL, nbits, NULL))
{
log_error ("certificate ID 0x%08lX not suitable for "

View File

@ -407,9 +407,9 @@ gpgsm_encrypt (ctrl_t ctrl, certlist_t recplist, int data_fd, estream_t out_fp)
}
/* Check compliance. */
if (! gnupg_cipher_is_allowed (opt.compliance, 1,
gcry_cipher_map_name (opt.def_cipher_algoid),
gcry_cipher_mode_from_oid (opt.def_cipher_algoid)))
if (!gnupg_cipher_is_allowed
(opt.compliance, 1, gcry_cipher_map_name (opt.def_cipher_algoid),
gcry_cipher_mode_from_oid (opt.def_cipher_algoid)))
{
log_error (_("you may not use cipher algorithm '%s'"
" while in %s mode\n"),

View File

@ -1625,11 +1625,13 @@ main ( int argc, char **argv)
GCRY_CIPHER_MODE_NONE)
&& ! gnupg_cipher_is_allowed (opt.compliance,
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))
log_error (_("you may not use cipher algorithm '%s'"
" 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));
if (forced_digest_algo
&& ! gnupg_digest_is_allowed (opt.compliance,
@ -1639,7 +1641,8 @@ main ( int argc, char **argv)
opt.forced_digest_algo))
log_error (_("you may not use digest algorithm '%s'"
" while in %s mode\n"),
forced_digest_algo, gnupg_compliance_option_string (opt.compliance));
forced_digest_algo,
gnupg_compliance_option_string (opt.compliance));
if (extra_digest_algo
&& ! gnupg_digest_is_allowed (opt.compliance,
@ -1649,7 +1652,8 @@ main ( int argc, char **argv)
opt.extra_digest_algo))
log_error (_("you may not use digest algorithm '%s'"
" while in %s mode\n"),
forced_digest_algo, gnupg_compliance_option_string (opt.compliance));
forced_digest_algo,
gnupg_compliance_option_string (opt.compliance));
if (log_get_errorcount(0))
gpgsm_exit(2);