18394 Commits

Author SHA1 Message Date
Andy Polyakov
a43cf4c0c0 Configure: use 5.10.0, don't require...
Configure started with 'require 5.10.0', but if executed by older perl
it failed with "might be runaway multi-line // string" instead of
naturally expected "Perl v5.10.0 required--this is only v5.x.y".

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit d83112b7fd3b0e751f8a5947e5a93db1cbbe86dc)
2017-04-01 15:51:18 +02:00
Andy Polyakov
afe2f42bfc e_afalg.[ch]: fix --strict-warnings with gcc 4.x and 32-bit build.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit c27778d8adf7fca3128ece0b7efca09f628008b9)
2017-04-01 15:48:16 +02:00
Sebastian Andrzej Siewior
845645327d Don't mention TLS 1.3 in the man page
The man pages for ciphers, s_client and s_server mention the tls1_3
option but it is not implemented in the 1.1.0 branch. Thus remove it to
avoid confusion.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>

Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3099)
2017-03-31 20:48:28 +02:00
Jon Spillett
e1d2ea3a54 Fix for #2730. Add CRLDP extension to list of supported extensions
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3087)
(cherry picked from commit e6f648fd880369e186039501c960809b17f96e88)
2017-03-31 12:06:05 -04:00
FdaSilvaYY
a2dcdb57af More typo fixes
Backport of 69687aa829bc8bdcaf5468eb3dd0ada13700b7aa
(Merged from #3069)

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3079)
2017-03-30 22:13:12 +02:00
Andy Polyakov
a05053cdf4 engines/e_capi.c: slip in PROV_RSA_AES for interchangable CSP only.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3034)

(cherry picked from commit 8ab9af5e28032478dd130467751b2e241eaee719)
2017-03-29 11:58:51 +02:00
Andy Polyakov
39ddc55f48 engines/e_capi.c: adhere to CryptAcquireContextW unconditionally.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 3a5b64b2f039a237b595961da07350b3f23282d0)
2017-03-29 11:58:44 +02:00
Andy Polyakov
3c9e644192 engine/e_capi.c: more formatting and styling fixes.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 8f0e5888ea4c577c5a1f0d667786da6376099c86)
2017-03-29 11:58:37 +02:00
Andy Polyakov
f5d82af6ef engines/e_capi.c: formatting and styling fixes.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit e08b444ac097825b10d3b90dbdb0d7197567cc4d)
2017-03-29 11:58:27 +02:00
Steven Collison
b4db8104fb doc: Add stitched ciphers to EVP_EncryptInit.pod
These ciphers don't appear to be documented anywhere. Given the
performance[1] benefits I think it makes sense to expose them.

