summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2021-06-01Pass library context and property query into private key decodersJon Spillett
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14587)
2021-06-01Fix up encoder/decoder issues caused by not passing a library context to the ↵Jon Spillett
PKCS8 encrypt/decrypt Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14587)
2021-06-01Enhance the encoder/decoder tests to allow testing with a non-default ↵Jon Spillett
library context and configurable providers Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14587)
2021-06-01req: fix Coverity 1485137 Explicit null dereferencePauli
Add a check for a non-existent file name when specifying params via file. Add a check for a failure to determine key type. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15534)
2021-06-01crypto: updates to pass size_t to RAND_bytes_ex()Pauli
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/15540)
2021-06-01ssl: ass size_t to RAND_bytes_ex()Pauli
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/15540)
2021-06-01rand: use size_t for size argument to RAND_bytes_ex()Pauli
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/15540)
2021-06-01Move provider der_XXX.h.in files to the include directory.Shane Lontis
Fixes #15506 The .in and generated .h files are now in the same directory. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15544)
2021-06-01Fix error stack for some fetch calls.Shane Lontis
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15532)
2021-06-01Migration guide updates for flags and controls.Shane Lontis
Provided a section that links to the ctrl/flags mappings to parameters for digests and ciphers. Added "EVP_CIPHER_CTX_set_flags() ordering" to changes section. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15496)
2021-06-01Document Settable EVP_CIPHER_CTX parameter "use-bits"Shane Lontis
Added docs for EVP_CIPHER_CTX_set_flags(), EVP_CIPHER_CTX_clear_flags() and EVP_CIPHER_CTX_test_flags(). Added section for "FLAGS" to show parameter mappings. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15496)
2021-06-01Fix param indentation in ciphercommon_hw.cShane Lontis
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15496)
2021-06-01Fix aes cfb1 so that it can operate in bit mode.Shane Lontis
The code to handle the cipher operation was already in the provider. It just needed a OSSL_PARAM in order to set this into the algorithm. EVP_CIPHER_CTX_set_flags() has been modified to pass the OSSL_PARAM. Issue reported by Mark Powers from Acumen. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15496)
2021-06-01add some cross compilation buildsPauli
Add some cross compiling builds to test things aren't broken. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15535)
2021-06-01sparc: fix cross compile buildPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15535)
2021-06-01ppc: fix ambiguous if if else statementPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15535)
2021-05-31Add .asn1 dependencies for files generated from providers/common/der/*.inRichard Levitte
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/15533)
2021-05-31Update solaris64-sparcv9-cc build target cflagsJan Lana
Fixes #15507 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/15509)
2021-05-31Fix cert creation in the storeMatt Caswell
When we create a cert in the store, make sure we do so with the libctx and propq associated. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/15523)
2021-05-31Add the usual autowarn perl snippet in providers/common/der/*.inRichard Levitte
We have this in all other .in files, so these should have that as well. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/15524)
2021-05-31Teach EVP_PKEYs to say whether they were decoded from explicit paramsMatt Caswell
Currently we explicitly downgrade an EVP_PKEY to an EC_KEY and ask the EC_KEY directly whether it was decoded from explicit parameters or not. Instead we teach EVP_PKEYs to respond to a new parameter for this purpose. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/15526)
2021-05-31Update check_sig_alg_match() to work with provided keysMatt Caswell
Use EVP_PKEY_is_a() to check whether an EVP_PKEY is compatible with the given signature. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/15528)
2021-05-31Special case SM2 when decodingMatt Caswell
SM2 abuses the EC oid by reusing it - but an EC key is different to an SM2 key. Therefore we have to special case SM2 during decoding. If we encounter the EC OID then we have to try both algorithms. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/15522)
2021-05-31Fixes #14103 & #14102. Update AES demos with error handling and EVP fetchJon Spillett
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/15081)
2021-05-31Fix PKCS7_verify to not have an error stack if it succeeds.Shane Lontis
Revert a change in behavior to BIO_write(). If a NULL BIO is passed, no error is raised and the return value is 0. There are many places where the return code from the write was not checked, resulting in an error stack with no error status being returned. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15493)
2021-05-29fips: set the library context and handle laterPauli
They need to be set once the provider will definitely be loading. If they are set earlier, a double free results on a failure. Fixes #15452 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15492)
2021-05-29make update-fips-checksumsRichard Levitte
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15514)
2021-05-29Rearrange the check of providers/fips.so dependenciesRichard Levitte
The mechanism had special cases to guess when something was generated from a .in file. It's better, though, to use the knowledge in configdata.pm, especially when the generated file is in a different location than its source. Cleanups are added, and we change the use of sed to a use of perl when cleaning up paths with 'something/../' in them, since perl has more powerful tools for this sort of thing. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15514)
2021-05-29Make providers/fips.module.sources.new depend on configdata.pmRichard Levitte
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15514)
2021-05-29configdata.pm: Allow extra arguments when --query is given.Richard Levitte
That allows operations like this: ./configdata.pm --query 'get_sources(@ARGV)' file1 file2 file3 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15514)
2021-05-29add zero strenght arguments to BN and RAND RNG callsPauli
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15513)
2021-05-29prov: add zero strenght arguments to BN and RAND RNG callsPauli
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15513)
2021-05-29ssl: add zero strenght arguments to BN and RAND RNG callsPauli
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15513)
2021-05-29test: add zero strenght arguments to BN and RAND RNG callsPauli
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15513)
2021-05-29rand: add a strength argument to the BN and RAND RNG callsPauli
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15513)
2021-05-29doc: document the strength arugments to the RNG functionsPauli
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15513)
2021-05-29Make undef'd counts zero by default.Rich Salz
Fixes #15409 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15467)
2021-05-29ec: Add PPC64 vector assembly version of p521 field operationsAmitay Isaacs
Only field multiplication and squaring (but not reduction) show a significant improvement. This is enabled on Power ISA >= 3.0. On a Power 9 CPU an average 10% performance improvement is seen (ECHDE: 14%, ECDSA sign: 6%, ECDSA verify 10%), compared to existing code. On an upcoming Power 10 CPU we see an average performance improvement of 26% (ECHDE: 38%, ECDSA sign: 16%, ECDSA verify 25%), compared to existing code. Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15401)
2021-05-29ec: Add run time code selection for p521 field operationsMartin Schwenke
This is only used if ECP_NISTP521_ASM is defined and this currently only occurs on PPC64. This simply chooses the C reference implementation, which will be the default when custom code is available for certain CPUs. Only the multiplication and squaring operations are handled, since the upcoming assembly code only contains those. This scheme can be easily extended to handle reduction too. Signed-off-by: Martin Schwenke <martin@meltin.net> Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15401)
2021-05-29ec: Rename reference p521 field operations and use them via macrosMartin Schwenke
This will allow clean addition of assembly versions of these operations. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15401)
2021-05-29perlasm/ppc-xlate.pl: Handle rewriting of vector registersMartin Schwenke
Power has 2 numbering systems for vector registers: * VR: Vector Registers are numbered from 0 to 31 * VSR: Vector-Scalar registers are numbers from 32 to 63 These refer to the same registers. Some instructions use VR numbering for their operands, while others use VSR numbering. When using Perl to provide a meaningful name for a register it makes sense to use the same variable for both VR and VSR instructions. This makes the code more readable. However, providing a VSR number (i.e. >=32) to an instruction that expects a VR number will cause an assembler error. So, for instructions that require VR numbering, map VSR numbers (i.e. >=32) to VR numbers. This also allows existing code that uses VR numbering to remain unchanged. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15401)
2021-05-29BIO acpt_state(): Allow retrying addresses (e.g., using IPv6 vs. IPv4) on ↵Dr. David von Oheimb
creating accept socket Fixes #15386 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15417)
2021-05-29BIO_s_accept.pod: Add missing documentation for BIO_{get,set}_accept_ip_family()Dr. David von Oheimb
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15417)
2021-05-29apps/ocsp: Allow -port 0Dr. David von Oheimb
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15417)
2021-05-29DOC: Slightly improve the documentation of BIO_lookup() and related functionsDr. David von Oheimb
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15417)
2021-05-29apps/lib/s_socket.c and 80-test_cmp_http.t: Make ACCEPT port reporting more ↵Dr. David von Oheimb
robust Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15417)
2021-05-29Fix intermittent CI failure in evp_kdf_test for non_caching build.Shane Lontis
Fixes #15515 Another case of the order that tests run in causes a failure. A new test was loading "legacy" into the default lib ctx. If it ran first then everything fails. The test now has its own lib ctx. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15516)
2021-05-28Fix incorrect gettable OSSL_CIPHER_PARAM_TLS_MAC parameterShane Lontis
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15416)
2021-05-28Fix incorrect OSSL_CIPHER_PARAM_SPEED get_ctx_paramsShane Lontis
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15416)
2021-05-28Add missing EVP_CTRL_CCM_SET_L controlShane Lontis
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15416)