Commit graph

5341 commits

Author SHA1 Message Date
Andy Polyakov
cd2693862b PA-RISC assembler pack: switch to bve in 64-bit builds.
PR: 3074
(cherry picked from commit 02450ec69d)
2013-06-30 23:15:53 +02:00
Dr. Stephen Henson
cdb6c48445 Don't use RC2 with PKCS#12 files in FIPS mode. 2013-05-30 21:39:50 +01:00
Dr. Stephen Henson
04b727b4dd Fix PSS signature printing.
Fix PSS signature printing: consistently use 0x prefix for hex values for
padding length and trailer fields.
(cherry picked from commit deb24ad53147f5a8dd63416224a5edd7bbc0e74a)
2013-05-05 14:03:30 +01:00
Dr. Stephen Henson
cbd93a0636 Reencode with X509_CRL_ctx_sign too.
(cherry picked from commit 96940f4f2d0300c033379a87db0ff19e598c6264)
2013-05-03 13:06:18 +01:00
Dr. Stephen Henson
b9e84f007f Reencode certificates in X509_sign_ctx.
Reencode certificates in X509_sign_ctx as well as X509_sign.

This was causing a problem in the x509 application when it modified an
existing certificate.
(cherry picked from commit c6d8adb8a4)
2013-05-02 12:24:56 +01:00
Andy Polyakov
29a546720b crypto/modes/modes_lcl.h: let STRICT_ALIGNMENT be on ARMv7.
While ARMv7 in general is capable of unaligned access, not all instructions
actually are. And trouble is that compiler doesn't seem to differentiate
those capable and incapable of unaligned access. Side effect is that kernel
goes into endless loop retrying same instruction triggering unaligned trap.
Problem was observed in xts128.c and ccm128.c modules. It's possible to
resolve it by using (volatile u32*) casts, but letting STRICT_ALIGNMENT
be feels more appropriate.
(cherry picked from commit 3bdd80521a)
2013-04-13 21:19:31 +02:00
Dr. Stephen Henson
79dabcc137 Typo.
(cherry picked from commit 0ded2a0689)
2013-03-31 17:43:58 +01:00
Matt Caswell
03e1b3a153 Make binary curve ASN.1 work in FIPS mode.
Don't check for binary curves by checking methods: the values will
be different in FIPS mode as they are redirected to the validated module
version.
(cherry picked from commit 94782e0e9c)
2013-03-26 16:58:40 +00:00
Andy Polyakov
96b680f210 x86cpuid.pl: make it work with older CPUs.
PR: 3005
(cherry picked from commit 5702e965d7)
2013-03-18 19:50:23 +01:00
Andy Polyakov
9ab3ce1246 e_aes_cbc_hmac_sha1.c: fix rare bad record mac on AES-NI plaforms.
PR: 3002
(cherry picked from commit 5c60046553)
2013-03-18 19:35:48 +01:00
Dr. Stephen Henson
85615e33e5 Encode INTEGER correctly.
If an ASN1_INTEGER structure is allocated but not explicitly set encode
it as zero: don't generate an invalid zero length INTEGER.
(cherry picked from commit 1643edc63c)
2013-03-18 14:21:56 +00:00
Andy Polyakov
bca0d7fdb5 x86_64-gf2m.pl: fix typo.
(cherry picked from commit 342dbbbe4e)
2013-03-01 22:38:11 +01:00
Andy Polyakov
bc4ae2cb0b x86_64-gf2m.pl: add missing Windows build fix for #2963.
PR: 3004
(cherry picked from commit 7c43601d44)
2013-03-01 21:58:08 +01:00
Andy Polyakov
ef4b9f001a bn_nist.c: cumulative update from master.
PR: 2981, 2837
2013-02-16 11:40:35 +01:00
Dr. Stephen Henson
3151e328e0 prepare for next version 2013-02-11 16:14:11 +00:00
Dr. Stephen Henson
f66db68e1f prepare for release 2013-02-11 11:57:46 +00:00
Andy Polyakov
1113fc31ba sparccpuid.S: work around emulator bug on T1.
(cherry picked from commit 3caeef94bd)
2013-02-11 10:41:57 +01:00
Andy Polyakov
13e225300f e_aes_cbc_hmac_sha1.c: fine-tune cache line alignment.
With previous commit it also ensures that valgrind is happy.
2013-02-08 09:45:09 +01:00
Andy Polyakov
746c6f3a53 e_aes_cbc_hmac_sha1.c: align calculated MAC at cache line. 2013-02-07 23:04:31 +01:00
Dr. Stephen Henson
41cf07f0ec prepare for next version 2013-02-06 02:26:24 +00:00
Dr. Stephen Henson
f9f6a8f96c Prepare for release. 2013-02-04 22:40:10 +00:00
Dr. Stephen Henson
0d589ac150 make update 2013-02-04 21:29:41 +00:00
Andy Polyakov
529d27ea47 e_aes_cbc_hmac_sha1.c: cleanse temporary copy of HMAC secret. 2013-02-03 20:04:39 +01:00
Andy Polyakov
b2226c6c83 bn_word.c: fix overflow bug in BN_add_word.
(cherry picked from commit 134c00659a)
2013-02-02 22:39:00 +01:00
Andy Polyakov
024de2174b x86_64 assembly pack: keep making Windows build more robust.
PR: 2963 and a number of others
(cherry picked from commit 4568182a8b)
2013-02-02 22:26:20 +01:00
Andy Polyakov
125093b59f e_aes_cbc_hmac_sha1.c: address the CBC decrypt timing issues.
Address CBC decrypt timing issues and reenable the AESNI+SHA1 stitch.
2013-02-02 19:35:09 +01:00
Dr. Stephen Henson
62e4506a7d Don't try and verify signatures if key is NULL (CVE-2013-0166)
Add additional check to catch this in ASN1_item_verify too.
2013-01-29 16:49:24 +00:00
Ben Laurie
e130841bcc Make CBC decoding constant time.
This patch makes the decoding of SSLv3 and TLS CBC records constant
time. Without this, a timing side-channel can be used to build a padding
oracle and mount Vaudenay's attack.

