Andy Polyakov [Mon, 5 Jun 2017 09:09:37 +0000 (11:09 +0200)]
sha/asm/keccak1600-armv4.pl: add NEON code path.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Andy Polyakov [Thu, 1 Jun 2017 19:05:59 +0000 (21:05 +0200)]
sha/asm/keccak1600-armv4.pl: add SHA3_absorb and SHA3_squeeze.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Andy Polyakov [Wed, 31 May 2017 12:29:58 +0000 (14:29 +0200)]
sha/asm/keccak1600-armv4.pl: optimization based on profiler feedback.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Andy Polyakov [Wed, 31 May 2017 10:13:36 +0000 (12:13 +0200)]
Add sha/asm/keccak1600-armv4.pl.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Paul Yang [Tue, 6 Jun 2017 10:43:14 +0000 (18:43 +0800)]
Fix coding style
Signed-off-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3614)
Paul Yang [Sun, 4 Jun 2017 19:56:07 +0000 (03:56 +0800)]
Fix doc nits in X509_check_private_key.pod
remove the tailing dot
Signed-off-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3614)
Paul Yang [Sun, 4 Jun 2017 19:41:19 +0000 (03:41 +0800)]
Set local variable to 0 to avoid build error
Signed-off-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3614)
Paul Yang [Sun, 4 Jun 2017 19:16:40 +0000 (03:16 +0800)]
Add test cases for X509_check_private_key
To test X509_check_private_key and relatives.
Add a CSR and corresponding RSA private key to test
X509_REQ_check_private_key function.
Signed-off-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3614)
Paul Yang [Sun, 4 Jun 2017 19:14:15 +0000 (03:14 +0800)]
Document X509_check_private_key and relative
Document two private key check functions:
X509_check_private_key
X509_REQ_check_private_key
Signed-off-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3614)
Dr. Stephen Henson [Tue, 6 Jun 2017 12:37:41 +0000 (13:37 +0100)]
Move and update RSA-PSS documentation.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3621)
Dr. Stephen Henson [Tue, 6 Jun 2017 11:51:01 +0000 (12:51 +0100)]
Fix define to match documentation
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3621)
Rich Salz [Fri, 2 Jun 2017 20:05:37 +0000 (16:05 -0400)]
Document default client -psk_identity
Document that -psk is required to use PSK cipher
[skip ci]
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/3607)
Daniel Kahn Gillmor [Fri, 2 Jun 2017 01:01:27 +0000 (21:01 -0400)]
Avoid failing s_server when client's psk_identity is unexpected
s_server has traditionally been very brittle in PSK mode. If the
client offered any PSK identity other than "Client_identity" s_server
would simply abort.
This is breakage for breakage's sake, and unlike most other parts of
s_server, which tend to allow more flexible connections.
This change accomplishes two things:
* when the client's psk_identity does *not* match the identity
expected by the server, just warn, don't fail.
* allow the server to expect instead a different psk_identity from
the client besides "Client_identity"
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3605)
Rich Salz [Mon, 5 Jun 2017 17:32:05 +0000 (13:32 -0400)]
Use common STANZA for bn and exp tests
Standardize file:line messages
Reduce buff size; move to end of STANZA
Add some Title entries (with blank line after)
Add Title to some BN test files.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3608)
Andy Polyakov [Thu, 1 Jun 2017 19:06:26 +0000 (21:06 +0200)]
sha/keccak1600.c: add #ifdef KECCAK1600_ASM.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Andy Polyakov [Mon, 5 Jun 2017 09:07:55 +0000 (11:07 +0200)]
sha/keccak1600.c: reduce temporary storage utilization even futher.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Andy Polyakov [Sat, 3 Jun 2017 20:07:05 +0000 (22:07 +0200)]
sha/keccak1600.c: add another 1x variant.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Andy Polyakov [Wed, 31 May 2017 10:12:44 +0000 (12:12 +0200)]
sha/keccak1600.c: add ARM-specific "reference" tweaks.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Andy Polyakov [Sat, 3 Jun 2017 19:08:57 +0000 (21:08 +0200)]
ec/asm/ecp_nistz256-x86_64.pl: minor sqr_montx cleanup.
Drop some redundant instructions in reduction in ecp_nistz256_sqr_montx.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Todd Short [Wed, 26 Apr 2017 18:05:49 +0000 (14:05 -0400)]
Fix ex_data and session_dup issues
Code was added in commit
b3c31a65 that overwrote the last ex_data value
using CRYPTO_dup_ex_data() causing a memory leak, and potentially
confusing the ex_data dup() callback.
In ssl_session_dup(), fix error handling (properly reference and up-ref
shared data) and new-up the ex_data before calling CRYPTO_dup_ex_data();
all other structures that dup ex_data have the destination ex_data new'd
before the dup.
Fix up some of the ex_data documentation.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3323)
Rich Salz [Fri, 2 Jun 2017 14:30:44 +0000 (10:30 -0400)]
Add text pointing to full change list.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3606)
Matt Caswell [Thu, 1 Jun 2017 16:35:23 +0000 (17:35 +0100)]
Work around Travis "virtual memory exhausted" error
One particular build was running out of memory. By swapping to debug mode
we reduce the optimisation level which should reduce the amount of memory
required.
[extended tests]
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3601)
Matt Caswell [Thu, 1 Jun 2017 15:37:46 +0000 (16:37 +0100)]
Left shift of a negative number is undefined behaviour
Fix undefined behaviour in curve25519.c. Prior to this running with
ubsan produces errors like this:
crypto/ec/curve25519.c:3871:18: runtime error: left shift of negative
value -22867
[extended tests]
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3600)
Keigo Tanaka [Sat, 13 May 2017 00:50:49 +0000 (09:50 +0900)]
Added mysql as starttls protocol.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3456)
Aashil Patel [Thu, 1 Jun 2017 00:05:14 +0000 (20:05 -0400)]
Remove unnecessary if condition from apps.c
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3596)
Rich Salz [Thu, 1 Jun 2017 20:26:26 +0000 (16:26 -0400)]
Add -p (public only) flag to find-doc-nits
Report if any non-public items are documented.
Add util/private.num that lists items that aren't in the public
(lib*.num) files that we do want to document.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3603)
Rich Salz [Wed, 31 May 2017 16:14:55 +0000 (12:14 -0400)]
Only release thread-local key if we created it.
Thanks to Jan Alexander Steffens for finding the bug and confirming the
fix.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3592)
Erwann Abalea [Wed, 31 May 2017 15:54:02 +0000 (11:54 -0400)]
Add some OID's from X.520
CLA: trivial
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3590)
Richard Levitte [Sun, 28 May 2017 07:35:11 +0000 (09:35 +0200)]
Add UI functionality to duplicate the user data
This can be used by engines that need to retain the data for a longer time
than just the call where this user data is passed.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3575)
Paul Yang [Wed, 31 May 2017 14:46:30 +0000 (22:46 +0800)]
Fix coding style in apps/passwd file
Reformat some indents and braces based on OpenSSL coding style spec.
Signed-off-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3586)
HorimotoYasuhiro [Mon, 29 May 2017 11:08:26 +0000 (20:08 +0900)]
CLA: trivial
Fix coding style
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3581)
Matt Caswell [Wed, 31 May 2017 09:27:32 +0000 (10:27 +0100)]
Wait longer for the server in TLSProxy to start
In a recent PR (#3566) it seems that TLSProxy gave up trying to connect to
the server process too quickly. This meant the test failed even though the
server *did* eventually start. Currently we try 3 times to connect with a
0.1 second pause between each attempt. That is probably too aggressive.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3587)
Dr. Stephen Henson [Thu, 25 May 2017 13:53:32 +0000 (14:53 +0100)]
Clear sensitive data in ED25519_sign
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Sun, 30 Apr 2017 12:42:35 +0000 (13:42 +0100)]
Add
Ed25519 documentation
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Wed, 26 Apr 2017 17:46:31 +0000 (18:46 +0100)]
no-ec fix
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Fri, 21 Apr 2017 12:36:15 +0000 (13:36 +0100)]
Add
Ed25519 verify test.
Add
Ed25519 certificate verify test using certificate from
draft-ietf-curdle-pkix-04 and custom generated root certificate.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Tue, 25 Apr 2017 19:34:58 +0000 (20:34 +0100)]
Add custom sig_info_set for
ED25519
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Sat, 20 May 2017 02:06:26 +0000 (03:06 +0100)]
make errors
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Fri, 7 Apr 2017 00:17:40 +0000 (01:17 +0100)]
Add custom ASN.1 sign and verify
Since
ED25519 doesn't have an associated digest it needs custom sign/verify
routines to handle ASN.1 signatures.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Fri, 7 Apr 2017 02:34:09 +0000 (03:34 +0100)]
Add
ED25519 as signature OID
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Sat, 20 May 2017 02:05:13 +0000 (03:05 +0100)]
Add RFC8032 tests and additional cases
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Sat, 20 May 2017 02:08:20 +0000 (03:08 +0100)]
make errors
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Wed, 5 Apr 2017 20:47:57 +0000 (21:47 +0100)]
ED25519 public key method.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Wed, 5 Apr 2017 15:48:32 +0000 (16:48 +0100)]
add method
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Wed, 5 Apr 2017 18:05:21 +0000 (19:05 +0100)]
Add
ED25519 ASN.1 method
Make X25519 key method more flexible by removing hard coding of NID_X25519
OID. Since the parameters and key syntax between
ED25519 and X25519 are
almost identical they can share a lot of common code.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Wed, 5 Apr 2017 13:13:48 +0000 (14:13 +0100)]
Add EdDSA algorithm OIDs from draft-ietf-curdle-pkix-04
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Wed, 5 Apr 2017 15:09:57 +0000 (16:09 +0100)]
Make
Ed25519 consistent with X25519
Rename and change ED25519_keypair_from_seed to ED25519_public_from_private
to be consistent with X25519 API.
Modidy ED25519_sign to take separate public key argument instead of
requiring it to follow the private key.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Tue, 4 Apr 2017 21:56:41 +0000 (22:56 +0100)]
Add
Ed25519 algorithm.
Reinstate
Ed25519 algorithm to curv25519.c this is largely just a copy of
the code from BoringSSL with some adjustments so it compiles under OpenSSL.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Fri, 19 May 2017 23:00:13 +0000 (00:00 +0100)]
make errors
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Sat, 20 May 2017 02:18:32 +0000 (03:18 +0100)]
Allow NULL md for custom signing methods
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Dr. Stephen Henson [Fri, 19 May 2017 20:31:46 +0000 (21:31 +0100)]
Add support for custom digestsign/digestverify methods.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Andy Polyakov [Tue, 30 May 2017 13:57:37 +0000 (15:57 +0200)]
sha/keccak1600.c: implement lane complementing transform
...as discussed in section 2.2 of "Keccak implementation overview".
[skip ci]
Reviewed-by: Rich Salz <rsalz@openssl.org>
Andy Polyakov [Mon, 29 May 2017 15:12:54 +0000 (17:12 +0200)]
sha/keccak1600.c: implement bit interleaving optimization.
This targets 32-bit processors and is discussed in section 2.1 of
"Keccak implementation overview".
Reviewed-by: Rich Salz <rsalz@openssl.org>
Rich Salz [Thu, 25 May 2017 18:16:26 +0000 (14:16 -0400)]
Add stricter checking in NAME section
Require a comma between every name and a single space before the dash
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3559)
Marek Klein [Wed, 24 May 2017 12:49:44 +0000 (14:49 +0200)]
fixing incorrect OID of signingCertificateV2
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3538)
Thijs Wenker [Mon, 29 May 2017 00:55:43 +0000 (02:55 +0200)]
Fix certificate version number in test
The version number 3 means version 4, while 2 means version 3. Since this is the v3nametest, version 3 should be used.
CLA: Trivial
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3577)
Richard Levitte [Sun, 28 May 2017 13:01:36 +0000 (15:01 +0200)]
Revert "Add internal functions to fetch a refcount"
It turned out to be a bad idea.
This reverts commits
6891a79da67ccd621b67e49b60ddc188d7864291
and
c27bc74698ed043b7549d5637ec0a8cf65b39e59.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3576)
Richard Levitte [Sun, 28 May 2017 05:35:58 +0000 (07:35 +0200)]
Correct small typo in CRYPTO_GET_REF
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3574)
Richard Levitte [Sat, 27 May 2017 20:04:59 +0000 (22:04 +0200)]
Add internal functions to fetch a refcount
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3573)
Josh Soref [Fri, 19 May 2017 00:16:30 +0000 (00:16 +0000)]
Fix spelling errors in CMS.
Unfortunately it affects error code macros in public cms.h header, for
which reason misspelled names are preserved for backward compatibility.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3463)
Matt Caswell [Fri, 26 May 2017 12:06:08 +0000 (13:06 +0100)]
Fix a Proxy race condition
Issue #3562 describes a problem where a race condition can occur in the
Proxy such that a test "ok" line can appear in the middle of other text
causing the test harness to miss it. The issue is that we do not wait for
the client process to finish after the test is complete, so that process may
continue to write data to stdout/stderr at the same time that the test
harness does.
This commit fixes TLSProxy so that we always wait for the client process to
finish before continuing.
Fixes #3562
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3567)
Matt Caswell [Fri, 26 May 2017 13:02:38 +0000 (14:02 +0100)]
Update the pyca-cryptography version
Commit
9bfeeef made some function parameters const. This actually broke
the pyca-cryptography tests. The discussion in #3360 considers this to
actually be a problem with pyca-cryptography not an OpenSSL issue (they
replicate some of our header file contents which then causes function
prototype mismatches). This commit updates the pyca-cryptography version
to pull in their fix for this issue and make our external tests pass again.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3569)
Todd Short [Mon, 22 May 2017 15:24:59 +0000 (11:24 -0400)]
Fix inconsistent check of UNSAFE_LEGACY_RENEGOTIATION
The check for SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION is
inconsistent. Most places check SSL->options, one place is checking
SSL_CTX->options; fix that.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
GH: #3523
Rainer Jung [Thu, 25 May 2017 21:58:14 +0000 (23:58 +0200)]
Fix use of "can_load()" in run_tests.pl.
CLA: Trivial
Fixes #3563.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3564)
Andy Polyakov [Thu, 25 May 2017 11:48:32 +0000 (13:48 +0200)]
test/evp_test.c: improve output in case of errors.
Recently introduced TEST_* macros print variables' symbolic names.
In order to make error output more readable rename some variables.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Andy Polyakov [Thu, 25 May 2017 16:08:09 +0000 (18:08 +0200)]
modes/ocb128.c: address undefined behaviour warning.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3526)
Andy Polyakov [Tue, 23 May 2017 12:33:20 +0000 (14:33 +0200)]
aria/aria.c: address undefined behaviour warning in small-footprint path.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3526)
Kurt Roeckx [Thu, 25 May 2017 17:24:11 +0000 (19:24 +0200)]
Add missing commas in pod files
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #3557
Matt Caswell [Thu, 25 May 2017 10:26:18 +0000 (11:26 +0100)]
Fix BoringSSL alert related test failures
Commit
bd990e2535 changed our handling of alerts. Some of the BoringSSl
tests were expecting specific errors to be created if bad alerts were sent.
Those errors have now changed as a result of that commit, so the BoringSSL
test config needs to be updated to match.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3549)
Matt Caswell [Thu, 25 May 2017 14:18:22 +0000 (15:18 +0100)]
Document that HMAC() with a NULL md is not thread safe
Fixes #3541
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3553)
Matt Caswell [Thu, 25 May 2017 10:00:29 +0000 (11:00 +0100)]
Updates CHANGES and NEWS for new release
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3546)
David Woodhouse [Wed, 24 May 2017 11:18:14 +0000 (12:18 +0100)]
Document that PKCS#12 functions assume UTF-8 for passwords
Part of issue #3531
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3535)
Richard Levitte [Tue, 23 May 2017 17:52:54 +0000 (19:52 +0200)]
Clarify what character encoding is used in the returned UI strings
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3532)
Rich Salz [Tue, 23 May 2017 13:24:12 +0000 (09:24 -0400)]
Fix va_arg all in test_error_c90
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3506)
Rich Salz [Fri, 12 May 2017 18:19:51 +0000 (14:19 -0400)]
Revise evp_test parser; make like bn_test
Re-order and comment on the functions
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3506)
Rich Salz [Tue, 23 May 2017 14:01:37 +0000 (10:01 -0400)]
Add titles to groups of EVP tests
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3529)
Rich Salz [Tue, 23 May 2017 12:59:49 +0000 (08:59 -0400)]
Fix line numbering for errors.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3528)
Dr. Stephen Henson [Tue, 23 May 2017 11:56:51 +0000 (12:56 +0100)]
Don't use one shot API for SSLv3.
SSLv3 (specifically with client auth) cannot use one shot APIs: the digested
data and the master secret are handled in separate update operations. So
in the special case of SSLv3 use the streaming API.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3527)
Paul Yang [Mon, 22 May 2017 15:18:45 +0000 (23:18 +0800)]
Fix typo in doc/man3/EVP_EncrypInit.pod
In the example section.
CLA: trivial
Signed-off-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3520)
Rich Salz [Mon, 22 May 2017 17:09:58 +0000 (13:09 -0400)]
Revert "Integration build a small memory image"
This reverts commit
e2580e70d5c644c5dadd33ffa8bb23223959b87a.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Updates https://github.com/openssl/openssl/pull/3268)
Matt Caswell [Mon, 22 May 2017 11:36:11 +0000 (12:36 +0100)]
Add an error to the stack on failure in dtls1_write_bytes()
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3496)
Matt Caswell [Mon, 22 May 2017 11:33:42 +0000 (12:33 +0100)]
Convert existing usage of assert() to ossl_assert() in libssl
Provides consistent output and approach.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3496)
Matt Caswell [Mon, 22 May 2017 11:33:29 +0000 (12:33 +0100)]
Fix some style issues in returns
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3496)
Matt Caswell [Fri, 19 May 2017 08:35:19 +0000 (09:35 +0100)]
Replace instances of OPENSSL_assert() with soft asserts in libssl
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3496)
Matt Caswell [Fri, 19 May 2017 08:30:37 +0000 (09:30 +0100)]
Add a macro for testing assertion in both debug and production builds
If we have an assert then in a debug build we want an abort() to occur.
In a production build we want the function to return an error.
This introduces a new macro to assist with that. The idea is to replace
existing use of OPENSSL_assert() with this new macro. The problem with
OPENSSL_assert() is that it aborts() on an assertion failure in both debug
and production builds. It should never be a library's decision to abort a
process (we don't get to decide when to kill the life support machine or
the nuclear reactor control system). Additionally if an attacker can
cause a reachable assert to be hit then this can be a source of DoS attacks
e.g. see CVE-2017-3733, CVE-2015-0293, CVE-2011-4577 and CVE-2002-1568.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3496)
Pauli [Sun, 21 May 2017 22:22:19 +0000 (08:22 +1000)]
Reformat the string output to be more in line with the decisions made in #3465
Don't highlight excess when comparing unequal length strings.
Clean up the NULL / empty string display.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3514)
Pauli [Sun, 21 May 2017 22:39:44 +0000 (08:39 +1000)]
Bring the memory output inline with the suggestions in #3465.
Excess bytes, when one block is longer than the other, are not explicitly
highlighted.
The NULL / zero length block output has been cleaned up.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3515)
Alex Gaynor [Thu, 20 Apr 2017 22:47:53 +0000 (18:47 -0400)]
Fixed merge nonsense
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3149)
Alex Gaynor [Mon, 10 Apr 2017 21:11:01 +0000 (17:11 -0400)]
Newlines!
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3149)
Alex Gaynor [Sat, 8 Apr 2017 13:33:17 +0000 (09:33 -0400)]
Update the test to assert that the SCT is from an X.509 extension
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3149)
Alex Gaynor [Sat, 8 Apr 2017 13:21:19 +0000 (09:21 -0400)]
Style fixes and use the source parameter so the OCSP path works
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3149)
Alex Gaynor [Sat, 8 Apr 2017 00:58:50 +0000 (20:58 -0400)]
This is an int
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3149)
Alex Gaynor [Sat, 8 Apr 2017 00:56:12 +0000 (20:56 -0400)]
Don't use a for-loop decleration
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3149)
Alex Gaynor [Sat, 8 Apr 2017 00:49:27 +0000 (20:49 -0400)]
Fixed #3020 -- set entry type on SCTs from X.509 and OCSP extensions
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3149)
Pauli [Mon, 22 May 2017 11:56:42 +0000 (07:56 -0400)]
Integration build a small memory image
Modify one of the integration builds so that that the
OPENSSL_SMALL_MEMORY option is compiled. There doesn't appear to be an
automatic build with this option set.
I think the options in the modified build are covered elsewhere (without
the small memory) but a new job might still be preferable.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3268)
Todd Short [Sun, 21 May 2017 14:21:06 +0000 (10:21 -0400)]
Fix the mem_sec "small arena"
Fix the small arena test to just check for the symptom of the infinite
loop (i.e. initialized set on failure), rather than the actual infinite
loop. This avoids some valgrind errors.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3512)
Andy Polyakov [Sun, 21 May 2017 09:16:34 +0000 (11:16 +0200)]
test/secmemtest.c: clarify limitations for huge secure memory arena test.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diego Santa Cruz [Tue, 16 May 2017 14:05:19 +0000 (16:05 +0200)]
Fix srp app missing NULL termination with password callback
The password_callback() function does not necessarily NULL terminate
the password buffer, the caller must use the returned length but the
srp app uses this function as if it was doing NULL termination.
This made the -passin and -passout options of "openssl srp"
fail inexpicably and randomly or even crash.
Fixed by enlarging the buffer by one, so that the maximum password length
remains unchanged, and adding NULL termination upon return.
[Rearrange code for coding style compliance in process.]
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3475)
Rich Salz [Sun, 21 May 2017 01:44:31 +0000 (21:44 -0400)]
-inkey can be an identifier, not just a file
update pkcs12, smime, ts apps.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3507)
Andy Polyakov [Sat, 20 May 2017 10:35:58 +0000 (12:35 +0200)]
test/run_tests.pl: don't mask test failures.
Switch to TAP::Harness inadvertently masked test failures.
Test::Harness::runtests was terminating with non-zero exit code in case
of failure[s], while TAP::Harness apparently holds caller responsible
for doing so.
Reviewed-by: Rich Salz <rsalz@openssl.org>