[1] https://software.intel.com/sites/default/files/open-ssl-performance-paper.pdf

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3067)
(cherry picked from commit 209fac9f8a24000beaa8a438517115b42ca7e7c6)
2017-03-29 09:32:53 +01:00
Steven Collison
27c9c6b262 doc: Add missing options in s_{server,client}
These were added to the help in ad775e04f6dab but not the pods.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3065)
(cherry picked from commit 254b58fd7335fa3c58e2535d46658109ffd8bdcd)
2017-03-29 09:26:18 +01:00
Jon Spillett
c6f2dc757f Add documentation for SNI APIs
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3071)
(cherry picked from commit 8c55c4614731487449a02f90ff9a209ff6c63447)
2017-03-29 07:30:05 +02:00
Rich Salz
1d1255fe99 Remove duplicate doc
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3068)
(cherry picked from commit a01dbac232166563cdeafcbe31f321c05d164a10)
2017-03-29 07:20:20 +02:00
FdaSilvaYY
5f028d6801 Fix 0 -> NULL, indentation
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3066)
(cherry picked from commit a6ac1ed686346d2164c16446624c973e51d3ae92)
2017-03-28 16:21:26 -04:00
FdaSilvaYY
9ade16edd5 Refomat a few comments on 80 cols
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3066)
(cherry picked from commit cbe952418376a25acd872db4281a0b09735001f1)
2017-03-28 16:21:03 -04:00
FdaSilvaYY
389252a37e Fix a few more typos
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3066)
(cherry picked from commit 1ee4b98e695cd041da931c10fbdaf82f0ee0f268)
2017-03-28 16:20:02 -04:00
FdaSilvaYY
a0cdcf9bc8 Spelling fixes
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3066)
(cherry picked from commit a8cd439bf58708ffe234a9f707cf6a394d28a1f9)
2017-03-28 16:18:15 -04:00
Jon Spillett
fd2975883d Add documentation for SSL_*_ex_data() functions
[skip ci]

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3050)
(cherry picked from commit 09fdfa4b2fe4c9770c27cd523a5bf55b1d50eac9)
2017-03-28 21:54:23 +02:00
Rich Salz
37e4be4a86 Move PRIu64 to e_os.h
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3061)
2017-03-28 11:38:55 -04:00
Matt Caswell
0f954d65f4 Provide documentation for missing SSL_SESSION_* functions
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3052)
(cherry picked from commit b31db50528ccfd493b3be73f55c53f4606943d28)
2017-03-28 15:25:20 +01:00
Emilia Kasper
4c8b3b5c5a asynctest: don't depend on apps
Remove unnecessary include of apps.h. Tests shouldn't take a
dependency on apps. In this case, there is no dependency, the include
is unnecessary.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-03-28 14:38:55 +02:00
Hannes Magnusson
231fa2b766 Remove redundant decl of 509_STORE_set_flags
a47bc283 accidentally adds another define for X509_STORE_set_flags
It is already defined 5lines prior

CLA: trivial

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3047)

(cherry picked from commit feb891990a5137bbe11768a11100d2b423a6b11e)
2017-03-28 08:38:17 -04:00
Richard Levitte
7dca72af91 In err_cleanup(), cleanup the thread local storage too
Fixes #3033

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3035)
(cherry picked from commit 165f1c3ef39680471339d21b9f6c12ea86b4a26a)
2017-03-27 12:55:34 +02:00
Andy Polyakov
be25316469 aes/asm/bsaes-armv7.pl: relax stack alignment requirement.
Even though Apple refers to Procedure Call Standard for ARM Architecture
(AAPCS), they apparently adhere to custom version that doesn't follow
stack alignment constraints in the said standard. [Why or why? If it's
vendor lock-in thing, then it would be like worst spot ever.] And since
bsaes-armv7 relied on standard alignment, it became problematic to
execute the code on iOS.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 0822d41b6d54132df96c02cc6f6fa9b179378351)
2017-03-26 18:30:41 +02:00
Bernd Edlinger
2ba62f0649 Don't access memory before checking the correct length in aesni_cbc_hmac_sha256_ctrl in case EVP_CTRL_AEAD_TLS1_AAD.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3023)

(cherry picked from commit 1b6f5a4d3b8cdb02e0bba6878a2b70c850522440)
2017-03-25 11:14:03 +01:00
Zack Williams
943a3ccb96 "any" instead of "and"
The "and" should be an "any"

Fixed in LibreSSL's docs: http://man.openbsd.org/man5/x509v3.cnf.5#Subject_alternative_name

