summaryrefslogtreecommitdiffstats
path: root/util
AgeCommit message (Collapse)Author
2021-09-09OpenSSL::Ordinals::set_version() should only be given the short versionRichard Levitte
This function tried to shave off the pre-release and build metadata text from the the version number it gets, but didn't do that quite right. Since this isn't even a documented behaviour, the easier, and arguably more correct path is for that function not to try to shave off anything, and for the callers to feed it the short version number, "{MAJOR}.{MINOR}.{PATCH}", nothing more. The build file templates are adjusted accordingly. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16556)
2021-09-09Enhance the srctop, bldtop, data and result functions to check the resultRichard Levitte
This affects bldtop_dir, bldtop_file, srctop_dir, srctop_file, data_dir, data_file, result_dir, and result_file. They are all enhanced to check that the resulting path really is a directory or a file. They only do this if the path exists. This allows the tests to catch if these functions are used incorrectly, even on systems where the syntax for directories and files is the same. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16523)
2021-09-07Use '[option...]' not '[[ options ]]' in textRich Salz
Looks more like manpage format. :) Also remove `{{..}}` notation and rewrite around it. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16329)
2021-09-02always use the same perl in $PATHa1346054
Different tests may use unexpectedly different versions of perl, depending on whether they hardcode the path to the perl executable or if they resolve the path from the environment. This fixes it so that the same perl is always used. Fix some trailing whitespace and spelling mistakes as well. CLA: trivial Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16362)
2021-08-20Replace CONFIG_NOWAIT env var with -w optionRich Salz
And document the -w option Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16325)
2021-08-19Set KERNEL_BITS, add CONFIG_NOWAITRich Salz
Avoid perl "undefined variable in regexp" message. Not all uses were changed because I wasn't sure. Add support for CONFIG_NOWAIT environment variable. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16325)
2021-08-19util/add-depends.pl: Rebuild the build file after reconfigurationRichard Levitte
Reconfiguration is assumed if any dependency (.d) file is older than configdata.pm. Fixes #16364 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16365)
2021-08-19util/add-depends.pl: Only add dependencies on existing or generated headersRichard Levitte
Headers that fulfill neither of those conditions are skipped. This avoids build breaks when development has removed a previously existing header. Fixes #16360 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16361)
2021-08-04doc: use the documented =item markersBeat Bolli
The generated lists[1] look weird when using a dash as the list item character. Perlpod documents[2] '*' for unordered lists and '1.' (note the period) for ordered lists. Use these characters instead. [1] e.g. https://www.openssl.org/docs/manmaster/man7/migration_guide.html#New-Algorithms [2] https://perldoc.perl.org/perlpod Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16190)
2021-07-29make updateMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2021-07-26EVP: Add EVP_PKEY_get0_provider() and EVP_PKEY_CTX_get0_provider()Richard Levitte
Fixes #16058 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16063)
2021-07-06err: remove ERR_GET_FUNC()Pauli
This is problematic in 3.0 because the function codes are all defined as zero. This leads to either every error matching or no error ever matching. Both are problematic for users. The OTC vote resolved to remove this function completely. Fixes #15946 Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> (Merged from https://github.com/openssl/openssl/pull/16004)
2021-07-06util: add -fips option to wrap.pl to make using the FIPS provider easierPauli
Without this option, I find I need to figure out which environment variables point where which wastes effort. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15966)
2021-06-30CMP: Add missing getter functions to CRMF API and CMP APIDr. David von Oheimb
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15790)
2021-06-29Ensure ordinals are created during release processMatt Caswell
We introduce a new makefile target "make release-update" that forces ordinal file renumbering, and also does the fips checksum updates. We then call that from the release script. Fixes #15806 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15901)
2021-06-27Update config.pmLőrinczy, Zsigmond
Missing '(' added into a PowerPC-specific command Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15911)
2021-06-25OpenSSL::Util::fixup_cmd_elements(): Include '!' among the VMS chars to processRichard Levitte
! is the DCL character that starts a comment, and therefore acts as a cut-off if not quoted. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15889)
2021-06-18Make util/wrap.pl work better on VMSRichard Levitte
Perl's system() on VMS needs to have the command line properly fixed up, even with arguments passed in list form. We arrange that by having util/wrap.pl use the same command line fixups as OpenSSL::Test. As a consequence, util/wrap.pl needs to be generated, to easily pick up data from configdata.pm. This also removes yet another file copying hack from the build file templates. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15791)
2021-06-18OpenSSL::Test: Move the command line quotifierRichard Levitte
The command line quotifier is more useful as a common utility, so it gets moved to OpenSSL::Util, as the following two functions: fixup_cmd_elements(), which is the generic command line reformatter fixup_cmd(), which is like fixup_cmd_elements(), but treats the first element specially where necessary (such as on VMS). Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15791)
2021-06-17Fix exit code for VMS in util/wrap.pl and test/run_tests.plRichard Levitte
The exit code for VMS is a bit tricky, and while perl translates the VMS status code from a typical C program to posix terms, it doesn't automatically translate its exit code into the typical C program VMS status code. Perl scripts are recommended to do so explicitly. Therefore, we make util/wrap.pl and test/run_tests.pl simulate the typical C program VMS status code for all non-zero exit codes, except we give them all the error severity (according to the VMS C library reference manual, exit codes 2 and above are treated as success...). Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15787)
2021-06-16Configuration: Fix incorrect $unified_info{attributes} referencesRichard Levitte
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15758)
2021-06-16HTTP client: fix use of OSSL_HTTP_adapt_proxy(), which is needed also in cmp.cDr. David von Oheimb
For this reason, export this function, which allows removing http_local.h Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15764)
2021-06-16Add documentation for the newly added OBJ up callsMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15681)
2021-06-11Rename OSSL_HTTP_set_request() to OSSL_HTTP_set1_request() for clarityDr. David von Oheimb
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15697)
2021-06-11Add support for ISO 8601 datetime formatWilliam Edmisten
Fixes #5430 Added the configuration file option "date_opt" to the openssl applications ca, crl and x509. Added ASN1_TIME_print_ex which supports the new datetime format using the flag ASN1_DTFLGS_ISO8601 Reviewed-by: Paul Dale <pauli@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/14384)
2021-06-10OpenSSL::Test: If __cwd() is to create the directory, do it earlyRichard Levitte
This is to ensure that abs_path() has an existing directory to look at. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15701)
2021-06-10OpenSSL::Test: Treat SRCDATA directory specially, as it might not existRichard Levitte
Not all tests come with a SRCDATA directory. if it doesn't exist, we simply drop it from the internal table of directories. OpenSSL::Test::srcdata_dir() and OpenSSL::Test::srcdata_file() may return undef in that case. However, recipes shouldn't try to refer to a non-existing data directory, so if that happens, it's a programming error and must be corrected. Fixes #15679 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15700)
2021-06-10util: convert SHA* one shots back to being functionsPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://github.com/openssl/openssl/pull/15668)
2021-06-08OpenSSL::Test.pm: Replace all uses of rel2abs() with abs_path()Richard Levitte
rel2abs() doesn't clean the path well enough, which may lead to odd results when calculating new paths. abs_path() works better for this sort of thing. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15644)
2021-06-08doc-nits: support out of source executionPauli
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15637)
2021-06-05ENCODER: Drop OSSL_ENCODER_PARAM_INPUT_TYPERichard Levitte
This was a poor substitute for using the name of the decoder implementation, and since there is functionality to get the latter now, this parameter can be dropped. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15570)
2021-06-05Add documentation for newly added ASN1 functionsMatt Caswell
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15591)
2021-06-05Teach more of the ASN.1 code about libctx/propqMatt Caswell
Make sure we pass libctx/propq down to all the layers so that objects that are created during parsing have the right values. Then use this new capability for PKCS7. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15591)
2021-06-05Teach the ASN.1 code how to create embedded objects with libctx/propqMatt Caswell
An ASN.1 object such as an X509 may have embedded objects in it such as an X509_PUBKEY. If there is a libctx/propq in use then we need to make sure we pass these down to the constructors of these embedded objects. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15591)
2021-06-05Provide the ability to create an X509_PUBKEY with a libctx/propqMatt Caswell
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15591)
2021-06-03Deprecate EVP_CIPHER_impl_ctx_size and EVP_CIPHER_CTX_buf_noconstRichard Levitte
Fixes #15519 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15584)
2021-06-03Restore all the ? in util/libcrypto.numRichard Levitte
They will become numbers again when beta1 is actually released. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15578)
2021-06-03util/mknum.pl: Really allow unset ordinals in developmentRichard Levitte
Any pre-release tag that includes '-dev' is development. The ordinals don't need to be finalized before '-dev' is removed (i.e. a release is made). Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15578)
2021-06-03util: update FIPS checksumming script to be more aggressive with whitespacePauli
Fixes #15562 Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15574)
2021-06-02libcrypto: make XXX_get_number() internalPauli
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15564)
2021-06-02utils: remove TODOPauli
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15539)
2021-06-02Fix up bad libcrypto.numJon Spillett
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15576)
2021-06-02Add NCONF_get_section_names()Tomas Mraz
And a few additional fixups to make the no-deprecated configuration to build. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15466)
2021-06-02Add NCONF_get0_libctx()Rich Salz
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15466)
2021-06-01Add documentation of the old names kept as alias macrosTomas Mraz
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15405)
2021-06-01Rename also the OSSL_PROVIDER_name() functionTomas Mraz
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15405)
2021-06-01Rename all getters to use get/get0 in nameTomas Mraz
For functions that exist in 1.1.1 provide a simple aliases via #define. Fixes #15236 Functions with OSSL_DECODER_, OSSL_ENCODER_, OSSL_STORE_LOADER_, EVP_KEYEXCH_, EVP_KEM_, EVP_ASYM_CIPHER_, EVP_SIGNATURE_, EVP_KEYMGMT_, EVP_RAND_, EVP_MAC_, EVP_KDF_, EVP_PKEY_, EVP_MD_, and EVP_CIPHER_ prefixes are renamed. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15405)
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-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-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)