[svn] gcry - r1427 - in trunk: . cipher mpi random src tests

svn author wk cvs at cvs.gnupg.org
Mon Apr 12 23:00:15 CEST 2010


Author: wk
Date: 2010-04-12 23:00:13 +0200 (Mon, 12 Apr 2010)
New Revision: 1427

Modified:
   trunk/ChangeLog
   trunk/cipher/ChangeLog
   trunk/cipher/ac.c
   trunk/cipher/cipher.c
   trunk/cipher/des.c
   trunk/cipher/ecc.c
   trunk/cipher/md.c
   trunk/cipher/primegen.c
   trunk/cipher/pubkey.c
   trunk/cipher/rfc2268.c
   trunk/cipher/rsa.c
   trunk/cipher/tiger.c
   trunk/cipher/twofish.c
   trunk/configure.ac
   trunk/mpi/ChangeLog
   trunk/mpi/longlong.h
   trunk/mpi/mpi-bit.c
   trunk/mpi/mpi-inline.c
   trunk/random/ChangeLog
   trunk/random/random-csprng.c
   trunk/random/random-fips.c
   trunk/random/random.c
   trunk/random/rndegd.c
   trunk/random/rndlinux.c
   trunk/random/rndunix.c
   trunk/random/rndw32.c
   trunk/src/ChangeLog
   trunk/src/fips.c
   trunk/src/g10lib.h
   trunk/src/gcryptrnd.c
   trunk/src/global.c
   trunk/src/hmac256.c
   trunk/src/module.c
   trunk/src/mpi.h
   trunk/src/secmem.c
   trunk/src/sexp.c
   trunk/tests/ChangeLog
   trunk/tests/ac-data.c
   trunk/tests/basic.c
Log:
Applied spelling fixes and more verbose test diagnositcs by Brad Hards.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/ChangeLog	2010-04-12 21:00:13 UTC (rev 1427)
@@ -1,3 +1,7 @@
+2010-04-12  Brad Hards  <bradh at frogmouth.net>  (wk)
+
+	* configure.ac: Print more verbose info at the end.
+
 2010-03-24  Werner Koch  <wk at g10code.com>
 
 	* configure.ac (USE_RNDW32CE): New.

Modified: trunk/cipher/ChangeLog
===================================================================
--- trunk/cipher/ChangeLog	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/cipher/ChangeLog	2010-04-12 21:00:13 UTC (rev 1427)
@@ -1,3 +1,7 @@
+2010-04-12  Brad Hards  <bradh at frogmouth.net>  (wk)
+
+	Spelling fixes.
+
 2010-03-26  Werner Koch  <wk at g10code.com>
 
 	* tiger.c (asn): Unfetter the old TIGER from an OID.
@@ -16,13 +20,13 @@
 
 	* sha512.c (ROTR, Ch, Maj, Sum0, Sum1): Turn macros into inline
 	functions.
-	(transform): Partly Unroll to interweave the chain variables.
+	(transform): Partly unroll to interweave the chain variables.
 	Suggested by Christian Grothoff.
 
 2009-12-10  Werner Koch  <wk at g10code.com>
 
 	* Makefile.am (o_flag_munging): New.
-	(tiger.o, tiger.lo): Use it. 
+	(tiger.o, tiger.lo): Use it.
 
 	* cipher.c (do_ctr_encrypt): Add arg OUTBUFLEN.  Check for
 	suitable value.  Add check for valid inputlen.  Wipe temporary

Modified: trunk/mpi/ChangeLog
===================================================================
--- trunk/mpi/ChangeLog	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/mpi/ChangeLog	2010-04-12 21:00:13 UTC (rev 1427)
@@ -1,3 +1,7 @@
+2010-04-12  Brad Hards  <bradh at frogmouth.net>  (wk)
+
+	Spelling fixes.
+
 2010-02-22  Aurelien Jarno <aurel32 at debian.org>  (wk)
 
 	* longlong.h (umul_ppmm) <mips> [__GNUC__ >= 4.4]: Patch according

Modified: trunk/random/ChangeLog
===================================================================
--- trunk/random/ChangeLog	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/random/ChangeLog	2010-04-12 21:00:13 UTC (rev 1427)
@@ -1,3 +1,7 @@
+2010-04-12  Brad Hards  <bradh at frogmouth.net>  (wk)
+
+	Spelling fixes.
+
 2010-03-24  Werner Koch  <wk at g10code.com>
 
 	* rndw32.c: Revert all changes from 2010-01-21.

Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/src/ChangeLog	2010-04-12 21:00:13 UTC (rev 1427)
@@ -1,3 +1,7 @@
+2010-04-12  Brad Hards  <bradh at frogmouth.net>  (wk)
+
+	Spelling fixes.
+
 2010-03-15  Werner Koch  <wk at g10code.com>
 
 	* gcrypt.h.in: Add autoconf template to set generated file to

