5 years agoRT1744: SSL_CTX_set_dump_dh() doc feedback
David Gatwood [Tue, 26 Aug 2014 17:02:03 +0000 (13:02 -0400)]
RT1744: SSL_CTX_set_dump_dh() doc feedback

The description of when the server creates a DH key is
confusing.  This cleans it up.
(rsalz: also removed trailing whitespace.)

Reviewed-by: Viktor Dukhovni <>
5 years agoRT1804: fix EXAMPLE in EVP_EncryptInit.pod
Jan Schaumann [Fri, 15 Aug 2014 03:00:44 +0000 (23:00 -0400)]
RT1804: fix EXAMPLE in EVP_EncryptInit.pod

The EXAMPLE that used FILE and RC2 doesn't compile due to a
few minor errors.  Tweak to use IDEA and AES-128. Remove
examples about RC2 and RC5.

Reviewed-by: Emilia Kasper <>
5 years agoTypo fixes to evp documentation.
Matt Caswell [Thu, 24 Jul 2014 05:00:11 +0000 (01:00 -0400)]
Typo fixes to evp documentation.

This patch was submitted by user "Kox" via the wiki

Reviewed-by: Tim Hudson <>
(cherry picked from commit 2dd8cb3b9593f528d9537aa6a003d5c93df1e3c5)

5 years agoRT3060: Limit the number of empty records.
Adam Langley [Tue, 19 Aug 2014 15:57:53 +0000 (17:57 +0200)]
RT3060: Limit the number of empty records.

Limit the number of empty records that will be processed consecutively
in order to prevent ssl3_get_record from never returning.

Reported by "oftc_must_be_destroyed" and George Kadianakis.

Reviewed-by: Bodo Moeller <>
(cherry picked from commit 3aac17a82fbaf2bc23ee62f24611e5883d3e7b97)

5 years agoRT3061: Don't SEGFAULT when trying to export a public DSA key as a private key.
Adam Langley [Thu, 21 Feb 2013 22:11:55 +0000 (17:11 -0500)]
RT3061: Don't SEGFAULT when trying to export a public DSA key as a private key.

Reviewed-by: Viktor Dukhovni <>
Reviewed-by: Rich Salz <>
(cherry picked from commit e19c93811f0db499c98d2888f1c0c0ab65e6238a)

5 years agoImprove EVP_PKEY_sign documentation
Emilia Kasper [Fri, 22 Aug 2014 11:16:55 +0000 (13:16 +0200)]
Improve EVP_PKEY_sign documentation

Clarify the intended use of EVP_PKEY_sign. Make the code example compile.

Reviewed-by: Dr Stephen Henson <>
(cherry picked from commit d64c533a207f7b6d86c3bc8ffb053e5f4d0c1ca0)

5 years agodefine inline for Visual Studio
Emilia Kasper [Tue, 19 Aug 2014 11:18:07 +0000 (13:18 +0200)]
define inline for Visual Studio

In Visual Studio, inline is available in C++ only, however __inline is available for C, see

Reviewed-by: Richard Levitte <>
Reviewed-by: Dr Stephen Henson <>
(cherry picked from commit f511b25a7370c775dc9fd6198dbacd1706cf242b)

5 years agoFix build when BSAES_ASM is defined but VPAES_ASM is not
Emilia Kasper [Tue, 19 Aug 2014 14:28:07 +0000 (16:28 +0200)]
Fix build when BSAES_ASM is defined but VPAES_ASM is not

Reviewed-by: Andy Polyakov <>
(cherry picked from commit da92be4d68bec81030838e3228ef0238c565af85)

5 years agoAdd volatile qualifications to two blocks of inline asm to stop GCC from
Adam Langley [Mon, 3 Jun 2013 19:45:11 +0000 (15:45 -0400)]
Add volatile qualifications to two blocks of inline asm to stop GCC from
eliminating them as dead code.

Both volatile and "memory" are used because of some concern that the compiler
may still cache values across the asm block without it, and because this was
such a painful debugging session that I wanted to ensure that it's never

(cherry picked from commit 7753a3a68431aa81b82beea4c3f5374b41454679)


Reviewed-by: Rich Salz <>
5 years agoFixed out-of-bounds read errors in ssl3_get_key_exchange.
Matt Caswell [Sat, 26 Jul 2014 22:47:40 +0000 (23:47 +0100)]
Fixed out-of-bounds read errors in ssl3_get_key_exchange.



Reviewed-by: Emilia Käsper <>
5 years agoFurther improve/fix ec_GFp_simple_points_make_affine (ecp_smpl.c) and
Bodo Moeller [Wed, 13 Aug 2014 15:37:19 +0000 (17:37 +0200)]
Further improve/fix ec_GFp_simple_points_make_affine (ecp_smpl.c) and
group_order_tests (ectest.c).  Also fix the EC_POINTs_mul documentation (ec.h).

