summaryrefslogtreecommitdiffstats
path: root/util
AgeCommit message (Collapse)Author
2020-01-16Deprecate the low level RC4 functionsPauli
Use of the low level RC4 functions has been informally discouraged for a long time. We now formally deprecate them. Applications should instead use the EVP APIs, e.g. EVP_EncryptInit_ex, EVP_EncryptUpdate, EVP_EncryptFinal_ex and the equivalently named decrypt functions. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10834)
2020-01-16Deprecate the low level RC2 functionsPauli
Use of the low level RC2 functions has been informally discouraged for a long time. We now formally deprecate them. Applications should instead use the EVP APIs, e.g. EVP_EncryptInit_ex, EVP_EncryptUpdate, EVP_EncryptFinal_ex, and the equivalently named decrypt functions. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10834)
2020-01-16Deprecate the low level SEED functionsPauli
Use of the low level SEED functions has been informally discouraged for a long time. We now formally deprecate them. Applications should instead use the EVP APIs, e.g. EVP_EncryptInit_ex, EVP_EncryptUpdate, EVP_EncryptFinal_ex, and the equivalently named decrypt functions. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10833)
2020-01-15Add FIPS Self test kats for digestsShane Lontis
Added an API to optionally set a self test callback. The callback has the following 2 purposes (1) Output information about the KAT tests. (2) Allow the ability to corrupt one of the KAT's The fipsinstall program uses the API. Some KATS are not included in this PR since the required functionality did not yet exist in the provider. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10374)
2020-01-13Refactor the tls/dlts version optionsRich Salz
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/10134)
2020-01-13Deprecate the Low Level CAST APIsMatt Caswell
Applications should instead use the higher level EVP APIs, e.g. EVP_Encrypt*() and EVP_Decrypt*(). Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10742)
2020-01-13Deprecate Low Level Camellia APIsMatt Caswell
Applications should instead use the higher level EVP APIs, e.g. EVP_Encrypt*() and EVP_Decrypt*(). Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10741)
2020-01-13make find-doc-nits report function typedef w/ space before arg listDr. David von Oheimb
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10673)
2020-01-13handle new findings of find-doc-nits for certain typedefsDr. David von Oheimb
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10673)
2020-01-13improve 'typedef' patterns of find-doc-nitsDr. David von Oheimb
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10673)
2020-01-12Deprecate the low level Whirlpool functions.Pauli
Use of the low level Whirlpool functions has been informally discouraged for a long time. We now formally deprecate them. Applications should instead use the EVP APIs, e.g. EVP_Digest, EVP_DigestInit_ex, EVP_DigestUpdate and EVP_DigestFinal_ex. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10779)
2020-01-12Deprecate the low level MDC2 functions.Pauli
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10790)
2020-01-12Deprecate the low level MD4 functions.Pauli
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10790)
2020-01-12Deprecate the low level MD2 functions.Pauli
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10790)
2020-01-12Deprecate the low level RIPEMD160 functions.Pauli
Use of the low level RIPEMD160 functions has been informally discouraged for a long time. We now formally deprecate them. Applications should instead use the EVP APIs, e.g. EVP_Digest, EVP_DigestInit_ex, EVP_DigestUpdate and EVP_DigestFinal_ex. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10789)
2020-01-12Add dsa signature alg to fips providerShane Lontis
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10615)
2020-01-08Deprecate Low Level Blowfish APIsMatt Caswell
Applications should instead use the higher level EVP APIs, e.g. EVP_Encrypt*() and EVP_Decrypt*(). Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10740)
2020-01-06Deprecate the low level AES functionsMatt Caswell
Use of the low level AES functions has been informally discouraged for a long time. We now formally deprecate them. Applications should instead use the EVP APIs, e.g. EVP_EncryptInit_ex, EVP_EncryptUpdate, EVP_EncryptFinal_ex, and the equivalently named decrypt functions. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10580)
2019-12-26Removed now documented stuff from util/missing*.txtRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10683)
2019-12-26util/find-doc-nits: when loading "missing" files, check if documentedRichard Levitte
It may be that some "missing" manuals have been written since their insertion in the "missing" files. Make sure to alert when such manual references are found. This works, because we collect all existing manual references into %name_map first. Fixes #10681 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10683)
2019-12-21OpenSSL::Util::extract_pod_info(): Allow invisible namesRichard Levitte
This should be very unusual, but we do have a case of a name we don't want to display. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10621)
2019-12-21OpenSSL::Util::extract_pod_info(): Read the POD one paragraph at a timeRichard Levitte
POD files should always be treated this way Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10621)
2019-12-21Adjust all util/missing*.txt to include the section numberRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10621)
2019-12-21util/find-doc-nits: Better checking of missing documentationRichard Levitte
The names collected in util/missing*.txt are not file names, but symbol names, and to compare properly with script data, the section name must be included. All symbols found in util/lib*.num are library functions, so we know that they are in manual section 3 and can simply add that info. The same goes for all macros found in C headers. Finally, we get rid of getdocced() and its associated hash table %docced. We already have the appropriate information in %name_map. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10621)
2019-12-21perl: OpenSSL::Util::Pod::extract_pod_info() now saves the file contentsRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10621)
2019-12-19CRYPTO: split cipher_platform.h into algorithm specific headersRichard Levitte
aes_platform.h cmll_platform.h des_platform.h To make this possible, we must also define DES_ASM and CMLL_ASM to indicate that we have the necessary internal support. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10662)
2019-12-18BIO: Add BIO_f_prefix(), a text line prefixing filterRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10531)
2019-12-14Deprecate most of debug-memoryRich Salz
Fixes #8322 The leak-checking (and backtrace option, on some platforms) provided by crypto-mdebug and crypto-mdebug-backtrace have been mostly neutered; only the "make malloc fail" capability remains. OpenSSL recommends using the compiler's leak-detection instead. The OPENSSL_DEBUG_MEMORY environment variable is no longer used. CRYPTO_mem_ctrl(), CRYPTO_set_mem_debug(), CRYPTO_mem_leaks(), CRYPTO_mem_leaks_fp() and CRYPTO_mem_leaks_cb() return a failure code. CRYPTO_mem_debug_{malloc,realloc,free}() have been removed. All of the above are now deprecated. Merge (now really small) mem_dbg.c into mem.c Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10572)
2019-12-13Remove CRYPTO_secure_allocated from util/missingcrypto111.txtRichard Levitte
Followup on #10523 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10611)
2019-12-12Various missing-link fixesRich Salz
Also, turn missing L<foo(3)> into foo(3) Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10104)
2019-12-12chunk 6 of CMP contribution to OpenSSLDr. David von Oheimb
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10297)
2019-12-11Fix docs for CRYPTO_secure_allocatedRich Salz
Fixes #9300 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10523)
2019-12-11Fix some typosVeres Lajos
Reported-by: misspell-fixer <https://github.com/vlajos/misspell-fixer> CLA: trivial Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10544)
2019-12-10Remove handling of outdated macro'sRich Salz
DECLARE_STACK_OF was renamed to DEFINE_STACK_OF in commit 8588571. Expanded the only use of TYPEDEF_{D2I,I2D,D2I2D}_OF, so that they can easily be removed in a future release 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/10464)
2019-12-04add X509_cmp_timeframe() including its documentationDr. David von Oheimb
Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10502)
2019-12-04util/mkerr.pl: don't stop reading conserved symbols from the state fileRichard Levitte
If we don't read them, they will not be conserved. Fixes #10522 Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/10549)
2019-11-29util/find-doc-nits: ignore macros ending in _fnsigRichard Levitte
These are helper macros alongside the IMPLEMENT_ and DECLARE_ macros. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10394)
2019-11-29util/find-doc-nits: limit the prototype checkRichard Levitte
The prototype checks shouldn't be performed on SYNOPSIS lines that aren't function prototypes. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10394)
2019-11-29PROV SERIALIZER: add support for writing RSA keysRichard Levitte
This also adds the missing accessor RSA_get0_pss_params(), so those parameters can be included in the PKCS#8 data structure without needing to know the inside of the RSA structure. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10394)
2019-11-29PROV SERIALIZER: add common functionality to serialize keysRichard Levitte
To support generic output of public keys wrapped in a X509_PUBKEY, additional PEM and i2d/d2i routines are added for that type. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10394)
2019-11-29SERIALIZER: add support for serializing EVP_PKEYsRichard Levitte
The following public functions is added: - OSSL_SERIALIZER_CTX_new_by_EVP_PKEY() - OSSL_SERIALIZER_CTX_set_cipher() - OSSL_SERIALIZER_CTX_set_passphrase() - OSSL_SERIALIZER_CTX_set_passphrase_cb() - OSSL_SERIALIZER_CTX_set_passphrase_ui() OSSL_SERIALIZER_CTX_new_by_EVP_PKEY() selects a suitable serializer for the given EVP_PKEY, and sets up the OSSL_SERIALIZER_CTX to function together with OSSL_SERIALIZER_to_bio() and OSSL_SERIALIZER_to_fp(). OSSL_SERIALIZER_CTX_set_cipher() indicates what cipher should be used to produce an encrypted serialization of the EVP_PKEY. This is passed directly to the provider using OSSL_SERIALIZER_CTX_set_params(). OSSL_SERIALIZER_CTX_set_passphrase() can be used to set a pass phrase to be used for the encryption. This is passed directly to the provider using OSSL_SERIALIZER_CTX_set_params(). OSSL_SERIALIZER_CTX_set_passphrase_cb() and OSSL_SERIALIZER_CTX_set_passphrase_ui() sets up a callback to be used to prompt for a passphrase. This is stored in the context, and is called via an internal intermediary at the time of serialization. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10394)
2019-11-29SERIALIZER: add functions for serialization to fileRichard Levitte
These functions are added: - OSSL_SERIALIZER_to_bio() - OSSL_SERIALIZER_to_fp() (unless 'no-stdio') OSSL_SERIALIZER_to_bio() and OSSL_SERIALIZER_to_fp() work as wrapper functions, and call an internal "do_output" function with the given serializer context and a BIO to output the serialized result to. The internal "do_output" function must have intimate knowledge of the object being output. This will defined independently with context creators for specific OpenSSL types. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10394)
2019-11-29SERIALIZER: New API for serialization of objects through providersRichard Levitte
Serialization is needed to be able to take a provider object (such as the provider side key data) and output it in PEM form, DER form, text form (for display), and possibly other future forms (XML? JSON? JWK?) The idea is that a serializer should be able to handle objects it has intimate knowledge of, as well as object data in OSSL_PARAM form. The latter will allow libcrypto to serialize some object with a different provider than the one holding the data, if exporting of that data is allowed and there is a serializer that can handle it. We will provide serializers for the types of objects we know about, which should be useful together with any other provider that provides implementations of the same type of object. Serializers are selected by method name and a couple of additional properties: - format used to tell what format the output should be in. Possibilities could include "format=text", "format=pem", "format=der", "format=pem-pkcs1" (traditional), "format=der-pkcs1" (traditional) - type used to tell exactly what type of data should be output, for example "type=public" (the public part of a key), "type=private" (the private part of a key), "type=domainparams" (domain parameters). This also adds a passphrase callback function type, OSSL_PASSPHRASE_CALLBACK, which is a bit like OSSL_CALLBACK, but it takes a few extra arguments to place the result in. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10394)
2019-11-29configdata.pm.in, util/dofile.pl: load 'platform' unconditionallyRichard Levitte
The 'platform' module handles defaults fine, there's no need to add extra conditions on it being loaded. Fixes #10513 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10514)
2019-11-27util/find-doc-nits: Better parsing of linksRichard Levitte
When checking links, we need to peal away stuff that aren't part of the link proper first. That makes it easier to check the link itself. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10507)
2019-11-17Add missing EVP_PKEY_METHOD accessors for digestsign and digestverifyAnthony Hu
Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/10388)
2019-11-14Delete recently documented functions from missingcryptoTomas Mraz
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10432)
2019-11-14Move RSA Asym cipher code to the default providerMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10152)
2019-11-14Implement provider support for Asym CiphersMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10152)
2019-11-13libcrypto.num: remove some unused EVP_MAC symbolsDr. Matthias St. Pierre
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10421)