Modified: trunk/tests/ChangeLog
===================================================================
--- trunk/tests/ChangeLog	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/tests/ChangeLog	2010-04-12 21:00:13 UTC (rev 1427)
@@ -1,3 +1,9 @@
+2010-04-12  Brad Hards  <bradh at frogmouth.net>  (wk)
+
+	* basic.c (check_cbc_mac_cipher): Print more info.
+	(main): Factor some code out to ...
+	(check_cipher_modes): .. new.
+
 2010-04-06  Brad Hards  <bradh at frogmouth.net>  (wk)
 
 	* aeswrap.c, hmac.c, basic.c:  Typo fixes.

Modified: trunk/cipher/ac.c
===================================================================
--- trunk/cipher/ac.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/cipher/ac.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -2499,7 +2499,7 @@
 dencode_action_t;
 
 /* Encode or decode a message according to the the encoding method
-   METHOD; ACTION specifies wether the message that is contained in
+   METHOD; ACTION specifies whether the message that is contained in
    BUFFER_IN and of length BUFFER_IN_N should be encoded or decoded.
    The resulting message will be stored in a newly allocated buffer in
    BUFFER_OUT and BUFFER_OUT_N.  */

Modified: trunk/cipher/cipher.c
===================================================================
--- trunk/cipher/cipher.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/cipher/cipher.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -118,7 +118,7 @@
 /* This is the lock protecting CIPHERS_REGISTERED.  */
 static ath_mutex_t ciphers_registered_lock = ATH_MUTEX_INITIALIZER;
 
-/* Flag to check wether the default ciphers have already been
+/* Flag to check whether the default ciphers have already been
    registered.  */
 static int default_ciphers_registered;
 
@@ -686,7 +686,7 @@
   
   REGISTER_DEFAULT_CIPHERS;
 
-  /* Fetch the according module and check wether the cipher is marked
+  /* Fetch the according module and check whether the cipher is marked
      available for use.  */
   ath_mutex_lock (&ciphers_registered_lock);
   module = _gcry_module_lookup_id (ciphers_registered, algo);
@@ -1972,7 +1972,7 @@
 
    There are no values for CMD yet defined.  
 
-   The fucntion always returns GPG_ERR_INV_OP.
+   The function always returns GPG_ERR_INV_OP.
    
  */
 gcry_error_t
@@ -2014,7 +2014,7 @@
    Note: Because this function is in most cases used to return an
    integer value, we can make it easier for the caller to just look at
    the return value.  The caller will in all cases consult the value
-   and thereby detecting whether a error occured or not (i.e. while
+   and thereby detecting whether a error occurred or not (i.e. while
    checking the block size)
  */
 gcry_error_t

Modified: trunk/cipher/des.c
===================================================================
--- trunk/cipher/des.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/cipher/des.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -106,7 +106,7 @@
  *
  *     if ( (error_msg = selftest()) )
  *     {
- *	   fprintf(stderr, "An error in the DES/Tripple-DES implementation occured: %s\n", error_msg);
+ *	   fprintf(stderr, "An error in the DES/Triple-DES implementation occurred: %s\n", error_msg);
  *	   abort();
  *     }
  */

Modified: trunk/cipher/ecc.c
===================================================================
--- trunk/cipher/ecc.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/cipher/ecc.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -1266,7 +1266,7 @@
     }
 
   /* Check that all parameters are known and normalize all MPIs (that
-     should not be required but we use an internal fucntion later and
+     should not be required but we use an internal function later and
      thus we better make 100% sure that they are normalized). */
   for (idx = 0; idx < 6; idx++)
     if (!values[idx])

Modified: trunk/cipher/md.c
===================================================================
--- trunk/cipher/md.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/cipher/md.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -105,7 +105,7 @@
 /* This is the lock protecting DIGESTS_REGISTERED.  */
 static ath_mutex_t digests_registered_lock = ATH_MUTEX_INITIALIZER;
 
-/* Flag to check wether the default ciphers have already been
+/* Flag to check whether the default ciphers have already been
    registered.  */
 static int default_digests_registered;
 
@@ -1142,7 +1142,7 @@
  * Note:  Because this function is in most cases used to return an
  * integer value, we can make it easier for the caller to just look at
  * the return value.  The caller will in all cases consult the value