5 years agoFix SRP ciphersuites.
Dr. Stephen Henson [Tue, 12 Aug 2014 17:33:00 +0000 (18:33 +0100)]
Fix SRP ciphersuites.

Add patch missed from backport of SRP ciphersuite fix.
Reviewed-by: Kurt Roeckx <>
5 years agoFix SRP authentication ciphersuites.
Dr. Stephen Henson [Fri, 8 Aug 2014 10:24:25 +0000 (11:24 +0100)]
Fix SRP authentication ciphersuites.

The addition of SRP authentication needs to be checked in various places
to work properly. Specifically:

A certificate is not sent.
A certificate request must not be sent.
Server key exchange message must not contain a signature.
If appropriate SRP authentication ciphersuites should be chosen.
Reviewed-by: Matt Caswell <>
(cherry picked from commit 8f5a8805b82d1ae81168b11b7f1506db9e047dec)



5 years agoTest SRP authentication ciphersuites.
Dr. Stephen Henson [Fri, 8 Aug 2014 10:19:39 +0000 (11:19 +0100)]
Test SRP authentication ciphersuites.

Reviewed-by: Matt Caswell <>
(cherry picked from commit 193c1c07165b0042abd217274a084b49459d4443)

5 years agoOnly use FIPS EC methods in FIPS mode.
Dr. Stephen Henson [Thu, 7 Aug 2014 00:08:14 +0000 (01:08 +0100)]
Only use FIPS EC methods in FIPS mode.

Reviewed-by: Tim Hudson <>
5 years agoPrepare for 1.0.1j-dev
Matt Caswell [Wed, 6 Aug 2014 21:19:10 +0000 (22:19 +0100)]
Prepare for 1.0.1j-dev

Reviewed-by: Stephen Henson <>
5 years agoPrepare for 1.0.1i release OpenSSL_1_0_1i
Matt Caswell [Wed, 6 Aug 2014 21:18:45 +0000 (22:18 +0100)]
Prepare for 1.0.1i release

Reviewed-by: Stephen Henson <>
5 years agomake update
Matt Caswell [Wed, 6 Aug 2014 21:18:45 +0000 (22:18 +0100)]
make update

Reviewed-by: Stephen Henson <>
5 years agoupdate NEWS
Dr. Stephen Henson [Wed, 6 Aug 2014 13:47:50 +0000 (14:47 +0100)]
update NEWS

Reviewed-by: Kurt Roeckx <>
5 years agoupdate CHANGES
Dr. Stephen Henson [Wed, 6 Aug 2014 13:09:51 +0000 (14:09 +0100)]
update CHANGES

Reviewed-by: Kurt Roeckx <>
5 years agoCheck SRP parameters early.
Dr. Stephen Henson [Fri, 1 Aug 2014 13:56:56 +0000 (14:56 +0100)]
Check SRP parameters early.

Check SRP parameters when they are received so we can send back an
appropriate alert.
Reviewed-by: Kurt Roeckx <>
5 years agoFix SRP buffer overrun vulnerability.
Dr. Stephen Henson [Thu, 31 Jul 2014 19:56:22 +0000 (20:56 +0100)]
Fix SRP buffer overrun vulnerability.

Invalid parameters passed to the SRP code can be overrun an internal
buffer. Add sanity check that g, A, B < N to SRP code.

Thanks to Sean Devlin and Watson Ladd of Cryptography Services, NCC
Group for reporting this issue.
Reviewed-by: Kurt Roeckx <>
5 years agoFix SRP ciphersuite DoS vulnerability.
Dr. Stephen Henson [Tue, 29 Jul 2014 20:23:30 +0000 (21:23 +0100)]
Fix SRP ciphersuite DoS vulnerability.

If a client attempted to use an SRP ciphersuite and it had not been
set up correctly it would crash with a null pointer read. A malicious
server could exploit this in a DoS attack.

Thanks to Joonas Kuorilehto and Riku Hietamäki from Codenomicon
for reporting this issue.

Reviewed-by: Tim Hudson <>
5 years agoFix race condition in ssl_parse_serverhello_tlsext
Gabor Tyukasz [Wed, 23 Jul 2014 21:42:06 +0000 (23:42 +0200)]
Fix race condition in ssl_parse_serverhello_tlsext

Reviewed-by: Tim Hudson <>
Reviewed-by: Dr. Stephen Henson <>
5 years agoFix OID handling:
Emilia Kasper [Wed, 2 Jul 2014 17:02:33 +0000 (19:02 +0200)]
Fix OID handling:

