summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--cipher/ChangeLog8
-rw-r--r--cipher/ac.c2
-rw-r--r--cipher/cipher.c8
-rw-r--r--cipher/des.c2
-rw-r--r--cipher/ecc.c2
-rw-r--r--cipher/md.c4
-rw-r--r--cipher/primegen.c4
-rw-r--r--cipher/pubkey.c8
-rw-r--r--cipher/rfc2268.c2
-rw-r--r--cipher/rsa.c6
-rw-r--r--cipher/tiger.c2
-rw-r--r--cipher/twofish.c2
-rw-r--r--configure.ac8
-rw-r--r--mpi/ChangeLog4
-rw-r--r--mpi/longlong.h2
-rw-r--r--mpi/mpi-bit.c2
-rw-r--r--mpi/mpi-inline.c2
-rw-r--r--random/ChangeLog4
-rw-r--r--random/random-csprng.c12
-rw-r--r--random/random-fips.c4
-rw-r--r--random/random.c8
-rw-r--r--random/rndegd.c2
-rw-r--r--random/rndlinux.c2
-rw-r--r--random/rndunix.c2
-rw-r--r--random/rndw32.c2
-rw-r--r--src/ChangeLog4
-rw-r--r--src/fips.c4
-rw-r--r--src/g10lib.h2
-rw-r--r--src/gcryptrnd.c4
-rw-r--r--src/global.c6
-rw-r--r--src/hmac256.c2
-rw-r--r--src/module.c4
-rw-r--r--src/mpi.h2
-rw-r--r--src/secmem.c4
-rw-r--r--src/sexp.c4
-rw-r--r--tests/ChangeLog6
-rw-r--r--tests/ac-data.c2
-rw-r--r--tests/basic.c59
39 files changed, 135 insertions, 76 deletions
diff --git a/ChangeLog b/ChangeLog
index b24a6f98..92224633 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-12 Brad Hards <bradh@frogmouth.net> (wk)
+
+ * configure.ac: Print more verbose info at the end.
+
2010-03-24 Werner Koch <wk@g10code.com>
* configure.ac (USE_RNDW32CE): New.
diff --git a/cipher/ChangeLog b/cipher/ChangeLog
index 6e199b0a..82ea799d 100644
--- a/cipher/ChangeLog
+++ b/cipher/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-12 Brad Hards <bradh@frogmouth.net> (wk)
+
+ Spelling fixes.
+
2010-03-26 Werner Koch <wk@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@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
diff --git a/cipher/ac.c b/cipher/ac.c
index ee9498b2..14569cc0 100644
--- a/cipher/ac.c
+++ b/cipher/ac.c
@@ -2499,7 +2499,7 @@ typedef enum dencode_action
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. */
diff --git a/cipher/cipher.c b/cipher/cipher.c
index 4808a5fb..acdca763 100644
--- a/cipher/cipher.c
+++ b/cipher/cipher.c
@@ -118,7 +118,7 @@ static gcry_module_t ciphers_registered;
/* 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 @@ gcry_cipher_open (gcry_cipher_hd_t *handle,
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 @@ gcry_cipher_ctl( gcry_cipher_hd_t h, int cmd, void *buffer, size_t buflen)
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 @@ gcry_cipher_info (gcry_cipher_hd_t h, int cmd, void *buffer, size_t *nbytes)
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
diff --git a/cipher/des.c b/cipher/des.c
index f91df777..e7f14fd6 100644
--- a/cipher/des.c
+++ b/cipher/des.c
@@ -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();
* }
*/
diff --git a/cipher/ecc.c b/cipher/ecc.c
index fcbd8e3a..f61f5799 100644
--- a/cipher/ecc.c
+++ b/cipher/ecc.c
@@ -1266,7 +1266,7 @@ compute_keygrip (gcry_md_hd_t md, gcry_sexp_t keyparam)
}
/* 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])
diff --git a/cipher/md.c b/cipher/md.c
index a353f3c3..5f121267 100644
--- a/cipher/md.c
+++ b/cipher/md.c
@@ -105,7 +105,7 @@ static gcry_module_t digests_registered;
/* 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 @@ md_asn_oid (int algorithm, size_t *asnlen, size_t *mdlen)
* 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
diff --git a/cipher/primegen.c b/cipher/primegen.c
index b869bee8..f0727754 100644
--- a/cipher/primegen.c
+++ b/cipher/primegen.c
@@ -988,7 +988,7 @@ is_prime (gcry_mpi_t n, int steps, unsigned int *count)
/* 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 @@ gcry_prime_generate (gcry_mpi_t *prime, unsigned int prime_bits,
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)
{
diff --git a/cipher/pubkey.c b/cipher/pubkey.c
index 08abcbfd..1779c91f 100644
--- a/cipher/pubkey.c
+++ b/cipher/pubkey.c
@@ -85,7 +85,7 @@ static gcry_module_t pubkeys_registered;
/* 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 @@ sexp_data_to_mpi (gcry_sexp_t input, unsigned int nbits, gcry_mpi_t *ret_mpi,
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 @@ gcry_pk_ctl (int cmd, void *buffer, size_t buflen)
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)
diff --git a/cipher/rfc2268.c b/cipher/rfc2268.c
index 7d63fcef..9575ca68 100644
--- a/cipher/rfc2268.c
+++ b/cipher/rfc2268.c
@@ -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.
*/
diff --git a/cipher/rsa.c b/cipher/rsa.c
index 484d103d..6102cc40 100644
--- a/cipher/rsa.c
+++ b/cipher/rsa.c
@@ -582,7 +582,7 @@ generate_x931 (RSA_secret_key *sk, unsigned int nbits, unsigned long e_value,
/****************
- * 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 @@ rsa_decrypt (int algo, gcry_mpi_t *result, gcry_mpi_t *data,
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 @@ rsa_get_nbits (int algo, gcry_mpi_t *pkey)
(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
diff --git a/cipher/tiger.c b/cipher/tiger.c
index 88fd3483..4ad6ce53 100644
--- a/cipher/tiger.c
+++ b/cipher/tiger.c
@@ -878,7 +878,7 @@ gcry_md_spec_t _gcry_digest_spec_tiger =
-/* 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,
diff --git a/cipher/twofish.c b/cipher/twofish.c
index 5274c400..68b2c7ac 100644
--- a/cipher/twofish.c
+++ b/cipher/twofish.c
@@ -522,7 +522,7 @@ static byte calc_sb_tbl[512] = {
* 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.
diff --git a/configure.ac b/configure.ac
index 5a44b31b..65e29cdb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1188,10 +1188,14 @@ AC_OUTPUT
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
diff --git a/mpi/ChangeLog b/mpi/ChangeLog
index 07f42232..fb6ea33d 100644
--- a/mpi/ChangeLog
+++ b/mpi/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-12 Brad Hards <bradh@frogmouth.net> (wk)
+
+ Spelling fixes.
+
2010-02-22 Aurelien Jarno <aurel32@debian.org> (wk)
* longlong.h (umul_ppmm) <mips> [__GNUC__ >= 4.4]: Patch according
diff --git a/mpi/longlong.h b/mpi/longlong.h
index b736d490..be88cae2 100644
--- a/mpi/longlong.h
+++ b/mpi/longlong.h
@@ -944,7 +944,7 @@ typedef unsigned int UTItype __attribute__ ((mode (TI)));
/* 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 { \
diff --git a/mpi/mpi-bit.c b/mpi/mpi-bit.c
index 32c820c2..dbfdfcfa 100644
--- a/mpi/mpi-bit.c
+++ b/mpi/mpi-bit.c
@@ -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.
diff --git a/mpi/mpi-inline.c b/mpi/mpi-inline.c
index a1969463..fdccb8f1 100644
--- a/mpi/mpi-inline.c
+++ b/mpi/mpi-inline.c
@@ -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
diff --git a/random/ChangeLog b/random/ChangeLog
index 2fa2b81d..71483c90 100644
--- a/random/ChangeLog
+++ b/random/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-12 Brad Hards <bradh@frogmouth.net> (wk)
+
+ Spelling fixes.
+
2010-03-24 Werner Koch <wk@g10code.com>
* rndw32.c: Revert all changes from 2010-01-21.
diff --git a/random/random-csprng.c b/random/random-csprng.c
index 9ad39513..c0792af5 100644
--- a/random/random-csprng.c
+++ b/random/random-csprng.c
@@ -137,7 +137,7 @@ static int pool_balance;
/* 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 @@ static int (*slow_gather_fnc)(void (*)(const void*, size_t,
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 @@ _gcry_rngcsprng_dump_stats (void)
/* 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 @@ lock_seed_file (int fd, const char *fname, int for_write)
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 @@ do_fast_random_poll (void)
/* 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 @@ _gcry_rngcsprng_create_nonce (void *buffer, size_t length)
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);
diff --git a/random/random-fips.c b/random/random-fips.c
index 2667e71f..f9a21d08 100644
--- a/random/random-fips.c
+++ b/random/random-fips.c
@@ -135,7 +135,7 @@ struct rng_context
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 @@ _gcry_rngfips_selftest (selftest_report_func_t report)
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);
diff --git a/random/random.c b/random/random.c
index 8df87e2d..84683378 100644
--- a/random/random.c
+++ b/random/random.c
@@ -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 @@ _gcry_random_dump_stats (void)
/* 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 @@ gcry_randomize (void *buffer, size_t length, enum gcry_random_level level)
/* 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 @@ _gcry_update_random_seed_file (void)
/* 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
diff --git a/random/rndegd.c b/random/rndegd.c
index 63a5e0f1..c194225e 100644
--- a/random/rndegd.c
+++ b/random/rndegd.c
@@ -119,7 +119,7 @@ do_read( int fd, void *buf, size_t nbytes )
}
-/* 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)
{
diff --git a/random/rndlinux.c b/random/rndlinux.c
index 6f98a9eb..ec140a83 100644
--- a/random/rndlinux.c
+++ b/random/rndlinux.c
@@ -125,7 +125,7 @@ _gcry_rndlinux_gather_random (void (*add)(const void*, size_t,
/* 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)
diff --git a/random/rndunix.c b/random/rndunix.c
index 9c9317d5..2db718da 100644
--- a/random/rndunix.c
+++ b/random/rndunix.c
@@ -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 */
diff --git a/random/rndw32.c b/random/rndw32.c
index 49dff3cc..852f9aca 100644
--- a/random/rndw32.c
+++ b/random/rndw32.c
@@ -278,7 +278,7 @@ init_system_rng (void)
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,
diff --git a/src/ChangeLog b/src/ChangeLog
index ff5cc54d..9990a460 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-12 Brad Hards <bradh@frogmouth.net> (wk)
+
+ Spelling fixes.
+
2010-03-15 Werner Koch <wk@g10code.com>
* gcrypt.h.in: Add autoconf template to set generated file to
diff --git a/src/fips.c b/src/fips.c
index 91f30427..9f46f717 100644
--- a/src/fips.c
+++ b/src/fips.c
@@ -55,7 +55,7 @@ enum module_states
/* 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 @@ _gcry_fips_is_operational (void)
}
-/* 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
diff --git a/src/g10lib.h b/src/g10lib.h
index a7d2e011..57b84675 100644
--- a/src/g10lib.h
+++ b/src/g10lib.h
@@ -275,7 +275,7 @@ gcry_err_code_t _gcry_module_add (gcry_module_t *entries,
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);
diff --git a/src/gcryptrnd.c b/src/gcryptrnd.c
index e15fecaf..34c24733 100644
--- a/src/gcryptrnd.c
+++ b/src/gcryptrnd.c
@@ -81,7 +81,7 @@ static void serve (int listen_fd);
/* 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 @@ connection_loop (int fd)
break;
}
if (rc)
- break; /* A write error occured while sending the response. */
+ break; /* A write error occurred while sending the response. */
}
}
diff --git a/src/global.c b/src/global.c
index 6b8a4d4e..d23e7370 100644
--- a/src/global.c
+++ b/src/global.c
@@ -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 @@ _gcry_global_is_operational (void)
/* 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 @@ _gcry_vcontrol (enum gcry_ctl_cmds cmd, va_list arg_ptr)
/* 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:
{
diff --git a/src/hmac256.c b/src/hmac256.c
index a1383738..6e31d200 100644
--- a/src/hmac256.c
+++ b/src/hmac256.c
@@ -296,7 +296,7 @@ finalize (hmac256_context_t hd)
/* 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
diff --git a/src/module.c b/src/module.c
index c70a44c0..4f282af2 100644
--- a/src/module.c
+++ b/src/module.c
@@ -125,7 +125,7 @@ _gcry_module_drop (gcry_module_t entry)
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 @@ _gcry_module_lookup_id (gcry_module_t entries, unsigned int mod_id)
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. */
diff --git a/src/mpi.h b/src/mpi.h
index eaac7389..21d4a4eb 100644
--- a/src/mpi.h
+++ b/src/mpi.h
@@ -239,7 +239,7 @@ struct mpi_point_s
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;
diff --git a/src/secmem.c b/src/secmem.c
index 48150d5f..1e375bfd 100644
--- a/src/secmem.c
+++ b/src/secmem.c
@@ -143,7 +143,7 @@ mb_get_next (memblock_t *mb)
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 @@ mb_get_prev (memblock_t *mb)
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)
diff --git a/src/sexp.c b/src/sexp.c
index 77825ba0..a1366e04 100644
--- a/src/sexp.c
+++ b/src/sexp.c
@@ -950,7 +950,7 @@ unquote_string (const char *string, size_t length, unsigned char *buf)
/****************
* 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 @@ sexp_sscan (gcry_sexp_t *retsexp, size_t *erroff,
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) \
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 9e7371c1..a194a262 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-12 Brad Hards <bradh@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@frogmouth.net> (wk)
* aeswrap.c, hmac.c, basic.c: Typo fixes.
diff --git a/tests/ac-data.c b/tests/ac-data.c
index e97b4f49..65b66ec9 100644
--- a/tests/ac-data.c
+++ b/tests/ac-data.c
@@ -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); \
} \
diff --git a/tests/basic.c b/tests/basic.c
index f69a8f03..a6186540 100644
--- a/tests/basic.c
+++ b/tests/basic.c
@@ -124,7 +124,7 @@ check_cbc_mac_cipher (void)
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 @@ check_cbc_mac_cipher (void)
}
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 @@ check_cbc_mac_cipher (void)
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 @@ check_aes128_cbc_cts_cipher (void)
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 @@ check_aes128_cbc_cts_cipher (void)
}
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 @@ check_aes128_cbc_cts_cipher (void)
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 @@ check_aes128_cbc_cts_cipher (void)
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 @@ check_ctr_cipher (void)
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 @@ check_ctr_cipher (void)
}
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 @@ check_ctr_cipher (void)
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 @@ check_cfb_cipher (void)
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 @@ check_cfb_cipher (void)
gcry_cipher_close (hde);
gcry_cipher_close (hdd);
}
+ if (verbose)
+ fprintf (stderr, " Completed CFB checks.\n");
}
static void
@@ -816,8 +825,15 @@ check_ofb_cipher (void)
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 @@ check_ofb_cipher (void)
gcry_cipher_close (hde);
gcry_cipher_close (hdd);
}
+ if (verbose)
+ fprintf (stderr, " Completed OFB checks.\n");
}
static void
@@ -1161,6 +1179,21 @@ check_ciphers (void)
}
+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 @@ main (int argc, char **argv)
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 ();