Rich Salz [Wed, 14 Jun 2017 17:54:04 +0000 (13:54 -0400)]
Undo commit
40720ce
Comment in the commit:
/* Ignore NULLs, thanks to Bob Beck <beck@obtuse.com> */
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3700)
Rich Salz [Wed, 14 Jun 2017 17:53:01 +0000 (13:53 -0400)]
Undo commit
de02ec2
Original text:
Check if a random "file" is really a device file, and treat it
specially if it is.
Add a few OpenBSD-specific cases.
This is part of a large change submitted by Markus Friedl <markus@openbsd.or
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3700)
Rich Salz [Wed, 14 Jun 2017 17:47:17 +0000 (13:47 -0400)]
Undo commit
0755217
Original text:
Fix Perl problems on sparc64.
This is part of a large change submitted by Markus Friedl
<markus@openbsd.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3700)
Richard Levitte [Wed, 5 Jul 2017 18:54:08 +0000 (20:54 +0200)]
STORE 'file' scheme loader: fix try_decode_params() to check ambiguity
The way try_decode_params works in raw more, it would take the first ASN1
that could decode and return a STORE_INFO with the resulting EVP_PKEY.
This change has it go through all the matching ASN1 methods and properly
check if there's more than one match, i.e. an ambiguity.
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/3863)
Benjamin Kaduk [Tue, 9 May 2017 23:39:50 +0000 (18:39 -0500)]
Error out when forcing an unsupported TLS version
If the result of a SSL_{CTX_,}set_{min,max}_proto_version() call
leaves the min and max version identical, and support for that version
is compiled out of the library, return an error. Such an object has
no hope of successfully completing a handshake, and this error may
be easier to decipher than the resulting handshake failure.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3422)
Benjamin Kaduk [Wed, 14 Jun 2017 16:47:02 +0000 (11:47 -0500)]
Improve BN_CTX documentation
Since BN_CTX_init() is gone, all calls use BN_CTX_new(). Also,
essentially all consumers will use BN_CTX_start()/BN_CTX_end(),
so make that more clear from the BN_CTX_new() man page.
Document the thread-unsafety of individual BN_CTX objects.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3682)
Richard Levitte [Wed, 5 Jul 2017 08:26:25 +0000 (10:26 +0200)]
Fix small UI issues
- in EVP_read_pw_string_min(), the return value from UI_add_* wasn't
properly checked
- in UI_process(), |state| was never made NULL, which means an error
when closing the session wouldn't be accurately reported.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/3849)
Richard Levitte [Wed, 5 Jul 2017 09:03:34 +0000 (11:03 +0200)]
Avoid possible memleak in X509_policy_check()
When tree_calculate_user_set() fails, a jump to error failed to
deallocate a possibly allocated |auth_nodes|.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/3850)
Pauli [Wed, 5 Jul 2017 03:40:23 +0000 (13:40 +1000)]
Fix compiler warnings
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/3839)
Rich Salz [Thu, 15 Jun 2017 00:34:37 +0000 (20:34 -0400)]
Undo commit
d420ac2
[extended tests]
Original text:
Use BUF_strlcpy() instead of strcpy().
Use BUF_strlcat() instead of strcat().
Use BIO_snprintf() instead of sprintf().
In some cases, keep better track of buffer lengths.
This is part of a large change submitted by Markus Friedl <markus@openbsd.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/3701)
Pauli [Tue, 4 Jul 2017 03:44:52 +0000 (13:44 +1000)]
Remove the TEST_check macro.
This macro aborted the process which stopped any later tests from running.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3838)
Rich Salz [Mon, 3 Jul 2017 17:33:58 +0000 (13:33 -0400)]
Add echo for end of each build phase
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3842)
Richard Levitte [Tue, 4 Jul 2017 15:18:31 +0000 (17:18 +0200)]
STORE: fix possible memory leak
If scheme is NULL, the allocated res is leaked
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3841)
Pauli [Mon, 3 Jul 2017 23:56:05 +0000 (09:56 +1000)]
Use the return value from write(2)
This prevents a warning when building with crypto-mdebug.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3836)
Rich Salz [Wed, 21 Jun 2017 12:55:02 +0000 (13:55 +0100)]
BN_pseudo_rand is really BN_rand
And BN_pseudo_rand_range is really BN_rand_range.
Document that we might deprecate those functions.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3743)
Andy Polyakov [Sat, 24 Jun 2017 19:26:44 +0000 (21:26 +0200)]
'make update' after objects/objects.txt update.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/3643)
Andy Polyakov [Sun, 18 Jun 2017 21:30:24 +0000 (23:30 +0200)]
objects/objects.txt: add SHA3 OIDs.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/3643)
Richard Levitte [Sat, 1 Jul 2017 16:28:50 +0000 (18:28 +0200)]
Correct documentation for UI_get0_result_string
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/3824)
Andy Polyakov [Fri, 30 Jun 2017 11:35:59 +0000 (13:35 +0200)]
sha/keccak1600.c: internalize KeccakF1600 and simplify SHA3_absorb.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Andy Polyakov [Fri, 30 Jun 2017 09:45:34 +0000 (11:45 +0200)]
sha/asm/keccak1600-x86_64.pl: close gap with Keccak Code Package.
[Also typo and readability fixes. Ryzen result is added.]
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Andy Polyakov [Fri, 30 Jun 2017 09:42:58 +0000 (11:42 +0200)]
sha/asm/keccak1600-s390x.pl: typo and readability, minor size optimization.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Andy Polyakov [Fri, 30 Jun 2017 09:42:00 +0000 (11:42 +0200)]
x86_64 assembly pack: fill some blanks in Ryzen results.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Rich Salz [Sun, 2 Jul 2017 16:16:38 +0000 (12:16 -0400)]
Various doc fixes
Fix a =head1 section name
Fix a typo in POD label
Remove a spurious =back
Add a missing blank line
Avoid 'legacy' -- use 'deprecated' if still needed if we cannot just reword.
Always do strict checking
Do not warn about missing "RETURN VALUES" unless -s is set.
Change OpenSSL version 1.1 -> 1.1.0
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3830)
Bernd Edlinger [Wed, 14 Jun 2017 18:25:52 +0000 (20:25 +0200)]
Fix potential crash in tls_construct_finished.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3667)
Bernd Edlinger [Tue, 13 Jun 2017 05:25:43 +0000 (07:25 +0200)]
Fix a crash in tls_construct_client_certificate.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3667)
Matt Caswell [Fri, 30 Jun 2017 09:45:11 +0000 (10:45 +0100)]
Fix TLSv1.3 exporter
We need to use the hashsize in generating the exportsecret not 0! Otherwise
we end up with random garbage for the secret.
It was pure chance that this passed the tests previously. It so happens
that, because we call SSL_export_keying_material() repeatedly for different
scenarios in the test, we end up in the tls13_export_keying_material() at
exactly the same position in the stack each time and therefore end up using
the same random garbage secret each time!
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3810)
Richard Levitte [Sat, 1 Jul 2017 10:14:37 +0000 (12:14 +0200)]
Remove the possibility to disable the UI module entirely
Instead, make it possible to disable the console reader that's part of
the UI module. This makes it possible to use the UI API and other UI
methods in environments where the console reader isn't useful.
To disable the console reader, configure with 'no-ui-console' /
'disable-ui-console'.
'no-ui' / 'disable-ui' is now an alias for 'no-ui-console' /
'disable-ui-console'.
Fixes #3806
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3820)
Richard Levitte [Sat, 1 Jul 2017 16:25:43 +0000 (18:25 +0200)]
Make sure OSSL_STORE_load() isn't caught in an endless loop
The post process callback might potentially say "no" to everything (by
constantly returning NULL) and thereby cause an endless loop. Ensure
that we stop all processing when "eof" is reached.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/3823)
Pauli [Mon, 3 Jul 2017 02:14:59 +0000 (12:14 +1000)]
Fix copyright date for the ARIA evp file.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3831)
Kurt Roeckx [Sun, 2 Jul 2017 15:40:51 +0000 (17:40 +0200)]
Update fuzz corpora
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #3829
Richard Levitte [Sun, 2 Jul 2017 09:54:40 +0000 (11:54 +0200)]
STORE 'file' scheme loader: DNS name in URI is case insensitive
... so compare accordingly with "//localhost"
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/3827)
Richard Levitte [Fri, 30 Jun 2017 18:47:45 +0000 (20:47 +0200)]
When apps_startup() fails, exit with a failure code and a message
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3816)
Rich Salz [Thu, 15 Jun 2017 16:03:40 +0000 (12:03 -0400)]
Cleanup some copyright stuff
Remove some incorrect copyright references.
Move copyright to standard place
Add OpenSSL copyright where missing.
Remove copyrighted file that we don't use any more
Remove Itanium assembler for RC4 and MD5 (assembler versions of old and
weak algorithms for an old chip)
Standardize apps/rehash copyright comment; approved by Timo
Put dual-copyright notice on mkcert
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3691)
Dr. Stephen Henson [Fri, 30 Jun 2017 18:55:47 +0000 (19:55 +0100)]
Fix build with no-threads no-ec
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3817)
Rich Salz [Fri, 30 Jun 2017 17:55:08 +0000 (13:55 -0400)]
Fix atfork flag. Avoid double-negatives :)
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/3815)
Rich Salz [Thu, 15 Jun 2017 16:08:35 +0000 (12:08 -0400)]
Merge Intel copyright notice into standard
This is done with the kind permission of Intel.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3813)
Rich Salz [Thu, 29 Jun 2017 15:40:19 +0000 (11:40 -0400)]
Add ECHO to makefiles for real silence
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3801)
Matt Caswell [Thu, 29 Jun 2017 14:03:14 +0000 (15:03 +0100)]
Drop support for OPENSSL_NO_TLS1_3_METHOD
There are no public TLSv1_3_*method() functions so
OPENSSL_NO_TLS1_3_METHOD doesn't make any sense and should be removed.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3800)
Rich Salz [Thu, 22 Jun 2017 18:00:06 +0000 (14:00 -0400)]
Add fork handlers, based on pthread_atfork
Only for Unix platforms
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3754)
Richard Levitte [Thu, 29 Jun 2017 19:47:54 +0000 (21:47 +0200)]
STORE: Make sure the loader to be registered is complete
Most of the loader function pointers are crucial, they must be defined
unconditionally. Therefore, let's make sure OSSL_STORE_register_loader
refuses to register incomplete loaders
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/3805)
Richard Levitte [Thu, 29 Jun 2017 19:46:02 +0000 (21:46 +0200)]
STORE: simplify store_loader_cmp()
We have already made sure that the loader scheme isn't NULL, so
checking if they are NULL or not when comparing registered loaders
is redundant. We still soft assert it, just to be entirely sure.
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/3805)
Richard Levitte [Thu, 29 Jun 2017 19:11:48 +0000 (21:11 +0200)]
util/mkdef.pl: Make symbol version processing Linux only
For Windows, we care which way it is, the resulting file is just a pile
of symbols. For VMS, we really need to care about the numeric ordering,
and getting the symbols sorted by symbol version too didn't agree with
that.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3804)
Richard Levitte [Thu, 29 Jun 2017 19:09:52 +0000 (21:09 +0200)]
util/mkdef.pl: Add UNIX as a platform
This allows us to guard Unix specific functions with
#ifndef / #ifdef OPENSSL_SYS_UNIX
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3804)
Andy Polyakov [Tue, 27 Jun 2017 19:45:18 +0000 (21:45 +0200)]
Add sha/asm/keccak1600-s390x.pl.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Andy Polyakov [Mon, 26 Jun 2017 15:39:43 +0000 (17:39 +0200)]
sha/asm/keccak1600-x86_64.pl: add CFI directives.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Andy Polyakov [Mon, 26 Jun 2017 15:29:24 +0000 (17:29 +0200)]
sha/asm/keccak1600-x86_64.pl: optimize by re-ordering instructions.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Andy Polyakov [Mon, 26 Jun 2017 15:28:13 +0000 (17:28 +0200)]
sha/asm/keccak1600-x86_64.pl: remove redundant moves.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Andy Polyakov [Mon, 26 Jun 2017 15:27:09 +0000 (17:27 +0200)]
Add sha/asm/keccak1600-x86_64.pl.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Richard Levitte [Tue, 6 Dec 2016 13:41:33 +0000 (14:41 +0100)]
Add internal functions to fetch PEM data from an opened BIO
store_attach_pem_bio() creates a STORE_CTX with the 'file' scheme
loader backend in PEM reading mode on an already opened BIO.
store_detach_pem_bio() detaches the STORE_CTX from the BIO and
destroys it (without destroying the BIO).
These two functions can be used in place of STORE_open() and
STORE_close(), and are present as internal support for other OpenSSL
functions.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2745)
Richard Levitte [Mon, 27 Feb 2017 13:30:00 +0000 (14:30 +0100)]
Make it possible to tell the file loader to use secure memory
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3483)
Steven Danneman [Tue, 27 Jun 2017 22:53:11 +0000 (15:53 -0700)]
Fix double array increment in s_client mysql connect
The packet parsing code for the server version string was incrementing
the array index twice on every iteration. This meant that strings with
an even number of characters would pass, but strings with an odd number
(ex: 5.7.18-0ubuntu0.16.04.1) would cause the pos variable to get out
of sync.
This would cause a later failure with "MySQL packet is broken."
CLA: trivial
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3799)
Richard Levitte [Tue, 27 Jun 2017 21:08:54 +0000 (23:08 +0200)]
STORE 'file' scheme loader: refactor the treatment of matches
Sometimes, 'file_load' couldn't really distinguish if a file handler
matched the data and produced an error or if it didn't match the data
at all.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Fri, 26 May 2017 16:36:26 +0000 (18:36 +0200)]
STORE: Add an entry in NEWS and CHANGES
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Thu, 18 May 2017 14:07:15 +0000 (16:07 +0200)]
STORE test recipe: Remove comment refering to OpenConnect
These tests were inspired by OpenConnect and incorporated
by permission of David Woodhouse under CLA
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Tue, 13 Dec 2016 12:47:13 +0000 (13:47 +0100)]
Add documentation for the storeutl app
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Tue, 13 Dec 2016 12:46:53 +0000 (13:46 +0100)]
Add documentation for STORE functions
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Sun, 11 Dec 2016 06:06:13 +0000 (07:06 +0100)]
engine app: print out information on STORE loaders and STORE FILE handlers
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Sun, 11 Dec 2016 06:02:06 +0000 (07:02 +0100)]
STORE: add ENGINE information to loaders
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Tue, 7 Feb 2017 15:30:31 +0000 (16:30 +0100)]
Test that storeutl with a directory path works as expected
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Tue, 7 Feb 2017 15:19:40 +0000 (16:19 +0100)]
STORE 'file' scheme loader: Add directory listing capability
This has it recognised when the given path is a directory. In that
case, the file loader will give back a series of names, all as URI
formatted as possible given the incoming URI.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Sat, 11 Feb 2017 00:18:29 +0000 (01:18 +0100)]
STORE 'file' scheme loader: Add handler for encrypted PKCS#8 data
Add a separate handler for encrypted PKCS#8 data. This uses the new
restart functionality.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Sat, 11 Feb 2017 00:17:50 +0000 (01:17 +0100)]
STORE 'file' scheme loader: refactor file_load to support decoding restart
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Thu, 8 Dec 2016 13:28:42 +0000 (14:28 +0100)]
STORE: Add a OSSL_STORE_INFO type to help support file handler restarts
Some containers might very simply decode into something new that
deserves to be considered as new (embedded) data. With the help of a
special OSSL_STORE_INFO type, make that new data available to the
loader functions so they can start over.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Mon, 5 Dec 2016 14:13:01 +0000 (15:13 +0100)]
STORE tests: add PKCS#12 tests
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Sat, 11 Feb 2017 00:16:07 +0000 (01:16 +0100)]
STORE 'file' scheme loader: add support for the PKCS#12 container
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Mon, 5 Dec 2016 22:15:58 +0000 (23:15 +0100)]
STORE 'file' scheme loader: add support for containers
Containers are objects that are containers for a bunch of other
objects with types we recognise but aren't readable in a stream. Such
containers are read and parsed, and their content is cached, to be
served one object at a time.
This extends the FILE_HANDLER type to include a function to destroy
the cache and a function to simulate the EOF check.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Sat, 19 Nov 2016 19:24:17 +0000 (20:24 +0100)]
Add a test that checks the store utility
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Sat, 19 Nov 2016 18:38:23 +0000 (19:38 +0100)]
Add a simple store utility command
This command can be used to view the contents of any supported type of
information fetched from a URI, and output them in PEM format.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Mon, 28 Nov 2016 16:30:21 +0000 (17:30 +0100)]
Add a STORE loader for the "file" scheme
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Fri, 18 Nov 2016 17:18:37 +0000 (18:18 +0100)]
Make it possible to peek at BIO data through BIO_f_buffer()
This is needed for the upcoming "file" scheme STORE loader.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Fri, 18 Nov 2016 17:17:20 +0000 (18:17 +0100)]
Make asn1_d2i_read_bio accessible from STORE
This is needed for the upcoming "file" scheme STORE loader.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Thu, 8 Dec 2016 14:51:31 +0000 (15:51 +0100)]
Add the STORE module
This STORE module adds the following functionality:
- A function OSSL_STORE_open(), OSSL_STORE_load() and OSSL_STORE_close()
that accesses a URI and helps loading the supported objects (PKEYs,
CERTs and CRLs for the moment) from it.
- An opaque type OSSL_STORE_INFO that holds information on each loaded
object.
- A few functions to retrieve desired data from a OSSL_STORE_INFO
reference.
- Functions to register and unregister loaders for different URI
schemes. This enables dynamic addition of loaders from applications
or from engines.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Richard Levitte [Tue, 6 Dec 2016 03:29:08 +0000 (04:29 +0100)]
Make it possible to refer to ERR_R_UI_LIB
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3542)
Matt Caswell [Wed, 28 Jun 2017 16:18:27 +0000 (17:18 +0100)]
Updates following review of SSL_export_key_material() changes
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3782)
Matt Caswell [Tue, 27 Jun 2017 15:32:40 +0000 (16:32 +0100)]
Update the SSL_export_keying_material() documentation for TLSv1.3
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3782)
Matt Caswell [Tue, 27 Jun 2017 15:28:25 +0000 (16:28 +0100)]
Add an SSL_export_keying_material() test
There aren't any test vectors for this, so all we do is test that both
sides of the communication create the same result for different protocol
versions.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3782)
Matt Caswell [Tue, 27 Jun 2017 13:57:15 +0000 (14:57 +0100)]
Update SSL_export_keying_material() for TLSv1.3
Fixes #3680
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3782)
Greg Zaverucha [Wed, 28 Jun 2017 00:38:25 +0000 (17:38 -0700)]
Fix sample code
Fix memory leak in sample encryption code and check return value of
fopen.
CLA: trivial
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3790)
Richard Levitte [Tue, 27 Jun 2017 09:25:03 +0000 (11:25 +0200)]
crypto/mem.c: on Windows, use rand() instead of random()
Windows doesn't provide random(). In this particular case, our
requirements on the quality of randomness isn't high, so we don't
need to care how good randomness rand() does or doesn't provide.
Fixes #3778
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3779)
Todd Short [Mon, 26 Jun 2017 13:21:20 +0000 (09:21 -0400)]
ssl_session_dup() missing ext.alpn_session
Properly copy ext.alpn_session in ssl_session_dup()
Use OPENSSL_strndup() as that's used in ssl_asn1.c
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/3770)
Richard Levitte [Wed, 28 Jun 2017 12:39:20 +0000 (14:39 +0200)]
Add dependency on apps/progs.h for test/uitest.o
uitest.o depends on apps.h which depends on progs.h, which is
dynamically generated, so we need to explicitely add a dependency
between uitest.o and progs.h for the latter to be generated in time.
Fixed #3793
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3794)
Richard Levitte [Wed, 28 Jun 2017 11:01:29 +0000 (13:01 +0200)]
test/uitest.c's pem_password_cb returned 1 instead of the password length
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3791)
Richard Levitte [Wed, 28 Jun 2017 09:17:24 +0000 (11:17 +0200)]
UI_UTIL_wrap_read_pem_callback: make sure to terminate the string received
The callback we're wrapping around may or may not return a
NUL-terminated string. Let's ensure it is.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3791)
Richard Levitte [Wed, 21 Jun 2017 20:03:29 +0000 (22:03 +0200)]
Document the added devcrypto engine in CHANGES
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3744)
Richard Levitte [Thu, 11 May 2017 10:52:47 +0000 (12:52 +0200)]
Comment on the lack of documentation for asymmetric ciphers
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3744)
Richard Levitte [Tue, 18 Apr 2017 06:51:51 +0000 (08:51 +0200)]
Adapt for BSD cryptodev.h differences
The BSD cryptodev.h doesn't have things like COP_FLAG_WRITE_IV and
COP_FLAG_UPDATE. In that case, we need to implement that
functionality ourselves.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3744)
Richard Levitte [Fri, 24 Mar 2017 15:19:00 +0000 (16:19 +0100)]
Add new /dev/crypto engine
Based on cryptodev-linux
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3744)
Richard Levitte [Tue, 27 Jun 2017 14:05:12 +0000 (16:05 +0200)]
Add the common error ERR_R_OPERATION_FAIL
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3744)
Rich Salz [Mon, 26 Jun 2017 16:02:57 +0000 (12:02 -0400)]
Use randomness not entropy
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/3773)
Benjamin Kaduk [Mon, 26 Jun 2017 17:05:09 +0000 (12:05 -0500)]
Fix return-value checks in OCSP_resp_get1_id()
Commit
db17e43d882ecde217e1dce4a2b8c76c3ed134bf added the function
but would improperly report success if the underlying dup operation
failed.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3775)
Richard Levitte [Tue, 27 Jun 2017 11:47:22 +0000 (13:47 +0200)]
util/mkerr.pl: avoid getting an annoying warning about negative count
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3781)
Richard Levitte [Tue, 27 Jun 2017 11:34:17 +0000 (13:34 +0200)]
util/mkerr.pl: allow module names prefixed with OSSL_ or OPENSSL_
To make sure that our symbols don't clash with other libraries, we
claim the namespaces OSSL and OPENSSL. Because C doesn't provide
namespaces, the only solution is to have them as prefixes on symbols,
thus we allow OSSL_ and OPENSSL_ as prefixes.
These namespace prefixes are optional for the foreseeable future, and
will only be used for new modules as needed on a case by case basis,
until further notice.
For extra safety, there's an added requirement that module names -
apart from the namespace prefix - be at least 2 characters long.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3781)
Rich Salz [Mon, 26 Jun 2017 18:04:02 +0000 (14:04 -0400)]
Rename static global "lock" to "obj_lock"
Breaks djgpp, masks a common kernel function name.
Thanks to Gisle Vanem for pointing this out.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3776)
Paul Yang [Thu, 22 Jun 2017 10:52:29 +0000 (18:52 +0800)]
Change to check last return value of BN_CTX_get
To make it consistent in the code base
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/3749)
Paul Yang [Sun, 25 Jun 2017 17:09:46 +0000 (01:09 +0800)]
Fix return value checking for BIO_sock_init
BIO_sock_init returns '-1' on error, not '0', so it's needed to check
explicitly istead of using '!'.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/3766)
Paul Yang [Sun, 25 Jun 2017 03:49:19 +0000 (11:49 +0800)]
Fix inaccurate comments in bn_prime.c
As well as a coding style nit is fixed.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/3763)
Richard Levitte [Sun, 25 Jun 2017 20:06:25 +0000 (22:06 +0200)]
tsget.in: remove call of WWW::Curl::Easy::global_cleanup
This function is undocumented, but similarly named functions (such as
'curl_global_cleanup') are documented as internals that should not be
called by scripts.
Fixes #3765
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3768)
Benjamin Kaduk [Sun, 25 Jun 2017 02:46:36 +0000 (21:46 -0500)]
Fix no-dsa build again
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3762)
Benjamin Kaduk [Wed, 26 Apr 2017 20:17:57 +0000 (15:17 -0500)]
Add tests for deprecated sigalgs with TLS 1.3 ClientHellos
Test for each of DSA, SHA1, and SHA224.
Use the symbolic names for SignatureScheme comparisons just added.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3326)
Benjamin Kaduk [Thu, 27 Apr 2017 15:32:30 +0000 (10:32 -0500)]
Fix no-dsa build
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3326)