- Upon parsing, reject OIDs with invalid base-128 encoding.
- Always NUL-terminate the destination buffer in OBJ_obj2txt printing function.


Reviewed-by: Dr. Stephen Henson <>
Reviewed-by: Kurt Roeckx <>
Reviewed-by: Tim Hudson <>
5 years agoFix DTLS anonymous EC(DH) denial of service
Emilia Käsper [Thu, 24 Jul 2014 20:15:29 +0000 (22:15 +0200)]
Fix DTLS anonymous EC(DH) denial of service


Reviewed-by: Dr. Stephen Henson <>
5 years agoFix protocol downgrade bug in case of fragmented packets
David Benjamin [Wed, 23 Jul 2014 20:32:21 +0000 (22:32 +0200)]
Fix protocol downgrade bug in case of fragmented packets


Reviewed-by: Emilia Käsper <>
Reviewed-by: Bodo Möller <>
5 years agoRemove some duplicate DTLS code.
Adam Langley [Fri, 6 Jun 2014 21:47:07 +0000 (14:47 -0700)]
Remove some duplicate DTLS code.

In a couple of functions, a sequence number would be calculated twice.

Additionally, in |dtls1_process_out_of_seq_message|, we know that
|frag_len| <= |msg_hdr->msg_len| so the later tests for |frag_len <
msg_hdr->msg_len| can be more clearly written as |frag_len !=
msg_hdr->msg_len|, since that's the only remaining case.

Reviewed-by: Matt Caswell <>
Reviewed-by: Emilia Käsper <>
5 years agoApplying same fix as in dtls1_process_out_of_seq_message. A truncated DTLS fragment...
Matt Caswell [Thu, 24 Jul 2014 22:54:28 +0000 (23:54 +0100)]
Applying same fix as in dtls1_process_out_of_seq_message. A truncated DTLS fragment would cause *ok to be clear, but the return value would still be the number of bytes read.

Problem identified by Emilia Käsper, based on previous issue/patch by Adam

Reviewed-by: Emilia Käsper <>
5 years agoFix return code for truncated DTLS fragment.
Adam Langley [Fri, 6 Jun 2014 21:44:20 +0000 (14:44 -0700)]
Fix return code for truncated DTLS fragment.

Previously, a truncated DTLS fragment in
|dtls1_process_out_of_seq_message| would cause *ok to be cleared, but
the return value would still be the number of bytes read. This would
cause |dtls1_get_message| not to consider it an error and it would
continue processing as normal until the calling function noticed that
*ok was zero.

I can't see an exploit here because |dtls1_get_message| uses
|s->init_num| as the length, which will always be zero from what I can

Reviewed-by: Matt Caswell <>
Reviewed-by: Emilia Käsper <>
5 years agoFix memory leak from zero-length DTLS fragments.
Adam Langley [Fri, 6 Jun 2014 21:30:33 +0000 (14:30 -0700)]
Fix memory leak from zero-length DTLS fragments.

The |pqueue_insert| function can fail if one attempts to insert a
duplicate sequence number. When handling a fragment of an out of
sequence message, |dtls1_process_out_of_seq_message| would not call
|dtls1_reassemble_fragment| if the fragment's length was zero. It would
then allocate a fresh fragment and attempt to insert it, but ignore the
return value, leaking the fragment.

This allows an attacker to exhaust the memory of a DTLS peer.

Fixes CVE-2014-3507

Reviewed-by: Matt Caswell <>
Reviewed-by: Emilia Käsper <>
5 years agoFix DTLS handshake message size checks.
Matt Caswell [Fri, 6 Jun 2014 21:25:52 +0000 (14:25 -0700)]
Fix DTLS handshake message size checks.

In |dtls1_reassemble_fragment|, the value of
|msg_hdr->frag_off+frag_len| was being checked against the maximum
handshake message size, but then |msg_len| bytes were allocated for the
fragment buffer. This means that so long as the fragment was within the
allowed size, the pending handshake message could consume 16MB + 2MB
(for the reassembly bitmap). Approx 10 outstanding handshake messages
are allowed, meaning that an attacker could consume ~180MB per DTLS

In the non-fragmented path (in |dtls1_process_out_of_seq_message|), no
check was applied.

Fixes CVE-2014-3506

Wholly based on patch by Adam Langley with one minor amendment.

Reviewed-by: Emilia Käsper <>
5 years agoAdded comment for the frag->reassembly == NULL case as per feedback from Emilia
Matt Caswell [Thu, 24 Jul 2014 22:33:34 +0000 (23:33 +0100)]
Added comment for the frag->reassembly == NULL case as per feedback from Emilia

