summaryrefslogtreecommitdiffstats
path: root/util/perl
AgeCommit message (Collapse)Author
2023-02-07Fix typo in Ordinals.pm from PR #14074Viktor Dukhovni
Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20201) (cherry picked from commit 77c8d6d703efd1d935b5c2603fd31f4b15b1214d)
2022-11-18ParseC.pm: gracefully handle DOS-style end-of-line in source filesDr. David von Oheimb
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://github.com/openssl/openssl/pull/19686) (cherry picked from commit c507db9678f50482df5f6c58e42572fe6fe3007c)
2022-09-29OpenSSL::config: Fix trivial bugsRichard Levitte
Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19285) (cherry picked from commit 2ba5bffa26c0c4677f48e730628c0b54c31c734c)
2022-09-29OpenSSL::config: Fix VMS guessesRichard Levitte
The MACHINE value from POSIX::uname() isn't trustworthy at all. MACHINE names like this has been seen: _HP__VMM___(1.67GHz/9.0MB) Perl's `$Config{archname}` is much more trustworthy, especially since VMS isn't a multiarch operating system, at least yet. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19285) (cherry picked from commit e63f5fdcb2658961f29fe7bed7968c0dcf7328a7)
2022-09-29OpenSSL::config: determine the MSVC target architecture by asking clRichard Levitte
Since cl knows what architecture it builds fore, all depending on what the user set up, it makes sense to ask it, and use that result primarly, and only use the POSIX::uname() MACHINE value as a fallback. Also, this does indeed determine if cl is present or not. We drop the explicit names in .github/workflows/windows.yml as proof of concept. Fixes #19281 Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19285) (cherry picked from commit 0747f94b5f7b7f07f21384507ba1adaea6f99e88)
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-03-15Update copyright yearMatt Caswell
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
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-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-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-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-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-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-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-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-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-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-05-25fix Solaris OS detection in config.pmJan Lana
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15439)
2021-05-20Update copyright yearMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15381)
2021-05-19Fix OpenSSL::fallback for VMSRichard Levitte
VMS unpackers will typically convert any period ('.') in directory names to underscores, since the period is a path separator on VMS, just like '/' is a path separator on Unix. Our fallback mechanism needs to account for that. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15317)
2021-05-19Move some OpenSSL perl utility functions to OpenSSL::UtilRichard Levitte
quotify1() and quotify_l() were in OpenSSL::Template, but should be more widely usable. configdata.pm.in's out_item() is also more widely useful and is therefore moved to OpenSSL::Util as well, and renamed to dump_data(). Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15310)
2021-05-06Update copyright yearMatt Caswell
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15181)
2021-05-04Add OpenSSL::Config::Query and use it in configdata.pmRichard Levitte
OpenSSL::Config::Query is a configuration querying tool that's meant to make it easier to query the diverse configuration data for info. That's much easier than to dig through all the parts of %unified_info. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8871)
2021-05-04OpenSSL::Test: When prefixing command with $^X on Windows, fix it up!Richard Levitte
The perl interpreter name itself might contain spaces and need quoting. __fixup_prg() does this for us. Fixes #14256 Co-authored-by: Tomáš Mráz <tomas@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15084)
2021-04-28Improve the implementation of X509_STORE_CTX_get1_issuer()Tomas Mraz
It is possible for the stack of X509_OBJECTs held in an X509_STORE_CTX to have a custom compare function associated with it. Normally (by default) this uses X509_NAME_cmp(). The X509_STORE_CTX_get1_issuer() function assumed that it would always be X509_NAME_cmp(). By implementing OPENSSL_sk_find_all() function we can avoid explicitly using X509_NAME_cmp() in X509_STORE_CTX_get1_issuer(). Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14728)
2021-04-27Add system guessing for linux64-riscv64 targetAndreas Schwab
CLA: trivial Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15023)
2021-04-08Update copyright yearMatt Caswell
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14801)
2021-03-31Add a local perl module to get year last changedRich Salz
This is used for generating a more-correct copyright statement for the "build_generated" targets. Fixes: #13765 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13791)
2021-03-25Teach TLSProxy how to encrypt <= TLSv1.2 ETM recordsMatt Caswell
Previously TLSProxy only knew how to "repack" messages for TLSv1.3. Most of the handshake in <= TLSv1.2 is unencrypted so this hasn't been too much of restriction. However we now want to modify reneg handshakes which are encrypted so we need to add that capability. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org>
2021-03-11Update copyright yearMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14512)
2021-03-09Reword repeated words.Shane Lontis
A trivial PR to remove some commonly repeated words. It looks like this is not the first PR to do this. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14420)
2021-02-23util/perl/OpenSSL/config.pm: Add VMS specific C compiler settingsRichard Levitte
That includes proper compiler version detection. Partially fixes #14247 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14270)
2021-02-23util/perl/OpenSSL/config.pm: Fix determine_compiler_settings()Richard Levitte
There may be times when a compiler can't be detected, in which case determine_compiler_settings() bailed out too early, before platform specific fallbacks have a chance to set the record straight. That bail out has been moved to be done after the platform specific fallbacks. Furthermore, the attempt to check for gcc or clang and get their version number was done even if no compiler had been automatically detected or pre-specified via $CC. It now only does this when there is a compiler specified or detected. The platform specific fallbacks check the versions separately. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14270)
2021-02-18Update copyright yearMatt Caswell
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14235)
2021-02-08mknum.pl: Exclude duplicate entries and include source file name in diagnosticsDr. David von Oheimb
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14074)
2021-02-05Remove the old DEPRECATEDIN macrosRichard Levitte
They serve no purpose any more Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13461)
2021-01-28Update copyright yearRichard Levitte
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13999)
2021-01-23Util/Pod.pm: Fix uninitialized $podinfo{lastsecttext} on empty inputDr. David von Oheimb
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13898)
2020-12-05PEM: Add a more generic way to implement PEM _ex functions for libctxRichard Levitte
This also adds the following functions, for completeness: PEM_write_PrivateKey_ex(), PEM_write_bio_PrivateKey_ex(), PEM_write_PUBKEY_ex, PEM_write_bio_PUBKEY_ex Fixes #13542 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13547)
2020-12-02Correct system guessing for darwin64-arm64 targetTim Hudson
Previously the system guessing logic would incorrectly guess i686-apple-darwin as the fallback for any unspecified architecture that is a Darwin target Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13517)
2020-11-06Correct system guessing for solaris64-x86_64-* targetsMatt Caswell
Previously the system guessing script was choosing a target that did not exist for these platforms. Fixes #13323 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13327)
2020-11-06Don't complain about uninitialized values when running ConfigureMatt Caswell
If a system understands `uname -X` then the Configure script will attempt to use uninitialized values. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13327)
2020-10-15Update copyright yearMatt Caswell
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13144)
2020-10-12OpenSSL::ParseC: handle OSSL_CORE_MAKE_FUNCRichard Levitte
Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13074)
2020-10-12Add PEM declaration macros that take attributesRichard Levitte
This makes it possible to easily deprecated selections of PEM functions. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13074)
2020-10-12Add ASN1 declaration macros that take attributesRichard Levitte
This makes it possible to easily deprecated selections of ASN1 functions. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13074)