Michael Tuexen [Tue, 13 Aug 2013 17:53:19 +0000 (18:53 +0100)]
DTLS message_sequence number wrong in rehandshake ServerHello
This fix ensures that
* A HelloRequest is retransmitted if not responded by a ClientHello
* The HelloRequest "consumes" the sequence number 0. The subsequent
ServerHello uses the sequence number 1.
* The client also expects the sequence number of the ServerHello to
be 1 if a HelloRequest was received earlier.
This patch fixes the RFC violation.
(cherry picked from commit
b62f4daac00303280361924b9cc19b3e27528b15)
Michael Tuexen [Thu, 8 Aug 2013 12:28:55 +0000 (13:28 +0100)]
DTLS handshake fix.
Reported by: Prashant Jaikumar <rmstar@gmail.com>
Fix handling of application data received before a handshake.
(cherry picked from commit
0c75eeacd3285b395dc75b65c3e6fe6ffbef59f0)
Dr. Stephen Henson [Fri, 12 Jul 2013 16:35:08 +0000 (17:35 +0100)]
Fix verify loop with CRL checking.
PR #3090
Reported by: Franck Youssef <fry@open.ch>
If no new reason codes are obtained after checking a CRL exit with an
error to avoid repeatedly checking the same CRL.
This will only happen if verify errors such as invalid CRL scope are
overridden in a callback.
(cherry picked from commit
4b26645c1a71cf9ce489e4f79fc836760b670ffe)
Kaspar Brand [Tue, 6 Aug 2013 15:01:47 +0000 (16:01 +0100)]
Fix for PEM_X509_INFO_read_bio.
PR: 3028
Fix bug introduced in PEM_X509_INFO_bio which wouldn't process RSA keys
correctly if they appeared first.
(cherry picked from commit
5ae8d6bcbaff99423a2608559d738a3fcf7ed6dc)
Andy Polyakov [Sat, 3 Aug 2013 14:56:58 +0000 (16:56 +0200)]
crypto/evp/e_aes.c: fix logical pre-processor bug and formatting.
Bug would emerge when XTS is added to bsaes-armv7.pl. Pointed out by
Ard Biesheuvel of Linaro.
(cherry picked from commit
044f63086051d7542fa9485a1432498c39c4d8fa)
Andy Polyakov [Sat, 3 Aug 2013 14:28:50 +0000 (16:28 +0200)]
crypto/bn/asm/rsax-x86_64.pl: make it work on Darwin.
(cherry picked from commit
fd8ad019e194f54fbc651897c1b3b4cc1898c6c4)
Andy Polyakov [Wed, 31 Jul 2013 21:50:15 +0000 (23:50 +0200)]
crypto/sha/asm/sha*-x86_64.pl: comply with Win64 ABI.
(cherry picked from commit
006784378db1a8957fcf587ee1deaa5cf2ae76c7)
Trevor [Mon, 24 Jun 2013 22:59:05 +0000 (15:59 -0700)]
Cosmetic touchups.
Ben Laurie [Fri, 12 Jul 2013 11:48:24 +0000 (12:48 +0100)]
Support new rsaz asm stuff.
Andy Polyakov [Fri, 12 Jul 2013 16:59:17 +0000 (18:59 +0200)]
bn/asm/rsaz-avx2.pl: Windows-specific fix.
(cherry picked from commit
5c57c69f9ebcc933161a24d77f87f17011c9977b)
Ben Laurie [Fri, 12 Jul 2013 11:47:39 +0000 (12:47 +0100)]
s/rsaz_eligible/rsaz_avx2_eligible/.
(cherry picked from commit
852f837f5ee81f2633ddf753fa3a30661ad3835a)
Andy Polyakov [Wed, 10 Jul 2013 07:59:25 +0000 (09:59 +0200)]
sha512-586.pl: fix typo.
Submitted by: Gisle Vanem
(cherry picked from commit
241fba4ea9772662e55577de996273cdb272e611)
Andy Polyakov [Fri, 5 Jul 2013 20:11:28 +0000 (22:11 +0200)]
Remove RSAX engine, superseded by RSAZ module.
(cherry picked from commit
f5b132d652e47af3cde3293d54c1bd028d00758d)
Conflicts [resloved]:
Configure
Andy Polyakov [Fri, 5 Jul 2013 19:39:47 +0000 (21:39 +0200)]
Take RSAZ modules into build loop, add glue and engage.
RT: 2582, 2850
(cherry picked from commit
ca48ace5c52feb0082954fff00a44e1914b9e7e9)
Conflicts:
Configure
Andy Polyakov [Fri, 5 Jul 2013 19:30:18 +0000 (21:30 +0200)]
Add RSAZ assembly modules.
RT: 2582, 2850
(cherry picked from commit
0b4bb91db65697ab6d3a0fc05b140887cbce3080)
Andy Polyakov [Fri, 5 Jul 2013 19:10:56 +0000 (21:10 +0200)]
bn/asm/x86_86-mont.pl: optimize reduction for Intel Core family.
(cherry picked from commit
26e43b48a3fa72fc5d7f3aa849af3d7917deea9d)
Andy Polyakov [Fri, 5 Jul 2013 18:52:58 +0000 (20:52 +0200)]
bn/bn_exp.c: harmonize.
(cherry picked from commit
cbce8c4644fa8dfa72e62a2aa921a74eee6d62c9)
Trevor [Mon, 13 May 2013 01:55:27 +0000 (18:55 -0700)]
Trying cherrypick:
Add support for arbitrary TLS extensions.
Contributed by Trevor Perrin.
Conflicts:
CHANGES
ssl/ssl.h
ssl/ssltest.c
test/testssl
Fix compilation due to #endif.
Cherrypicking more stuff.
Cleanup of custom extension stuff.
serverinfo rejects non-empty extensions.
Omit extension if no relevant serverinfo data.
Improve error-handling in serverinfo callback.
Cosmetic cleanups.
s_client documentation.
s_server documentation.
SSL_CTX_serverinfo documentation.
Cleaup -1 and NULL callback handling for custom extensions, add tests.
Cleanup ssl_rsa.c serverinfo code.
Whitespace cleanup.
Improve comments in ssl.h for serverinfo.
Whitespace.
Cosmetic cleanup.
Reject non-zero-len serverinfo extensions.
Whitespace.
Make it build.
Conflicts:
test/testssl
Andy Polyakov [Sun, 30 Jun 2013 21:55:55 +0000 (23:55 +0200)]
config: fix executable format detection on latest FreeBSD.
Submitted by: Bryan Drewery
PR: 3075
(cherry picked from commit
c256e69d3f3acd0794ae9c1f353f4093bd4c8878)
Andy Polyakov [Sun, 30 Jun 2013 21:09:09 +0000 (23:09 +0200)]
bn/bn_exp.c: Solaris-specific fix, T4 MONTMUL relies on alloca.
(cherry picked from commit
b74ce8d9489b319c0d097ff116b5a0bdb634462d)
Andy Polyakov [Sun, 30 Jun 2013 21:07:33 +0000 (23:07 +0200)]
x86_64-xlate.pl: Windows fixes.
(cherry picked from commit
a9d14832fd98cb0c13b53fddea39765fb259358c)
Andy Polyakov [Sun, 30 Jun 2013 21:06:28 +0000 (23:06 +0200)]
aesni-sha256-x86_64.pl: fix typo in Windows SEH.
(cherry picked from commit
42386fdb62176ed3af237dd3e802ba9b8c0d4def)
Andy Polyakov [Tue, 18 Jun 2013 08:37:00 +0000 (10:37 +0200)]
PA-RISC assembler pack: switch to bve in 64-bit builds.
PR: 3074
(cherry picked from commit
02450ec69dda7815ba1e7bd74eb30f0ae1eb3042)
Andy Polyakov [Tue, 18 Jun 2013 08:42:08 +0000 (10:42 +0200)]
SPARC T4 DES support: fix typo.
(cherry picked from commit
8ee3c7e676c5edb1d5fbe0d66b7ce307a4f92899)
Andy Polyakov [Tue, 18 Jun 2013 08:39:38 +0000 (10:39 +0200)]
Optimize SPARC T4 MONTMUL support.
Improve RSA sing performance by 20-30% by:
- switching from floating-point to integer conditional moves;
- daisy-chaining sqr-sqr-sqr-sqr-sqr-mul sequences;
- using MONTMUL even during powers table setup;
(cherry picked from commit
4ddacd9921f48013b5cd011e4b93b294c14db1c2)
Ben Laurie [Thu, 13 Jun 2013 14:09:48 +0000 (15:09 +0100)]
Backport single makefile from master.
Ben Laurie [Thu, 13 Jun 2013 12:26:22 +0000 (13:26 +0100)]
Wrong include path.
Dr. Stephen Henson [Wed, 12 Jun 2013 20:16:31 +0000 (21:16 +0100)]
Typo: don't call RAND_cleanup during app startup.
Andy Polyakov [Mon, 10 Jun 2013 20:35:22 +0000 (22:35 +0200)]
aesni-sha1-x86_64.pl: update performance data.
(cherry picked from commit
3b848d3401de1892415e46561ae75f06ff65e823)
Andy Polyakov [Mon, 10 Jun 2013 20:34:06 +0000 (22:34 +0200)]
aesni-sha256-x86_64.pl: harmonize with latest sha512-x86_64.pl.
(cherry picked from commit
42b9a4177bf9d465ff9ac8d4e1526301d809a87e)
Andy Polyakov [Mon, 10 Jun 2013 20:30:34 +0000 (22:30 +0200)]
sha1-x86_64.pl: add AVX2+BMI code path.
(cherry picked from commit
cd8d7335afcdef97312e05a9bd29b17a00796f48)
Andy Polyakov [Mon, 10 Jun 2013 20:29:01 +0000 (22:29 +0200)]
sha512-x86_64.pl: upcoming-Atom-specific optimization.
(cherry picked from commit
c7f690c243f5ad3dccaa6dbb918c92eb39622711)
Andy Polyakov [Mon, 10 Jun 2013 20:26:53 +0000 (22:26 +0200)]
sha[256|512]-586.pl: add more SIMD code paths.
(cherry picked from commit
32213d8d77e0ce6afc4b19f94c228812d0bf8fd5)
Andy Polyakov [Mon, 10 Jun 2013 20:25:12 +0000 (22:25 +0200)]
ghash-x86_64.pl: add Haswell performance data.
(cherry picked from commit
b42759158d8b7e5b23c7a24d11bc7f2194f55007)
Andy Polyakov [Mon, 10 Jun 2013 20:20:46 +0000 (22:20 +0200)]
x86cpuid.pl: fix extended feature flags detection.
(cherry picked from commit
1bc0b68d7b8c7620487310ed84fa273ba0d9f428)
Dr. Stephen Henson [Thu, 30 May 2013 20:39:50 +0000 (21:39 +0100)]
Don't use RC2 with PKCS#12 files in FIPS mode.
(cherry picked from commit
cdb6c48445ded3daafab32e5f266943d07bb512b)
Dr. Stephen Henson [Sun, 5 May 2013 12:34:03 +0000 (13:34 +0100)]
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)
Dr. Stephen Henson [Fri, 3 May 2013 11:31:47 +0000 (12:31 +0100)]
Reencode with X509_CRL_ctx_sign too.
(cherry picked from commit
96940f4f2d0300c033379a87db0ff19e598c6264)
Ben Laurie [Tue, 4 Jun 2013 15:27:05 +0000 (16:27 +0100)]
Header needed for SOCK_STREAM on FreeBSD.
Ben Laurie [Tue, 4 Jun 2013 15:17:30 +0000 (16:17 +0100)]
Fix missing/incorrect prototype.
Ben Laurie [Tue, 4 Jun 2013 14:14:18 +0000 (15:14 +0100)]
Missing prototypes.
Ben Laurie [Tue, 4 Jun 2013 14:05:18 +0000 (15:05 +0100)]
Remove added ;.
Andy Polyakov [Mon, 5 Nov 2012 17:03:39 +0000 (17:03 +0000)]
crypto/modes: even more strict aliasing fixes [and fix bug in cbc128.c from
previous cbc128.c commit].
Andy Polyakov [Mon, 5 Nov 2012 10:04:02 +0000 (10:04 +0000)]
cbc128.c: fix strict aliasing warning.
Andy Polyakov [Sat, 1 Jun 2013 07:58:07 +0000 (09:58 +0200)]
crypto/bn/bn_exp.c: SPARC portability fix.
(cherry picked from commit
b69437e1e5cdf9c6dfda17cc238f87f730b198ac)
Andy Polyakov [Sat, 25 May 2013 17:08:39 +0000 (19:08 +0200)]
aesni-sha1-x86_64.pl: Atom-specific optimization.
(cherry picked from commit
4df2280b4f4747256a729116fef0f1c2af457522)
Andy Polyakov [Sat, 25 May 2013 17:02:57 +0000 (19:02 +0200)]
sha512-x86_64.pl: +16% optimization for Atom.
(and pending AVX2 changes).
(cherry picked from commit
504bbcf3cd236353d7e5ef66fc3bfbf5c7935791)
Andy Polyakov [Sat, 25 May 2013 16:57:03 +0000 (18:57 +0200)]
vpaes-x86[_64].pl: minor Atom-specific optimization.
(cherry picked from commit
988d11b64193da65e7f9bbf436ad2a08d8d57142)
Andy Polyakov [Mon, 20 May 2013 14:36:53 +0000 (16:36 +0200)]
evp/e_aes.c: engage SPARC T4 AES support [from master].
Andy Polyakov [Mon, 20 May 2013 14:30:21 +0000 (16:30 +0200)]
evp/e_aes.c: engage AES-NI GCM stitch.
Andy Polyakov [Mon, 20 May 2013 14:16:34 +0000 (16:16 +0200)]
evp/evp_err.c: update from master.
Andy Polyakov [Mon, 20 May 2013 14:09:13 +0000 (16:09 +0200)]
evp/e_camellia.c: engage SPARC T5 Camellia support [from master].
Andy Polyakov [Mon, 20 May 2013 14:08:39 +0000 (16:08 +0200)]
evp/e_des[3].c: engage SPARC T4 DES support.
Andy Polyakov [Mon, 20 May 2013 13:48:13 +0000 (15:48 +0200)]
Add BN support for SPARC VIS3 and T4 [from master].
Andy Polyakov [Sun, 19 May 2013 22:33:09 +0000 (00:33 +0200)]
md5_locl.h: enable assembly support on SPARC [from master].
Andy Polyakov [Sun, 19 May 2013 22:16:18 +0000 (00:16 +0200)]
sparcv9cap.c: update from master.
Andy Polyakov [Sun, 19 May 2013 22:08:15 +0000 (00:08 +0200)]
Add MD5 SPARC T4 code from master.
Andy Polyakov [Sun, 19 May 2013 22:04:38 +0000 (00:04 +0200)]
Add SHA SPARC T4 code from master.
Andy Polyakov [Sun, 19 May 2013 21:58:54 +0000 (23:58 +0200)]
Add Camellia SPARC T4 module from master.
Andy Polyakov [Sun, 19 May 2013 21:54:34 +0000 (23:54 +0200)]
Add AES SPARC T4 module from master.
Andy Polyakov [Sun, 19 May 2013 21:51:22 +0000 (23:51 +0200)]
Add DES SPARC T4 module from master.
Andy Polyakov [Sun, 19 May 2013 21:47:38 +0000 (23:47 +0200)]
Add perlasm/sparcv9_modes.pl from master.
Andy Polyakov [Sun, 19 May 2013 21:43:12 +0000 (23:43 +0200)]
des_enc.m4: update from master.
Andy Polyakov [Sun, 19 May 2013 21:11:03 +0000 (23:11 +0200)]
evp/Makefile: fix typo.
Andy Polyakov [Sun, 19 May 2013 20:35:37 +0000 (22:35 +0200)]
Add EVP glue to AES-NI SHA256 stich [from master].
Andy Polyakov [Sun, 19 May 2013 20:23:18 +0000 (22:23 +0200)]
Add AES-NI SHA256 stitch and take it into build loop [from master].
Andy Polyakov [Sun, 19 May 2013 20:18:52 +0000 (22:18 +0200)]
aesni-sha1-x86_64.pl: update from master.
Andy Polyakov [Sun, 19 May 2013 20:06:18 +0000 (22:06 +0200)]
Add AES-NI GCM stich and take it into build loop [from master].
Andy Polyakov [Sun, 19 May 2013 19:55:30 +0000 (21:55 +0200)]
gcm128.c: update from master (add AVX and VIS3 support).
Andy Polyakov [Sun, 19 May 2013 19:53:14 +0000 (21:53 +0200)]
ghash-sparcv9.pl: update from master.
Andy Polyakov [Sun, 19 May 2013 19:51:19 +0000 (21:51 +0200)]
ghash-x86_64.pl: update from master.
Andy Polyakov [Sun, 19 May 2013 19:46:03 +0000 (21:46 +0200)]
ghash-x86.pl: update from master.
Andy Polyakov [Sun, 19 May 2013 19:36:54 +0000 (21:36 +0200)]
sha512-x86_64.pl: update from master.
Andy Polyakov [Sun, 19 May 2013 19:36:38 +0000 (21:36 +0200)]
sha512-586.pl: update from master.
Andy Polyakov [Sun, 19 May 2013 19:35:55 +0000 (21:35 +0200)]
sha256-598.pl: update from master.
Andy Polyakov [Sun, 19 May 2013 19:33:04 +0000 (21:33 +0200)]
sha1-x86_64.pl: update from master.
Andy Polyakov [Sun, 19 May 2013 19:32:29 +0000 (21:32 +0200)]
sha1-586.pl: update from master.
Andy Polyakov [Sun, 19 May 2013 19:27:59 +0000 (21:27 +0200)]
crypto/perlasm: update from master.
Andy Polyakov [Wed, 15 May 2013 18:41:51 +0000 (20:41 +0200)]
RFC6689 support: add missing commit (git noob alert).
Andy Polyakov [Wed, 15 May 2013 18:38:58 +0000 (20:38 +0200)]
ssl/dnssec.c: compilation errors.
Andy Polyakov [Mon, 13 May 2013 13:36:06 +0000 (15:36 +0200)]
Initial support for RFC6689, a.k.a. DANE.
Note that it initially applies to 1.0.2, and not to HEAD. This is
in order to allow development with existing libunbound installations
that are dependent on OpenSSL 1.0.x. More details in RT.
RT: 3003
Dr. Stephen Henson [Thu, 2 May 2013 11:18:46 +0000 (12:18 +0100)]
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
c6d8adb8a45186617e0a8e2c09469bd164b92b31)
Andy Polyakov [Sat, 13 Apr 2013 18:57:37 +0000 (20:57 +0200)]
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
3bdd80521a81d50ade4214053cd9b293f920a77b)
Dr. Stephen Henson [Mon, 8 Apr 2013 17:03:12 +0000 (18:03 +0100)]
Set s->d1 to NULL after freeing it.
(cherry picked from commit
04638f2fc335a6dc2af8e5d556d36e29c261dcd2)
Dr. Stephen Henson [Sun, 31 Mar 2013 16:42:46 +0000 (17:42 +0100)]
Dr. Stephen Henson [Thu, 28 Mar 2013 14:28:06 +0000 (14:28 +0000)]
Call RAND_cleanup in openssl application.
(cherry picked from commit
944bc29f9004cf8851427ebfa83ee70b8399da57)
Matt Caswell [Tue, 26 Mar 2013 15:39:50 +0000 (15:39 +0000)]
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
94782e0e9c28bd872107b8f814f4db68c9fbf5ab)
Dr. Stephen Henson [Tue, 11 Sep 2012 13:54:09 +0000 (13:54 +0000)]
enhance EC method to support setting curve type when generating keys and add parameter encoding option
(cherry picked from commit
24edfa9df9e6315b107b7c2d8ce0634208e8c350)
Dr. Stephen Henson [Tue, 19 Mar 2013 13:46:28 +0000 (13:46 +0000)]
Disable compression for DTLS.
The only standard compression method is stateful and is incompatible with
DTLS.
Andy Polyakov [Mon, 4 Mar 2013 19:05:04 +0000 (20:05 +0100)]
x86cpuid.pl: make it work with older CPUs.
PR: 3005
(cherry picked from commit
5702e965d759dde8a098d8108660721ba2b93a7d)
Andy Polyakov [Mon, 18 Mar 2013 18:29:41 +0000 (19:29 +0100)]
e_aes_cbc_hmac_sha1.c: fix rare bad record mac on AES-NI plaforms.
PR: 3002
(cherry picked from commit
5c60046553716fcf160718f59160493194f212dc)
Michael Tuexen [Mon, 18 Mar 2013 14:30:38 +0000 (14:30 +0000)]
Avoid unnecessary fragmentation.
(cherry picked from commit
80ccc66d7eedb2d06050130c77c482ae1584199a)
Dr. Stephen Henson [Mon, 18 Mar 2013 14:19:40 +0000 (14:19 +0000)]
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
1643edc63c3e15b6db5a15a728bc288f2cc2bbc7)
Dr. Stephen Henson [Mon, 18 Mar 2013 13:58:32 +0000 (13:58 +0000)]
Dr. Stephen Henson [Mon, 4 Mar 2013 19:28:39 +0000 (19:28 +0000)]
Update ordinals.
Andy Polyakov [Fri, 1 Mar 2013 21:36:36 +0000 (22:36 +0100)]
x86_64-gf2m.pl: fix typo.
(cherry picked from commit
342dbbbe4eb82b6e12163965a12f580c2deb03ad)
Andy Polyakov [Fri, 1 Mar 2013 20:43:10 +0000 (21:43 +0100)]
x86_64-gf2m.pl: add missing Windows build fix for #2963.
PR: 3004
(cherry picked from commit
7c43601d4424575d589f028aed0d5a4ae337527f)
Dr. Stephen Henson [Tue, 26 Feb 2013 16:48:49 +0000 (16:48 +0000)]
Add function CMS_RecipientInfo_encrypt
Add CMS_RecipientInfo_encrypt: this function encrypts an existing content
encryption key to match the key in the RecipientInfo structure: this is
useful if a new recpient is added to and existing enveloped data structure.
Add documentation.
(cherry picked from commit
e1f1d28f34cc5cfc87772e0d8331e00137a4a213)
Dr. Stephen Henson [Tue, 26 Feb 2013 16:46:58 +0000 (16:46 +0000)]
Fix error codes.
(cherry picked from commit
388aff08dc38d6e4c5146d445b62f581bb484ed4)
Dr. Stephen Henson [Tue, 26 Feb 2013 16:33:05 +0000 (16:33 +0000)]
Demo code for SSL_CONF API
Two example programs one for command line argument processing and
one for configuration file processing.
(cherry picked from commit
3646578ae7e29230d7b05a5487ad12990b2ae688)