Reviewed-by: Emilia Käsper <>
5 years agoAvoid double free when processing DTLS packets.
Adam Langley [Fri, 6 Jun 2014 21:19:21 +0000 (14:19 -0700)]
Avoid double free when processing DTLS packets.

The |item| variable, in both of these cases, may contain a pointer to a
|pitem| structure within |s->d1->buffered_messages|. It was being freed
in the error case while still being in |buffered_messages|. When the
error later caused the |SSL*| to be destroyed, the item would be double

Thanks to Wah-Teh Chang for spotting that the fix in 1632ef74 was
inconsistent with the other error paths (but correct).

Fixes CVE-2014-3505

Reviewed-by: Matt Caswell <>
Reviewed-by: Emilia Käsper <>
5 years agomake update
Dr. Stephen Henson [Fri, 1 Aug 2014 19:44:37 +0000 (20:44 +0100)]
make update

Reviewed-by: Tim Hudson <>
5 years agoFix error discrepancy.
Dr. Stephen Henson [Thu, 31 Jul 2014 20:22:23 +0000 (21:22 +0100)]
Fix error discrepancy.

We can't rename ssleay_rand_bytes to md_rand_bytes_lock as this will cause
an error code discrepancy. Instead keep ssleay_rand_bytes and add an
extra parameter: since ssleay_rand_bytes is not part of the public API
this wont cause any binary compatibility issues.
Reviewed-by: Kurt Roeckx < >
(cherry picked from commit 8068a675a7d1a657c54546f24e673e59e6707f03)

5 years agoUpdate $default_depflags to match current defaults.
Bodo Moeller [Fri, 1 Aug 2014 17:07:57 +0000 (19:07 +0200)]
Update $default_depflags to match current defaults.

