aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove EVP_CIPH_FLAG_DEFAULT_ASN1 from all provided implementationsRichard Levitte2019-10-019-34/+35
| | | | | | | Since that flag has lost its relevance, don't use it any more. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10008)
* Adapt EVP_CIPHER_{param_to_asn1,asn1_to_param} for use with provider.Richard Levitte2019-10-014-39/+105
| | | | | | | | | | | | | | | | | | | | | | | | | So far, these two funtions have depended on legacy EVP_CIPHER implementations to be able to do their work. This change adapts them to work with provided implementations as well, in one of two possible ways: 1. If the implementation's set_asn1_parameters or get_asn1_parameters function pointers are non-NULL, this is a legacy implementation, and that function is called. 2. Otherwise, if the cipher doesn't have EVP_CIPH_FLAG_CUSTOM_ASN1 set, the default AlgorithmIdentifier parameter code in libcrypto is executed. 3. Otherwise, if the cipher is a provided implementation, the ASN1 type structure is converted to a DER blob which is then passed to the implementation as a parameter (param_to_asn1) or the DER blob is retrieved from the implementation as a parameter and converted locally to a ASN1_TYPE (asn1_to_param). With this, the old flag EVP_CIPH_FLAG_DEFAULT_ASN1 has become irrelevant and is simply ignored. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10008)
* Make manuals with TYPE conform with man-pages(7)Richard Levitte2019-10-018-241/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Details from man-pages(7) that are used: Formatting conventions for manual pages describing functions ... Variable names should, like argument names, be specified in italics. ... Formatting conventions (general) ... Special macros, which are usually in uppercase, are in bold. Exception: don't boldface NULL. ... Furthermore, for TYPE used as a placeholder for types and correponding part of function names, we extrapolate that it's both a type and a variable, and should therefore be bold (typical for types and function names) and italic (typical for variables). POD processors don'e know this, so we have to help them along. Therefore: SPARSE_ARRAY_OF(TYPE) => B<SPARSE_ARRAY_OF>(B<I<TYPE>>) ossl_sa_TYPE_num() => B<ossl_sa_I<TYPE>_num>() TYPE => B<I<TYPE>> There are some other less typical uses where one simply has to give formatting some extra though. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10041)
* Make ASN1 manuals conform with man-pages(7)Richard Levitte2019-10-0110-173/+178
| | | | | | | | | | | | | | | | | | | | Details from man-pages(7) that are used: Formatting conventions for manual pages describing functions ... Variable names should, like argument names, be specified in italics. ... Formatting conventions (general) ... Special macros, which are usually in uppercase, are in bold. Exception: don't boldface NULL. ... Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10042)
* Consistent formatting of flags with argsRich Salz2019-10-0154-1279/+1295
| | | | | | | | | | | For documentation of all commands with "-flag arg" format them consistently: "B<-flag> I<arg>", except when arg is literal (for example "B<-inform> B<PEM>|B<DER>") Update find-doc-nits to complain if badly formatted strings are found. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10022)
* Add defines for __NR_getrandom for all Linux architecturesKurt Roeckx2019-09-301-3/+49
| | | | | | | Fixes: #10015 Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> GH: #10044
* Make ASYNC manuals conform with man-pages(7)Richard Levitte2019-09-304-133/+181
| | | | | | | | | | | | | | | | | | | | | | Details from man-pages(7) that are used: Formatting conventions for manual pages describing functions ... Variable names should, like argument names, be specified in italics. ... Formatting conventions (general) ... Special macros, which are usually in uppercase, are in bold. Exception: don't boldface NULL. ... Additionally, expanded some lists to make better use of POD formatting. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10043)
* Correct the function names in SSL_CTX_set_stateless_cookie_generate_cb.podMatt Caswell2019-09-302-21/+60
| | | | | | | | | | | Although the synopsis used the correct function names, the description did not. Also the description of the equivalent DTLSv1_listen() callbacks was missing, so these have been added. Fixes #10030 Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10033)
* Fix a bundle of mischecks of return valuesPaul Yang2019-09-302-7/+7
| | | | | | | | | Several EVP_PKEY_xxxx functions return 0 and a negative value for indicating errors. Some places call these functions with a zero return value check only, which misses the check for the negative scenarios. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10055)
* Make default values by ERR_get_error_all() and friends more consistentDr. David von Oheimb2019-09-302-27/+29
| | | | | | | | Unset data defaults to the empty string ("") or 0. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9948)
* Fix a return value bug in apps/speed.cPaul Yang2019-09-301-2/+2
| | | | | | | | Those functions returns less than and equal to 0 to indicate an error occured. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10054)
* Consistent naming for context gettable param queries .Pauli2019-09-2718-52/+52
| | | | | | | | | | | | All instances of EVP_*_CTX_gettable_params functions have been renamed to EVP_*_gettable_ctx_params. Except for the EVP_MD ones which were changed already. These functions do not take EVP_*_CTX arguments so their prior naming was misleading. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10052)
* Make relevant tests more sensitive to 'no-fips'Richard Levitte2019-09-292-63/+118
| | | | | | | | | | | | | | This applies to test/recipes/30-test_evp.t and test/recipes/30-test_evp_fetch_prov.t. Additionally, we make test/recipes/30-test_evp_fetch_prov.t data driven, to make test number planning more automated, and to separate what is unique from what is common to all the test cases. [extended tests] Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/10047)
* Fix a document description in apps/reqPaul Yang2019-09-291-2/+2
| | | | | Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9958)
* Fix a double free issue when signing SM2 certPaul Yang2019-09-292-20/+32
| | | | | | | | | | | | | | If the SM2 ID value has not been passed correctly when signing an SM2 certificate/certificate request, a double free occurs. For instance: openssl req -x509 ... -sm2-id 1234567812345678 The '-sm2-id' should not be used in this scenario, while the '-sigopt' is the correct one to use. Documentation has also been updated to make the options more clear. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9958)
* Add util/fix-includes scriptDr. Matthias St. Pierre2019-09-282-0/+25
| | | | | | | | | | | | | | | | | This script contains all adjustments to header files which were made during the reorganization of the header files. It is meant as an aid for other contributors which encounter preprocessor #include errors after rebasing over this pull request. Simply running util/fix-includes from the root of the source directory should hopefully fix the problem. Note: such #include errors are expected only for pull requests which add a lot of new code, in particular new compilation modules. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
* Add legacy include guards to public header filesDr. Matthias St. Pierre2019-09-2897-0/+582
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For every public header file, the old include guard definition needs to be added in addition to the new one include/openssl/file.h: #ifndef OPENSSL_FILE_H # define OPENSSL_FILE_H # pragma once # include <openssl/macros.h> # if !OPENSSL_API_3 # define HEADER_FILE_H # endif ... This is going to ensure that applications which use the old include guards externally, for example like this #ifndef HEADER_FILE_H # include <openssl/file.h> #endif will not fail to compile. In addition to the legacy guard, the public header files also receive a '# pragma once' directive. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
* Fix header file include guard namesDr. Matthias St. Pierre2019-09-28215-481/+481
| | | | | | | | | | | | | Make the include guards consistent by renaming them systematically according to the naming conventions below For the public header files (in the 'include/openssl' directory), the guard names try to match the path specified in the include directives, with all letters converted to upper case and '/' and '.' replaced by '_'. For the private header files files, an extra 'OSSL_' is added as prefix. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
* Reorganize public header files (part 2)Dr. Matthias St. Pierre2019-09-281-0/+16
| | | | | | | Add an <openssl/ossl_typ.h> compatibility header. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
* Reorganize public header files (part 1)Dr. Matthias St. Pierre2019-09-2839-38/+38
| | | | | | | Rename <openssl/ossl_typ.h> to <openssl/types.h>. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
* Reorganize local header filesDr. Matthias St. Pierre2019-09-28501-498/+498
| | | | | | | | | | | | | Apart from public and internal header files, there is a third type called local header files, which are located next to source files in the source directory. Currently, they have different suffixes like '*_lcl.h', '*_local.h', or '*_int.h' This commit changes the different suffixes to '*_local.h' uniformly. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
* Reorganize private crypto header filesDr. Matthias St. Pierre2019-09-28329-406/+398
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, there are two different directories which contain internal header files of libcrypto which are meant to be shared internally: While header files in 'include/internal' are intended to be shared between libcrypto and libssl, the files in 'crypto/include/internal' are intended to be shared inside libcrypto only. To make things complicated, the include search path is set up in such a way that the directive #include "internal/file.h" could refer to a file in either of these two directoroes. This makes it necessary in some cases to add a '_int.h' suffix to some files to resolve this ambiguity: #include "internal/file.h" # located in 'include/internal' #include "internal/file_int.h" # located in 'crypto/include/internal' This commit moves the private crypto headers from 'crypto/include/internal' to 'include/crypto' As a result, the include directives become unambiguous #include "internal/file.h" # located in 'include/internal' #include "crypto/file.h" # located in 'include/crypto' hence the superfluous '_int.h' suffixes can be stripped. The files 'store_int.h' and 'store.h' need to be treated specially; they are joined into a single file. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
* Add legacy include guard manually to opensslconf.h.inDr. Matthias St. Pierre2019-09-281-2/+6
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
* Funtion name with variable part in doc/man7/ and doc/internal/man3/Richard Levitte2019-09-283-27/+44
| | | | | | | | | | | | | | | | | | | | We have a few pages where part of function names can be considered variable. There are no normative guidelines for such a case, but if we draw from the formatting convention of variable and argument names, we can draw the conclusion that this variable part should be italized, within already given conventions. In other words, we need to help the POD processor along in cases like these: SPARSE_ARRAY_OF(TYPE) ossl_sa_TYPE_num() These need explicit formatting: B<SPARSE_ARRAY_OF>(I<TYPE>) B<ossl_sa_I<TYPE>_num>() Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10034)
* Make doc/man7/ and doc/internal/man3/ conform with man-pages(7)Richard Levitte2019-09-2831-226/+226
| | | | | | | | | | | | | | | | | | | | It's all in the details, from man-pages(7): Formatting conventions for manual pages describing functions ... Variable names should, like argument names, be specified in italics. ... Formatting conventions (general) ... Special macros, which are usually in uppercase, are in bold. Exception: don't boldface NULL. ... Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10034)
* [KDF] Add KBKDF implementation for counter-mode HMACRobbie Harwood2019-09-2710-1/+517
| | | | | | | | | | | | | Implement SP800-108 section 5.1 with HMAC intended for use in Kerberos. Add test vectors from RFC 8009. Adds error codes PROV_R_INVALID_MAC and PROV_R_MISSING_MAC. Signed-off-by: Robbie Harwood <rharwood@redhat.com> Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9924)
* OSSL_PARAM functions: change to allow the data field to be NULLRichard Levitte2019-09-272-4/+45
| | | | | Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10025)
* OSSL_PARAM.pod: document the mechanism to figure out buffer sizesRichard Levitte2019-09-271-0/+5
| | | | | | | | | | | When requesting parameters, it's acceptable to make a first pass with the |data| field of some parameters being NULL. That can be used to help the requestor to figure out dynamically what buffer size is needed. For variable size parameters, there's no other way to find out. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10025)
* Certificate Management Protocol (CMP, RFC 4210) extension to OpenSSLDr. David von Oheimb2019-09-2738-287/+4512
| | | | | | | | | | | | | | | | Also includes CRMF (RFC 4211) and HTTP transfer (RFC 6712) CMP and CRMF API is added to libcrypto, and the "cmp" app to the openssl CLI. Adds extensive man pages and tests. Integration into build scripts. Incremental pull request based on OpenSSL commit 8869ad4a39f of 2019-04-02 4th chunk: CMP context/parameters and utilities in crypto/cmp/cmp_ctx.c, crypto/cmp/cmp_util.c, and related files Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9107)
* Reformat param description linesPauli2019-09-2723-126/+126
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10024)
* Make OSSL_PARAM descriptions uniformly formatted.Pauli2019-09-275-35/+48
| | | | | | | =item B<MACRO> ("name") <type> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10024)
* When building of modules is disabled, build the legacy provider into libcryptoRichard Levitte2019-09-266-15/+40
| | | | | | | This makes the legacy provider available regardless of building conditions. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9637)
* Configure, build.info: make it possible to use variables in indexesRichard Levitte2019-09-261-8/+21
| | | | | | | | That will make it possible to assign different goals for translation units depending on need. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9637)
* Ensure man1 POD files start with openssl-Rich Salz2019-09-263-0/+8
| | | | | | | | | | Commit b6b66573 (PR #9679) renamed most POD files. This change causes find-doc-nits to flag misnamed files. Also fix the two misnamed files that it found. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10000)
* Missing else in cipher_hw_aes_ocb_generic_initkeyFangming.Fang2019-09-261-1/+1
| | | | | | | | | | | | | | | This came from commit 3837c202 "Add aes_ocb cipher to providers". It causes the default non-hardware accelerated AES implementation to be used even if HWAES_CAPABLE is set. Affects all platforms except X86 and SPARC. Patch by: Nick Gasson <Nick.Gasson@arm.com> Change-Id: I26001a3a922ff23f6090fdcefefaecf68e92e2a6 Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10012)
* Use OSSL_PARAM types. Limits are explained in the description where ↵Pauli2019-09-261-3/+4
| | | | | | | appropriate. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10011)
* Use OSSL_PARAM types. Limits are explained in the description where ↵Pauli2019-09-263-12/+15
| | | | | | | appropriate. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10011)
* KDF section 3 clean upPauli2019-09-261-1/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10011)
* Use OSSL_PARAM types for MAC documentationPauli2019-09-267-14/+21
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10011)
* Use OSSL_PARAM types for KDF documentationPauli2019-09-265-10/+10
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10011)
* s390x assembly pack: accelerate X25519, X448, Ed25519 and Ed448Patrick Steuer2019-09-2520-76/+914
| | | | | | | | | using PCC and KDSA instructions. Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10004)
* s390x assembly pack: cleanse only sensitive fieldsPatrick Steuer2019-09-251-2/+2
| | | | | | | | | of instruction parameter blocks. Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10004)
* s390x assembly pack: fix OPENSSL_s390xcap z15 cpu maskPatrick Steuer2019-09-251-5/+5
| | | | | | | Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10004)
* s390x assembly pack: fix msa3 stfle bit detectionPatrick Steuer2019-09-251-1/+1
| | | | | | | Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10004)
* Make EVP_MD_CTX_[gettable|settable]_params() take an EVP_MD_CTXMatt Caswell2019-09-256-17/+49
| | | | | | | | | | | | EVP_MD_CTX_gettable_params() and EVP_MD_CTX_settable_params() were confusingly named because they did not take an EVP_MD_CTX parameter. In addition we add the functions EVP_MD_gettable_ctx_params() and EVP_MD_settable_ctx_params() which do the same thing but are passed an EVP_MD object instead. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9998)
* Remove the engine parameter from the provider MAC documentationsPauli2019-09-251-10/+0
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9971)
* Remove the engine parameter from the individual MAC documentationPauli2019-09-253-6/+0
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9971)
* Remove engine param from EVP_KDF and EVP_MAC documentationPauli2019-09-252-12/+4
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9971)
* Remove engine param from the settable listPauli2019-09-253-3/+0
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9971)
* Remove engine param macros from wrapper APIsPauli2019-09-252-8/+4
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9971)