[git] GnuPG - branch, STABLE-BRANCH-1-4, updated. gnupg-1.4.12-34-g3d56d48

by Werner Koch cvs at cvs.gnupg.org
Wed Dec 19 14:10:47 CET 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, STABLE-BRANCH-1-4 has been updated
       via  3d56d486e1cfd7c32930a92afd6d0c558a90b77e (commit)
       via  550983f8fbe84ee81d3631b1dda91ad2e41b1a11 (commit)
      from  58004340cc8c7124edc3c6866eec5478499b252e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3d56d486e1cfd7c32930a92afd6d0c558a90b77e
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Dec 19 14:05:56 2012 +0100

    Remove trailing white space from some files
    
    --

diff --git a/g10/sign.c b/g10/sign.c
index 462392d..6788f74 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();
diff --git a/include/http.h b/include/http.h
index 1ecdc60..38fe48d 100644
--- a/include/http.h
+++ b/include/http.h
@@ -53,7 +53,7 @@ typedef enum {
 
 /* put flag values into an enum, so that gdb can display them */
 enum
-  { 
+  {
     HTTP_FLAG_NO_SHUTDOWN = 1
   };
 
diff --git a/util/http.c b/util/http.c
index bfaaf1f..e5db605 100644
--- a/util/http.c
+++ b/util/http.c
@@ -94,7 +94,7 @@ init_sockets (void)
         return;
 
     if( WSAStartup( 0x0101, &wsdata ) ) {
-        log_error ("error initializing socket library: ec=%d\n", 
+        log_error ("error initializing socket library: ec=%d\n",
                     (int)WSAGetLastError () );
         return;
     }
@@ -205,7 +205,7 @@ http_wait_response( HTTP_HD hd, unsigned int *ret_status )
     http_start_data( hd ); /* make sure that we are in the data */
 
 #if 0
-    hd->sock = dup( hd->sock ); 
+    hd->sock = dup( hd->sock );
     if( hd->sock == -1 )
 	return G10ERR_GENERAL;
 #endif
@@ -843,9 +843,9 @@ connect_server( const char *server, ushort port, unsigned int flags,
 	  return -1;
 	}
 
-      addr.sin_family=AF_INET; 
+      addr.sin_family=AF_INET;
       addr.sin_port=htons(port);
-      memcpy(&addr.sin_addr,&inaddr,sizeof(inaddr));      
+      memcpy(&addr.sin_addr,&inaddr,sizeof(inaddr));
 
       if(connect(sock,(struct sockaddr *)&addr,sizeof(addr))==0)
 	return sock;
@@ -1025,7 +1025,7 @@ write_server( int sock, const char *data, size_t length )
 
     nleft = length;
     while( nleft > 0 ) {
-#ifdef _WIN32  
+#ifdef _WIN32
         int nwritten;
 
         nwritten = send (sock, data, nleft, 0);

commit 550983f8fbe84ee81d3631b1dda91ad2e41b1a11
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Dec 19 14:03:25 2012 +0100

    Adjust to GNU coding standards
    
    --
    
    A variable definition with initialization shall have only one variable
    per type.

diff --git a/util/http.c b/util/http.c
index b72489b..bfaaf1f 100644
--- a/util/http.c
+++ b/util/http.c
@@ -817,8 +817,13 @@ static int
 connect_server( const char *server, ushort port, unsigned int flags,
 		struct http_srv *srv )
 {
-  int sock=-1, srvindex, srvcount=0, connected=0, hostfound=0, chosen=-1;
-  struct srventry *srvlist=NULL;
+  int sock = -1;
+  int srvcount = 0;
+  int connected = 0;
+  int hostfound = 0;
+  int chosen = -1;
+  struct srventry *srvlist = NULL;
+  int srvindex;
 
 #ifdef _WIN32
   unsigned long inaddr;
@@ -981,7 +986,7 @@ connect_server( const char *server, ushort port, unsigned int flags,
     }
 #endif /* !HAVE_GETADDRINFO */
 
-  if(chosen>-1 && srv)
+  if(chosen > -1 && srv)
     {
       srv->used_server = strdup (srvlist[chosen].target);
       srv->used_port = srvlist[chosen].port;

-----------------------------------------------------------------------

Summary of changes:
 g10/sign.c     |   36 ++++++++++++++++++------------------
 include/http.h |    2 +-
 util/http.c    |   21 +++++++++++++--------
 3 files changed, 32 insertions(+), 27 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list