5 years agoSimplify and fix ec_GFp_simple_points_make_affine
Bodo Moeller [Fri, 1 Aug 2014 15:18:14 +0000 (17:18 +0200)]
Simplify and fix ec_GFp_simple_points_make_affine
(which didn't always handle value 0 correctly).


5 years agoAvoid multiple lock using FIPS DRBG.
Dr. Stephen Henson [Wed, 30 Jul 2014 14:13:08 +0000 (15:13 +0100)]
Avoid multiple lock using FIPS DRBG.

Don't use multiple locks when SP800-90 DRBG is used outside FIPS mode.

Reviewed-by: Rich Salz <>
(cherry picked from commit a3efe1b6e9d2aa2ce5661e4d4b97262eae743fa7)

5 years agoAdd conditional unit testing interface.
Dr. Stephen Henson [Wed, 23 Jul 2014 12:18:06 +0000 (13:18 +0100)]
Add conditional unit testing interface.

Don't call internal functions directly call them through
SSL_test_functions(). This also makes unit testing work on
Windows and platforms that don't export internal functions
from shared libraries.

By default unit testing is not enabled: it requires the compile
time option "enable-unit-test".
Reviewed-by: Geoff Thorpe <>
(cherry picked from commit e0fc7961c4fbd27577fb519d9aea2dc788742715)



5 years ago"EC_POINT_invert" was checking "dbl" function pointer instead of "invert".
Billy Brumley [Mon, 21 Jul 2014 21:08:23 +0000 (22:08 +0100)]
"EC_POINT_invert" was checking "dbl" function pointer instead of "invert".


Reviewed-by: Rich Salz <>
(cherry picked from commit cba11f57ce161fd301a72194827327128191de7e)

5 years agoRemove old unused and unmaintained demonstration code.
Tim Hudson [Mon, 21 Jul 2014 19:26:17 +0000 (05:26 +1000)]
Remove old unused and unmaintained demonstration code.

Reviewed-by: Dr. Stephen Henson <>
(cherry picked from commit 62352b8138018775a4c085a105fccd9cdcb6323f)

5 years agoMinor documentation update removing "really" and a
Tim Hudson [Mon, 21 Jul 2014 10:03:50 +0000 (20:03 +1000)]
Minor documentation update removing "really" and a
statement of opinion rather than a fact.

Reviewed-by: Dr. Stephen Henson <>
Reviewed-by: Rich Salz <>
(cherry picked from commit c8d133e4b6f1ed1b7ad3c1a6d2c62f460e26c050)

5 years agoFix documentation for RSA_set_method(3)
Dr. Stephen Henson [Sat, 19 Jul 2014 13:20:05 +0000 (14:20 +0100)]
Fix documentation for RSA_set_method(3)

Reviewed-by: Matt Caswell <>
(cherry picked from commit 197400c3f0d617d71ad8167b52fb73046d334320)

5 years agoFix typo, add reference.
Jeffrey Walton [Thu, 17 Jul 2014 10:25:02 +0000 (11:25 +0100)]
Fix typo, add reference.

Reviewed-by: Stephen Henson <>
Reviewed-by: Matt Caswell <>
(cherry picked from commit d48e78f0cf22aaddb563f4bcfccf25b1a45ac8a4)

5 years agoDisabled XTS mode in enc utility as it is not supported
Matt Caswell [Sun, 13 Jul 2014 22:28:13 +0000 (23:28 +0100)]
Disabled XTS mode in enc utility as it is not supported


Reviewed-by: Tim Hudson <>
Reviewed-by: Rich Salz <>
(cherry picked from commit 2097a17c576f2395a10b05f14490688bc5f45a07)

5 years agoAdd Matt Caswell's fingerprint, and general update on the fingerprints file to bring...
Matt Caswell [Tue, 15 Jul 2014 21:47:29 +0000 (22:47 +0100)]
Add Matt Caswell's fingerprint, and general update on the fingerprints file to bring it up to date

Reviewed-by: Tim Hudson <>
(cherry picked from commit 3bd548192a03142c80cf8bc68659d79dea20a738)

5 years agoClarify -Verify and PSK.
Dr. Stephen Henson [Tue, 15 Jul 2014 19:22:39 +0000 (20:22 +0100)]
Clarify -Verify and PSK.

(cherry picked from commit ca2015a617842fed3d36ed4dcbbf8d5e27bc5216)

5 years agoFix DTLS certificate requesting code.
Dr. Stephen Henson [Tue, 15 Jul 2014 17:21:59 +0000 (18:21 +0100)]
Fix DTLS certificate requesting code.

Use same logic when determining when to expect a client
certificate for both TLS and DTLS.

(cherry picked from commit c8d710dc5f83d69d802f941a4cc5895eb5fe3d65)

5 years agoDon't allow -www etc options with DTLS.
Dr. Stephen Henson [Tue, 15 Jul 2014 11:22:49 +0000 (12:22 +0100)]
Don't allow -www etc options with DTLS.

The options which emulate a web server don't make sense when doing DTLS.
Exit with an error if an attempt is made to use them.

(cherry picked from commit 58a2aaeade8bdecd0f9f0df41927f7cff3012547)

5 years agoAdd ECC extensions with DTLS.
Dr. Stephen Henson [Tue, 15 Jul 2014 11:20:30 +0000 (12:20 +0100)]
Add ECC extensions with DTLS.


5 years agoUse case insensitive compare for servername.
Dr. Stephen Henson [Mon, 14 Jul 2014 22:59:13 +0000 (23:59 +0100)]
Use case insensitive compare for servername.

(cherry picked from commit 1c3e9a7c67ccdc5e770829fe951e5832e600d377)

5 years agodocument -nextprotoneg option in man pages
Hubert Kario [Fri, 6 Jun 2014 14:48:43 +0000 (16:48 +0200)]
document -nextprotoneg option in man pages

Add description of the option to advertise support of
Next Protocol Negotiation extension (-nextprotoneg) to
man pages of s_client and s_server.

(cherry picked from commit 7efd0e777e65eaa6c60d85b1cc5c889f872f8fc4)



5 years agoUse more common name for GOST key exchange.
Dr. Stephen Henson [Mon, 14 Jul 2014 14:05:50 +0000 (15:05 +0100)]
Use more common name for GOST key exchange.
(cherry picked from commit 7aabd9c92fe6f0ea2a82869e5171dcc4518cee85)

5 years agoFixed valgrind complaint due to BN_consttime_swap reading uninitialised data.
Matt Caswell [Thu, 10 Jul 2014 22:47:31 +0000 (23:47 +0100)]
Fixed valgrind complaint due to BN_consttime_swap reading uninitialised data.
This is actually ok for this function, but initialised to zero anyway if
PURIFY defined.

This does have the impact of masking any *real* unitialised data reads in bn though.

Patch based on approach suggested by Rich Salz.


(cherry picked from commit 77747e2d9a5573b1dbc15e247ce18c03374c760c)

5 years agoAdd names of GOST algorithms.
Peter Mosmans [Sun, 13 Jul 2014 17:30:07 +0000 (18:30 +0100)]
Add names of GOST algorithms.

(cherry picked from commit 924e5eda2c82d737cc5a1b9c37918aa6e34825da)

5 years ago* crypto/ui/ui_lib.c: misplaced brace in switch statement.
Richard Levitte [Sun, 13 Jul 2014 17:11:29 +0000 (19:11 +0200)]
* crypto/ui/ui_lib.c: misplaced brace in switch statement.
  Detected by

(cherry picked from commit 8b5dd340919e511137696792279f595a70ae2762)

5 years agoDon't clean up uninitialised EVP_CIPHER_CTX on error (CID 483259).
Ben Laurie [Thu, 10 Jul 2014 16:47:48 +0000 (17:47 +0100)]
Don't clean up uninitialised EVP_CIPHER_CTX on error (CID 483259).

(cherry picked from commit c1d1b0114e9d370c30649e46182393dbfc00e20c)

5 years agoFix memory leak in BIO_free if there is no destroy function.
Matt Caswell [Wed, 9 Jul 2014 22:29:17 +0000 (23:29 +0100)]
Fix memory leak in BIO_free if there is no destroy function.
Based on an original patch by Neitrino Photonov <>


(cherry picked from commit 66816c53bea0ecddb9448da7ea9a51a334496127)

5 years agoPrevent infinite loop loading config files.
David Lloyd [Mon, 7 Jul 2014 12:11:48 +0000 (13:11 +0100)]
Prevent infinite loop loading config files.

(cherry picked from commit 9d23f422a32cb333a5e803199ae230706b1bf9f5)

5 years agoUsage for -hack and -prexit -verify_return_error
Dr. Stephen Henson [Sun, 6 Jul 2014 21:33:35 +0000 (22:33 +0100)]
Usage for -hack and -prexit -verify_return_error
(cherry picked from commit ee724df75d9ad67fd954253ac514fddb46f1e3c6)

5 years agoDocument certificate status request options.
Dr. Stephen Henson [Sun, 6 Jul 2014 21:16:21 +0000 (22:16 +0100)]
Document certificate status request options.
(cherry picked from commit cba3f1c739f012aaadb85aaefaf8de424d2695e2)



5 years agos_server usage for certificate status requests
Dr. Stephen Henson [Sun, 6 Jul 2014 21:23:01 +0000 (22:23 +0100)]
s_server usage for certificate status requests
(cherry picked from commit a44f219c009798054d6741e919cba5b2e656dbf4)

5 years agoUpdate ticket callback docs.
Dr. Stephen Henson [Thu, 3 Jul 2014 13:50:08 +0000 (14:50 +0100)]
Update ticket callback docs.
(cherry picked from commit a23a6e85d8dcd5733a343754f434201f3c9aa6f0)

5 years agoSanity check keylength in PVK files.
Dr. Stephen Henson [Sat, 5 Jul 2014 23:32:44 +0000 (00:32 +0100)]
Sanity check keylength in PVK files.

(cherry picked from commit 733a6c882e92f8221bd03a51643bb47f5f81bb81)

5 years agoAdded reference to platform specific cryptographic acceleration such as AES-NI
Jeffrey Walton [Sat, 5 Jul 2014 21:39:08 +0000 (22:39 +0100)]
Added reference to platform specific cryptographic acceleration such as AES-NI

5 years agoFixed error in pod files with latest versions of pod2man
Matt Caswell [Sat, 5 Jul 2014 21:31:05 +0000 (22:31 +0100)]
Fixed error in pod files with latest versions of pod2man

(cherry picked from commit 07255f0a76d9d349d915e14f969b9ff2ee0d1953)

5 years agoReturn smaller of ret and f.
Alan Hryngle [Sat, 5 Jul 2014 21:24:03 +0000 (22:24 +0100)]
Return smaller of ret and f.

(cherry picked from commit fdea4fff8fb058be928980600b24cf4c62ef3630)

5 years agoDon't limit message sizes in ssl3_get_cert_verify.
Dr. Stephen Henson [Sat, 5 Jul 2014 12:19:12 +0000 (13:19 +0100)]
Don't limit message sizes in ssl3_get_cert_verify.

PR#319 (reoponed version).
(cherry picked from commit 7f6e9578648728478e84246fd3e64026b8b6a48e)

5 years agotypo
Dr. Stephen Henson [Fri, 4 Jul 2014 12:50:26 +0000 (13:50 +0100)]
(cherry picked from commit 2cfbec1caea8f9567bdff85d33d22481f2afb40a)
(cherry picked from commit a9661e45acda0bedcb2413b412f9ffc3f9fb2354)

5 years agoAdd license info.
Dr. Stephen Henson [Fri, 4 Jul 2014 17:41:45 +0000 (18:41 +0100)]
Add license info.
(cherry picked from commit 55707a36cce3584457f687ff020842c079624ee8)

5 years agoMerge branch 'rsalz-docfixes'
Rich Salz [Thu, 3 Jul 2014 02:44:53 +0000 (22:44 -0400)]
Merge branch 'rsalz-docfixes'

5 years agoClose 3170, remove reference to Ariel Glenn's old 0.9.8 doc
Rich Salz [Thu, 3 Jul 2014 04:07:04 +0000 (00:07 -0400)]
Close 3170, remove reference to Ariel Glenn's old 0.9.8 doc
(cherry picked from commit f1112985e847286033ac573e70bdee752d26f46f)

5 years agobn_exp.c: fix x86_64-specific crash with one-word modulus.
Andy Polyakov [Wed, 2 Jul 2014 17:35:50 +0000 (19:35 +0200)]
bn_exp.c: fix x86_64-specific crash with one-word modulus.

PR: #3397
(cherry picked from commit eca441b2b4d33d2a18d163ef9b4b3aff14251c73)

5 years agoupdate release notes
Dr. Stephen Henson [Wed, 2 Jul 2014 17:32:03 +0000 (18:32 +0100)]
update release notes

5 years agoFix doc typo.
Matt Smart [Wed, 2 Jul 2014 02:43:42 +0000 (03:43 +0100)]
Fix doc typo.

ERR_get_error(3) references the non-existent
ERR_get_last_error_line_data instead of the one that does exist,

(cherry picked from commit 5cc99c6cf5e908df6b00b04af7f08e99c0698c7b)

5 years agoMake disabling last cipher work.
Thijs Alkemade [Wed, 2 Jul 2014 02:32:19 +0000 (03:32 +0100)]
Make disabling last cipher work.
(cherry picked from commit 7cb472bd0d0fd9da3d42bed1acc56c3a79fc5328)

5 years agoutil/ fix perl warning
Geoff Thorpe [Fri, 25 Apr 2014 05:20:16 +0000 (01:20 -0400)]
util/ fix perl warning

Gets rid of this;

defined(@array) is deprecated at ../util/ line 792.
        (Maybe you should just omit the defined()?)
defined(@array) is deprecated at ../util/ line 800.
        (Maybe you should just omit the defined()?)

Signed-off-by: Geoff Thorpe <>
(cherry picked from commit 647f360e2e86818cee1f2d0429e071d14814e0b5)

5 years agoASN1 sanity check.
Dr. Stephen Henson [Tue, 1 Jul 2014 23:57:57 +0000 (00:57 +0100)]
ASN1 sanity check.

Primitive encodings shouldn't use indefinite length constructed

PR#2438 (partial).
(cherry picked from commit 398e99fe5e06edb11f55a39ce0883d9aa633ffa9)

5 years agoFix possible buffer overrun.
Ben Laurie [Wed, 23 Apr 2014 17:13:20 +0000 (18:13 +0100)]
Fix possible buffer overrun.

5 years agoFix copy for CCM, GCM and XTS.
Dr. Stephen Henson [Mon, 30 Jun 2014 11:57:29 +0000 (12:57 +0100)]
Fix copy for CCM, GCM and XTS.

Internal pointers in CCM, GCM and XTS contexts should either be
NULL or set to point to the appropriate key schedule. This needs
to be adjusted when copying contexts.
(cherry picked from commit c2fd5d79ffc4fc9d120a0faad579ce96473e6a2f)

5 years agoClarified that the signature's buffer size, `s`, is not used as an
Jeffrey Walton [Sun, 29 Jun 2014 22:34:21 +0000 (23:34 +0100)]
Clarified that the signature's buffer size, `s`, is not used as an
IN parameter.

Under the old docs, the only thing stated was "at most
EVP_PKEY_size(pkey) bytes will be written". It was kind of misleading
since it appears EVP_PKEY_size(pkey) WILL be written regardless of the
signature's buffer size.

(cherry picked from commit 6e6ba36d980f67b6e5c7b139f78da7acbbf8ec76)

5 years agoMake EVP_CIPHER_CTX_copy work in GCM mode.
ZNV [Sun, 29 Jun 2014 21:01:28 +0000 (22:01 +0100)]
Make EVP_CIPHER_CTX_copy work in GCM mode.

(cherry picked from commit 370bf1d708e6d7af42e1752fb078d0822c9bc73d)

5 years agoFix memory leak.
Dr. Stephen Henson [Sun, 29 Jun 2014 12:51:30 +0000 (13:51 +0100)]
Fix memory leak.

(cherry picked from commit 44724beeadf95712a42a8b21dc71bf110e89a262)

5 years agoTypo.
Ken Ballou [Sun, 29 Jun 2014 12:38:55 +0000 (13:38 +0100)]

(cherry picked from commit 76ed5a42ea68dd08bba44e4003b7e638e5d8a4a3)

5 years agoShow errors on CSR verification failure.
Dr. Stephen Henson [Sun, 29 Jun 2014 12:31:57 +0000 (13:31 +0100)]
Show errors on CSR verification failure.

If CSR verify fails in ca utility print out error messages.
Otherwise some errors give misleading output: for example
if the key size exceeds the library limit.

(cherry picked from commit a30bdb55d1361b9926eef8127debfc2e1bb8c484)

5 years agoMake no-ssl3 no-ssl2 do more sensible things.
Dr. Stephen Henson [Sun, 29 Jun 2014 02:02:51 +0000 (03:02 +0100)]
Make no-ssl3 no-ssl2 do more sensible things.
(cherry picked from commit 7ae6a4b659facfd7ad8131238aa1d349cb3fc951)

5 years agoClarify protocols supported.
Dr. Stephen Henson [Sat, 28 Jun 2014 20:54:13 +0000 (21:54 +0100)]
Clarify protocols supported.

Update protocols supported and note that SSLv2 is effectively disabled
by default.

(cherry picked from commit 1b13a4f38dfc385d5e776f6b3e06c5795874cf9b)

5 years agoTypo.
Dr. Stephen Henson [Sat, 28 Jun 2014 11:42:04 +0000 (12:42 +0100)]

(cherry picked from commit 7c206db9280865ae4af352dbc14e9019a6c4795d)

5 years agoDon't disable state strings with no-ssl2
Dr. Stephen Henson [Fri, 27 Jun 2014 23:54:32 +0000 (00:54 +0100)]
Don't disable state strings with no-ssl2

Some state strings were erronously not compiled when no-ssl2
was set.

(cherry picked from commit 0518a3e19e18cfc441cab261b28441b8c8bd77bf)

5 years agoFix compilation with -DSSL_DEBUG -DTLS_DEBUG -DKSSL_DEBUG
yogesh nagarkar [Fri, 27 Jun 2014 23:40:26 +0000 (00:40 +0100)]

(cherry picked from commit d183545d4589f1e7a40190400b8b99ea3d1f7f97)

5 years agoFix typo in ideatest.c
Andreas Westfeld [Fri, 27 Jun 2014 23:04:56 +0000 (00:04 +0100)]
Fix typo in ideatest.c
(cherry picked from commit d1d4382dcb3fdcad4758ef7e7dd7b61dbf5abbfe)

5 years agoRemove redundant check.
Ken Ballou [Fri, 27 Jun 2014 22:17:47 +0000 (23:17 +0100)]
Remove redundant check.

(cherry picked from commit fd331c0bb9b557903dd2ce88398570a3327b5ef0)

5 years agoFix for EVP_PBE_alg_add().
Dr. Stephen Henson [Fri, 27 Jun 2014 21:56:37 +0000 (22:56 +0100)]
Fix for EVP_PBE_alg_add().

In EVP_PBE_alg_add don't use the underlying NID for the cipher
as it may have a non-standard key size.

(cherry picked from commit efb7caef637a1de8468ca109efd355a9d0e73a45)

5 years agoTolerate critical AKID in CRLs.
Dr. Stephen Henson [Fri, 27 Jun 2014 17:49:32 +0000 (18:49 +0100)]
Tolerate critical AKID in CRLs.

(cherry picked from commit 11da66f8b1fbe5777fe08cc6ace9e1f2c1576a50)

5 years agoHandle IPv6 addresses in OCSP_parse_url.
Tom Greenslade [Fri, 27 Jun 2014 16:30:59 +0000 (17:30 +0100)]
Handle IPv6 addresses in OCSP_parse_url.

(cherry picked from commit b36f35cda964544a15d53d3fdfec9b2bab8cacb1)

5 years agoDon't advertise ECC ciphersuits in SSLv2 compatible client hello.
Tomas Mraz [Fri, 27 Jun 2014 15:49:22 +0000 (16:49 +0100)]
Don't advertise ECC ciphersuits in SSLv2 compatible client hello.

(cherry picked from commit 0436369fccd128cb7f6a8538d5fed1c876c437af)

5 years agoClarify docs.
Jeffrey Walton [Fri, 27 Jun 2014 15:33:06 +0000 (16:33 +0100)]
Clarify docs.

Document that the certificate passed to SSL_CTX_add_extra_chain_cert()
should not be freed by the application.

(cherry picked from commit 0535c2d67ca2d684087ef90be35d5fb207aab227)

Add restrictions section present in other branches.



5 years agoRemove ancient obsolete files under pkcs7.
Dr. Stephen Henson [Thu, 26 Jun 2014 11:36:44 +0000 (12:36 +0100)]
Remove ancient obsolete files under pkcs7.
(cherry picked from commit 7be6b27aaf5ed77f13c93dc89a2c27a42082db3f)

5 years agoMemory leak and NULL derefernce fixes.
Dr. Stephen Henson [Fri, 27 Jun 2014 02:21:10 +0000 (03:21 +0100)]
Memory leak and NULL derefernce fixes.