summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-09-28Reorganize local header filesDr. Matthias St. Pierre
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)
2019-09-28Reorganize private crypto header filesDr. Matthias St. Pierre
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)
2019-09-28Add legacy include guard manually to opensslconf.h.inDr. Matthias St. Pierre
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
2019-09-28Funtion name with variable part in doc/man7/ and doc/internal/man3/Richard Levitte
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)
2019-09-28Make doc/man7/ and doc/internal/man3/ conform with man-pages(7)Richard Levitte
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)
2019-09-27[KDF] Add KBKDF implementation for counter-mode HMACRobbie Harwood
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)
2019-09-27OSSL_PARAM functions: change to allow the data field to be NULLRichard Levitte
Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10025)
2019-09-27OSSL_PARAM.pod: document the mechanism to figure out buffer sizesRichard Levitte
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)
2019-09-27 Certificate Management Protocol (CMP, RFC 4210) extension to OpenSSLDr. David von Oheimb
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)
2019-09-27Reformat param description linesPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10024)
2019-09-27Make OSSL_PARAM descriptions uniformly formatted.Pauli
=item B<MACRO> ("name") <type> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10024)
2019-09-26When building of modules is disabled, build the legacy provider into libcryptoRichard Levitte
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)
2019-09-26Configure, build.info: make it possible to use variables in indexesRichard Levitte
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)
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)