aboutsummaryrefslogtreecommitdiffstats
path: root/g10/sign.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/sign.c')
-rw-r--r--g10/sign.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/g10/sign.c b/g10/sign.c
index 462392df3..6788f7427 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -151,7 +151,7 @@ mk_notation_policy_etc( PKT_signature *sig,
/*
- * Helper to hash a user ID packet.
+ * Helper to hash a user ID packet.
*/
static void
hash_uid (MD_HANDLE md, int sigversion, const PKT_user_id *uid)
@@ -189,7 +189,7 @@ hash_uid (MD_HANDLE md, int sigversion, const PKT_user_id *uid)
static void
hash_sigversion_to_magic (MD_HANDLE md, const PKT_signature *sig)
{
- if (sig->version >= 4)
+ if (sig->version >= 4)
md_putc (md, sig->version);
md_putc (md, sig->sig_class);
if (sig->version < 4) {
@@ -202,7 +202,7 @@ hash_sigversion_to_magic (MD_HANDLE md, const PKT_signature *sig)
else {
byte buf[6];
size_t n;
-
+
md_putc (md, sig->pubkey_algo);
md_putc (md, sig->digest_algo);
if (sig->hashed) {
@@ -258,13 +258,13 @@ do_sign( PKT_secret_key *sk, PKT_signature *sig,
sig->digest_algo = digest_algo;
sig->digest_start[0] = dp[0];
sig->digest_start[1] = dp[1];
- if (sk->is_protected && sk->protect.s2k.mode == 1002)
- {
+ if (sk->is_protected && sk->protect.s2k.mode == 1002)
+ {
#ifdef ENABLE_CARD_SUPPORT
unsigned char *rbuf;
size_t rbuflen;
char *snbuf;
-
+
snbuf = serialno_and_fpr_from_sk (sk->protect.iv,
sk->protect.ivlen, sk);
rc = agent_scd_pksign (snbuf, digest_algo,
@@ -282,7 +282,7 @@ do_sign( PKT_secret_key *sk, PKT_signature *sig,
return G10ERR_UNSUPPORTED;
#endif /* ENABLE_CARD_SUPPORT */
}
- else
+ else
{
frame = encode_md_value( NULL, sk, md, digest_algo );
if (!frame)
@@ -492,7 +492,7 @@ print_status_sig_created ( PKT_secret_key *sk, PKT_signature *sig, int what )
* Loop over the secret certificates in SK_LIST and build the one pass
* signature packets. OpenPGP says that the data should be bracket by
* the onepass-sig and signature-packet; so we build these onepass
- * packet here in reverse order
+ * packet here in reverse order
*/
static int
write_onepass_sig_packets (SK_LIST sk_list, IOBUF out, int sigclass )
@@ -508,7 +508,7 @@ write_onepass_sig_packets (SK_LIST sk_list, IOBUF out, int sigclass )
PKT_onepass_sig *ops;
PACKET pkt;
int i, rc;
-
+
for (i=0, sk_rover = sk_list; sk_rover; sk_rover = sk_rover->next ) {
if (++i == skcount)
break;
@@ -521,7 +521,7 @@ write_onepass_sig_packets (SK_LIST sk_list, IOBUF out, int sigclass )
ops->pubkey_algo = sk->pubkey_algo;
keyid_from_sk (sk, ops->keyid);
ops->last = (skcount == 1);
-
+
init_packet(&pkt);
pkt.pkttype = PKT_ONEPASS_SIG;
pkt.pkt.onepass_sig = ops;
@@ -611,7 +611,7 @@ write_plaintext_packet (IOBUF out, IOBUF inp, const char *fname,
wipememory(copy_buffer,4096); /* burn buffer */
}
/* fixme: it seems that we never freed pt/pkt */
-
+
return rc;
}
@@ -923,7 +923,7 @@ sign_file( STRLIST filenames, int detached, STRLIST locusr,
there is an assumed preference for uncompressed data.
Still, if it did fail, we'll also end up with the
default. */
-
+
if((compr_algo=
select_algo_from_prefs(pk_list,PREFTYPE_ZIP,-1,NULL))==-1)
compr_algo=default_compress_algo();
@@ -1095,7 +1095,7 @@ clearsign_file( const char *fname, STRLIST locusr, const char *outfile )
outfile = NULL;
errno = EPERM;
}
- else
+ else
out = iobuf_create( outfile );
if( !out )
{
@@ -1222,7 +1222,7 @@ sign_symencrypt_file (const char *fname, STRLIST locusr)
}
rc = build_sk_list (locusr, &sk_list, 1, PUBKEY_USAGE_SIG);
- if (rc)
+ if (rc)
goto leave;
/* prepare iobufs */
@@ -1234,7 +1234,7 @@ sign_symencrypt_file (const char *fname, STRLIST locusr)
errno = EPERM;
}
if( !inp ) {
- log_error(_("can't open `%s': %s\n"),
+ log_error(_("can't open `%s': %s\n"),
fname? fname: "[stdin]", strerror(errno) );
rc = G10ERR_OPEN_FILE;
goto leave;
@@ -1326,7 +1326,7 @@ sign_symencrypt_file (const char *fname, STRLIST locusr)
create_time);
if (rc)
goto leave;
-
+
/* Write the signatures */
/*(current filters: zip - encrypt - armor)*/
rc = write_signature_packets (sk_list, out, mfx.md,
@@ -1482,7 +1482,7 @@ int
update_keysig_packet( PKT_signature **ret_sig,
PKT_signature *orig_sig,
PKT_public_key *pk,
- PKT_user_id *uid,
+ PKT_user_id *uid,
PKT_public_key *subpk,
PKT_secret_key *sk,
int (*mksubpkt)(PKT_signature *, void *),
@@ -1514,7 +1514,7 @@ update_keysig_packet( PKT_signature **ret_sig,
/* create a new signature packet */
sig = copy_signature (NULL, orig_sig);
-
+
/* We need to create a new timestamp so that new sig expiration
calculations are done correctly... */
sig->timestamp=make_timestamp();