- * and thereby detecting whether a error occured or not (i.e. while checking
+ * and thereby detecting whether a error occurred or not (i.e. while checking
  * the block size)
  */
 gcry_error_t

Modified: trunk/cipher/primegen.c
===================================================================
--- trunk/cipher/primegen.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/cipher/primegen.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -988,7 +988,7 @@
 /* Given ARRAY of size N with M elements set to true produce a
    modified array with the next permutation of M elements.  Note, that
    ARRAY is used in a one-bit-per-byte approach.  To detected the last
-   permutation it is useful to intialize the array with the first M
+   permutation it is useful to initialize the array with the first M
    element set to true and use this test:
        m_out_of_n (array, m, n);
        for (i = j = 0; i < n && j < m; i++)
@@ -1170,7 +1170,7 @@
   return gcry_error (err);
 }
 
-/* Check wether the number X is prime.  */
+/* Check whether the number X is prime.  */
 gcry_error_t
 gcry_prime_check (gcry_mpi_t x, unsigned int flags)
 {

Modified: trunk/cipher/pubkey.c
===================================================================
--- trunk/cipher/pubkey.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/cipher/pubkey.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -85,7 +85,7 @@
 /* This is the lock protecting PUBKEYS_REGISTERED.  */
 static ath_mutex_t pubkeys_registered_lock = ATH_MUTEX_INITIALIZER;;
 
-/* Flag to check wether the default pubkeys have already been
+/* Flag to check whether the default pubkeys have already been
    registered.  */
 static int default_pubkeys_registered;
 
@@ -1567,7 +1567,7 @@
    Do a PK encrypt operation
   
    Caller has to provide a public key as the SEXP pkey and data as a
-   SEXP with just one MPI in it. Alternativly S_DATA might be a
+   SEXP with just one MPI in it. Alternatively S_DATA might be a
    complex S-Expression, similar to the one used for signature
    verification.  This provides a flag which allows to handle PKCS#1
    block type 2 padding.  The function returns a a sexp which may be
@@ -2504,14 +2504,14 @@
 
     GCRYCTL_GET_ALGO_USAGE:
         Return the usage glafs for the give algo.  An invalid alog
-        does return 0.  Disabled algos are ignored here becuase we
+        does return 0.  Disabled algos are ignored here because we
         only want to know whether the algo is at all capable of
         the usage.
   
    Note: Because this function is in most cases used to return an
    integer value, we can make it easier for the caller to just look at
    the return value.  The caller will in all cases consult the value
-   and thereby detecting whether a error occured or not (i.e. while
+   and thereby detecting whether a error occurred or not (i.e. while
    checking the block size) */
 gcry_error_t
 gcry_pk_algo_info (int algorithm, int what, void *buffer, size_t *nbytes)

Modified: trunk/cipher/rfc2268.c
===================================================================
--- trunk/cipher/rfc2268.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/cipher/rfc2268.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -22,7 +22,7 @@
 /* This implementation was written by Nikos Mavroyanopoulos for GNUTLS
  * as a Libgcrypt module (gnutls/lib/x509/rc2.c) and later adapted for
  * direct use by Libgcrypt by Werner Koch.  This implementation is
- * only useful for pkcs#12 descryption.
+ * only useful for pkcs#12 decryption.
  *
  * The implementation here is based on Peter Gutmann's RRC.2 paper.
  */

Modified: trunk/cipher/rsa.c
===================================================================
--- trunk/cipher/rsa.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/cipher/rsa.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -582,7 +582,7 @@
 
 
 /****************
- * Test wether the secret key is valid.
+ * Test whether the secret key is valid.
  * Returns: true if this is a valid key.
  */
 static int
@@ -952,7 +952,7 @@
       gcry_mpi_mod (r, r, sk.n);
 
       /* Calculate inverse of r.  It practically impossible that the
-         follwing test fails, thus we do not add code to release
+         following test fails, thus we do not add code to release
          allocated resources.  */
       if (!gcry_mpi_invm (ri, r, sk.n))
 	return GPG_ERR_INTERNAL;
@@ -1063,7 +1063,7 @@
         (e #010001#))
         
    PKCS-15 says that for RSA only the modulus should be hashed -
-   however, it is not clear wether this is meant to use the raw bytes
+   however, it is not clear whether this is meant to use the raw bytes
    (assuming this is an unsigned integer) or whether the DER required
    0 should be prefixed.  We hash the raw bytes.  */
 static gpg_err_code_t

Modified: trunk/cipher/tiger.c
===================================================================
--- trunk/cipher/tiger.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/cipher/tiger.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -878,7 +878,7 @@
 
 
 
-/* This is the fixed TIGER implemenation.  */
+/* This is the fixed TIGER implementation.  */
 static byte asn1[19] = /* Object ID is 1.3.6.1.4.1.11591.12.2 */
   { 0x30, 0x29, 0x30, 0x0d, 0x06, 0x09, 0x2b, 0x06,
     0x01, 0x04, 0x01, 0xda, 0x47, 0x0c, 0x02,

Modified: trunk/cipher/twofish.c
===================================================================
--- trunk/cipher/twofish.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/cipher/twofish.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -522,7 +522,7 @@
  * preprocessed through q0 and q1 respectively; for longer keys they are the
  * output of previous stages.  j is the index of the first key byte to use.
  * CALC_K computes a pair of subkeys for 128-bit Twofish, by calling CALC_K_2
- * twice, doing the Psuedo-Hadamard Transform, and doing the necessary
+ * twice, doing the Pseudo-Hadamard Transform, and doing the necessary
  * rotations.  Its parameters are: a, the array to write the results into,
  * j, the index of the first output entry, k and l, the preprocessed indices
  * for index 2i, and m and n, the preprocessed indices for index 2i+1.

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/configure.ac	2010-04-12 21:00:13 UTC (rev 1427)
@@ -1188,10 +1188,14 @@
 echo "
         Libgcrypt v${VERSION} has been configured as follows:
         
-        Platform:  $PRINTABLE_OS_NAME ($host)
+        Platform:                  $PRINTABLE_OS_NAME ($host)
+        Enabled cipher algorithms: $enabled_ciphers
+        Enabled digest algorithms: $enabled_digests
+        Enabled pubkey algorithms: $enabled_pubkey_ciphers
+        Random number generator:   $random
+        Using linux capabilities:  $use_capabilities
 "
 
-
 if test "$print_egd_notice" = "yes"; then
 cat <<G10EOF
   

Modified: trunk/mpi/longlong.h
===================================================================
--- trunk/mpi/longlong.h	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/mpi/longlong.h	2010-04-12 21:00:13 UTC (rev 1427)
@@ -944,7 +944,7 @@
 /* Powerpc 64 bit support taken from gmp-4.1.2. */
 /* We should test _IBMR2 here when we add assembly support for the system
    vendor compilers.  */
-#if 0 /* Not yet enabled becuase we don't have hardware for a test. */
+#if 0 /* Not yet enabled because we don't have hardware for a test. */
 #if (defined (_ARCH_PPC) || defined (__powerpc__)) && W_TYPE_SIZE == 64
 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
   do {									\

Modified: trunk/mpi/mpi-bit.c
===================================================================
--- trunk/mpi/mpi-bit.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/mpi/mpi-bit.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -1,4 +1,4 @@
-/* mpi-bit.c  -  MPI bit level fucntions
+/* mpi-bit.c  -  MPI bit level functions
  * Copyright (C) 1998, 1999, 2001, 2002, 2006 Free Software Foundation, Inc.
  *
  * This file is part of Libgcrypt.

Modified: trunk/mpi/mpi-inline.c
===================================================================
--- trunk/mpi/mpi-inline.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/mpi/mpi-inline.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -27,7 +27,7 @@
 
 #include "mpi-internal.h"
 
-/* always include the header becuase it is only
+/* always include the header because it is only
  * included by mpi-internal if __GCC__ is defined but we
  * need it here in all cases and the above definition of
  * of the macro allows us to do so

Modified: trunk/random/random-csprng.c
===================================================================
--- trunk/random/random-csprng.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/random/random-csprng.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -137,7 +137,7 @@
 
 /* After a mixing operation this variable will be set to true and
    cleared if new entropy has been added or a remix is required for
-   otehr reasons.  */
+   other reasons.  */
 static int just_mixed;
 
 /* The name of the seed file or NULL if no seed file has been defined.
@@ -161,7 +161,7 @@
                                        enum random_origins),
                               enum random_origins, size_t, int);
 
-/* This function is set to the actual fast entropy gathering fucntion
+/* This function is set to the actual fast entropy gathering function
    during initialization.  If it is NULL, no such function is
    available. */
 static void (*fast_gather_fnc)(void (*)(const void*, size_t,
@@ -388,7 +388,7 @@
 
 
 /* This function should be called during initialization and before
-   intialization of this module to place the random pools into secure
+   initialization of this module to place the random pools into secure
    memory.  */
 void
 _gcry_rngcsprng_secure_alloc (void)
@@ -728,7 +728,7 @@
    correlated to some extent.  In the perfect scenario, the attacker
    can control (or at least guess) the PID and clock of the
    application, and drain the system's entropy pool to reduce the "up
-   to 16 bytes" above to 0.  Then the dependencies of the inital
+   to 16 bytes" above to 0.  Then the dependencies of the initial
    states of the pools are completely known.  */
 static int
 read_seed_file (void)
@@ -1251,7 +1251,7 @@
 
 /* The fast random pool function as called at some places in
    libgcrypt.  This is merely a wrapper to make sure that this module
-   is initalized and to look the pool.  Note, that this function is a
+   is initialized and to lock the pool.  Note, that this function is a
    NOP unless a random function has been used or _gcry_initialize (1)
    has been used.  We use this hack so that the internal use of this
    function in cipher_open and md_open won't start filling up the
@@ -1352,7 +1352,7 @@
                strerror (err));
 
   apid = getpid ();
-  /* The first time intialize our buffer. */
+  /* The first time initialize our buffer. */
   if (!nonce_buffer_initialized)
     {
       time_t atime = time (NULL);

Modified: trunk/random/random-fips.c
===================================================================
--- trunk/random/random-fips.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/random/random-fips.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -135,7 +135,7 @@
 
   unsigned char guard_2[1];
 
-  /* The last result from the x931_aes fucntion.  Only valid if
+  /* The last result from the x931_aes function.  Only valid if
      compare_value_valid is set.  */
   unsigned char compare_value[16];
 
@@ -997,7 +997,7 @@
     char buffer[8];
 
     /* Do a simple test using the public interface.  This will also
-       enforce full intialization of the RNG.  We need to be fully
+       enforce full initialization of the RNG.  We need to be fully
        initialized due to the global requirement of the
        tempvalue_for_x931_aes_driver stuff. */
     gcry_randomize (buffer, sizeof buffer, GCRY_STRONG_RANDOM);

Modified: trunk/random/random.c
===================================================================
--- trunk/random/random.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/random/random.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -34,7 +34,7 @@
 
 
 /* If not NULL a progress function called from certain places and the
-   opaque value passed along.  Registred by
+   opaque value passed along.  Registered by
    _gcry_register_random_progress (). */
 static void (*progress_cb) (void *,const char*,int,int, int );
 static void *progress_cb_data;
@@ -93,7 +93,7 @@
 
 
 /* This function should be called during initialization and beore
-   intialization of this module to place the random pools into secure
+   initialization of this module to place the random pools into secure
    memory.  */
 void
 _gcry_secure_random_alloc (void)
@@ -218,7 +218,7 @@
 
 
 /* This function may be used to specify the file to be used as a seed
-   file for the PRNG.  This fucntion should be called prior to the
+   file for the PRNG.  This function should be called prior to the
    initialization of the random module.  NAME may not be NULL.  */
 void
 _gcry_set_random_seed_file (const char *name)
@@ -245,7 +245,7 @@
 
 /* The fast random pool function as called at some places in
    libgcrypt.  This is merely a wrapper to make sure that this module
-   is initalized and to lock the pool.  Note, that this function is a
+   is initialized and to lock the pool.  Note, that this function is a
    NOP unless a random function has been used or _gcry_initialize (1)
    has been used.  We use this hack so that the internal use of this
    function in cipher_open and md_open won't start filling up the

Modified: trunk/random/rndegd.c
===================================================================
--- trunk/random/rndegd.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/random/rndegd.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -119,7 +119,7 @@
 }
 
 
-/* Note that his fucntion is not thread-safe.  */
+/* Note that his function is not thread-safe.  */
 gpg_error_t
 _gcry_rndegd_set_socket_name (const char *name)
 {

Modified: trunk/random/rndlinux.c
===================================================================
--- trunk/random/rndlinux.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/random/rndlinux.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -125,7 +125,7 @@
 
   /* Enter the read loop.  */
   delay = 0;  /* Start with 0 seconds so that we do no block on the
-                 first iteration and in turn call the progess function
+                 first iteration and in turn call the progress function
                  before blocking.  To give the OS a better chance to
                  return with something we will actually use 100ms. */
   while (length)

Modified: trunk/random/rndunix.c
===================================================================
--- trunk/random/rndunix.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/random/rndunix.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -207,7 +207,7 @@
  * '1024 / SC_0' */
 
 #define SC( weight )	( 1024 / weight )	/* Scale factor */
-#define SC_0			16384	/* SC( SC_0 ) evalutes to 0 */
+#define SC_0			16384	/* SC( SC_0 ) evaluates to 0 */
 
 static struct RI {
     const char *path;		/* Path to check for existence of source */

Modified: trunk/random/rndw32.c
===================================================================
--- trunk/random/rndw32.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/random/rndw32.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -278,7 +278,7 @@
      the 760 MP chipset) also has a hardware RNG, but there doesn't appear 
      to be any driver support for this as there is for the Intel RNG so we 
      can't do much with it.  OTOH the Intel RNG is also effectively dead 
-     as well, mostly due to virtually nonexistant support/marketing by 
+     as well, mostly due to virtually nonexistent support/marketing by
      Intel, it's included here mostly for form's sake.  */
   if ( (!pCryptAcquireContext || !pCryptGenRandom || !pCryptReleaseContext
         || !pCryptAcquireContext (&hRNGProv, NULL, INTEL_DEF_PROV,

Modified: trunk/src/fips.c
===================================================================
--- trunk/src/fips.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/src/fips.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -55,7 +55,7 @@
 
 
 /* Flag telling whether we are in fips mode.  It uses inverse logic so
-   that fips mode is the default unless changed by the intialization
+   that fips mode is the default unless changed by the initialization
    code. To check whether fips mode is enabled, use the function
    fips_mode()! */
 static int no_fips_mode_required;
@@ -384,7 +384,7 @@
 }
 
 
-/* This is test on wether the library is in the operational state.  In
+/* This is test on whether the library is in the operational state.  In
    contrast to _gcry_fips_is_operational this function won't do a
    state transition on the fly.  */
 int

Modified: trunk/src/g10lib.h
===================================================================
--- trunk/src/g10lib.h	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/src/g10lib.h	2010-04-12 21:00:13 UTC (rev 1427)
@@ -275,7 +275,7 @@
 
 typedef int (*gcry_module_lookup_t) (void *spec, void *data);
 
-/* Lookup a module specification by it's ID.  After a successfull
+/* Lookup a module specification by it's ID.  After a successful
    lookup, the module has it's resource counter incremented.  */
 gcry_module_t _gcry_module_lookup_id (gcry_module_t entries,
 				       unsigned int id);

Modified: trunk/src/gcryptrnd.c
===================================================================
--- trunk/src/gcryptrnd.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/src/gcryptrnd.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -81,7 +81,7 @@
 
 
 /* Error printing utility.  PRIORITY should be one of syslog's
-   priority levels.  This fucntions prints to the stderro or syslog
+   priority levels.  This functions prints to the stderr or syslog
    depending on whether we are already daemonized. */
 static void
 logit (int priority, const char *format, ...)
@@ -536,7 +536,7 @@
           break;
         }
       if (rc)
-        break; /* A write error occured while sending the response. */
+        break; /* A write error occurred while sending the response. */
     }
 }
 

Modified: trunk/src/global.c
===================================================================
--- trunk/src/global.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/src/global.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -47,7 +47,7 @@
 static unsigned int debug_flags;
 
 /* gcry_control (GCRYCTL_SET_FIPS_MODE), sets this flag so that the
-   intialization code swicthed fips mode on.  */
+   initialization code switched fips mode on.  */
 static int force_fips_mode;
 
 /* Controlled by global_init().  */
@@ -159,7 +159,7 @@
 /* Version number parsing.  */
 
 /* This function parses the first portion of the version number S and
-   stores it in *NUMBER.  On sucess, this function returns a pointer
+   stores it in *NUMBER.  On success, this function returns a pointer
    into S starting with the first character, which is not part of the
    initial number portion; on failure, NULL is returned.  */
 static const char*
@@ -474,7 +474,7 @@
       
       /* This command dumps information pertaining to the
          configuration of libgcrypt to the given stream.  It may be
-         used before the intialization has been finished but not
+         used before the initialization has been finished but not
          before a gcry_version_check. */
     case GCRYCTL_PRINT_CONFIG:
       {

Modified: trunk/src/hmac256.c
===================================================================
--- trunk/src/hmac256.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/src/hmac256.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -296,7 +296,7 @@
 
 
 /* Create a new context.  On error NULL is returned and errno is set
-   appropriately.  If KEY is given the fucntion computes HMAC using
+   appropriately.  If KEY is given the function computes HMAC using
    this key; with KEY given as NULL, a plain SHA-256 digest is
    computed.  */
 hmac256_context_t

Modified: trunk/src/module.c
===================================================================
--- trunk/src/module.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/src/module.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -125,7 +125,7 @@
   gcry_free (entry);
 }
 
-/* Lookup a module specification by it's ID.  After a successfull
+/* Lookup a module specification by it's ID.  After a successful
    lookup, the module has it's resource counter incremented.  */
 gcry_module_t 
 _gcry_module_lookup_id (gcry_module_t entries, unsigned int mod_id)
@@ -142,7 +142,7 @@
   return entry;
 }
 
-/* Lookup a module specification.  After a successfull lookup, the
+/* Lookup a module specification.  After a successful lookup, the
    module has it's resource counter incremented.  FUNC is a function
    provided by the caller, which is responsible for identifying the
    wanted module.  */

Modified: trunk/src/mpi.h
===================================================================
--- trunk/src/mpi.h	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/src/mpi.h	2010-04-12 21:00:13 UTC (rev 1427)
@@ -239,7 +239,7 @@
   gcry_mpi_t z;
 };
 
-/* Context used with elliptic curve fucntions.  */
+/* Context used with elliptic curve functions.  */
 struct mpi_ec_ctx_s;
 typedef struct mpi_ec_ctx_s *mpi_ec_t;
 

Modified: trunk/src/secmem.c
===================================================================
--- trunk/src/secmem.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/src/secmem.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -143,7 +143,7 @@
   return mb_next;
 }
 
-/* Return the block preceeding MB or NULL, if MB is the first
+/* Return the block preceding MB or NULL, if MB is the first
    block.  */
 static memblock_t *
 mb_get_prev (memblock_t *mb)
@@ -168,7 +168,7 @@
   return mb_prev;
 }
 
-/* If the preceeding block of MB and/or the following block of MB
+/* If the preceding block of MB and/or the following block of MB
    exist and are not active, merge them to form a bigger block.  */
 static void
 mb_merge (memblock_t *mb)

Modified: trunk/src/sexp.c
===================================================================
--- trunk/src/sexp.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/src/sexp.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -950,7 +950,7 @@
 /****************
  * Scan the provided buffer and return the S expression in our internal
  * format.  Returns a newly allocated expression.  If erroff is not NULL and
- * a parsing error has occured, the offset into buffer will be returned.
+ * a parsing error has occurred, the offset into buffer will be returned.
  * If ARGFLAG is true, the function supports some printf like
  * expressions.
  *  These are:
@@ -1002,7 +1002,7 @@
   if (!erroff)
     erroff = &dummy_erroff;
 
-  /* Depending on wether ARG_LIST is non-zero or not, this macro gives
+  /* Depending on whether ARG_LIST is non-zero or not, this macro gives
      us the next argument, either from the variable argument list as
      specified by ARG_PTR or from the argument array ARG_LIST.  */
 #define ARG_NEXT(storage, type)                          \

Modified: trunk/tests/ac-data.c
===================================================================
--- trunk/tests/ac-data.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/tests/ac-data.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -29,7 +29,7 @@
   do \
     if (err) \
       { \
-        fprintf (stderr, "Error occured at line %i: %s\n", \
+        fprintf (stderr, "Error occurred at line %i: %s\n", \
                  __LINE__, gcry_strerror (err)); \
         exit (1); \
       } \

Modified: trunk/tests/basic.c
===================================================================
--- trunk/tests/basic.c	2010-04-06 10:37:13 UTC (rev 1426)
+++ trunk/tests/basic.c	2010-04-12 21:00:13 UTC (rev 1427)
@@ -124,7 +124,7 @@
   gcry_error_t err = 0;
 
   if (verbose)
-    fprintf (stderr, "Starting CBC MAC checks.\n");
+    fprintf (stderr, "  Starting CBC MAC checks.\n");
 
   for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++)
     {
@@ -182,7 +182,7 @@
 	}
 
       if (verbose)
-	fprintf (stderr, "  checking CBC MAC for %s [%i]\n", 
+	fprintf (stderr, "    checking CBC MAC for %s [%i]\n", 
 		 gcry_cipher_algo_name (tv[i].algo),
 		 tv[i].algo);
       err = gcry_cipher_encrypt (hd,
@@ -214,7 +214,7 @@
       gcry_cipher_close (hd);
     }
   if (verbose)
-    fprintf (stderr, "Completed CBC MAC checks.\n");
+    fprintf (stderr, "  Completed CBC MAC checks.\n");
 }
 
 static void
@@ -258,7 +258,7 @@
   gcry_error_t err = 0;
 
   if (verbose)
-    fprintf (stderr, "Starting AES128 CBC CTS checks.\n");
+    fprintf (stderr, "  Starting AES128 CBC CTS checks.\n");
   err = gcry_cipher_open (&hd,
 			  GCRY_CIPHER_AES,
 			  GCRY_CIPHER_MODE_CBC, GCRY_CIPHER_CBC_CTS);
@@ -289,7 +289,7 @@
 	}
 
       if (verbose)
-	fprintf (stderr, "  checking encryption for length %i\n", tv[i].inlen);
+	fprintf (stderr, "    checking encryption for length %i\n", tv[i].inlen);
       err = gcry_cipher_encrypt (hd, out, MAX_DATA_LEN,
 				 plaintext, tv[i].inlen);
       if (err)
@@ -312,7 +312,7 @@
 	  return;
 	}
       if (verbose)
-	fprintf (stderr, "  checking decryption for length %i\n", tv[i].inlen);
+	fprintf (stderr, "    checking decryption for length %i\n", tv[i].inlen);
       err = gcry_cipher_decrypt (hd, out, tv[i].inlen, NULL, 0);
       if (err)
 	{
@@ -328,7 +328,7 @@
 
   gcry_cipher_close (hd);
   if (verbose)
-    fprintf (stderr, "Completed AES128 CBC CTS checks.\n");
+    fprintf (stderr, "  Completed AES128 CBC CTS checks.\n");
 }
 
 static void
@@ -409,7 +409,7 @@
   gcry_error_t err = 0;
 
   if (verbose)
-    fprintf (stderr, "Starting CTR cipher checks.\n");
+    fprintf (stderr, "  Starting CTR cipher checks.\n");
   for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++)
     {
       err = gcry_cipher_open (&hde, tv[i].algo, GCRY_CIPHER_MODE_CTR, 0);
@@ -460,7 +460,7 @@
 	}
 
       if (verbose)
-	fprintf (stderr, "  checking CTR mode for %s [%i]\n", 
+	fprintf (stderr, "    checking CTR mode for %s [%i]\n", 
 		 gcry_cipher_algo_name (tv[i].algo),
 		 tv[i].algo);
       for (j = 0; tv[i].data[j].inlen; j++)
@@ -574,7 +574,7 @@
       gcry_cipher_close (hdd);
     }
   if (verbose)
-    fprintf (stderr, "Completed CTR cipher checks.\n");
+    fprintf (stderr, "  Completed CTR cipher checks.\n");
 }
 
 static void
@@ -654,8 +654,15 @@
   int i, j, keylen, blklen;
   gcry_error_t err = 0;
 
+  if (verbose)
+    fprintf (stderr, "  Starting CFB checks.\n");
+    
   for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++)
     {
+      if (verbose)
+        fprintf (stderr, "    checking CFB mode for %s [%i]\n", 
+		 gcry_cipher_algo_name (tv[i].algo),
+		 tv[i].algo);
       err = gcry_cipher_open (&hde, tv[i].algo, GCRY_CIPHER_MODE_CFB, 0);
       if (!err)
         err = gcry_cipher_open (&hdd, tv[i].algo, GCRY_CIPHER_MODE_CFB, 0);
@@ -737,6 +744,8 @@
       gcry_cipher_close (hde);
       gcry_cipher_close (hdd);
     }
