summaryrefslogtreecommitdiffstats
path: root/util
AgeCommit message (Collapse)Author
2022-07-20check-format.pl: Fix report on constant on LHS of comparison/assignmentDr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> (cherry picked from commit 15ae69fa7bc0f367edded19bc48e6d9a5ce8d547)
2022-07-20check_format.pl: Add checks for blank lines within/after local declsDr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> (cherry picked from commit d8662f2f8716645164a9d4d8795a9c353fe315fb)
2022-07-20check_format.pl: Fix typosDimitris Apostolou
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (cherry picked from commit e304aa87b35fac5ea97c405dd3c21549faa45e78)
2022-07-20check-format.pl: Fix report on constant on LHS of comparison or assignmentDr. David von Oheimb
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (cherry picked from commit 2e6afe1079c6993868c5d8a813605d16980e8e10)
2022-06-24Added documentation for PEM_X509_INFO_read() and PEM_X509_INFO_read_bio()Allan
Fixes #18342 Fixes <propq> to I<propq> Updated copyright year Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18623) (cherry picked from commit 9454423bf1eac4c75e70ff4fd67456e4cfb05a92)
2022-06-21Update copyright yearMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> Release: yes
2022-05-19mdl: Don't enforce one space after list markersRichard Levitte
Common markdown styles usually show 4-column indents to separate the list marker and the list item text. That's a common template for writing new markdown files. On the other hand, we do have some files (such as CHANGES.md) where we use a different style. From a markdown perspective, both are perfectly OK, and there's no reason to enforce either. Therefore, the best thing is to exclude this particular rule. Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18297) (cherry picked from commit 2046f80bc84deff5f3b8e3f8ffe54528bc684658)
2022-05-13mkdef.pl: Add cmd-line flag to differentiate shared libs and DSO.Daniel Fiala
Fixes openssl#16984. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18284) (cherry picked from commit e5f831a065df1d6e4640ef389f8594a5f10c9c8e)
2022-05-05Detect arm64-*-*bsd and enable assembly optimizationsAllan Jude
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17084) (cherry picked from commit 8e22f9d6d956ad583afe10b986519731c113ac80)
2022-05-03make updateMatt Caswell
Reviewed-by: Tomas Mraz <tomas@openssl.org> Release: yes
2022-04-27Add SSL_(CTX_)?get0_(verify|chain)_cert_store functionsHugo Landau
Currently we do not have any way to retrieve these values once set. Fixes #18035. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18038) (cherry picked from commit 948cf521798a801cfde47a137343e6f958d71f04)
2022-04-21Public API functions OPENSSL_str[n]casecmpDmitry Belyavskiy
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18103)
2022-04-07Document {SSL|SSL_CTX}_set_{purpose|trust}()Hugo Landau
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18037) (cherry picked from commit eb27a90e41a62d3337c5e21e24ee72f1e49a445c)
2022-04-07Document SSL_CTX_get_ssl_methodHugo Landau
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18037) (cherry picked from commit e12bee78d4e64da2176dd9a7ec19ec680dd3bebf)
2022-03-23util/markdownlint.rb: Allow fenced code blocksRichard Levitte
We use both indented and fenced styles in diverse markdown files. We try to do this consistently in each file, though. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17933) (cherry picked from commit fb2cd91f27d0cc0bbf1883dd188788016165a458)
2022-03-15Update copyright yearMatt Caswell
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2022-03-15Add documentation of BN_mod_sqrt()Tomas Mraz
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 03eccd2663e36f8b95ba3ae8c30a63313a38ec0a)
2022-03-14Add manpages for SSL_get_certificate, SSL_get_private_keyHugo Landau
This is as I understand these functions from reading the code. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17815) (cherry picked from commit 2a9219514263454896bdda800b4b811843338bc7)
2022-03-14Replace handling of negative verification result with SSL_set_retry_verify()Tomas Mraz
Provide a different mechanism to indicate that the application wants to retry the verification. The negative result of the callback function now indicates an error again. Instead the SSL_set_retry_verify() can be called from the callback to indicate that the handshake should be suspended. Fixes #17568 Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17825) (cherry picked from commit dfb39f73132edf56daaad189e6791d1bdb57c4db)
2022-02-24Undeprecate OPENSSL_VERSION_NUMBER and OpenSSL_version_num()Matt Caswell
This macro and function were deprecated in the documentation but not in the source. Following an OTC vote the deprecation has been removed from the documentation. See https://github.com/openssl/technical-policies/issues/26 Fixes #17517 Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17750) (cherry picked from commit 42659159f4d4a8c16a0e9b089d40a5831b60cbb6)
2022-02-16Force macOS 10.15 or later to be 64-bitTodd Short
macOS Catalina (10.15) no longer supports 32-bit applications. Do not wait 5 seconds to give the user the option of using KERNEL_BITS=32 Do not accept the KERNEL_BITS=32 option Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17675) (cherry picked from commit b926548b362531e8a64e7482c081611fab7183a8)
2022-02-02Document purpose and trust setting functionsMatt Caswell
In particular: X509_STORE_CTX_set_purpose() X509_STORE_CTX_set_trust(); X509_STORE_CTX_purpose_inherit(); Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/17603)
2022-01-06Fix copyright year issuesBernd Edlinger
Fixes: #13765 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17427) (cherry picked from commit fd84b9c3e94be1771d1b34ad857081f7693318aa)
2021-12-27Add support for BSD-riscv64 targetPiotr Kubaj
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> Reviewed-by: Paul Dale <pauli@openssl.org> (cherry picked from commit c2d1ad0e048dd3bfa60e6aa0b5ee343cc6d97a15) (Merged from https://github.com/openssl/openssl/pull/17333)
2021-12-14Update copyright yearMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2021-12-10Teach OpenSSL::ParseC about OPENSSL_EXPORT and OPENSSL_EXTERNRichard Levitte
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17215) (cherry picked from commit 7a2ad00f3ecffa6be350e9e72992d4ec003f54ae)
2021-11-23DOC: Add a few previously documented functionsRichard Levitte
d2i_X509_bio(), d2i_X509_fp(), i2d_X509_bio(), and i2d_X509_fp() were documented in OpenSSL 1.0.2. In a grand unification of the documentation of (almost) all d2i and i2d functions, these were dropped, most likely by mistake. This simply adds them back. Fixes #17091 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17094)
2021-10-27EVP: Allow a fallback for operations that work with an EVP_PKEYRichard Levitte
Functions like EVP_PKEY_sign_init() do an implicit fetch of the operation implementation (EVP_SIGNATURE in this case), then get the KEYMGMT from the same provider, and tries to export the key there if necessary. If an export of the key isn't possible (because the provider that holds the key is an HSM and therefore can't export), we would simply fail without looking any further. This change modifies the behaviour a bit by trying a second fetch of the operation implementation, but specifically from the provider of the EVP_PKEY that's being used. This is done with the same properties that were used with the initial operation implementation fetch, and should therefore be safe, allowing only what those properties allow. Fixes #16614 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16725) (cherry picked from commit 839ffdd11cd48d329a1d89565d62e0be082f9d08)
2021-09-21Fix util/mkpod2html.pl to call pod2html with absolute pathsRichard Levitte
It turns out that on VMS, pod2html only recognises VMS directory specifications if they contain a device name, which is accomplished by making them absolute. Otherwise, a VMS build that includes building the document HTML files ends up with an error like this: $ perl [---.downloads.openssl-3_0-snap-20210916.util]mkpod2html.pl -i [---.downloads.openssl-3_0-snap-20210916.doc.man1]CA.pl.pod -o [.DOC.HTML.MAN1]CA.PL.HTML -t "CA.pl" -r "[---.downloads.openssl-3_0-snap-20210916.doc]" [---.downloads.openssl-3_0-snap-20210916.util]mkpod2html.pl: error changing to directory -/-/-/downloads/openssl-3_0-snap-20210916/doc/: no such file or directory %SYSTEM-F-ABORT, abort Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16626) (cherry picked from commit dc18f036f161e1e49e1d001046716c77d1699e70)
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) (cherry picked from commit 435981cbadad2c58c35bacd30ca5d8b4c9bea72f)
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) (cherry picked from commit 473664aafdff1f60db99929bdd43c2a9b26d14cd)
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)