basebuilder_pel7x64builder0
5 years ago
24 changed files with 9597 additions and 0 deletions
@ -0,0 +1,9 @@
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh |
||||
|
||||
# Quit out if anything fails. |
||||
set -e -x |
||||
|
||||
# Clean out patent-or-otherwise-encumbered code. |
||||
# EC: ????????? ??/??/2015 |
||||
|
||||
rm -f cipher/ecc.c |
@ -0,0 +1,73 @@
@@ -0,0 +1,73 @@
|
||||
diff -up libgcrypt-1.5.0/cipher/elgamal.c.leak libgcrypt-1.5.0/cipher/elgamal.c |
||||
--- libgcrypt-1.5.0/cipher/elgamal.c.leak 2011-02-04 20:09:38.000000000 +0100 |
||||
+++ libgcrypt-1.5.0/cipher/elgamal.c 2012-12-03 14:51:10.743067964 +0100 |
||||
@@ -641,7 +641,10 @@ elg_generate_ext (int algo, unsigned int |
||||
} |
||||
|
||||
if (xvalue) |
||||
- ec = generate_using_x (&sk, nbits, xvalue, retfactors); |
||||
+ { |
||||
+ ec = generate_using_x (&sk, nbits, xvalue, retfactors); |
||||
+ gcry_mpi_release(xvalue); |
||||
+ } |
||||
else |
||||
{ |
||||
generate (&sk, nbits, retfactors); |
||||
diff -up libgcrypt-1.5.0/cipher/primegen.c.leak libgcrypt-1.5.0/cipher/primegen.c |
||||
--- libgcrypt-1.5.0/cipher/primegen.c.leak 2012-04-05 15:37:52.000000000 +0200 |
||||
+++ libgcrypt-1.5.0/cipher/primegen.c 2012-12-03 14:44:14.610010867 +0100 |
||||
@@ -1198,10 +1198,7 @@ gcry_prime_group_generator (gcry_mpi_t * |
||||
gcry_mpi_t prime, gcry_mpi_t *factors, |
||||
gcry_mpi_t start_g) |
||||
{ |
||||
- gcry_mpi_t tmp = gcry_mpi_new (0); |
||||
- gcry_mpi_t b = gcry_mpi_new (0); |
||||
- gcry_mpi_t pmin1 = gcry_mpi_new (0); |
||||
- gcry_mpi_t g = start_g? gcry_mpi_copy (start_g) : gcry_mpi_set_ui (NULL, 3); |
||||
+ gcry_mpi_t tmp, b, pmin1, g; |
||||
int first = 1; |
||||
int i, n; |
||||
|
||||
@@ -1214,6 +1211,11 @@ gcry_prime_group_generator (gcry_mpi_t * |
||||
if (n < 2) |
||||
return gpg_error (GPG_ERR_INV_ARG); |
||||
|
||||
+ tmp = gcry_mpi_new (0); |
||||
+ b = gcry_mpi_new (0); |
||||
+ pmin1 = gcry_mpi_new (0); |
||||
+ g = start_g? gcry_mpi_copy (start_g) : gcry_mpi_set_ui (NULL, 3); |
||||
+ |
||||
/* Extra sanity check - usually disabled. */ |
||||
/* mpi_set (tmp, factors[0]); */ |
||||
/* for(i = 1; i < n; i++) */ |
||||
diff -up libgcrypt-1.5.0/cipher/pubkey.c.leak libgcrypt-1.5.0/cipher/pubkey.c |
||||
--- libgcrypt-1.5.0/cipher/pubkey.c.leak 2011-06-13 12:23:50.000000000 +0200 |
||||
+++ libgcrypt-1.5.0/cipher/pubkey.c 2012-12-03 15:23:42.377183489 +0100 |
||||
@@ -2853,6 +2853,8 @@ gcry_pk_encrypt (gcry_sexp_t *r_ciph, gc |
||||
|
||||
REGISTER_DEFAULT_PUBKEYS; |
||||
|
||||
+ init_encoding_ctx (&ctx, PUBKEY_OP_ENCRYPT, gcry_pk_get_nbits (s_pkey)); |
||||
+ |
||||
/* Get the key. */ |
||||
rc = sexp_to_key (s_pkey, 0, NULL, &pkey, &module); |
||||
if (rc) |
||||
@@ -2873,7 +2875,6 @@ gcry_pk_encrypt (gcry_sexp_t *r_ciph, gc |
||||
algo_elems = pubkey->elements_enc; |
||||
|
||||
/* Get the stuff we want to encrypt. */ |
||||
- init_encoding_ctx (&ctx, PUBKEY_OP_ENCRYPT, gcry_pk_get_nbits (s_pkey)); |
||||
rc = sexp_data_to_mpi (s_data, &data, &ctx); |
||||
if (rc) |
||||
goto leave; |
||||
diff -up libgcrypt-1.5.0/src/hmac256.c.leak libgcrypt-1.5.0/src/hmac256.c |
||||
--- libgcrypt-1.5.0/src/hmac256.c.leak 2011-02-04 20:17:33.000000000 +0100 |
||||
+++ libgcrypt-1.5.0/src/hmac256.c 2012-12-03 15:37:36.504955809 +0100 |
||||
@@ -435,7 +435,6 @@ _gcry_hmac256_finalize (hmac256_context_ |
||||
tmphd = _gcry_hmac256_new (NULL, 0); |
||||
if (!tmphd) |
||||
{ |
||||
- free (hd); |
||||
return NULL; |
||||
} |
||||
_gcry_hmac256_update (tmphd, hd->opad, 64); |
@ -0,0 +1,12 @@
@@ -0,0 +1,12 @@
|
||||
diff -up libgcrypt-1.5.0/tests/Makefile.noecc libgcrypt-1.5.0/tests/Makefile |
||||
--- libgcrypt-1.5.0/tests/Makefile.in.noecc 2011-07-21 15:34:33.000000000 +0200 |
||||
+++ libgcrypt-1.5.0/tests/Makefile.in 2011-07-21 15:39:35.000000000 +0200 |
||||
@@ -57,7 +57,7 @@ TESTS = version$(EXEEXT) t-mpi-bit$(EXEE |
||||
ac-data$(EXEEXT) basic$(EXEEXT) mpitests$(EXEEXT) \ |
||||
tsexp$(EXEEXT) keygen$(EXEEXT) pubkey$(EXEEXT) hmac$(EXEEXT) \ |
||||
keygrip$(EXEEXT) fips186-dsa$(EXEEXT) aeswrap$(EXEEXT) \ |
||||
- curves$(EXEEXT) t-kdf$(EXEEXT) pkcs1v2$(EXEEXT) \ |
||||
+ t-kdf$(EXEEXT) pkcs1v2$(EXEEXT) \ |
||||
$(am__EXEEXT_1) benchmark$(EXEEXT) |
||||
|
||||
# random.c uses fork() thus a test for W32 does not make any sense. |
@ -0,0 +1,214 @@
@@ -0,0 +1,214 @@
|
||||
diff -up libgcrypt-1.5.0/cipher/dsa.c.tests libgcrypt-1.5.0/cipher/dsa.c |
||||
--- libgcrypt-1.5.0/cipher/dsa.c.tests 2011-06-13 12:24:46.000000000 +0200 |
||||
+++ libgcrypt-1.5.0/cipher/dsa.c 2011-07-20 16:44:51.000000000 +0200 |
||||
@@ -479,22 +479,21 @@ generate_fips186 (DSA_secret_key *sk, un |
||||
initial_seed.seed = gcry_sexp_nth_data (initial_seed.sexp, 1, |
||||
&initial_seed.seedlen); |
||||
} |
||||
- |
||||
- /* Fixme: Enable 186-3 after it has been approved and after fixing |
||||
- the generation function. */ |
||||
- /* if (use_fips186_2) */ |
||||
- (void)use_fips186_2; |
||||
- ec = _gcry_generate_fips186_2_prime (nbits, qbits, |
||||
- initial_seed.seed, |
||||
+ |
||||
+ if (use_fips186_2) |
||||
+ ec = _gcry_generate_fips186_2_prime (nbits, qbits, |
||||
+ initial_seed.seed, |
||||
initial_seed.seedlen, |
||||
&prime_q, &prime_p, |
||||
r_counter, |
||||
r_seed, r_seedlen); |
||||
- /* else */ |
||||
- /* ec = _gcry_generate_fips186_3_prime (nbits, qbits, NULL, 0, */ |
||||
- /* &prime_q, &prime_p, */ |
||||
- /* r_counter, */ |
||||
- /* r_seed, r_seedlen, NULL); */ |
||||
+ else |
||||
+ ec = _gcry_generate_fips186_3_prime (nbits, qbits, |
||||
+ initial_seed.seed, |
||||
+ initial_seed.seedlen, |
||||
+ &prime_q, &prime_p, |
||||
+ r_counter, |
||||
+ r_seed, r_seedlen, NULL); |
||||
gcry_sexp_release (initial_seed.sexp); |
||||
if (ec) |
||||
goto leave; |
||||
diff -up libgcrypt-1.5.0/cipher/primegen.c.tests libgcrypt-1.5.0/cipher/primegen.c |
||||
--- libgcrypt-1.5.0/cipher/primegen.c.tests 2011-03-28 14:19:52.000000000 +0200 |
||||
+++ libgcrypt-1.5.0/cipher/primegen.c 2011-07-21 14:36:03.000000000 +0200 |
||||
@@ -1647,7 +1647,7 @@ _gcry_generate_fips186_3_prime (unsigned |
||||
gpg_err_code_t ec; |
||||
unsigned char seed_help_buffer[256/8]; /* Used to hold a generated SEED. */ |
||||
unsigned char *seed_plus; /* Malloced buffer to hold SEED+x. */ |
||||
- unsigned char digest[256/8]; /* Helper buffer for SHA-1 digest. */ |
||||
+ unsigned char digest[256/8]; /* Helper buffer for SHA-x digest. */ |
||||
gcry_mpi_t val_2 = NULL; /* Helper for the prime test. */ |
||||
gcry_mpi_t tmpval = NULL; /* Helper variable. */ |
||||
int hashalgo; /* The id of the Approved Hash Function. */ |
||||
@@ -1737,7 +1737,7 @@ _gcry_generate_fips186_3_prime (unsigned |
||||
} |
||||
gcry_mpi_release (prime_q); prime_q = NULL; |
||||
ec = gpg_err_code (gcry_mpi_scan (&prime_q, GCRYMPI_FMT_USG, |
||||
- value_u, sizeof value_u, NULL)); |
||||
+ value_u, qbits/8, NULL)); |
||||
if (ec) |
||||
goto leave; |
||||
mpi_set_highbit (prime_q, qbits-1 ); |
||||
@@ -1782,11 +1782,11 @@ _gcry_generate_fips186_3_prime (unsigned |
||||
if (seed_plus[i]) |
||||
break; |
||||
} |
||||
- gcry_md_hash_buffer (GCRY_MD_SHA1, digest, seed_plus, seedlen); |
||||
+ gcry_md_hash_buffer (hashalgo, digest, seed_plus, seedlen); |
||||
|
||||
gcry_mpi_release (tmpval); tmpval = NULL; |
||||
ec = gpg_err_code (gcry_mpi_scan (&tmpval, GCRYMPI_FMT_USG, |
||||
- digest, sizeof digest, NULL)); |
||||
+ digest, qbits/8, NULL)); |
||||
if (ec) |
||||
goto leave; |
||||
if (value_j == value_n) |
||||
@@ -1822,11 +1822,11 @@ _gcry_generate_fips186_3_prime (unsigned |
||||
} |
||||
|
||||
/* Step 12: Save p, q, counter and seed. */ |
||||
- log_debug ("fips186-3 pbits p=%u q=%u counter=%d\n", |
||||
+/* log_debug ("fips186-3 pbits p=%u q=%u counter=%d\n", |
||||
mpi_get_nbits (prime_p), mpi_get_nbits (prime_q), counter); |
||||
log_printhex("fips186-3 seed:", seed, seedlen); |
||||
log_mpidump ("fips186-3 prime p", prime_p); |
||||
- log_mpidump ("fips186-3 prime q", prime_q); |
||||
+ log_mpidump ("fips186-3 prime q", prime_q); */ |
||||
if (r_q) |
||||
{ |
||||
*r_q = prime_q; |
||||
diff -up libgcrypt-1.5.0/cipher/rsa.c.tests libgcrypt-1.5.0/cipher/rsa.c |
||||
--- libgcrypt-1.5.0/cipher/rsa.c.tests 2011-06-10 10:53:41.000000000 +0200 |
||||
+++ libgcrypt-1.5.0/cipher/rsa.c 2011-07-21 14:36:59.000000000 +0200 |
||||
@@ -388,7 +388,7 @@ generate_x931 (RSA_secret_key *sk, unsig |
||||
|
||||
*swapped = 0; |
||||
|
||||
- if (e_value == 1) /* Alias for a secure value. */ |
||||
+ if (e_value == 1 || e_value == 0) /* Alias for a secure value. */ |
||||
e_value = 65537; |
||||
|
||||
/* Point 1 of section 4.1: k = 1024 + 256s with S >= 0 */ |
||||
diff -up libgcrypt-1.5.0/random/random-fips.c.tests libgcrypt-1.5.0/random/random-fips.c |
||||
--- libgcrypt-1.5.0/random/random-fips.c.tests 2011-07-20 16:40:59.000000000 +0200 |
||||
+++ libgcrypt-1.5.0/random/random-fips.c 2011-07-20 16:40:59.000000000 +0200 |
||||
@@ -691,6 +691,7 @@ get_random (void *buffer, size_t length, |
||||
|
||||
check_guards (rng_ctx); |
||||
|
||||
+ reinitialize: |
||||
/* Initialize the cipher handle and thus setup the key if needed. */ |
||||
if (!rng_ctx->cipher_hd) |
||||
{ |
||||
@@ -710,13 +711,11 @@ get_random (void *buffer, size_t length, |
||||
if (rng_ctx->key_init_pid != getpid () |
||||
|| rng_ctx->seed_init_pid != getpid ()) |
||||
{ |
||||
- /* We are in a child of us. Because we have no way yet to do |
||||
- proper re-initialization (including self-checks etc), the |
||||
- only chance we have is to bail out. Obviusly a fork/exec |
||||
- won't harm because the exec overwrites the old image. */ |
||||
- fips_signal_error ("fork without proper re-initialization " |
||||
- "detected in RNG"); |
||||
- goto bailout; |
||||
+ /* Just reinitialize the key & seed. */ |
||||
+ gcry_cipher_close(rng_ctx->cipher_hd); |
||||
+ rng_ctx->cipher_hd = NULL; |
||||
+ rng_ctx->is_seeded = 0; |
||||
+ goto reinitialize; |
||||
} |
||||
|
||||
if (x931_aes_driver (buffer, length, rng_ctx)) |
||||
diff -up libgcrypt-1.5.0/tests/ac.c.tests libgcrypt-1.5.0/tests/ac.c |
||||
--- libgcrypt-1.5.0/tests/ac.c.tests 2011-02-04 20:18:20.000000000 +0100 |
||||
+++ libgcrypt-1.5.0/tests/ac.c 2011-07-20 16:40:59.000000000 +0200 |
||||
@@ -150,6 +150,9 @@ main (int argc, char **argv) |
||||
if (!gcry_check_version (GCRYPT_VERSION)) |
||||
die ("version mismatch\n"); |
||||
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); |
||||
+ if (gcry_fips_mode_active()) |
||||
+ /* ac not functional in the fips mode, skip it */ |
||||
+ return 77; |
||||
if (debug) |
||||
gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u , 0); |
||||
/* No valuable keys are create, so we can speed up our RNG. */ |
||||
diff -up libgcrypt-1.5.0/tests/ac-data.c.tests libgcrypt-1.5.0/tests/ac-data.c |
||||
--- libgcrypt-1.5.0/tests/ac-data.c.tests 2011-02-04 20:18:20.000000000 +0100 |
||||
+++ libgcrypt-1.5.0/tests/ac-data.c 2011-07-20 16:40:59.000000000 +0200 |
||||
@@ -198,6 +198,9 @@ main (int argc, char **argv) |
||||
if (!gcry_check_version (GCRYPT_VERSION)) |
||||
die ("version mismatch\n"); |
||||
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); |
||||
+ if (gcry_fips_mode_active()) |
||||
+ /* ac not functional in the fips mode, skip it */ |
||||
+ return 77; |
||||
if (debug) |
||||
gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u , 0); |
||||
|
||||
diff -up libgcrypt-1.5.0/tests/ac-schemes.c.tests libgcrypt-1.5.0/tests/ac-schemes.c |
||||
--- libgcrypt-1.5.0/tests/ac-schemes.c.tests 2011-02-04 20:18:20.000000000 +0100 |
||||
+++ libgcrypt-1.5.0/tests/ac-schemes.c 2011-07-20 16:40:59.000000000 +0200 |
||||
@@ -338,6 +338,9 @@ main (int argc, char **argv) |
||||
if (! gcry_check_version (GCRYPT_VERSION)) |
||||
die ("version mismatch\n"); |
||||
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); |
||||
+ if (gcry_fips_mode_active()) |
||||
+ /* ac not functional in the fips mode, skip it */ |
||||
+ return 77; |
||||
if (debug) |
||||
gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0); |
||||
|
||||
diff -up libgcrypt-1.5.0/tests/keygen.c.tests libgcrypt-1.5.0/tests/keygen.c |
||||
--- libgcrypt-1.5.0/tests/keygen.c.tests 2011-02-04 20:18:20.000000000 +0100 |
||||
+++ libgcrypt-1.5.0/tests/keygen.c 2011-07-21 14:39:03.000000000 +0200 |
||||
@@ -148,12 +148,12 @@ check_rsa_keys (void) |
||||
} |
||||
|
||||
if (verbose) |
||||
- fprintf (stderr, "creating 1536 bit DSA key\n"); |
||||
+ fprintf (stderr, "creating 2048 bit DSA key\n"); |
||||
rc = gcry_sexp_new (&keyparm, |
||||
"(genkey\n" |
||||
" (dsa\n" |
||||
- " (nbits 4:1536)\n" |
||||
- " (qbits 3:224)\n" |
||||
+ " (nbits 4:2048)\n" |
||||
+ " (qbits 3:256)\n" |
||||
" ))", 0, 1); |
||||
if (rc) |
||||
die ("error creating S-expression: %s\n", gpg_strerror (rc)); |
||||
@@ -190,11 +190,11 @@ check_rsa_keys (void) |
||||
|
||||
|
||||
if (verbose) |
||||
- fprintf (stderr, "creating 512 bit RSA key with e=257\n"); |
||||
+ fprintf (stderr, "creating 1024 bit RSA key with e=257\n"); |
||||
rc = gcry_sexp_new (&keyparm, |
||||
"(genkey\n" |
||||
" (rsa\n" |
||||
- " (nbits 3:512)\n" |
||||
+ " (nbits 4:1024)\n" |
||||
" (rsa-use-e 3:257)\n" |
||||
" ))", 0, 1); |
||||
if (rc) |
||||
@@ -208,11 +208,11 @@ check_rsa_keys (void) |
||||
gcry_sexp_release (key); |
||||
|
||||
if (verbose) |
||||
- fprintf (stderr, "creating 512 bit RSA key with default e\n"); |
||||
+ fprintf (stderr, "creating 1024 bit RSA key with default secure e\n"); |
||||
rc = gcry_sexp_new (&keyparm, |
||||
"(genkey\n" |
||||
" (rsa\n" |
||||
- " (nbits 3:512)\n" |
||||
+ " (nbits 4:1024)\n" |
||||
" (rsa-use-e 1:0)\n" |
||||
" ))", 0, 1); |
||||
if (rc) |
@ -0,0 +1,87 @@
@@ -0,0 +1,87 @@
|
||||
diff -up libgcrypt-1.5.0/src/fips.c.use-fipscheck libgcrypt-1.5.0/src/fips.c |
||||
--- libgcrypt-1.5.0/src/fips.c.use-fipscheck 2011-02-04 20:17:33.000000000 +0100 |
||||
+++ libgcrypt-1.5.0/src/fips.c 2011-07-20 16:17:21.000000000 +0200 |
||||
@@ -570,23 +570,48 @@ run_random_selftests (void) |
||||
return !!err; |
||||
} |
||||
|
||||
+static int |
||||
+get_library_path(const char *libname, const char *symbolname, char *path, size_t pathlen) |
||||
+{ |
||||
+ Dl_info info; |
||||
+ void *dl, *sym; |
||||
+ int rv = -1; |
||||
+ |
||||
+ dl = dlopen(libname, RTLD_LAZY); |
||||
+ if (dl == NULL) { |
||||
+ return -1; |
||||
+ } |
||||
+ |
||||
+ sym = dlsym(dl, symbolname); |
||||
+ |
||||
+ if (sym != NULL && dladdr(sym, &info)) { |
||||
+ strncpy(path, info.dli_fname, pathlen-1); |
||||
+ path[pathlen-1] = '\0'; |
||||
+ rv = 0; |
||||
+ } |
||||
+ |
||||
+ dlclose(dl); |
||||
+ |
||||
+ return rv; |
||||
+} |
||||
+ |
||||
/* Run an integrity check on the binary. Returns 0 on success. */ |
||||
static int |
||||
check_binary_integrity (void) |
||||
{ |
||||
#ifdef ENABLE_HMAC_BINARY_CHECK |
||||
gpg_error_t err; |
||||
- Dl_info info; |
||||
+ char libpath[4096]; |
||||
unsigned char digest[32]; |
||||
int dlen; |
||||
char *fname = NULL; |
||||
- const char key[] = "What am I, a doctor or a moonshuttle conductor?"; |
||||
- |
||||
- if (!dladdr ("gcry_check_version", &info)) |
||||
+ const char key[] = "orboDeJITITejsirpADONivirpUkvarP"; |
||||
+ |
||||
+ if (get_library_path ("libgcrypt.so.11", "gcry_check_version", libpath, sizeof(libpath))) |
||||
err = gpg_error_from_syserror (); |
||||
else |
||||
{ |
||||
- dlen = _gcry_hmac256_file (digest, sizeof digest, info.dli_fname, |
||||
+ dlen = _gcry_hmac256_file (digest, sizeof digest, libpath, |
||||
key, strlen (key)); |
||||
if (dlen < 0) |
||||
err = gpg_error_from_syserror (); |
||||
@@ -594,7 +619,7 @@ check_binary_integrity (void) |
||||
err = gpg_error (GPG_ERR_INTERNAL); |
||||
else |
||||
{ |
||||
- fname = gcry_malloc (strlen (info.dli_fname) + 1 + 5 + 1 ); |
||||
+ fname = gcry_malloc (strlen (libpath) + 1 + 5 + 1 ); |
||||
if (!fname) |
||||
err = gpg_error_from_syserror (); |
||||
else |
||||
@@ -603,7 +628,7 @@ check_binary_integrity (void) |
||||
char *p; |
||||
|
||||
/* Prefix the basename with a dot. */ |
||||
- strcpy (fname, info.dli_fname); |
||||
+ strcpy (fname, libpath); |
||||
p = strrchr (fname, '/'); |
||||
if (p) |
||||
p++; |
||||
diff -up libgcrypt-1.5.0/src/Makefile.in.use-fipscheck libgcrypt-1.5.0/src/Makefile.in |
||||
--- libgcrypt-1.5.0/src/Makefile.in.use-fipscheck 2011-06-29 10:58:01.000000000 +0200 |
||||
+++ libgcrypt-1.5.0/src/Makefile.in 2011-07-20 16:19:33.000000000 +0200 |
||||
@@ -375,7 +375,7 @@ libgcrypt_la_LIBADD = $(gcrypt_res) \ |
||||
../cipher/libcipher.la \ |
||||
../random/librandom.la \ |
||||
../mpi/libmpi.la \ |
||||
- ../compat/libcompat.la $(GPG_ERROR_LIBS) |
||||
+ ../compat/libcompat.la $(GPG_ERROR_LIBS) -ldl |
||||
|
||||
dumpsexp_SOURCES = dumpsexp.c |
||||
dumpsexp_CFLAGS = $(arch_gpg_error_cflags) |
@ -0,0 +1,82 @@
@@ -0,0 +1,82 @@
|
||||
diff -up libgcrypt-1.5.1/random/rndlinux.c.use-poll libgcrypt-1.5.1/random/rndlinux.c |
||||
--- libgcrypt-1.5.1/random/rndlinux.c.use-poll 2013-03-20 15:33:26.504867356 +0100 |
||||
+++ libgcrypt-1.5.1/random/rndlinux.c 2013-03-20 15:37:24.999944048 +0100 |
||||
@@ -32,6 +32,7 @@ |
||||
#include <string.h> |
||||
#include <unistd.h> |
||||
#include <fcntl.h> |
||||
+#include <poll.h> |
||||
#include "types.h" |
||||
#include "g10lib.h" |
||||
#include "rand-internal.h" |
||||
@@ -142,49 +143,37 @@ _gcry_rndlinux_gather_random (void (*add |
||||
} |
||||
|
||||
/* Enter the read loop. */ |
||||
- delay = 0; /* Start with 0 seconds so that we do no block on the |
||||
+ delay = 100; /* Start with 0 seconds so that we do no block on the |
||||
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) |
||||
{ |
||||
- fd_set rfds; |
||||
- struct timeval tv; |
||||
int rc; |
||||
+ struct pollfd pfd; |
||||
|
||||
- /* If the system has no limit on the number of file descriptors |
||||
- and we encounter an fd which is larger than the fd_set size, |
||||
- we don't use the select at all. The select code is only used |
||||
- to emit progress messages. A better solution would be to |
||||
- fall back to poll() if available. */ |
||||
-#ifdef FD_SETSIZE |
||||
- if (fd < FD_SETSIZE) |
||||
-#endif |
||||
+ pfd.fd = fd; |
||||
+ pfd.events = POLLIN; |
||||
+ |
||||
+ if ( !(rc=poll(&pfd, 1, delay)) ) |
||||
{ |
||||
- FD_ZERO(&rfds); |
||||
- FD_SET(fd, &rfds); |
||||
- tv.tv_sec = delay; |
||||
- tv.tv_usec = delay? 0 : 100000; |
||||
- if ( !(rc=select(fd+1, &rfds, NULL, NULL, &tv)) ) |
||||
- { |
||||
- if (!any_need_entropy || last_so_far != (want - length) ) |
||||
- { |
||||
- last_so_far = want - length; |
||||
- _gcry_random_progress ("need_entropy", 'X', |
||||
- (int)last_so_far, (int)want); |
||||
- any_need_entropy = 1; |
||||
- } |
||||
- delay = 3; /* Use 3 seconds henceforth. */ |
||||
- continue; |
||||
- } |
||||
- else if( rc == -1 ) |
||||
+ if (!any_need_entropy || last_so_far != (want - length) ) |
||||
{ |
||||
- log_error ("select() error: %s\n", strerror(errno)); |
||||
- if (!delay) |
||||
- delay = 1; /* Use 1 second if we encounter an error before |
||||
+ last_so_far = want - length; |
||||
+ _gcry_random_progress ("need_entropy", 'X', |
||||
+ (int)last_so_far, (int)want); |
||||
+ any_need_entropy = 1; |
||||
+ } |
||||
+ delay = 3000; /* Use 3 seconds henceforth. */ |
||||
+ continue; |
||||
+ } |
||||
+ else if( rc == -1 ) |
||||
+ { |
||||
+ log_error ("poll() error: %s\n", strerror(errno)); |
||||
+ if (!delay) |
||||
+ delay = 1000; /* Use 1 second if we encounter an error before |
||||
we have ever blocked. */ |
||||
- continue; |
||||
- } |
||||
+ continue; |
||||
} |
||||
|
||||
do |
@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
|
||||
diff -up libgcrypt-1.5.2/cipher/Makefile.am.aliasing libgcrypt-1.5.2/cipher/Makefile.am |
||||
--- libgcrypt-1.5.2/cipher/Makefile.am.aliasing 2013-04-18 16:49:13.000000000 +0200 |
||||
+++ libgcrypt-1.5.2/cipher/Makefile.am 2013-04-25 21:48:57.867465215 +0200 |
||||
@@ -81,3 +81,9 @@ tiger.o: $(srcdir)/tiger.c |
||||
|
||||
tiger.lo: $(srcdir)/tiger.c |
||||
`echo $(LTCOMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) ` |
||||
+ |
||||
+rijndael.o: $(srcdir)/rijndael.c |
||||
+ `echo $(COMPILE) -fno-strict-aliasing -c $(srcdir)/rijndael.c ` |
||||
+ |
||||
+rijndael.lo: $(srcdir)/rijndael.c |
||||
+ `echo $(LTCOMPILE) -fno-strict-aliasing -c $(srcdir)/rijndael.c ` |
||||
diff -up libgcrypt-1.5.2/cipher/Makefile.in.aliasing libgcrypt-1.5.2/cipher/Makefile.in |
||||
--- libgcrypt-1.5.2/cipher/Makefile.in.aliasing 2013-04-18 17:06:03.000000000 +0200 |
||||
+++ libgcrypt-1.5.2/cipher/Makefile.in 2013-04-25 21:48:59.164493610 +0200 |
||||
@@ -638,6 +638,12 @@ tiger.o: $(srcdir)/tiger.c |
||||
tiger.lo: $(srcdir)/tiger.c |
||||
`echo $(LTCOMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) ` |
||||
|
||||
+rijndael.o: $(srcdir)/rijndael.c |
||||
+ `echo $(COMPILE) -fno-strict-aliasing -c $(srcdir)/rijndael.c ` |
||||
+ |
||||
+rijndael.lo: $(srcdir)/rijndael.c |
||||
+ `echo $(LTCOMPILE) -fno-strict-aliasing -c $(srcdir)/rijndael.c ` |
||||
+ |
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables. |
||||
# Otherwise a system limit (for SysV at least) may be exceeded. |
||||
.NOEXPORT: |
||||
diff -up libgcrypt-1.5.2/cipher/rijndael.c.aliasing libgcrypt-1.5.2/cipher/rijndael.c |
@ -0,0 +1,102 @@
@@ -0,0 +1,102 @@
|
||||
diff -up libgcrypt-1.5.2/mpi/mpicoder.c.gccopt libgcrypt-1.5.2/mpi/mpicoder.c |
||||
--- libgcrypt-1.5.2/mpi/mpicoder.c.gccopt 2013-04-18 16:48:42.000000000 +0200 |
||||
+++ libgcrypt-1.5.2/mpi/mpicoder.c 2013-06-20 10:24:57.241510589 +0200 |
||||
@@ -555,16 +555,16 @@ gcry_mpi_print (enum gcry_mpi_format for |
||||
extra=1; |
||||
} |
||||
|
||||
- if (buffer && n > len) |
||||
- { |
||||
- /* The provided buffer is too short. */ |
||||
- gcry_free (tmp); |
||||
- return gcry_error (GPG_ERR_TOO_SHORT); |
||||
- } |
||||
if (buffer) |
||||
{ |
||||
unsigned char *s = buffer; |
||||
|
||||
+ if (n > len) |
||||
+ { |
||||
+ /* The provided buffer is too short. */ |
||||
+ gcry_free (tmp); |
||||
+ return gcry_error (GPG_ERR_TOO_SHORT); |
||||
+ } |
||||
if (extra) |
||||
*s++ = 0; |
||||
memcpy (s, tmp, n-extra); |
||||
@@ -580,12 +580,12 @@ gcry_mpi_print (enum gcry_mpi_format for |
||||
/* Note: We ignore the sign for this format. */ |
||||
/* FIXME: for performance reasons we should put this into |
||||
mpi_aprint because we can then use the buffer directly. */ |
||||
- if (buffer && n > len) |
||||
- return gcry_error (GPG_ERR_TOO_SHORT); |
||||
if (buffer) |
||||
{ |
||||
unsigned char *tmp; |
||||
|
||||
+ if (n > len) |
||||
+ return gcry_error (GPG_ERR_TOO_SHORT); |
||||
tmp = _gcry_mpi_get_buffer (a, &n, NULL); |
||||
if (!tmp) |
||||
return gpg_error_from_syserror (); |
||||
@@ -603,14 +603,13 @@ gcry_mpi_print (enum gcry_mpi_format for |
||||
if( a->sign ) |
||||
return gcry_error (GPG_ERR_INV_ARG); |
||||
|
||||
- if (buffer && n+2 > len) |
||||
- return gcry_error (GPG_ERR_TOO_SHORT); |
||||
- |
||||
if (buffer) |
||||
{ |
||||
unsigned char *tmp; |
||||
unsigned char *s = buffer; |
||||
|
||||
+ if (n+2 > len) |
||||
+ return gcry_error (GPG_ERR_TOO_SHORT); |
||||
s[0] = nbits >> 8; |
||||
s[1] = nbits; |
||||
|
||||
@@ -641,16 +640,16 @@ gcry_mpi_print (enum gcry_mpi_format for |
||||
extra=1; |
||||
} |
||||
|
||||
- if (buffer && n+4 > len) |
||||
- { |
||||
- gcry_free(tmp); |
||||
- return gcry_error (GPG_ERR_TOO_SHORT); |
||||
- } |
||||
- |
||||
if (buffer) |
||||
{ |
||||
unsigned char *s = buffer; |
||||
|
||||
+ if (n+4 > len) |
||||
+ { |
||||
+ gcry_free(tmp); |
||||
+ return gcry_error (GPG_ERR_TOO_SHORT); |
||||
+ } |
||||
+ |
||||
*s++ = n >> 24; |
||||
*s++ = n >> 16; |
||||
*s++ = n >> 8; |
||||
@@ -677,15 +676,15 @@ gcry_mpi_print (enum gcry_mpi_format for |
||||
if (!n || (*tmp & 0x80)) |
||||
extra = 2; |
||||
|
||||
- if (buffer && 2*n + extra + !!a->sign + 1 > len) |
||||
- { |
||||
- gcry_free(tmp); |
||||
- return gcry_error (GPG_ERR_TOO_SHORT); |
||||
- } |
||||
if (buffer) |
||||
{ |
||||
unsigned char *s = buffer; |
||||
|
||||
+ if (2*n + extra + !!a->sign + 1 > len) |
||||
+ { |
||||
+ gcry_free(tmp); |
||||
+ return gcry_error (GPG_ERR_TOO_SHORT); |
||||
+ } |
||||
if (a->sign) |
||||
*s++ = '-'; |
||||
if (extra) |
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
diff -up libgcrypt-1.5.3/random/drbg.c.drbg-init libgcrypt-1.5.3/random/drbg.c |
||||
--- libgcrypt-1.5.3/random/drbg.c.drbg-init 2017-02-28 14:28:55.000000000 +0100 |
||||
+++ libgcrypt-1.5.3/random/drbg.c 2017-02-28 15:15:54.401291408 +0100 |
||||
@@ -1820,12 +1820,16 @@ _gcry_drbg_randomize (void *buffer, size |
||||
enum gcry_random_level level) |
||||
{ |
||||
(void) level; |
||||
- gcry_drbg_lock (); |
||||
if (NULL == gcry_drbg) |
||||
{ |
||||
- fips_signal_error ("DRBG is not initialized"); |
||||
- goto bailout; |
||||
+ _gcry_drbg_init(1); |
||||
+ if (NULL == gcry_drbg) |
||||
+ { |
||||
+ log_fatal ("DRBG is not initialized\n"); |
||||
+ goto bailout; |
||||
+ } |
||||
} |
||||
+ gcry_drbg_lock (); |
||||
|
||||
/* As reseeding changes the entire state of the DRBG, including any |
||||
* key, either a re-init or a reseed is sufficient for a fork */ |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,142 @@
@@ -0,0 +1,142 @@
|
||||
diff -up libgcrypt-1.5.3/random/drbg.c.cfgrandom libgcrypt-1.5.3/random/drbg.c |
||||
--- libgcrypt-1.5.3/random/drbg.c.cfgrandom 2014-10-30 16:42:49.000000000 +0100 |
||||
+++ libgcrypt-1.5.3/random/drbg.c 2014-10-30 16:46:57.291800433 +0100 |
||||
@@ -485,8 +485,11 @@ gcry_drbg_get_entropy (struct gcry_drbg_ |
||||
read_cb_size = len; |
||||
read_cb_len = 0; |
||||
#if USE_RNDLINUX |
||||
+ _gcry_rndlinux_gather_random (gcry_drbg_read_cb, 0, len, |
||||
+ -1); |
||||
+ read_cb_len = 0; |
||||
rc = _gcry_rndlinux_gather_random (gcry_drbg_read_cb, 0, len, |
||||
- GCRY_VERY_STRONG_RANDOM); |
||||
+ GCRY_STRONG_RANDOM); |
||||
#elif USE_RNDUNIX |
||||
rc = _gcry_rndunix_gather_random (read_cb, 0, length, |
||||
GCRY_VERY_STRONG_RANDOM); |
||||
diff -up libgcrypt-1.5.3/random/random-fips.c.cfgrandom libgcrypt-1.5.3/random/random-fips.c |
||||
--- libgcrypt-1.5.3/random/random-fips.c.cfgrandom 2014-10-30 16:42:49.942216405 +0100 |
||||
+++ libgcrypt-1.5.3/random/random-fips.c 2014-10-30 16:42:49.970217037 +0100 |
||||
@@ -27,10 +27,10 @@ |
||||
There are 3 random context which map to the different levels of |
||||
random quality: |
||||
|
||||
- Generator Seed and Key Kernel entropy (init/reseed) |
||||
- ------------------------------------------------------------ |
||||
- GCRY_VERY_STRONG_RANDOM /dev/random 256/128 bits |
||||
- GCRY_STRONG_RANDOM /dev/random 256/128 bits |
||||
+ Generator Seed and Key Kernel entropy (init/reseed) |
||||
+ --------------------------------------------------------------------------------------- |
||||
+ GCRY_VERY_STRONG_RANDOM /etc/gcrypt/rngseed+/dev/urandom 256/128 bits |
||||
+ GCRY_STRONG_RANDOM /etc/gcrypt/rngseed+/dev/urandom 256/128 bits |
||||
gcry_create_nonce GCRY_STRONG_RANDOM n/a |
||||
|
||||
All random generators return their data in 128 bit blocks. If the |
||||
@@ -40,8 +40,10 @@ |
||||
(SEED_TTL) output blocks; the re-seeding is disabled in test mode. |
||||
|
||||
The GCRY_VERY_STRONG_RANDOM and GCRY_STRONG_RANDOM generators are |
||||
- keyed and seeded from the /dev/random device. Thus these |
||||
- generators may block until the kernel has collected enough entropy. |
||||
+ keyed and seeded with data that is loaded from the /etc/gcrypt/rngseed |
||||
+ if the device or symlink to device exists xored with the data |
||||
+ from the /dev/urandom device. This allows the system administrator |
||||
+ to always seed the RNGs from /dev/random if it is required. |
||||
|
||||
The gcry_create_nonce generator is keyed and seeded from the |
||||
GCRY_STRONG_RANDOM generator. It may also block if the |
||||
@@ -560,9 +562,13 @@ get_entropy (size_t nbytes) |
||||
entropy_collect_buffer_len = 0; |
||||
|
||||
#if USE_RNDLINUX |
||||
+ _gcry_rndlinux_gather_random (entropy_collect_cb, 0, |
||||
+ X931_AES_KEYLEN, |
||||
+ -1); |
||||
+ entropy_collect_buffer_len = 0; |
||||
rc = _gcry_rndlinux_gather_random (entropy_collect_cb, 0, |
||||
X931_AES_KEYLEN, |
||||
- GCRY_VERY_STRONG_RANDOM); |
||||
+ GCRY_STRONG_RANDOM); |
||||
#elif USE_RNDW32 |
||||
do |
||||
{ |
||||
diff -up libgcrypt-1.5.3/random/rndlinux.c.cfgrandom libgcrypt-1.5.3/random/rndlinux.c |
||||
--- libgcrypt-1.5.3/random/rndlinux.c.cfgrandom 2014-10-30 16:42:49.949216563 +0100 |
||||
+++ libgcrypt-1.5.3/random/rndlinux.c 2014-10-30 16:42:49.971217059 +0100 |
||||
@@ -37,7 +37,9 @@ |
||||
#include "g10lib.h" |
||||
#include "rand-internal.h" |
||||
|
||||
-static int open_device ( const char *name ); |
||||
+#define NAME_OF_CFG_RNGSEED "/etc/gcrypt/rngseed" |
||||
+ |
||||
+static int open_device ( const char *name, int fatal ); |
||||
|
||||
|
||||
static int |
||||
@@ -58,13 +60,17 @@ set_cloexec_flag (int fd) |
||||
* Used to open the /dev/random devices (Linux, xBSD, Solaris (if it exists)). |
||||
*/ |
||||
static int |
||||
-open_device ( const char *name ) |
||||
+open_device ( const char *name, int fatal ) |
||||
{ |
||||
int fd; |
||||
|
||||
fd = open ( name, O_RDONLY ); |
||||
if ( fd == -1 ) |
||||
- log_fatal ("can't open %s: %s\n", name, strerror(errno) ); |
||||
+ { |
||||
+ if (! fatal) |
||||
+ return fd; |
||||
+ log_fatal ("can't open %s: %s\n", name, strerror(errno) ); |
||||
+ } |
||||
|
||||
if (set_cloexec_flag (fd)) |
||||
log_error ("error setting FD_CLOEXEC on fd %d: %s\n", |
||||
@@ -93,6 +99,7 @@ _gcry_rndlinux_gather_random (void (*add |
||||
{ |
||||
static int fd_urandom = -1; |
||||
static int fd_random = -1; |
||||
+ static int fd_configured = -1; |
||||
int fd; |
||||
int n; |
||||
byte buffer[768]; |
||||
@@ -101,6 +108,7 @@ _gcry_rndlinux_gather_random (void (*add |
||||
size_t last_so_far = 0; |
||||
int any_need_entropy = 0; |
||||
int delay; |
||||
+ size_t orig_length = length; |
||||
|
||||
/* First read from a hardware source. However let it account only |
||||
for up to 50% of the requested bytes. */ |
||||
@@ -111,16 +119,26 @@ _gcry_rndlinux_gather_random (void (*add |
||||
length -= n_hw; |
||||
|
||||
/* Open the requested device. */ |
||||
+ |
||||
+ if (level == -1) |
||||
+ { |
||||
+ if (fd_configured == -1) |
||||
+ fd_configured = open_device ( NAME_OF_CFG_RNGSEED, 0 ); |
||||
+ fd = fd_configured; |
||||
+ if (fd == -1) |
||||
+ return -1; |
||||
+ } |
||||
+ |
||||
if (level >= 2) |
||||
{ |
||||
if( fd_random == -1 ) |
||||
- fd_random = open_device ( NAME_OF_DEV_RANDOM ); |
||||
+ fd_random = open_device ( NAME_OF_DEV_RANDOM, 1 ); |
||||
fd = fd_random; |
||||
} |
||||
- else |
||||
+ else if (level != -1) |
||||
{ |
||||
if( fd_urandom == -1 ) |
||||
- fd_urandom = open_device ( NAME_OF_DEV_URANDOM ); |
||||
+ fd_urandom = open_device ( NAME_OF_DEV_URANDOM, 1 ); |
||||
fd = fd_urandom; |
||||
} |
||||
|
@ -0,0 +1,72 @@
@@ -0,0 +1,72 @@
|
||||
diff -up libgcrypt-1.5.3/cipher/md.c.fips-ctor libgcrypt-1.5.3/cipher/md.c |
||||
--- libgcrypt-1.5.3/cipher/md.c.fips-ctor 2013-07-25 11:10:03.000000000 +0200 |
||||
+++ libgcrypt-1.5.3/cipher/md.c 2014-12-12 15:32:35.464515238 +0100 |
||||
@@ -570,11 +570,8 @@ md_enable (gcry_md_hd_t hd, int algorith |
||||
|
||||
if (!err && algorithm == GCRY_MD_MD5 && fips_mode ()) |
||||
{ |
||||
- _gcry_inactivate_fips_mode ("MD5 used"); |
||||
if (_gcry_enforced_fips_mode () ) |
||||
{ |
||||
- /* We should never get to here because we do not register |
||||
- MD5 in enforced fips mode. But better throw an error. */ |
||||
err = GPG_ERR_DIGEST_ALGO; |
||||
} |
||||
} |
||||
diff -up libgcrypt-1.5.3/src/global.c.fips-ctor libgcrypt-1.5.3/src/global.c |
||||
--- libgcrypt-1.5.3/src/global.c.fips-ctor 2014-12-12 15:32:35.463515215 +0100 |
||||
+++ libgcrypt-1.5.3/src/global.c 2014-12-12 16:46:33.424883301 +0100 |
||||
@@ -140,6 +140,34 @@ global_init (void) |
||||
} |
||||
|
||||
|
||||
+#ifndef FIPS_MODULE_PATH |
||||
+#define FIPS_MODULE_PATH "/etc/system-fips" |
||||
+#endif |
||||
+ |
||||
+void __attribute__ ((constructor)) _gcry_global_constructor (void) |
||||
+{ |
||||
+ int rv; |
||||
+ |
||||
+ rv = access (FIPS_MODULE_PATH, F_OK); |
||||
+ if (rv < 0 && errno != ENOENT) |
||||
+ rv = 0; |
||||
+ |
||||
+ if (!rv) |
||||
+ { |
||||
+ int no_secmem_save; |
||||
+ |
||||
+ /* it should be always 0 at this point but let's keep on the safe side */ |
||||
+ no_secmem_save = no_secure_memory; |
||||
+ no_secure_memory = 1; |
||||
+ /* force selftests */ |
||||
+ global_init (); |
||||
+ if (fips_mode ()) |
||||
+ _gcry_random_initialize (1); |
||||
+ _gcry_fips_run_selftests (0); |
||||
+ no_secure_memory = no_secmem_save; |
||||
+ } |
||||
+} |
||||
+ |
||||
/* This function is called by the macro fips_is_operational and makes |
||||
sure that the minimal initialization has been done. This is far |
||||
from a perfect solution and hides problems with an improper |
||||
@@ -500,8 +528,7 @@ _gcry_vcontrol (enum gcry_ctl_cmds cmd, |
||||
|
||||
case GCRYCTL_FIPS_MODE_P: |
||||
if (fips_mode () |
||||
- && !_gcry_is_fips_mode_inactive () |
||||
- && !no_secure_memory) |
||||
+ && !_gcry_is_fips_mode_inactive ()) |
||||
err = GPG_ERR_GENERAL; /* Used as TRUE value */ |
||||
break; |
||||
|
||||
@@ -600,7 +627,7 @@ _gcry_vcontrol (enum gcry_ctl_cmds cmd, |
||||
break; |
||||
|
||||
case GCRYCTL_SET_ENFORCED_FIPS_FLAG: |
||||
- if (!any_init_done) |
||||
+ if (fips_mode ()) |
||||
{ |
||||
/* Not yet intialized at all. Set the enforced fips mode flag */ |
||||
_gcry_set_enforced_fips_mode (); |
@ -0,0 +1,18 @@
@@ -0,0 +1,18 @@
|
||||
diff -up libgcrypt-1.5.3/tests/basic.c.fips-test libgcrypt-1.5.3/tests/basic.c |
||||
--- libgcrypt-1.5.3/tests/basic.c.fips-test 2014-09-26 17:36:41.620556071 +0200 |
||||
+++ libgcrypt-1.5.3/tests/basic.c 2014-09-26 17:36:43.317594382 +0200 |
||||
@@ -563,6 +563,14 @@ check_ctr_cipher (void) |
||||
if (!tv[i].algo) |
||||
continue; |
||||
|
||||
+ if (gcry_cipher_test_algo (tv[i].algo) && in_fips_mode) |
||||
+ { |
||||
+ if (verbose) |
||||
+ fprintf (stderr, " algorithm %d not available in fips mode\n", |
||||
+ tv[i].algo); |
||||
+ continue; |
||||
+ } |
||||
+ |
||||
err = gcry_cipher_open (&hde, tv[i].algo, GCRY_CIPHER_MODE_CTR, 0); |
||||
if (!err) |
||||
err = gcry_cipher_open (&hdd, tv[i].algo, GCRY_CIPHER_MODE_CTR, 0); |
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
diff -up libgcrypt-1.5.3/cipher/kdf.c.pbkdf-speedup libgcrypt-1.5.3/cipher/kdf.c |
||||
--- libgcrypt-1.5.3/cipher/kdf.c.pbkdf-speedup 2014-01-21 15:49:22.676638703 +0100 |
||||
+++ libgcrypt-1.5.3/cipher/kdf.c 2014-01-21 15:52:40.115047218 +0100 |
||||
@@ -172,19 +172,21 @@ pkdf2 (const void *passphrase, size_t pa |
||||
return ec; |
||||
} |
||||
|
||||
+ ec = gpg_err_code (gcry_md_setkey (md, passphrase, passphraselen)); |
||||
+ if (ec) |
||||
+ { |
||||
+ gcry_md_close (md); |
||||
+ gcry_free (sbuf); |
||||
+ return ec; |
||||
+ } |
||||
+ |
||||
/* Step 3 and 4. */ |
||||
memcpy (sbuf, salt, saltlen); |
||||
for (lidx = 1; lidx <= l; lidx++) |
||||
{ |
||||
for (iter = 0; iter < iterations; iter++) |
||||
{ |
||||
- ec = gpg_err_code (gcry_md_setkey (md, passphrase, passphraselen)); |
||||
- if (ec) |
||||
- { |
||||
- gcry_md_close (md); |
||||
- gcry_free (sbuf); |
||||
- return ec; |
||||
- } |
||||
+ gcry_md_reset (md); |
||||
if (!iter) /* Compute U_1: */ |
||||
{ |
||||
sbuf[saltlen] = (lidx >> 24); |
@ -0,0 +1,141 @@
@@ -0,0 +1,141 @@
|
||||
diff -up libgcrypt-1.5.3/random/random-csprng.c.rng-predictable libgcrypt-1.5.3/random/random-csprng.c |
||||
--- libgcrypt-1.5.3/random/random-csprng.c.rng-predictable 2015-08-11 14:31:35.904275580 +0200 |
||||
+++ libgcrypt-1.5.3/random/random-csprng.c 2016-08-17 23:35:15.691980751 +0200 |
||||
@@ -561,41 +561,46 @@ _gcry_rngcsprng_randomize (void *buffer, |
||||
|
||||
|
||||
/* |
||||
- Mix the pool: |
||||
- |
||||
- |........blocks*20byte........|20byte|..44byte..| |
||||
- <..44byte..> <20byte> |
||||
- | | |
||||
- | +------+ |
||||
- +---------------------------|----------+ |
||||
- v v |
||||
- |........blocks*20byte........|20byte|..44byte..| |
||||
- <.....64bytes.....> |
||||
- | |
||||
- +----------------------------------+ |
||||
- Hash |
||||
- v |
||||
- |.............................|20byte|..44byte..| |
||||
- <20byte><20byte><..44byte..> |
||||
- | | |
||||
- | +---------------------+ |
||||
- +-----------------------------+ | |
||||
- v v |
||||
- |.............................|20byte|..44byte..| |
||||
- <.....64byte......> |
||||
- | |
||||
- +-------------------------+ |
||||
- Hash |
||||
- v |
||||
- |.............................|20byte|..44byte..| |
||||
- <20byte><20byte><..44byte..> |
||||
- |
||||
- and so on until we did this for all blocks. |
||||
- |
||||
- To better protect against implementation errors in this code, we |
||||
- xor a digest of the entire pool into the pool before mixing. |
||||
- |
||||
- Note: this function must only be called with a locked pool. |
||||
+ * Mix the 600 byte pool. Note that the 64 byte scratch area directly |
||||
+ * follows the pool. The numbers in the diagram give the number of |
||||
+ * bytes. |
||||
+ * <................600...............> <.64.> |
||||
+ * pool |------------------------------------| |------| |
||||
+ * <20><.24.> <20> |
||||
+ * | | +-----+ |
||||
+ * +-----|-------------------------------|-+ |
||||
+ * +-------------------------------|-|-+ |
||||
+ * v v v |
||||
+ * |------| |
||||
+ * <hash> |
||||
+ * +---------------------------------------+ |
||||
+ * v |
||||
+ * <20> |
||||
+ * pool' |------------------------------------| |
||||
+ * <20><20><.24.> |
||||
+ * +---|-----|---------------------------+ |
||||
+ * +-----|---------------------------|-+ |
||||
+ * +---------------------------|-|-+ |
||||
+ * v v v |
||||
+ * |------| |
||||
+ * <hash> |
||||
+ * | |
||||
+ * +-----------------------------------+ |
||||
+ * v |
||||
+ * <20> |
||||
+ * pool'' |------------------------------------| |
||||
+ * <20><20><20><.24.> |
||||
+ * +---|-----|-----------------------+ |
||||
+ * +-----|-----------------------|-+ |
||||
+ * +-----------------------|-|-+ |
||||
+ * v v v |
||||
+ * |
||||
+ * and so on until we did this for all 30 blocks. |
||||
+ * |
||||
+ * To better protect against implementation errors in this code, we |
||||
+ * xor a digest of the entire pool into the pool before mixing. |
||||
+ * |
||||
+ * Note: this function must only be called with a locked pool. |
||||
*/ |
||||
static void |
||||
mix_pool(unsigned char *pool) |
||||
@@ -615,32 +620,30 @@ mix_pool(unsigned char *pool) |
||||
gcry_assert (pool_is_locked); |
||||
_gcry_rmd160_init( &md ); |
||||
|
||||
- /* Loop over the pool. */ |
||||
+ /* pool_0 -> pool'. */ |
||||
pend = pool + POOLSIZE; |
||||
- memcpy(hashbuf, pend - DIGESTLEN, DIGESTLEN ); |
||||
- memcpy(hashbuf+DIGESTLEN, pool, BLOCKLEN-DIGESTLEN); |
||||
- _gcry_rmd160_mixblock( &md, hashbuf); |
||||
- memcpy(pool, hashbuf, 20 ); |
||||
+ memcpy (hashbuf, pend - DIGESTLEN, DIGESTLEN); |
||||
+ memcpy (hashbuf+DIGESTLEN, pool, BLOCKLEN-DIGESTLEN); |
||||
+ _gcry_rmd160_mixblock (&md, hashbuf); |
||||
+ memcpy (pool, hashbuf, DIGESTLEN); |
||||
|
||||
if (failsafe_digest_valid && pool == rndpool) |
||||
{ |
||||
- for (i=0; i < 20; i++) |
||||
+ for (i=0; i < DIGESTLEN; i++) |
||||
pool[i] ^= failsafe_digest[i]; |
||||
} |
||||
|
||||
+ /* Loop for the remaining iterations. */ |
||||
p = pool; |
||||
for (n=1; n < POOLBLOCKS; n++) |
||||
{ |
||||
- memcpy (hashbuf, p, DIGESTLEN); |
||||
- |
||||
- p += DIGESTLEN; |
||||
- if (p+DIGESTLEN+BLOCKLEN < pend) |
||||
- memcpy (hashbuf+DIGESTLEN, p+DIGESTLEN, BLOCKLEN-DIGESTLEN); |
||||
+ if (p + BLOCKLEN < pend) |
||||
+ memcpy (hashbuf, p, BLOCKLEN); |
||||
else |
||||
{ |
||||
- unsigned char *pp = p + DIGESTLEN; |
||||
+ unsigned char *pp = p; |
||||
|
||||
- for (i=DIGESTLEN; i < BLOCKLEN; i++ ) |
||||
+ for (i=0; i < BLOCKLEN; i++ ) |
||||
{ |
||||
if ( pp >= pend ) |
||||
pp = pool; |
||||
@@ -648,8 +651,9 @@ mix_pool(unsigned char *pool) |
||||
} |
||||
} |
||||
|
||||
- _gcry_rmd160_mixblock ( &md, hashbuf); |
||||
- memcpy(p, hashbuf, 20 ); |
||||
+ _gcry_rmd160_mixblock (&md, hashbuf); |
||||
+ p += DIGESTLEN; |
||||
+ memcpy (p, hashbuf, DIGESTLEN); |
||||
} |
||||
|
||||
/* Our hash implementation does only leave small parts (64 bytes) |
@ -0,0 +1,374 @@
@@ -0,0 +1,374 @@
|
||||
diff -up libgcrypt-1.5.3/cipher/primegen.c.fips-keygen libgcrypt-1.5.3/cipher/primegen.c |
||||
--- libgcrypt-1.5.3/cipher/primegen.c.fips-keygen 2014-10-21 15:05:59.434189992 +0200 |
||||
+++ libgcrypt-1.5.3/cipher/primegen.c 2014-10-21 15:05:59.458190534 +0200 |
||||
@@ -1189,6 +1189,22 @@ gcry_prime_check (gcry_mpi_t x, unsigned |
||||
return gcry_error (err); |
||||
} |
||||
|
||||
+/* Check whether the number X is prime according to FIPS 186-4 table C.2. */ |
||||
+gpg_err_code_t |
||||
+_gcry_fips186_4_prime_check (gcry_mpi_t x, unsigned int bits) |
||||
+{ |
||||
+ gpg_err_code_t ec = GPG_ERR_NO_ERROR; |
||||
+ gcry_mpi_t val_2 = mpi_alloc_set_ui (2); /* Used by the Fermat test. */ |
||||
+ |
||||
+ /* We use 5 or 4 rounds as specified in table C.2 */ |
||||
+ if (! check_prime (x, val_2, bits > 1024 ? 4 : 5, NULL, NULL)) |
||||
+ ec = GPG_ERR_NO_PRIME; |
||||
+ |
||||
+ mpi_free (val_2); |
||||
+ |
||||
+ return ec; |
||||
+} |
||||
+ |
||||
/* Find a generator for PRIME where the factorization of (prime-1) is |
||||
in the NULL terminated array FACTORS. Return the generator as a |
||||
newly allocated MPI in R_G. If START_G is not NULL, use this as s |
||||
diff -up libgcrypt-1.5.3/cipher/rsa.c.fips-keygen libgcrypt-1.5.3/cipher/rsa.c |
||||
--- libgcrypt-1.5.3/cipher/rsa.c.fips-keygen 2014-10-21 15:05:59.423189744 +0200 |
||||
+++ libgcrypt-1.5.3/cipher/rsa.c 2014-10-21 15:12:45.200350340 +0200 |
||||
@@ -328,6 +328,279 @@ generate_std (RSA_secret_key *sk, unsign |
||||
} |
||||
|
||||
|
||||
+/**************** |
||||
+ * Generate a key pair with a key of size NBITS. |
||||
+ * USE_E = 0 let Libcgrypt decide what exponent to use. |
||||
+ * = 1 request the use of a "secure" exponent; this is required by some |
||||
+ * specification to be 65537. |
||||
+ * > 2 Use this public exponent. If the given exponent |
||||
+ * is not odd one is internally added to it. |
||||
+ * TESTPARMS: If set, do not generate but test whether the p,q is probably prime |
||||
+ * Returns key with zeroes to not break code calling this function. |
||||
+ * TRANSIENT_KEY: If true, generate the primes using the standard RNG. |
||||
+ * Returns: 2 structures filled with all needed values |
||||
+ */ |
||||
+static gpg_err_code_t |
||||
+generate_fips (RSA_secret_key *sk, unsigned int nbits, unsigned long use_e, |
||||
+ gcry_sexp_t testparms, int transient_key) |
||||
+{ |
||||
+ gcry_mpi_t p, q; /* the two primes */ |
||||
+ gcry_mpi_t d; /* the private key */ |
||||
+ gcry_mpi_t u; |
||||
+ gcry_mpi_t p1, q1; |
||||
+ gcry_mpi_t n; /* the public key */ |
||||
+ gcry_mpi_t e; /* the exponent */ |
||||
+ gcry_mpi_t g; |
||||
+ gcry_mpi_t minp; |
||||
+ gcry_mpi_t diff, mindiff; |
||||
+ gcry_random_level_t random_level; |
||||
+ unsigned int pbits = nbits/2; |
||||
+ unsigned int i; |
||||
+ int pqswitch; |
||||
+ gpg_err_code_t ec = GPG_ERR_NO_PRIME; |
||||
+ |
||||
+ if (nbits < 1024 || (nbits & 0x1FF)) |
||||
+ return GPG_ERR_INV_VALUE; |
||||
+ if (_gcry_enforced_fips_mode() && nbits != 2048 && nbits != 3072) |
||||
+ return GPG_ERR_INV_VALUE; |
||||
+ |
||||
+ /* The random quality depends on the transient_key flag. */ |
||||
+ random_level = transient_key ? GCRY_STRONG_RANDOM : GCRY_VERY_STRONG_RANDOM; |
||||
+ |
||||
+ if (testparms) |
||||
+ { |
||||
+ /* Parameters to derive the key are given. */ |
||||
+ /* Note that we explicitly need to setup the values of tbl |
||||
+ because some compilers (e.g. OpenWatcom, IRIX) don't allow |
||||
+ to initialize a structure with automatic variables. */ |
||||
+ struct { const char *name; gcry_mpi_t *value; } tbl[] = { |
||||
+ { "e" }, |
||||
+ { "p" }, |
||||
+ { "q" }, |
||||
+ { NULL } |
||||
+ }; |
||||
+ int idx; |
||||
+ gcry_sexp_t oneparm; |
||||
+ |
||||
+ tbl[0].value = &e; |
||||
+ tbl[1].value = &p; |
||||
+ tbl[2].value = &q; |
||||
+ |
||||
+ for (idx=0; tbl[idx].name; idx++) |
||||
+ { |
||||
+ oneparm = gcry_sexp_find_token (testparms, tbl[idx].name, 0); |
||||
+ if (oneparm) |
||||
+ { |
||||
+ *tbl[idx].value = gcry_sexp_nth_mpi (oneparm, 1, |
||||
+ GCRYMPI_FMT_USG); |
||||
+ gcry_sexp_release (oneparm); |
||||
+ } |
||||
+ } |
||||
+ for (idx=0; tbl[idx].name; idx++) |
||||
+ if (!*tbl[idx].value) |
||||
+ break; |
||||
+ if (tbl[idx].name) |
||||
+ { |
||||
+ /* At least one parameter is missing. */ |
||||
+ for (idx=0; tbl[idx].name; idx++) |
||||
+ gcry_mpi_release (*tbl[idx].value); |
||||
+ return GPG_ERR_MISSING_VALUE; |
||||
+ } |
||||
+ } |
||||
+ else |
||||
+ { |
||||
+ if (use_e < 65537) |
||||
+ use_e = 65537; /* This is the smallest value allowed by FIPS */ |
||||
+ |
||||
+ e = mpi_alloc( (32+BITS_PER_MPI_LIMB-1)/BITS_PER_MPI_LIMB ); |
||||
+ |
||||
+ use_e |= 1; /* make sure this is odd */ |
||||
+ mpi_set_ui (e, use_e); |
||||
+ |
||||
+ p = gcry_mpi_snew (pbits); |
||||
+ q = gcry_mpi_snew (pbits); |
||||
+ } |
||||
+ |
||||
+ n = gcry_mpi_new (nbits); |
||||
+ d = gcry_mpi_snew (nbits); |
||||
+ u = gcry_mpi_snew (nbits); |
||||
+ |
||||
+ /* prepare approximate minimum p and q */ |
||||
+ minp = gcry_mpi_new (pbits); |
||||
+ mpi_set_ui (minp, 0xB504F334); |
||||
+ gcry_mpi_lshift (minp, minp, pbits - 32); |
||||
+ |
||||
+ /* prepare minimum p and q difference */ |
||||
+ diff = gcry_mpi_new (pbits); |
||||
+ mindiff = gcry_mpi_new (pbits - 99); |
||||
+ mpi_set_ui (mindiff, 1); |
||||
+ gcry_mpi_lshift (mindiff, mindiff, pbits - 100); |
||||
+ |
||||
+ p1 = gcry_mpi_snew (pbits); |
||||
+ q1 = gcry_mpi_snew (pbits); |
||||
+ g = gcry_mpi_snew (pbits); |
||||
+ |
||||
+retry: |
||||
+ /* generate p and q */ |
||||
+ for (i = 0; i < 5 * pbits; i++) |
||||
+ { |
||||
+ ploop: |
||||
+ if (!testparms) |
||||
+ { |
||||
+ gcry_mpi_randomize (p, pbits, random_level); |
||||
+ } |
||||
+ if (mpi_cmp (p, minp) < 0) |
||||
+ { |
||||
+ if (testparms) goto err; |
||||
+ goto ploop; |
||||
+ } |
||||
+ |
||||
+ mpi_sub_ui (p1, p, 1); |
||||
+ if (gcry_mpi_gcd (g, p1, e)) |
||||
+ { |
||||
+ if (_gcry_fips186_4_prime_check (p, pbits) != GPG_ERR_NO_ERROR) |
||||
+ { |
||||
+ /* not a prime */ |
||||
+ if (testparms) goto err; |
||||
+ } |
||||
+ else |
||||
+ break; |
||||
+ } |
||||
+ else if (testparms) goto err; |
||||
+ } |
||||
+ if (i >= 5 * pbits) |
||||
+ goto err; |
||||
+ |
||||
+ for (i = 0; i < 5 * pbits; i++) |
||||
+ { |
||||
+ qloop: |
||||
+ if (!testparms) |
||||
+ { |
||||
+ gcry_mpi_randomize (q, pbits, random_level); |
||||
+ } |
||||
+ if (mpi_cmp (q, minp) < 0) |
||||
+ { |
||||
+ if (testparms) goto err; |
||||
+ goto qloop; |
||||
+ } |
||||
+ if (mpi_cmp (p, q) > 0) |
||||
+ { |
||||
+ pqswitch = 1; |
||||
+ mpi_sub (diff, p, q); |
||||
+ } |
||||
+ else |
||||
+ { |
||||
+ pqswitch = 0; |
||||
+ mpi_sub (diff, q, p); |
||||
+ } |
||||
+ if (mpi_cmp (diff, mindiff) < 0) |
||||
+ { |
||||
+ if (testparms) goto err; |
||||
+ goto qloop; |
||||
+ } |
||||
+ |
||||
+ mpi_sub_ui (q1, q, 1); |
||||
+ if (gcry_mpi_gcd (g, q1, e)) |
||||
+ { |
||||
+ if (_gcry_fips186_4_prime_check (q, pbits) != GPG_ERR_NO_ERROR) |
||||
+ { |
||||
+ /* not a prime */ |
||||
+ if (testparms) goto err; |
||||
+ } |
||||
+ else |
||||
+ break; |
||||
+ } |
||||
+ else if (testparms) goto err; |
||||
+ } |
||||
+ if (i >= 5 * pbits) |
||||
+ goto err; |
||||
+ |
||||
+ if (testparms) |
||||
+ { |
||||
+ mpi_clear (p); |
||||
+ mpi_clear (q); |
||||
+ } |
||||
+ else |
||||
+ { |
||||
+ gcry_mpi_t f; |
||||
+ |
||||
+ if (pqswitch) |
||||
+ { |
||||
+ gcry_mpi_t tmp; |
||||
+ |
||||
+ tmp = p; |
||||
+ p = q; |
||||
+ q = tmp; |
||||
+ } |
||||
+ |
||||
+ f = gcry_mpi_snew (nbits); |
||||
+ |
||||
+ /* calculate the modulus */ |
||||
+ mpi_mul(n, p, q); |
||||
+ |
||||
+ /* calculate the secret key d = e^1 mod phi */ |
||||
+ gcry_mpi_gcd (g, p1, q1); |
||||
+ mpi_fdiv_q (f, p1, g); |
||||
+ mpi_mul (f, f, q1); |
||||
+ |
||||
+ mpi_invm (d, e, f); |
||||
+ |
||||
+ gcry_mpi_release (f); |
||||
+ |
||||
+ if (mpi_get_nbits (d) < pbits) goto retry; |
||||
+ |
||||
+ /* calculate the inverse of p and q (used for chinese remainder theorem)*/ |
||||
+ mpi_invm(u, p, q ); |
||||
+ } |
||||
+ |
||||
+ ec = 0; |
||||
+ |
||||
+ if( DBG_CIPHER ) |
||||
+ { |
||||
+ log_mpidump(" p= ", p ); |
||||
+ log_mpidump(" q= ", q ); |
||||
+ log_mpidump(" n= ", n ); |
||||
+ log_mpidump(" e= ", e ); |
||||
+ log_mpidump(" d= ", d ); |
||||
+ log_mpidump(" u= ", u ); |
||||
+ } |
||||
+ |
||||
+err: |
||||
+ |
||||
+ gcry_mpi_release (p1); |
||||
+ gcry_mpi_release (q1); |
||||
+ gcry_mpi_release (g); |
||||
+ gcry_mpi_release (minp); |
||||
+ gcry_mpi_release (mindiff); |
||||
+ gcry_mpi_release (diff); |
||||
+ |
||||
+ sk->n = n; |
||||
+ sk->e = e; |
||||
+ sk->p = p; |
||||
+ sk->q = q; |
||||
+ sk->d = d; |
||||
+ sk->u = u; |
||||
+ |
||||
+ /* Now we can test our keys. */ |
||||
+ if (ec || (!testparms && test_keys (sk, nbits - 64))) |
||||
+ { |
||||
+ gcry_mpi_release (sk->n); sk->n = NULL; |
||||
+ gcry_mpi_release (sk->e); sk->e = NULL; |
||||
+ gcry_mpi_release (sk->p); sk->p = NULL; |
||||
+ gcry_mpi_release (sk->q); sk->q = NULL; |
||||
+ gcry_mpi_release (sk->d); sk->d = NULL; |
||||
+ gcry_mpi_release (sk->u); sk->u = NULL; |
||||
+ if (!ec) |
||||
+ { |
||||
+ fips_signal_error ("self-test after key generation failed"); |
||||
+ return GPG_ERR_SELFTEST_FAILED; |
||||
+ } |
||||
+ } |
||||
+ |
||||
+ return ec; |
||||
+} |
||||
+ |
||||
+ |
||||
/* Helper for generate_x931. */ |
||||
static gcry_mpi_t |
||||
gen_x931_parm_xp (unsigned int nbits) |
||||
@@ -812,7 +1085,7 @@ rsa_generate_ext (int algo, unsigned int |
||||
} |
||||
} |
||||
|
||||
- if (deriveparms || use_x931 || fips_mode ()) |
||||
+ if (deriveparms || use_x931) |
||||
{ |
||||
int swapped; |
||||
ec = generate_x931 (&sk, nbits, evalue, deriveparms, &swapped); |
||||
@@ -841,8 +1114,14 @@ rsa_generate_ext (int algo, unsigned int |
||||
transient_key = 1; |
||||
gcry_sexp_release (l1); |
||||
} |
||||
+ deriveparms = (genparms? |
||||
+ gcry_sexp_find_token (genparms, "test-parms", 0) : NULL); |
||||
/* Generate. */ |
||||
- ec = generate_std (&sk, nbits, evalue, transient_key); |
||||
+ if (deriveparms || fips_mode()) |
||||
+ ec = generate_fips (&sk, nbits, evalue, deriveparms, transient_key); |
||||
+ else |
||||
+ ec = generate_std (&sk, nbits, evalue, transient_key); |
||||
+ gcry_sexp_release (deriveparms); |
||||
} |
||||
|
||||
if (!ec) |
||||
diff -up libgcrypt-1.5.3/src/g10lib.h.fips-keygen libgcrypt-1.5.3/src/g10lib.h |
||||
--- libgcrypt-1.5.3/src/g10lib.h.fips-keygen 2013-07-25 11:10:04.000000000 +0200 |
||||
+++ libgcrypt-1.5.3/src/g10lib.h 2014-10-21 15:05:59.459190556 +0200 |
||||
@@ -195,6 +195,9 @@ gpg_err_code_t _gcry_generate_fips186_3_ |
||||
int *r_counter, |
||||
void **r_seed, size_t *r_seedlen, int *r_hashalgo); |
||||
|
||||
+gpg_err_code_t _gcry_fips186_4_prime_check |
||||
+ (const gcry_mpi_t x, unsigned int bits); |
||||
+ |
||||
|
||||
/* Replacements of missing functions (missing-string.c). */ |
||||
#ifndef HAVE_STPCPY |
||||
diff -up libgcrypt-1.5.3/tests/keygen.c.fips-keygen libgcrypt-1.5.3/tests/keygen.c |
||||
--- libgcrypt-1.5.3/tests/keygen.c.fips-keygen 2014-10-21 15:05:59.424189766 +0200 |
||||
+++ libgcrypt-1.5.3/tests/keygen.c 2014-10-21 15:05:59.459190556 +0200 |
||||
@@ -190,12 +190,12 @@ check_rsa_keys (void) |
||||
|
||||
|
||||
if (verbose) |
||||
- fprintf (stderr, "creating 1024 bit RSA key with e=257\n"); |
||||
+ fprintf (stderr, "creating 1024 bit RSA key with e=65539\n"); |
||||
rc = gcry_sexp_new (&keyparm, |
||||
"(genkey\n" |
||||
" (rsa\n" |
||||
" (nbits 4:1024)\n" |
||||
- " (rsa-use-e 3:257)\n" |
||||
+ " (rsa-use-e 5:65539)\n" |
||||
" ))", 0, 1); |
||||
if (rc) |
||||
die ("error creating S-expression: %s\n", gpg_strerror (rc)); |
||||
@@ -204,7 +204,7 @@ check_rsa_keys (void) |
||||
if (rc) |
||||
die ("error generating RSA key: %s\n", gpg_strerror (rc)); |
||||
|
||||
- check_generated_rsa_key (key, 257); |
||||
+ check_generated_rsa_key (key, 65539); |
||||
gcry_sexp_release (key); |
||||
|
||||
if (verbose) |
@ -0,0 +1,38 @@
@@ -0,0 +1,38 @@
|
||||
diff -up libgcrypt-1.5.3/random/random-csprng.c.urandom-only libgcrypt-1.5.3/random/random-csprng.c |
||||
--- libgcrypt-1.5.3/random/random-csprng.c.urandom-only 2013-07-25 11:10:04.000000000 +0200 |
||||
+++ libgcrypt-1.5.3/random/random-csprng.c 2015-04-10 10:31:39.797534903 +0200 |
||||
@@ -855,7 +855,7 @@ _gcry_rngcsprng_update_seed_file (void) |
||||
if ( !allow_seed_file_update ) |
||||
{ |
||||
unlock_pool (); |
||||
- log_info(_("note: random_seed file not updated\n")); |
||||
+ /* log_info(_("note: random_seed file not updated\n")); */ |
||||
return; |
||||
} |
||||
|
||||
@@ -1120,8 +1120,7 @@ getfnc_gather_random (void))(void (*)(co |
||||
enum random_origins, size_t, int); |
||||
|
||||
#if USE_RNDLINUX |
||||
- if ( !access (NAME_OF_DEV_RANDOM, R_OK) |
||||
- && !access (NAME_OF_DEV_URANDOM, R_OK)) |
||||
+ if (!access (NAME_OF_DEV_URANDOM, R_OK)) |
||||
{ |
||||
fnc = _gcry_rndlinux_gather_random; |
||||
return fnc; |
||||
diff -up libgcrypt-1.5.3/random/rndlinux.c.urandom-only libgcrypt-1.5.3/random/rndlinux.c |
||||
--- libgcrypt-1.5.3/random/rndlinux.c.urandom-only 2014-12-12 16:51:56.000000000 +0100 |
||||
+++ libgcrypt-1.5.3/random/rndlinux.c 2015-04-10 10:34:13.615111926 +0200 |
||||
@@ -132,7 +132,11 @@ _gcry_rndlinux_gather_random (void (*add |
||||
if (level >= 2) |
||||
{ |
||||
if( fd_random == -1 ) |
||||
- fd_random = open_device ( NAME_OF_DEV_RANDOM, 1 ); |
||||
+ /* We try to open /dev/random first but in case the open fails |
||||
+ we gracefully retry with /dev/urandom. */ |
||||
+ fd_random = open_device ( NAME_OF_DEV_RANDOM, 0 ); |
||||
+ if (fd_random == -1) |
||||
+ fd_random = open_device ( NAME_OF_DEV_URANDOM, 1 ); |
||||
fd = fd_random; |
||||
} |
||||
else if (level != -1) |
@ -0,0 +1,499 @@
@@ -0,0 +1,499 @@
|
||||
Name: libgcrypt |
||||
Version: 1.5.3 |
||||
Release: 14%{?dist} |
||||
URL: http://www.gnupg.org/ |
||||
Source0: libgcrypt-%{version}-hobbled.tar.xz |
||||
# The original libgcrypt sources now contain potentially patented ECC |
||||
# cipher support. We have to remove it in the tarball we ship with |
||||
# the hobble-libgcrypt script. |
||||
#Source0: ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.bz2 |
||||
#Source1: ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.bz2.sig |
||||
Source2: wk@g10code.com |
||||
Source3: hobble-libgcrypt |
||||
# do not run the ecc curves test |
||||
Patch1: libgcrypt-1.5.0-noecc.patch |
||||
# make FIPS hmac compatible with fipscheck - non upstreamable |
||||
Patch2: libgcrypt-1.5.0-use-fipscheck.patch |
||||
# fix tests in the FIPS mode, fix the FIPS-186-3 DSA keygen |
||||
Patch5: libgcrypt-1.5.0-tests.patch |
||||
# make the FIPS-186-3 DSA CAVS testable |
||||
Patch7: libgcrypt-1.5.3-fips-cavs.patch |
||||
# fix for memory leaks an other errors found by Coverity scan |
||||
Patch9: libgcrypt-1.5.0-leak.patch |
||||
# use poll instead of select when gathering randomness |
||||
Patch11: libgcrypt-1.5.1-use-poll.patch |
||||
# compile rijndael with -fno-strict-aliasing |
||||
Patch12: libgcrypt-1.5.2-aliasing.patch |
||||
# slight optimalization of mpicoder.c to silence Valgrind (#968288) |
||||
Patch13: libgcrypt-1.5.2-mpicoder-gccopt.patch |
||||
# pbkdf2 speedup - upstream |
||||
Patch15: libgcrypt-1.5.3-pbkdf-speedup.patch |
||||
# fix bug in whirlpool implementation (for backwards compatibility |
||||
# with files generated with buggy version set environment |
||||
# varible GCRYPT_WHIRLPOOL_BUG |
||||
Patch16: libgcrypt-1.5.3-whirlpool-bug.patch |
||||
# FIPS DRBG |
||||
Patch17: libgcrypt-1.5.3-drbg.patch |
||||
# Run the FIPS mode initialization in the shared library constructor |
||||
Patch18: libgcrypt-1.5.3-fips-ctor.patch |
||||
# Make it possible to run the test suite in the FIPS mode |
||||
Patch19: libgcrypt-1.5.3-fips-test.patch |
||||
# Make the FIPS RSA keygen to be FIPS 186-4 compliant |
||||
Patch20: libgcrypt-1.5.3-rsa-fips-keygen.patch |
||||
# add configurable source of RNG seed and seed by default |
||||
# from /dev/urandom in the FIPS mode |
||||
Patch21: libgcrypt-1.5.3-fips-cfgrandom.patch |
||||
# update the selftests for new FIPS requirements |
||||
Patch22: libgcrypt-1.5.3-fips-reqs.patch |
||||
# use only urandom if /dev/random cannot be opened |
||||
Patch24: libgcrypt-1.5.3-urandom-only.patch |
||||
# fix predictable PRNG output |
||||
Patch26: libgcrypt-1.5.3-rng-predictable.patch |
||||
# add drgb cavs test |
||||
Patch27: libgcrypt-1.5.3-drbg-cavs.patch |
||||
# allow reinitialization of ath in the FIPS mode |
||||
Patch28: libgcrypt-1.5.3-ath-reinstall.patch |
||||
# allow auto-initialization of drbg |
||||
Patch29: libgcrypt-1.5.3-drbg-init.patch |
||||
|
||||
%define gcrylibdir %{_libdir} |
||||
|
||||
# Technically LGPLv2.1+, but Fedora's table doesn't draw a distinction. |
||||
# Documentation and some utilities are GPLv2+ licensed. These files |
||||
# are in the devel subpackage. |
||||
License: LGPLv2+ |
||||
Summary: A general-purpose cryptography library |
||||
BuildRequires: gawk, libgpg-error-devel >= 1.4, pkgconfig |
||||
BuildRequires: fipscheck |
||||
# This is needed only when patching the .texi doc. |
||||
BuildRequires: texinfo |
||||
Group: System Environment/Libraries |
||||
|
||||
%package devel |
||||
Summary: Development files for the %{name} package |
||||
License: LGPLv2+ and GPLv2+ |
||||
Group: Development/Libraries |
||||
Requires(pre): /sbin/install-info |
||||
Requires(post): /sbin/install-info |
||||
Requires: libgpg-error-devel |
||||
Requires: %{name} = %{version}-%{release} |
||||
|
||||
%description |
||||
Libgcrypt is a general purpose crypto library based on the code used |
||||
in GNU Privacy Guard. This is a development version. |
||||
|
||||
%description devel |
||||
Libgcrypt is a general purpose crypto library based on the code used |
||||
in GNU Privacy Guard. This package contains files needed to develop |
||||
applications using libgcrypt. |
||||
|
||||
%prep |
||||
%setup -q |
||||
%{SOURCE3} |
||||
%patch1 -p1 -b .noecc |
||||
%patch2 -p1 -b .use-fipscheck |
||||
%patch5 -p1 -b .tests |
||||
%patch7 -p1 -b .cavs |
||||
%patch9 -p1 -b .leak |
||||
%patch11 -p1 -b .use-poll |
||||
%patch12 -p1 -b .aliasing |
||||
%patch13 -p1 -b .gccopt |
||||
%patch15 -p1 -b .pbkdf-speedup |
||||
%patch16 -p1 -b .whirlpool-bug |
||||
%patch17 -p1 -b .drbg |
||||
%patch18 -p1 -b .fips-ctor |
||||
%patch19 -p1 -b .fips-test |
||||
%patch20 -p1 -b .fips-keygen |
||||
%patch21 -p1 -b .cfgrandom |
||||
%patch22 -p1 -b .fips-reqs |
||||
%patch24 -p1 -b .urandom-only |
||||
%patch26 -p1 -b .rng-predictable |
||||
%patch27 -p1 -b .drbg-cavs |
||||
%patch28 -p1 -b .ath-reinstall |
||||
%patch29 -p1 -b .drbg-init |
||||
|
||||
%build |
||||
%configure --disable-static \ |
||||
%ifarch sparc64 |
||||
--disable-asm \ |
||||
%endif |
||||
--enable-noexecstack \ |
||||
--enable-hmac-binary-check \ |
||||
--enable-pubkey-ciphers='dsa elgamal rsa' \ |
||||
--disable-O-flag-munging |
||||
make %{?_smp_mflags} |
||||
|
||||
%check |
||||
fipshmac src/.libs/libgcrypt.so.?? |
||||
make check |
||||
|
||||
# Add generation of HMAC checksums of the final stripped binaries |
||||
%define __spec_install_post \ |
||||
%{?__debug_package:%{__debug_install_post}} \ |
||||
%{__arch_install_post} \ |
||||
%{__os_install_post} \ |
||||
fipshmac $RPM_BUILD_ROOT%{gcrylibdir}/*.so.?? \ |
||||
%{nil} |
||||
|
||||
%install |
||||
make install DESTDIR=$RPM_BUILD_ROOT |
||||
|
||||
# Change /usr/lib64 back to /usr/lib. This saves us from having to patch the |
||||
# script to "know" that -L/usr/lib64 should be suppressed, and also removes |
||||
# a file conflict between 32- and 64-bit versions of this package. |
||||
# Also replace my_host with none. |
||||
sed -i -e 's,^libdir="/usr/lib.*"$,libdir="/usr/lib",g' $RPM_BUILD_ROOT/%{_bindir}/libgcrypt-config |
||||
sed -i -e 's,^my_host=".*"$,my_host="none",g' $RPM_BUILD_ROOT/%{_bindir}/libgcrypt-config |
||||
|
||||
rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir ${RPM_BUILD_ROOT}/%{_libdir}/*.la |
||||
/sbin/ldconfig -n $RPM_BUILD_ROOT/%{_libdir} |
||||
|
||||
%if "%{gcrylibdir}" != "%{_libdir}" |
||||
# Relocate the shared libraries to %{gcrylibdir}. |
||||
mkdir -p $RPM_BUILD_ROOT%{gcrylibdir} |
||||
for shlib in $RPM_BUILD_ROOT%{_libdir}/*.so* ; do |
||||
if test -L "$shlib" ; then |
||||
rm "$shlib" |
||||
else |
||||
mv "$shlib" $RPM_BUILD_ROOT%{gcrylibdir}/ |
||||
fi |
||||
done |
||||
|
||||
# Overwrite development symlinks. |
||||
pushd $RPM_BUILD_ROOT/%{_libdir} |
||||
for shlib in %{gcrylibdir}/lib*.so.* ; do |
||||
shlib=`echo "$shlib" | sed -e 's,//,/,g'` |
||||
target=`basename "$shlib" | sed -e 's,\.so.*,,g'`.so |
||||
ln -sf $shlib $target |
||||
done |
||||
popd |
||||
|
||||
# Add soname symlink. |
||||
/sbin/ldconfig -n $RPM_BUILD_ROOT/%{_lib}/ |
||||
%endif |
||||
|
||||
|
||||
# Create /etc/gcrypt (hardwired, not dependent on the configure invocation) so |
||||
# that _someone_ owns it. |
||||
mkdir -p -m 755 $RPM_BUILD_ROOT/etc/gcrypt |
||||
|
||||
%post -p /sbin/ldconfig |
||||
|
||||
%postun -p /sbin/ldconfig |
||||
|
||||
%post devel |
||||
[ -f %{_infodir}/gcrypt.info.gz ] && \ |
||||
/sbin/install-info %{_infodir}/gcrypt.info.gz %{_infodir}/dir |
||||
exit 0 |
||||
|
||||
%preun devel |
||||
if [ $1 = 0 -a -f %{_infodir}/gcrypt.info.gz ]; then |
||||
/sbin/install-info --delete %{_infodir}/gcrypt.info.gz %{_infodir}/dir |
||||
fi |
||||
exit 0 |
||||
|
||||
%files |
||||
%defattr(-,root,root,-) |
||||
%dir /etc/gcrypt |
||||
%{gcrylibdir}/libgcrypt.so.* |
||||
%{gcrylibdir}/.libgcrypt.so.*.hmac |
||||
%doc COPYING.LIB AUTHORS NEWS THANKS |
||||
|
||||
%files devel |
||||
%defattr(-,root,root,-) |
||||
%{_bindir}/%{name}-config |
||||
%{_bindir}/dumpsexp |
||||
%{_bindir}/hmac256 |
||||
%{_includedir}/* |
||||
%{_libdir}/*.so |
||||
%{_datadir}/aclocal/* |
||||
|
||||
%{_infodir}/gcrypt.info* |
||||
%doc COPYING |
||||
|
||||
%changelog |
||||
* Tue Feb 28 2017 Tomáš Mráz <tmraz@redhat.com> 1.5.3-14 |
||||
- add DRBG CAVS driver and other necessary CAVS driver updates (#1172568) |
||||
- allow ath reinitialization in FIPS mode |
||||
- allow for auto-initialization of DRBG |
||||
|
||||
* Tue Oct 25 2016 Tomáš Mráz <tmraz@redhat.com> 1.5.3-13.1 |
||||
- fix CVE-2016-6313 - predictable PRNG output (#1366105) |
||||
|
||||
* Fri Apr 10 2015 Tomáš Mráz <tmraz@redhat.com> 1.5.3-13 |
||||
- touch only urandom in the selftest and when /dev/random is |
||||
unavailable for example by SELinux confinement |
||||
- fix the RSA selftest key (p q swap) |
||||
|
||||
* Wed Jan 14 2015 Tomáš Mráz <tmraz@redhat.com> 1.5.3-12 |
||||
- use macros instead of inline functions in the public header |
||||
|
||||
* Fri Dec 12 2014 Tomáš Mráz <tmraz@redhat.com> 1.5.3-11 |
||||
- do not initialize secure memory during the selftest |
||||
|
||||
* Fri Nov 14 2014 Tomáš Mráz <tmraz@redhat.com> 1.5.3-10 |
||||
- update the selftests for the new FIPS requirements |
||||
|
||||
* Fri Oct 31 2014 Tomáš Mráz <tmraz@redhat.com> 1.5.3-9 |
||||
- apply the fips-cfgrandom change also to the drbg seeding |
||||
|
||||
* Tue Oct 21 2014 Tomáš Mráz <tmraz@redhat.com> 1.5.3-7 |
||||
- make the RSA keygen to be compliant to FIPS 186-4 in |
||||
FIPS mode |
||||
|
||||
* Fri Sep 26 2014 Tomáš Mráz <tmraz@redhat.com> 1.5.3-5 |
||||
- add FIPS DRBG implementation |
||||
- run the FIPS POST tests in shared library constructor |
||||
- make it possible to run the test suite in the FIPS mode |
||||
|
||||
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.5.3-4 |
||||
- Mass rebuild 2014-01-24 |
||||
|
||||
* Tue Jan 21 2014 Tomáš Mráz <tmraz@redhat.com> 1.5.3-3 |
||||
- fix a bug in the Whirlpool hash implementation |
||||
- speed up the PBKDF2 computation |
||||
|
||||
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.5.3-2 |
||||
- Mass rebuild 2013-12-27 |
||||
|
||||
* Fri Jul 26 2013 Tomáš Mráz <tmraz@redhat.com> 1.5.3-1 |
||||
- new upstream version fixing cache side-channel attack on RSA private keys |
||||
|
||||
* Thu Jun 20 2013 Tomáš Mráz <tmraz@redhat.com> 1.5.2-3 |
||||
- silence false error detected by valgrind (#968288) |
||||
|
||||
* Thu Apr 25 2013 Tomáš Mráz <tmraz@redhat.com> 1.5.2-2 |
||||
- silence strict aliasing warning in Rijndael |
||||
- apply UsrMove |
||||
- spec file cleanups |
||||
|
||||
* Fri Apr 19 2013 Tomáš Mráz <tmraz@redhat.com> 1.5.2-1 |
||||
- new upstream version |
||||
|
||||
* Wed Mar 20 2013 Tomas Mraz <tmraz@redhat.com> 1.5.1-1 |
||||
- new upstream version |
||||
|
||||
* Tue Mar 5 2013 Tomas Mraz <tmraz@redhat.com> 1.5.0-11 |
||||
- use poll() instead of select() when gathering randomness (#913773) |
||||
|
||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-10 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild |
||||
|
||||
* Thu Jan 3 2013 Tomas Mraz <tmraz@redhat.com> 1.5.0-9 |
||||
- allow empty passphrase in PBKDF2 needed for cryptsetup (=891266) |
||||
|
||||
* Mon Dec 3 2012 Tomas Mraz <tmraz@redhat.com> 1.5.0-8 |
||||
- fix multilib conflict in libgcrypt-config |
||||
- fix minor memory leaks and other bugs found by Coverity scan |
||||
|
||||
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-6 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild |
||||
|
||||
* Thu Apr 5 2012 Tomas Mraz <tmraz@redhat.com> 1.5.0-5 |
||||
- Correctly rebuild the info documentation |
||||
|
||||
* Wed Apr 4 2012 Tomas Mraz <tmraz@redhat.com> 1.5.0-4 |
||||
- Add GCRYCTL_SET_ENFORCED_FIPS_FLAG command |
||||
|
||||
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-3 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild |
||||
|
||||
* Mon Aug 15 2011 Kalev Lember <kalevlember@gmail.com> 1.5.0-2 |
||||
- Rebuilt for rpm bug #728707 |
||||
|
||||
* Thu Jul 21 2011 Tomas Mraz <tmraz@redhat.com> 1.5.0-1 |
||||
- new upstream version |
||||
|
||||
* Mon Jun 20 2011 Tomas Mraz <tmraz@redhat.com> 1.4.6-4 |
||||
- Always xor seed from /dev/urandom over /etc/gcrypt/rngseed |
||||
|
||||
* Mon May 30 2011 Tomas Mraz <tmraz@redhat.com> 1.4.6-3 |
||||
- Make the FIPS-186-3 DSA implementation CAVS testable |
||||
- add configurable source of RNG seed /etc/gcrypt/rngseed |
||||
in the FIPS mode (#700388) |
||||
|
||||
* Fri Feb 11 2011 Tomas Mraz <tmraz@redhat.com> 1.4.6-1 |
||||
- new upstream version with minor changes |
||||
|
||||
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.5-7 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild |
||||
|
||||
* Fri Feb 4 2011 Tomas Mraz <tmraz@redhat.com> 1.4.5-6 |
||||
- fix a bug in the fips-186-3 dsa parameter generation code |
||||
|
||||
* Tue Feb 1 2011 Tomas Mraz <tmraz@redhat.com> 1.4.5-5 |
||||
- use /dev/urandom for seeding in the FIPS mode |
||||
- make the tests to pass in the FIPS mode also fixing |
||||
the FIPS-186-3 DSA keygen |
||||
|
||||
* Sun Feb 14 2010 Rex Dieter <rdieter@fedoraproject.org> 1.4.5-4 |
||||
- FTBFS libgcrypt-1.4.5-3.fc13: ImplicitDSOLinking (#564973) |
||||
|
||||
* Wed Feb 3 2010 Tomas Mraz <tmraz@redhat.com> 1.4.5-3 |
||||
- drop the S390 build workaround as it is no longer needed |
||||
- additional spec file cleanups for merge review (#226008) |
||||
|
||||
* Mon Dec 21 2009 Tomas Mraz <tmraz@redhat.com> 1.4.5-1 |
||||
- workaround for build on S390 (#548825) |
||||
- spec file cleanups |
||||
- upgrade to new minor upstream release |
||||
|
||||
* Tue Aug 11 2009 Tomas Mraz <tmraz@redhat.com> 1.4.4-8 |
||||
- fix warning when installed with --excludedocs (#515961) |
||||
|
||||
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.4-7 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
||||
|
||||
* Thu Jun 18 2009 Tomas Mraz <tmraz@redhat.com> 1.4.4-6 |
||||
- and now really apply the padlock patch |
||||
|
||||
* Wed Jun 17 2009 Tomas Mraz <tmraz@redhat.com> 1.4.4-5 |
||||
- fix VIA padlock RNG inline assembly call (#505724) |
||||
|
||||
* Thu Mar 5 2009 Tomas Mraz <tmraz@redhat.com> 1.4.4-4 |
||||
- with the integrity verification check the library needs to link to libdl |
||||
(#488702) |
||||
|
||||
* Tue Mar 3 2009 Tomas Mraz <tmraz@redhat.com> 1.4.4-3 |
||||
- add hmac FIPS integrity verification check |
||||
|
||||
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.4-2 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
||||
|
||||
* Fri Jan 30 2009 Tomas Mraz <tmraz@redhat.com> 1.4.4-1 |
||||
- update to 1.4.4 |
||||
- do not abort when the fips mode kernel flag is inaccessible |
||||
due to permissions (#470219) |
||||
- hobble the library to drop the ECC support |
||||
|
||||
* Mon Oct 20 2008 Dennis Gilmore <dennis@ausil.us> 1.4.3-2 |
||||
- disable asm on sparc64 |
||||
|
||||
* Thu Sep 18 2008 Nalin Dahyabhai <nalin@redhat.com> 1.4.3-1 |
||||
- update to 1.4.3 |
||||
- own /etc/gcrypt |
||||
|
||||
* Mon Sep 15 2008 Nalin Dahyabhai <nalin@redhat.com> |
||||
- invoke make with %%{?_smp_mflags} to build faster on multi-processor |
||||
systems (Steve Grubb) |
||||
|
||||
* Mon Sep 8 2008 Nalin Dahyabhai <nalin@redhat.com> 1.4.2-1 |
||||
- update to 1.4.2 |
||||
|
||||
* Tue Apr 29 2008 Nalin Dahyabhai <nalin@redhat.com> 1.4.1-1 |
||||
- update to 1.4.1 |
||||
- bump libgpgerror-devel requirement to 1.4, matching the requirement enforced |
||||
by the configure script |
||||
|
||||
* Thu Apr 3 2008 Joe Orton <jorton@redhat.com> 1.4.0-3 |
||||
- add patch from upstream to fix severe performance regression |
||||
in entropy gathering |
||||
|
||||
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.4.0-2 |
||||
- Autorebuild for GCC 4.3 |
||||
|
||||
* Mon Dec 10 2007 Nalin Dahyabhai <nalin@redhat.com> - 1.4.0-1 |
||||
- update to 1.4.0 |
||||
|
||||
* Tue Oct 16 2007 Nalin Dahyabhai <nalin@redhat.com> - 1.2.4-6 |
||||
- use ldconfig to build the soname symlink for packaging along with the |
||||
shared library (#334731) |
||||
|
||||
* Wed Aug 22 2007 Nalin Dahyabhai <nalin@redhat.com> - 1.2.4-5 |
||||
- add missing gawk buildrequirement |
||||
- switch from explicitly specifying the /dev/random RNG to just verifying |
||||
that the non-LGPL ones were disabled by the configure script |
||||
|
||||
* Thu Aug 16 2007 Nalin Dahyabhai <nalin@redhat.com> - 1.2.4-4 |
||||
- clarify license |
||||
- force use of the linux /dev/random RNG, to avoid accidentally falling back |
||||
to others which would affect the license of the resulting library |
||||
|
||||
* Mon Jul 30 2007 Nalin Dahyabhai <nalin@redhat.com> - 1.2.4-3 |
||||
- disable static libraries (part of #249815) |
||||
|
||||
* Fri Jul 27 2007 Nalin Dahyabhai <nalin@redhat.com> - 1.2.4-2 |
||||
- move libgcrypt shared library to /%%{_lib} (#249815) |
||||
|
||||
* Tue Feb 6 2007 Nalin Dahyabhai <nalin@redhat.com> - 1.2.4-1 |
||||
- update to 1.2.4 |
||||
|
||||
* Mon Jan 22 2007 Nalin Dahyabhai <nalin@redhat.com> - 1.2.3-2 |
||||
- make use of install-info more failsafe (Ville Skyttä, #223705) |
||||
|
||||
* Fri Sep 1 2006 Nalin Dahyabhai <nalin@redhat.com> - 1.2.3-1 |
||||
- update to 1.2.3 |
||||
|
||||
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.2.2-3.1 |
||||
- rebuild |
||||
|
||||
* Mon Jun 05 2006 Jesse Keating <jkeating@redhat.com> 1.2.2-3 |
||||
- Added missing buildreq pkgconfig |
||||
|
||||
* Tue May 16 2006 Nalin Dahyabhai <nalin@redhat.com> 1.2.2-2 |
||||
- remove file conflicts in libgcrypt-config by making the 64-bit version |
||||
think the libraries are in /usr/lib (which is wrong, but which it also |
||||
prunes from the suggest --libs output, so no harm done, hopefully) |
||||
|
||||
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.2.2-1.2.1 |
||||
- bump again for double-long bug on ppc(64) |
||||
|
||||
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.2.2-1.2 |
||||
- rebuilt for new gcc4.1 snapshot and glibc changes |
||||
|
||||
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com> |
||||
- rebuilt |
||||
|
||||
* Wed Oct 5 2005 Nalin Dahyabhai <nalin@redhat.com> 1.2.2-1 |
||||
- update to 1.2.2 |
||||
|
||||
* Wed Mar 16 2005 Nalin Dahyabhai <nalin@redhat.com> 1.2.1-1 |
||||
- update to 1.2.1 |
||||
|
||||
* Fri Jul 30 2004 Florian La Roche <Florian.LaRoche@redhat.de> |
||||
- another try to package the symlink |
||||
|
||||
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com> |
||||
- rebuilt |
||||
|
||||
* Sun May 2 2004 Bill Nottingham <notting@redhat.com> - 1.2.0-1 |
||||
- update to official 1.2.0 |
||||
|
||||
* Fri Apr 16 2004 Bill Nottingham <notting@redhat.com> - 1.1.94-1 |
||||
- update to 1.1.94 |
||||
|
||||
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com> |
||||
- rebuilt |
||||
|
||||
* Sat Feb 21 2004 Florian La Roche <Florian.LaRoche@redhat.de> |
||||
- add symlinks to shared libs at compile time |
||||
|
||||
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com> |
||||
- rebuilt |
||||
|
||||
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com> |
||||
- rebuilt |
||||
|
||||
* Thu Mar 20 2003 Jeff Johnson <jbj@redhat.com> 1.1.12-1 |
||||
- upgrade to 1.1.12 (beta). |
||||
|
||||
* Fri Jun 21 2002 Tim Powers <timp@redhat.com> |
||||
- automated rebuild |
||||
|
||||
* Sun May 26 2002 Tim Powers <timp@redhat.com> |
||||
- automated rebuild |
||||
|
||||
* Tue May 21 2002 Jeff Johnson <jbj@redhat.com> |
||||
- update to 1.1.7 |
||||
- change license to LGPL. |
||||
- include splint annotations patch. |
||||
- install info pages. |
||||
|
||||
* Tue Apr 2 2002 Nalin Dahyabhai <nalin@redhat.com> 1.1.6-1 |
||||
- update to 1.1.6 |
||||
|
||||
* Thu Jan 10 2002 Nalin Dahyabhai <nalin@redhat.com> 1.1.5-1 |
||||
- fix the Source tag so that it's a real URL |
||||
|
||||
* Thu Dec 20 2001 Nalin Dahyabhai <nalin@redhat.com> |
||||
- initial package |
Loading…
Reference in new issue