summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-09-26Ensure man1 POD files start with openssl-Rich Salz
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)
2019-09-26Missing else in cipher_hw_aes_ocb_generic_initkeyFangming.Fang
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)
2019-09-26Use OSSL_PARAM types. Limits are explained in the description where ↵Pauli
appropriate. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10011)
2019-09-26Use OSSL_PARAM types. Limits are explained in the description where ↵Pauli
appropriate. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10011)
2019-09-26KDF section 3 clean upPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10011)
2019-09-26Use OSSL_PARAM types for MAC documentationPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10011)
2019-09-26Use OSSL_PARAM types for KDF documentationPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10011)
2019-09-25s390x assembly pack: accelerate X25519, X448, Ed25519 and Ed448Patrick Steuer
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)
2019-09-25s390x assembly pack: cleanse only sensitive fieldsPatrick Steuer
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)
2019-09-25s390x assembly pack: fix OPENSSL_s390xcap z15 cpu maskPatrick Steuer
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)
2019-09-25s390x assembly pack: fix msa3 stfle bit detectionPatrick Steuer
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)
2019-09-25Make EVP_MD_CTX_[gettable|settable]_params() take an EVP_MD_CTXMatt Caswell
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)
2019-09-25Remove the engine parameter from the provider MAC documentationsPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9971)
2019-09-25Remove the engine parameter from the individual MAC documentationPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9971)
2019-09-25Remove engine param from EVP_KDF and EVP_MAC documentationPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9971)
2019-09-25Remove engine param from the settable listPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9971)
2019-09-25Remove engine param macros from wrapper APIsPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9971)
2019-09-25Make the "engine" parameter to some provider algorithms (KDF/PRF) hidden.Pauli
This parameter will disappear once engines are wrapped by a provider so it shouldn't ever be visible to the public. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9971)
2019-09-25Add rc4 cipher to default providerShane Lontis
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9992)
2019-09-24DOC: fix documentation of som EVP_MD_CTX functionsRichard Levitte
They were documented to take an EVP_MD pointer, when they really take an EVP_MD_CTX pointer. Fixes #9993 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9996)
2019-09-24Fix bugs in "info" commands flagsRich Salz
Remove -c/-e/-m aliases, OpenSSL commands don't do that. Fix typo's in the documentation. Fix -module flag to print the right thing. Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9986)
2019-09-24fix for dsa key size feature request issue: pkey -text or -text_pub should ↵jayaram
show dsa key size Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/9983)
2019-09-24Support printing out some otherName variantsDmitry Belyavskiy
The supported variants are - SmtpUTF8Name - xmppAddr - MS UPN - SRVName Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9965)
2019-09-23Add SSKDF test vectors from RFC 8636Simo Sorce
RFC 8636 defines the Pkinit Agility KDF, which turns out to be just a standard SSKDF with the Info built out of the ASN.1 option of SP 800 56A (See 5.8.2.1.2 of NIST SP 800-56A Rev. 3) RFC 8636 Also defines test vectors, so let's add them in addition to the tests from "non-official" test vectors. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9957)
2019-09-23Update new TLS version options to s_time man pageraja-ashok
Reviewed-by: Paul Yang <kaishen.yy@antfin.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9947)
2019-09-23Add TLS version options to s_timeraja-ashok
Reviewed-by: Paul Yang <kaishen.yy@antfin.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9947)
2019-09-23Rework cipher / digest fetching for legacy nids with multiple name supportRichard Levitte
With multiple names, it's no longer viable to just grab the "first" in the set and use that to find the legacy NID. Instead, all names for an algorithm must be checked, and if we encounter more than one NID asssociated with those names, we consider it an error and make that method unloadable. This ensures that all methods that do have an internal NID associated will get that NID in their structure, thereby ensuring that other parts of libcrypto that haven't gone away from using NIDs for comparison will continue to work as expected. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9969)
2019-09-23include/openssl/macros.h: better OPENSSL_FUNC fallbackRichard Levitte
Make sure OPENSSL_FUNC gets defined to something, no matter what. Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9976)
2019-09-23Add des ciphers to default providerShane Lontis
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9954)
2019-09-21Note that the mac command is preferrable to the MAC command line options.Pauli
The dgst command allows MACs to be calculated, the mac command is the more recent interface for doing the same and provides better access to a wider range of MACs. 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/9962)
2019-09-21Configure: add missing dependency to fix parallel builds on WindowsDr. Matthias St. Pierre
The issue was encountered when testing parallel builds of OpenSSL on Windows using `jom` instead of `nmake`. The builds persistently failed with the following error message because the generated file "buildinf.h" did not exist yet. crypto\info.c(15): fatal error C1083: cannot open include file: "buildinf.h": No such file or directory Apparently this error does not occur on Linux because `make` parallelizes the builds differently such that `crypto\cversion.c`, which has an explicit dependency on `buildinf.h`, gets compiled first. Also, the include dependency was added only recently in commit 096978f0990. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9960)
2019-09-21Use the correct maximum indentKurt Roeckx
Found by OSS-Fuzz Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> GH: #9959
2019-09-20include/openssl/macros.h: Rework OPENSSL_FUNC for div C standardsRichard Levitte
OPENSSL_FUNC was defined as an alias for __FUNCTION__ with new enough GNU C, regardless of the language standard used. We change this slightly, so this won't happen unless __STDC_VERSION is defined. Fixes #9911 Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9913)
2019-09-20Remove name string from PROV_CIPHER and PROV_DIGESTRichard Levitte
It was short lived, as it's not necessary any more. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9946)
2019-09-20Refactor SSKDF to create the MAC contexts earlyRichard Levitte
The SSKDF implementation fetched the digest(s) for the underlying MAC, just to get their names and pass those down to the MAC, which in turn would fetch those same digests again. This change circumvents this by fetching the MAC and create the MAC contexts for them directly when this PRF receives the relevant parameters, thus only having to pass EVP_MAC_CTX pointers around. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9946)
2019-09-20Refactor TLS-PRF's kdf_tls1_prf_mkmacctx() to a provider utilityRichard Levitte
ossl_prov_macctx_load_from_params() creates a EVP_MAC_CTX *, or sets new common parameters for an existing one. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9946)
2019-09-20Add aes_wrap cipher to providersShane Lontis
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9406)
2019-09-20Fix missing bn_mul_mont symbol in solaris fips moduleShane Lontis
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9943)
2019-09-20Move gcm decryption tag check higher up in the callstackShane Lontis
Code was updated for s390 that accidently removed the check inside the final method. Moving the check up before the final method is called is a better way of handling this. The oneshot method also calls the final method but doesnt need to do this check. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9945)
2019-09-20Exit non-zero if find-doc-nits finds nitsRich Salz
Filter all output to a new &err() routine, which sets the global exit status, $status. Also, fix all subroutine definitions and references to be consistent: no prototypes, no & before function calls. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Yang <kaishen.yy@antfin.com> (Merged from https://github.com/openssl/openssl/pull/9733)
2019-09-19Avoid ?: construct in XXXerr callsRich Salz
It either makes the flow of control simpler and more obvious, or it is just a "cleanup" so that the editing scripts will find and fixup things. Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9441)
2019-09-19Add merge-err-lines scriptRich Salz
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9441)
2019-09-19Deprecate XXXerr() macrosRich Salz
Actually, for transition, they're not really deprecated. Remove the "1 ||" from the ifdef line (in include/openssl/err.h) when ready to do this in production/"for real" Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9441)
2019-09-19Add script convert XXerr to ERR_raiseRich Salz
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9441)
2019-09-19Modify providers that keep track of underlying algorithmsRichard Levitte
With some provider implementations, there are underlying ciphers, digests and macs. For some of them, the name was retrieved from the method, but since the methods do not store those any more, we add different mechanics. For code that needs to pass on the name of a cipher or diges via parameters, we simply locally store the name that was used when fetching said cipher or digest. This will ensure that any underlying code that needs to fetch that same cipher or digest does so with the exact same name instead of any random name from the set of names associated with the algorithm. For code that needs to check what kind of algorithm was passed, we provide EVP_{type}_is_a(), that returns true if the given method has the given name as one of its names. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9897)
2019-09-19In provider implemented methods, save the name number, not the name stringRichard Levitte
Multiple names per implementation is already supported in the namemap, but hasn't been used yet. However, as soon as we have multiple names, we will get an issue with what name should be saved in the method. The solution is to not save the name itself, but rather the number it's associated with. This number is supposed to be unique for each set of names, and we assume that algorithm names are globally unique, i.e. there can be no name overlap between different algorithm types. Incidently, it was also found that the 'get' function used by ossl_construct_method() doesn't need all the parameters it was given; most of what it needs, it can now get through the data structure given by the caller of ossl_construct_method(). As a consequence, ossl_construct_method() itself doesn't need all the parameters it was given either. There are some added internal functions that are expected to disappear as soon as legacy code is removed, such as evp_first_name() and ossl_namemap_num2name(). Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9897)
2019-09-19Fix Solaris compile errors in provider ciphersShane Lontis
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9941)
2019-09-19Add option grouping capability to appsJon Spillett
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9920)
2019-09-19Add aes_ocb cipher to providersShane Lontis
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9320)
2019-09-19Add sm4 ciphers to default providerShane Lontis
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9935)