summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-09-18Add cast5 ciphers to default providerShane Lontis
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9929)
2019-09-18Change PARAMETER NAMES links to PARAMETERSPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9905)
2019-09-18Use PARAMETERS instead of PARAMETER NAMES for the heading for consistency.Pauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9905)
2019-09-18Fix links to functions.Pauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9905)
2019-09-18Cleanup KDF section 1 documentation.Pauli
Remove reference to EVP_KDF_ctrl_str and replace it with EVP_KDF_CTX_set_params. Add missing links, and specify two extra KDFs. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9905)
2019-09-18Clean up KDF documentation in section 7.Pauli
The EVP_KDF_ctrl function doesn't exist anymore and have been replaced by EVP_KDF_CTX_set_params. The EVP_KDF_new_id function doesn't exist either and EVP_KDF_new should be used instead. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9905)
2019-09-18Add support for io_pgetevents_time64 syscallAlistair Francis
32-bit architectures that are y2038 safe don't include syscalls that use 32-bit time_t. Instead these architectures have suffixed syscalls that always use a 64-bit time_t. In the case of the io_getevents syscall the syscall has been replaced with the io_pgetevents_time64 syscall instead. This patch changes the io_getevents() function to use the correct syscall based on the avaliable syscalls and the time_t size. We will only use the new 64-bit time_t syscall if the architecture is using a 64-bit time_t. This is to avoid having to deal with 32/64-bit conversions and relying on a 64-bit timespec struct on 32-bit time_t platforms. As of Linux 5.3 there are no 32-bit time_t architectures without __NR_io_getevents. In the future if a 32-bit time_t architecture wants to use the 64-bit syscalls we can handle the conversion. This fixes build failures on 32-bit RISC-V. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9819)
2019-09-18Add IDEA ciphers to default providerShane Lontis
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9917)
2019-09-18Fix Compiler error/warning for windows icl buildShane Lontis
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9907)
2019-09-18Fix Coverity CID:1453685 'unreachable code' in aes_xts code.Shane Lontis
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/9902)
2019-09-18crypto/bn/build.info: Correct use of SSE2 definitionRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9879)
2019-09-17apps/pkcs12: print multiple PKCS#12 safeBag attribute values if presentJon Spillett
Currently the pkcs12 app will only ever print the first value of a multi-value attribute. This is OK for some attributes (e.g. friendlyName, localKeyId) but may miss values for other attributes. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/9751)
2019-09-17Fix Solaris aes_hw_t4 compile issueShane Lontis
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9910)
2019-09-16Fix building statically without any dso supportBernd Edlinger
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9895)
2019-09-16Unify all assembler file generatorsRichard Levitte
They now generally conform to the following argument sequence: script.pl "$(PERLASM_SCHEME)" [ C preprocessor arguments ... ] \ $(PROCESSOR) <output file> However, in the spirit of being able to use these scripts manually, they also allow for no argument, or for only the flavour, or for only the output file. This is done by only using the last argument as output file if it's a file (it has an extension), and only using the first argument as flavour if it isn't a file (it doesn't have an extension). While we're at it, we make all $xlate calls the same, i.e. the $output argument is always quoted, and we always die on error when trying to start $xlate. There's a perl lesson in this, regarding operator priority... This will always succeed, even when it fails: open FOO, "something" || die "ERR: $!"; The reason is that '||' has higher priority than list operators (a function is essentially a list operator and gobbles up everything following it that isn't lower priority), and since a non-empty string is always true, so that ends up being exactly the same as: open FOO, "something"; This, however, will fail if "something" can't be opened: open FOO, "something" or die "ERR: $!"; The reason is that 'or' has lower priority that list operators, i.e. it's performed after the 'open' call. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9884)
2019-09-16build.info: For all assembler generators, remove all argumentsRichard Levitte
Since the arguments are now generated in the build file templates, they should be removed from the build.info files. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9884)
2019-09-16Build files: Unify standard arguments for assembler generating scripsRichard Levitte
- Make the last argument always be the output file. - Make the first argument always be the flavour, even if there is no flavour (i.e. it might become the empty string). - Make the next to last argument to be $(PROCESSOR) if that one has a value. - Remaining arguments are C prepropressor arguments. Perl scripts that should handle this may use the following code: $output = pop; $flavour = shift; if ($ARGV[$#ARGV] eq '386') { # Do 386 specific things } else { # Do whatever else, with the knowledge the @ARGV contains # C preprocessor arguments } Some scripts don't care about anything than $output, and that's ok. Some scripts do care, but handle it a little differently, and that's ok too (notably, the x86 scripts call asm_init() with the first and the last argument after having popped $output). As long as they handle the argument order right, they are going to be fine. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9884)
2019-09-16clearing the ecx private key memoryManishPatidar1
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9830)
2019-09-16Avoid mentioning ctrl_str in the MAC documentation.Pauli
Change to mentioning params instead. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9908)
2019-09-16Use "PARAMETERS" in the documentation headings.Pauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9906)
2019-09-15Add blowfish ciphers to default providerShane Lontis
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9887)
2019-09-15Add fips module integrity checkShane Lontis
Add environment variable for setting CONF .include path Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9769)
2019-09-15Fix compile error detected by Solaris buildShane Lontis
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9901)
2019-09-15Fix aesni_xts compile errorShane Lontis
Block copy bug.. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9900)
2019-09-15Fix small typo in doc for X509_STORE_CTX_newJan-Frederik Rieckers
CLA: trivial Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9894)
2019-09-15Fix examples in the section 7 KDF man pages.Pauli
All of the examples called EVP_KDF_set_params() when they should have been calling EVP_KDF_CTX_set_params(). Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9898)
2019-09-14fix CRMF symmetric key handlingAndreas Kretschmer
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9774)
2019-09-14Use param types instead of native types in the param descriptionsPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9891)
2019-09-14Use param types for parameter descriptions. Mention a size_t limit to those ↵Pauli
where it makes sense. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9891)
2019-09-14Add wording to limit the 'size' parameter to no more than can be specified ↵Pauli
using a size_t variable Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9891)
2019-09-14Add aes_xts cipher to providersShane Lontis
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9327)
2019-09-14Fix S390X bad size_t that causes memory trash in legacy ciphersShane Lontis
This caused a SEGV inside tls13_enc() when using chacha_poly. The tls code assigns the iv_length to a size_t (even though it is an int). This is actually really bad since it could be -1, which will then trash the iv buffer. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/9890)
2019-09-13ERR: Change get_error_values() to use an enumRich Salz
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9870)
2019-09-13Fix potential memory leaks with BN_to_ASN1_INTEGERBernd Edlinger
Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9833)
2019-09-13Define the MAC parameter types without using C type names to avoid confusion.Pauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9875)
2019-09-12Document the deprecation of ERR_STATE and ERR_get_state()Richard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9462)
2019-09-12Deprecate ERR_get_state()Richard Levitte
Internally, we still need this function, so we make it internal and then add a new ERR_get_state() that simply calls the internal variant, unless it's "removed" by configuration. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9462)
2019-09-12Deprecate the public definition of ERR_STATERichard Levitte
The intention is to make it opaque later on. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9462)
2019-09-12confdata.pm.in: New template for configdata.pmRichard Levitte
To have the configdata.pm text embedded in Configure was kind of ugly, and becomes clearer if put into a template file, configdata.pm.in. We can then use OpenSSL::Template to generate it. We also modify configdata.pm to be the build file generator, and run it from Configure. The benefit with that is that developers who tinker and play with the build file can do a "factory reset" without having to go through the configuration process, i.e. they can re-use the config data the already have. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9693)
2019-09-12util/dofile.pl, util/perl/OpenSSL/Template.pm: move parts of dofile.plRichard Levitte
We make a module OpenSSL::Template from the central parts of util/dofile.pl, and also reduce the amount of ugly code with more proper use of Text::Template. OpenSSL::Template is a simply subclass of Text::Template. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9693)
2019-09-12Add a CHANGES entry for the recent ERR changesRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9756)
2019-09-12Document the deprecation of ERR_func_error_string()Richard Levitte
Also, correct the output template for ERR_error_string() and ERR_error_string_n(). Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9756)
2019-09-12Modernise ERR_print_errors_cb()Richard Levitte
ERR_print_errors_cb() used functionality that isn't suitable any more, as that functionality couldn't integrate the error record function name strings. We therefore refactor it a bit to use better adapted methods. Fixes #9756 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9756)
2019-09-12Modernise the ERR functionality further (new functions and deprecations)Richard Levitte
ERR_func_error_string() essentially returns NULL, and since all function codes are now removed for all intents and purposes, this function has fallen out of use and cannot be modified to suit the data, since its only function is to interpret an error code. To compensate for the loss of error code, we instead provide new functions that extracts the function name strings from an error record: - ERR_get_error_func() - ERR_peek_error_func() - ERR_peek_last_error_func() Similarly, the once all encompasing functions ERR_peek_last_error_line_data(), ERR_peek_error_line_data() and ERR_get_error_line_data() lack the capability of getting the function name string, so we deprecate those and add these functions to replace them: - ERR_get_error_all() - ERR_peek_error_all() - ERR_peek_last_error_all() Finally, we adjust a few lines of code that used the now deprecated functions. Fixes #9756 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9756)
2019-09-12include/openssl/err.h: Depend on OPENSSL_NO_FILENAMES, not OPENSSL_NO_ERRRichard Levitte
The configuration option 'no-err' is documented to be used to avoid loading error related string tables. For some reason, it was also used to define if ERR_PUT_error() would pass the source file name and line information or not. The configuration option 'no-filenames' is documented to be used to avoid passing the source file name and line anywhere. So, the definition of ERR_PUT_error() should depend on OPENSSL_NO_FILENAMES rather than OPENSSL_NO_ERR. Furthermore, the definition of OPENSSL_FILE and OPENSSL_LINE depends on if OPENSSL_NO_FILENAMES is defined or not, so there was never any need to do extra macro gymnastics in include/openssl/err.h, so we simply remove it and use OPENSSL_FILE and OPENSSL_LINE directly. Finally, the macro OPENSSL_FUNC is unaffected by all these configuration options, so it should be used in all macros that call ERR_set_debug(). Fixes #9756 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9756)
2019-09-12include/openssl/macros.h: Remove the PEDANTIC OPENSSL_FUNC definitionRichard Levitte
There was a section to define OPENSSL_FUNC that depended on PEDANTIC being defined. That is an internal build macro that should never appear in a public header. The solution was simple, replace it with a check of __STRICT_ANSI__. Fixes #9756 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9756)
2019-09-12util/mkerr.pl: make it not depend on the function codeRichard Levitte
The output C code was made to use ERR_func_error_string() to see if a string table was already loaded or not. Since this function returns NULL always, this check became useless. Change it to use ERR_reason_error_string() instead, as there's no reason to believe we will get rid of reason strings, ever. To top it off, we rebuild all affected C sources. Fixes #9756 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9756)
2019-09-12BIO_f_zlib: Properly handle BIO_CTRL_PENDING and BIO_CTRL_WPENDING calls.Tomas Mraz
There can be data to write in output buffer and data to read that were not yet read in the input stream. Fixes #9866 Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9877)
2019-09-12Travis and Appveyor: use HARNESS_VERBOSE_FAILURE rather than HARNESS_VERBOSERichard Levitte
This allows for shorter logs, and also logs that only show the details for tests that fail. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9862)
2019-09-12Rework test/run_tests.pl to support selective verbosity and TAP copyRichard Levitte
This includes a complete rework of how we use TAP::Harness, by adding a TAP::Parser subclass that allows additional callbacks to be passed to perform what we need. The TAP::Parser callbacks we add are: ALL to print all the TAP output to a file (conditionally) to collect all the TAP output to an array (conditionally) EOF to print all the collected TAP output (if there is any) if any subtest failed To get TAP output to file, the environment variable HARNESS_TAP_COPY must be defined, with a file name as value. That file will be overwritten unconditionally. To get TAP output displayed on failure, the make variable VERBOSE_FAILURE or VF must be defined with a non-emoty value. Additionally, the output of test recipe names has been changed to only display its basename. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9862)