CLA: trivial

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2980)
(cherry picked from commit a41815f05e71009d2a5148bd30b70f47186ed66b)
2017-03-24 14:08:30 +01:00
Ian Spence
f4944142b8 Fix function documentation
CLA: trivial

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2972)
(cherry picked from commit f5fd3848fe5033534b92d2d18ed6fbd16741a0a2)
2017-03-24 13:39:25 +01:00
Andy Polyakov
6fd7aa95f0 bn/asm/sparcv9-mont.pl: fix squaring code path.
This module is used only with odd input lengths, i.e. not used in normal
PKI cases, on contemporary processors. The problem was "illuminated" by
fuzzing tests.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 120a9e1a825bd0407639bedb1e8e15823cf7a545)
2017-03-24 12:21:10 +01:00
Rich Salz
a9614a81c6 Look for comma before - in POD pages
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3021)
(cherry picked from commit 3ba4dac67a63c2d2589d46095d989b301cd62650)
2017-03-23 13:54:10 -04:00
Richard Levitte
ac47173594 Fix find-doc-nits: { is significant in regexps
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3019)
(cherry picked from commit 5d5835219ea84b6aa35f82791fdc585362e210d4)
2017-03-23 15:27:06 +01:00
Andy Polyakov
1371be1500 modes/ocb128.c: fix misaligned access in ILP32 builds on 64-bit processors.
One could have fixed the problem by arranging 64-bit alignment of
EVP_AES_OCB_CTX.aad_buf in evp/e_aes.c, but CRYPTO_ocb128_aad
prototype doesn't imply alignment and we have to honour it.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2994)

(cherry picked from commit a2bb183623dac253792753b82e291fd1d180aa78)
2017-03-22 11:10:17 +01:00
Andy Polyakov
09de9f0435 aes/asm/aesni-sha*-x86_64.pl: fix IV handling in SHAEXT paths.
Initial IV was disregarded on SHAEXT-capable processors. Amazingly
enough bulk AES128-SHA* talk-to-yourself tests were passing.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2992)

(cherry picked from commit 08d09628d2c9f3ef599399d8cad021a07ab98347)
2017-03-22 11:04:31 +01:00
Richard Levitte
28991705b7 Fix test/recipes/80-test_ssl_old.t
Cherry-pick error

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3006)
2017-03-21 13:31:14 +01:00
David Benjamin
72afe2fdc7 Remove duplicate X509_OBJECT free function.
These two functions do the same thing.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3001)
(cherry picked from commit b6ef12c4baa3a2c1ff0e3ac71270588dfcfe8cbd)
2017-03-21 10:23:33 +00:00
Richard Levitte
256315dee1 Rework how protocol specific ciphers in 80-test_ssl_old.t are picked out
The code to do this incorrectly assumed that the protocol version
could be used as a valid cipher suite  for the 'openssl cipher'
command.  While this is true in some cases, that isn't something to be
trusted.  Replace that assumption with code that takes the full
'openssl ciphers' command output and parses it to find the ciphers we
look for.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2956)
(cherry picked from commit 9ea6d56d044a95459e563abdc85aed26149e6ee9)
2017-03-21 10:21:29 +01:00
Richard Levitte
249452df67 Fix decoding of ASN.1 LONG and ZLONG items
LONG and ZLONG items (which are OpenSSL private special cases of
ASN1_INTEGER) are encoded into DER with padding if the leading octet
has the high bit set, where the padding can be 0x00 (for positive
numbers) or 0xff (for negative ones).

When decoding DER to LONG or ZLONG, the padding wasn't taken in
account at all, which means that if the encoded size with padding
is one byte more than the size of long, decoding fails.  This change
fixes that issue.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3000)
2017-03-20 22:10:31 +01:00
Rich Salz
201eb73cfd Document BIO_printf family
Also fix an error in UI_STRING (typo; wrong case).

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2999)
(cherry picked from commit 2ca2e9175d54dc66a66fe2a51ff5dd9b3bc899dc)
2017-03-20 16:56:30 -04:00
Bernd Edlinger
d63f25ff84 Fix the error handling in CRYPTO_dup_ex_data.
Fix a strict aliasing issue in ui_dup_method_data.
Add test coverage for CRYPTO_dup_ex_data, use OPENSSL_assert.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2997)
2017-03-20 19:35:39 +01:00
Richard Levitte
2af4b3fe32 Fix docs for X509_CRL_get0_by_serial() and X509_CRL_get0_by_cert()
They both return 2 when the revoked entry that's found has the reason
removeFromCRL.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2993)
(cherry picked from commit cdd6c8c5785f44026d58b542431674598db18493)
2017-03-20 14:36:43 +01:00
Péter Budai
8d049ed24b Fixed PKCS5_PBKDF2_HMAC() to adhere to the documentation.
The documentation of this function states that the password parameter
can be NULL. However, the implementation returns an error in this case
due to the inner workings of the HMAC_Init_ex() function.
With this change, NULL password will be treated as an empty string and
PKCS5_PBKDF2_HMAC() no longer fails on this input.