+  if (verbose)
+    fprintf (stderr, "  Completed CFB checks.\n");
 }
 
 static void
@@ -816,8 +825,15 @@
   int i, j, keylen, blklen;
   gcry_error_t err = 0;
 
+  if (verbose)
+    fprintf (stderr, "  Starting OFB checks.\n");
+    
   for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++)
     {
+      if (verbose)
+        fprintf (stderr, "    checking OFB mode for %s [%i]\n", 
+		 gcry_cipher_algo_name (tv[i].algo),
+		 tv[i].algo);
       err = gcry_cipher_open (&hde, tv[i].algo, GCRY_CIPHER_MODE_OFB, 0);
       if (!err)
         err = gcry_cipher_open (&hdd, tv[i].algo, GCRY_CIPHER_MODE_OFB, 0);
@@ -963,6 +979,8 @@
       gcry_cipher_close (hde);
       gcry_cipher_close (hdd);
     }
+  if (verbose)
+    fprintf (stderr, "  Completed OFB checks.\n");
 }
 
 static void
@@ -1161,6 +1179,21 @@
 }
 
 
+static void
+check_cipher_modes(void)
+{  
+  if (verbose)
+    fprintf (stderr, "Starting Cipher Mode checks.\n");
+      
+  check_aes128_cbc_cts_cipher ();
+  check_cbc_mac_cipher ();
+  check_ctr_cipher ();
+  check_cfb_cipher ();
+  check_ofb_cipher ();
+      
+  if (verbose)
+    fprintf (stderr, "Completed Cipher Mode checks.\n");
+}
 
 static void
 check_one_md (int algo, const char *data, int len, const char *expect)
@@ -2253,11 +2286,7 @@
   if (!selftest_only)
     {
       check_ciphers ();
-      check_aes128_cbc_cts_cipher ();
-      check_cbc_mac_cipher ();
-      check_ctr_cipher ();
-      check_cfb_cipher ();
-      check_ofb_cipher ();
+      check_cipher_modes ();
       check_digests ();
       check_hmac ();
       check_pubkey ();




More information about the Gnupg-commits mailing list