summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-10-05Add missing help text for some optionsRich Salz
Fixes: #9952 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/9989)
2019-10-05RC4 is not a block cipherMatt Caswell
RC4 is a stream cipher therefore EVP_CIPHER_CTX_block_size() should return 1. This fixes a test failure in ssl_test_old when enable-weak-ssl-ciphers has been configured. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10090)
2019-10-04Fix L<EVP_KDF-derive> to L<EVP_DEF_derive>Rich Salz
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/10096)
2019-10-04Move MD5-SHA1 digest completely to the default providerRichard Levitte
This leaves minimal implementations of EVP_md5_sha1, which is now only there to provide a name for implicit fetches. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9076)
2019-10-03Remove unused fields in method store structure.Pauli
The random bit caching was a residue of earlier code and isn't used any more. Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/10089)
2019-10-04Move all SHA digests completely to the default providerRichard Levitte
This leaves minimal implementations of EVP_sha* and EVP_shake*, which is now only there to provide a name for implicit fetches. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10059)
2019-10-03Rename "private" file, doc doc changes in CHANGESRich Salz
Use err() for find-doc-nits -e output Doing this meant we could remove the -s flag, so we do so; move option/help stuff to top of script. Add a CHANGES entry. Rename missing to other.syms Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10039)
2019-10-03Adapt existing providers to posibly have name listsRichard Levitte
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/8985)
2019-10-03Replumbing: make it possible for providers to specify multiple namesRichard Levitte
This modifies the treatment of algorithm name strings to allow multiple names separated with colons. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/8985)
2019-10-03'init_buf' memory can be freed when DTLS is used over SCTP (not over UDP).NaveenShivanna86
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/9653)
2019-10-03rsa: replace magic number '11' by RSA_PKCS1_PADDING_SIZEDr. Matthias St. Pierre
Suggested by Matt Hart Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10084)
2019-10-03Don't follow legacy path if ctx->pctx is setMatt Caswell
EVP_DigestInit_ex forced following of the legacy path if ctx->pctx is set (meaning we've actually been called via EVP_DigestSignInit_ex). There is some code in the legacy path that calls the EVP_PKEY_CTRL_DIGESTINIT ctrl on the pctx. Not going down the legacy path if ctx->pctx is set means that ctrl message will neve get sent. However, it turns out that all algs that understand that ctrl also set the EVP_MD_CTX_FLAG_NO_INIT flag which forces legacy anyway. Therefore the ctx->pctx check is not required and can be removed. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10082)
2019-10-03Fix no-errMatt Caswell
Skip the test_CTX_print_errors in cmp_ctx_test if no-err has been configured. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10071)
2019-10-03Free a fetched digest during EVP_MD_CTX_reset() not EVP_MD_free()Matt Caswell
Otherwise a mem leak can occur since EVP_MD_free() calls EVP_MD_CTX_reset() which then clears the contents of the ctx. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10013)
2019-10-03Don't call EVP_MD_CTX_reset during EVP_DigestFinalMatt Caswell
This resets the fields of the EVP_MD_CTX and means we can no longer make calls using the EVP_MD_CTX, such as to query parameters. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10013)
2019-10-03Add a test for the newly added md params codeMatt Caswell
Previous commits added code for routing md related parameters via and EVP_SIGNATURE implementation during a DigestSign operation. This adds a test to make sure this works as expected. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10013)
2019-10-03Update EVP_MD_CTX_get_params() et al to be EVP_DigestSign*() awareMatt Caswell
If doing an EVP_DigestSign*() or EVP_DigestVerify*() operation we use the embedded pctx for communication with the provider. Any MD params need to use that ctx instead. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10013)
2019-10-03Update documentationMatt Caswell
Add documentation for EVP_DigestSignInit_ex() and EVP_DigestVerifyInit_ex(), and add an appropriate CHANGES entry. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10013)
2019-10-03Ensure we look at EVP_MD_CTX_FLAG_KEEP_PKEY_CTX in non-legacy codeMatt Caswell
This flag is still relevant even for non-legacy code so we should check it where appropriate. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10013)
2019-10-03Add EVP_DigestSign/EVP_DigestVerify support for DSAMatt Caswell
Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10013)
2019-10-03Add the provider function signatures for DigestSign*Matt Caswell
Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10013)
2019-10-03Add rc5 ciphers to default providerShane Lontis
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10006)
2019-10-03Add arm64 in test matrix on TravisCI.Fangming.Fang
Change-Id: I5d2b729699cfd8e80c3df17db4a9d2edcbf64454 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10046)
2019-10-03doc: EVP_DigestInit clears all flagsChristian Heimes
Mention that EVP_DigestInit() also clears all flags. Fixes: 10031 Signed-off-by: Christian Heimes <christian@python.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10032)
2019-10-03Fix errors found by new find-doc-nitsRich Salz
Also patch find-doc-nits to ignore a Microsoft trademark and not flag it as a spelling error. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10023)
2019-10-03Add wordlist from man7.orgRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10023)
2019-10-03Do not print extensions in Certificate message for TLS1.2 and lowerDaniil Zotkin
According to RFC8446 CertificateEntry in Certificate message contains extensions that were not present in the Certificate message in RFC5246. CLA: trivial Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9994)
2019-10-03Fix Coverity issuesShane Lontis
CID 1453954 & 1453955 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9977)
2019-10-03Fix long name of some Microsoft objectsMichael Osipov
CLA: trivial Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10029)
2019-10-02doc/man1: fix malformed optionsRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10073)
2019-10-02util/find-doc-nits: more precise option and function name checkerRichard Levitte
The checks for our uses of 'B<' and 'I<' for options, and possibly function names, was over-reaching quite a bit. So we fine-tune it a bit: - by only checking for options in man1 pages, and only in SYNOPSIS and *OPTIONS sections. - by only checking for function names in man3 pages. The man1 option checker has the additional check that options found in *OPTIONS are also found in SYNOPSIS andd vice versa. In all cases, this also handles options and function names with additional markup, such as 'B<-I<cipher>>' and 'B<sk_I<TYPE>_push>'. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10073)
2019-10-02Update "missing documentation" function listsRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10064)
2019-10-01Add '=for comment ifdef' to pod pagesRich Salz
Make find-doc-nits understand that =for comment ifdef ssl3 ... in a POD page means that the "-ssl3" flag might be ifdef'd out in the local environment, and not to complain about it. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9974)
2019-10-01Make EVP_CIPHER_is_a() work with legacy cipher implementations tooRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10008)
2019-10-01Remove EVP_CIPH_FLAG_DEFAULT_ASN1 from all provided implementationsRichard Levitte
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)
2019-10-01Adapt EVP_CIPHER_{param_to_asn1,asn1_to_param} for use with provider.Richard Levitte
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)
2019-10-01Make manuals with TYPE conform with man-pages(7)Richard Levitte
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)
2019-10-01Make ASN1 manuals conform with man-pages(7)Richard Levitte
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)
2019-10-01Consistent formatting of flags with argsRich Salz
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)
2019-09-30Add defines for __NR_getrandom for all Linux architecturesKurt Roeckx
Fixes: #10015 Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> GH: #10044
2019-09-30 Make ASYNC manuals conform with man-pages(7)Richard Levitte
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)
2019-09-30Correct the function names in SSL_CTX_set_stateless_cookie_generate_cb.podMatt Caswell
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)
2019-09-30Fix a bundle of mischecks of return valuesPaul Yang
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)
2019-09-30Make default values by ERR_get_error_all() and friends more consistentDr. David von Oheimb
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)
2019-09-30Fix a return value bug in apps/speed.cPaul Yang
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)
2019-09-27Consistent naming for context gettable param queries .Pauli
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)
2019-09-29Make relevant tests more sensitive to 'no-fips'Richard Levitte
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)
2019-09-29Fix a document description in apps/reqPaul Yang
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9958)
2019-09-29Fix a double free issue when signing SM2 certPaul Yang
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)
2019-09-28Add util/fix-includes scriptDr. Matthias St. Pierre
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)