This patch also disables the stitched AESNI+SHA mode pending a similar
fix to that code.

In order to be easy to backport, this change is implemented in ssl/,
rather than as a generic AEAD mode. In the future this should be changed
around so that HMAC isn't in ssl/, but crypto/ as FIPS expects.
2013-01-28 17:31:49 +00:00
Ben Laurie
2ee798880a Add and use a constant-time memcmp.
This change adds CRYPTO_memcmp, which compares two vectors of bytes in
an amount of time that's independent of their contents. It also changes
several MAC compares in the code to use this over the standard memcmp,
which may leak information about the size of a matching prefix.
2013-01-28 17:30:38 +00:00
Dr. Stephen Henson
ffcf4c6164 Don't include comp.h in cmd_cd.c if OPENSSL_NO_COMP set 2013-01-23 01:07:23 +00:00
Andy Polyakov
b286a96811 x86_64 assembly pack: make Windows build more robust [from master].
PR: 2963 and a number of others
2013-01-22 22:54:04 +01:00
Andy Polyakov
2a2df2e9f2 bn/asm/mips.pl: hardwire local call to bn_div_words. 2013-01-22 21:16:51 +01:00
Dr. Stephen Henson
15481c5e42 Don't include comp.h if no-comp set. 2013-01-20 01:10:52 +00:00
Ben Laurie
72f27cd2df Fix some clang warnings. 2013-01-14 00:22:28 +00:00
Dr. Stephen Henson
51447d5db5 In FIPS mode use PKCS#8 format when writing private keys:
traditional format uses MD5 which is prohibited in FIPS mode.
2013-01-07 16:19:28 +00:00
Dr. Stephen Henson
fca84dabe6 make no-comp compile 2012-12-30 16:05:11 +00:00
Dr. Stephen Henson
dd83cc298d Fix two bugs which affect delta CRL handling:
Use -1 to check all extensions in CRLs.
Always set flag for freshest CRL.
2012-12-06 18:25:03 +00:00
Andy Polyakov
ea00598596 aes-s390x.pl: fix XTS bugs in z196-specific code path [from HEAD]. 2012-12-05 17:45:24 +00:00
Andy Polyakov
7dc98a62b2 aes-s389x.pl: harmonize software-only code path [from HEAD]. 2012-12-01 11:11:12 +00:00
Dr. Stephen Henson
f20ba1c9bb PR: 2803
Submitted by: jean-etienne.schwartz@bull.net

In OCSP_basic_varify return an error if X509_STORE_CTX_init fails.
2012-11-29 19:15:36 +00:00
Dr. Stephen Henson
96f7fafa24 Don't require tag before ciphertext in AESGCM mode 2012-10-16 22:46:40 +00:00
Bodo Möller
09ef5f6258 Fix EC_KEY initialization race.
Submitted by: Adam Langley
2012-10-05 20:51:12 +00:00
Bodo Möller
bcc0e4ca7c Fix Valgrind warning.
Submitted by: Adam Langley
2012-09-24 19:49:42 +00:00
Bodo Möller
c3a5b7b82a Fix warning.
Submitted by: Chromium Authors
2012-09-17 17:24:44 +00:00
Andy Polyakov
bc78883017 e_aes.c: uninitialized variable in aes_ccm_init_key [from HEAD].
PR: 2874
Submitted by: Tomas Mraz
2012-09-15 08:46:31 +00:00
Andy Polyakov
554cf97f03 bn_lcl.h: gcc removed support for "h" constraint, which broke inline
assembler [from HEAD].
2012-09-01 13:23:05 +00:00
Dr. Stephen Henson
7a217076d9 PR: 2786
Reported by: Tomas Mraz <tmraz@redhat.com>

Treat a NULL value passed to drbg_free_entropy callback as non-op. This
can happen if the call to fips_get_entropy fails.
2012-08-22 22:42:04 +00:00
Andy Polyakov
0720bf7df1 sha1-armv4-large.pl: comply with ABI [from HEAD]. 2012-08-17 19:59:49 +00:00
Andy Polyakov
9d6727781d aes-mips.pl: harmonize with fips module.
PR: 2863
Submitted by: Duane Sand
2012-08-17 09:02:40 +00:00
Andy Polyakov
78d767f5ec gcm128.c: fix AAD-only case with AAD length not divisible by 16 [from HEAD].
PR: 2859
Submitted by: John Foley
2012-08-13 15:32:18 +00:00