I have also added two new test cases that tests the handling of the
special values NULL and -1 of the password and passlen parameters,
respectively.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1692)
(cherry picked from commit fa013b65241dfed9b7d9e10e0adfedc9869c797e)
2017-03-17 08:57:04 -04:00
Matt Caswell
79037e8514 Fix no-dtls builds
Commits f2ff1432f in master and 14d4d7eda in 1.1.0 broke the no-dtls build
by moving the position of a "#endif" for OPENSSL_NO_DTLS in a change
which is otherwise unrelated to DTLS. This puts it back to where it was.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2974)
(cherry picked from commit 9998b32cb63b0bdd3d014abfa1d70e9a2c20a283)
2017-03-17 12:37:30 +00:00
Paul Yang
153442640d Fix typo in ASYNC_WAIT_CTX_new.pod doc
For the function that get the changed fds, it should be
'ASYNC_WAIT_CTX_get_changed_fds()' instead of 'ASYNC_WAIT_CTX_fds_have_changed()'.

CLA: trivial

Signed-off-by: Paul Yang <paulyang.inf@gmail.com>

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2967)
2017-03-16 13:51:20 +00:00
Richard Levitte
078fdfc446 Rather use -out parameter than redirect stdout
On some platforms, setting stdout to binary mode isn't quite enough,
which makes the result unusable.  With -out, we have better control.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2939)
(cherry picked from commit d8f9213ae2f0c59198fe56eeb70c34d735422254)
2017-03-16 13:06:32 +01:00
FdaSilvaYY
14d4d7eda1 Simplify code around next_proto.len by changing 'len' data type.
clean an useless static qualifier and a dead comment.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2278)

(cherry picked from commit f2ff1432fc50e5033471859dc9899eb219278a7a)
2017-03-16 11:44:22 +01:00
Bernd Edlinger
ef727bc566 Fixed a crash in print_notice.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2935)
(cherry picked from commit 29d1fad78899e5ae2997b19937a175784b21c996)
2017-03-15 19:38:31 -04:00
Pauli
71683a1d36 Update doc for sk_TYPE_find() and sk_TYPE_find_ex()
to better describe the vagaries in their behaviour.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2958)
(cherry picked from commit 89b06ca7b0b08d31ac48275d1376a7046dd75f55)
2017-03-15 09:40:09 -04:00
Andy Polyakov
1737382810 NOTES.WIN: mention Strawberry Perl as option.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 3a80bd29be74b50771dd20e15282db693dbe9522)
2017-03-15 12:19:04 +01:00
Richard Levitte
aa25177560 VMS: throw away [.util]shareable_image_wrap.c.in and add replacement scripts
[.util]shareable_image_wrap.c.in was never useful because lib$spawn()
insisted on combining stdout and stderr into one.

Instead, we introduce two scripts that create and destroy a temporary
environment where the local shareable images become available,
[.util]local_shlib.com and [.util]unlocal_shlib.com.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2948)
2017-03-14 22:22:17 +01:00
Benjamin Kaduk
b1163cc8b8 Fix a -Wsign-compare warning
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2940)
(cherry picked from commit 96a5d7fdbaa7aea5e5090e0f7dc2973943986fc9)
2017-03-14 18:10:04 +01:00
Benjamin Kaduk
3aa62f3951 Fix some -Wshadow warnings
Found using various (old-ish) versions of gcc.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2940)
(cherry picked from commit aebe9e399109dcde63a1d0328ffdfc5619b49431)
2017-03-14 18:10:00 +01:00