summaryrefslogtreecommitdiffstats
path: root/Configurations
AgeCommit message (Collapse)Author
2021-06-01Fix enable-fips builds on WindowsTomas Mraz
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15550)
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-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-28Rework and make DEBUG macros consistent.Rich Salz
Remove unused -DCONF_DEBUG and -DBN_CTX_DEBUG. Rename REF_PRINT to REF_DEBUG for consistency, and add a new tracing category and use it for printing reference counts. Rename -DDEBUG_UNUSED to -DUNUSED_RESULT_DEBUG Fix BN_DEBUG_RAND so it compiles and, when set, force DEBUG_RAND to be set also. Rename engine_debug_ref to be ENGINE_REF_PRINT also for consistency. Fixes #15357 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15353)
2021-05-27generate_fips_sources: properly include providers/common/der/*.inTomas Mraz
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15481)
2021-05-26Build file templates: rework FIPS module installationRichard Levitte
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15436)
2021-05-26Build file templates: rework how general dependencies are computedRichard Levitte
For some types of targets, we pretty much know what kinds of files all the dependencies are. For some, however, we can't assume anything, and are faced with dependencies in platform agnostic form. We need to find those in diverse places in %unified_info, and deduce from there how they should be converted to a platform specific form. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15436)
2021-05-26Rework how providers/fipsmodule.cnf is producedRichard Levitte
First of all, we have concluded that we can calculate the integrity checksum with a simple perl script. Second, having the production of providers/fipsmodule.cnf as a dependency for run_tests wasn't quite right. What we really want is to generate it as soon as a new providers/fips.so is produced. That required a small bit of fiddling with how diverse dependencies are made. Fixes #15166 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15436)
2021-05-25Do not try to install image directories with no imagesTomas Mraz
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/15433)
2021-05-25checksum: include header files in the checksumming outputPauli
Fixes #15133 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15365)
2021-05-22Disable loader_attic by default on VMSRichard Levitte
The reason is that it currently doesn't build properly, due to the of pvkfmt.c, causing multiply defined symbols since libcrypto exports them as well. At the same time, it can't do without that source file, or it won't have access to certain internal symbols from there. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15320)
2021-05-22VMS: Fix run of generic generator programs in descrip.mms.tmplRichard Levitte
For a generic program, always go through the MCR utility. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15397)
2021-05-22Configurations/descrip.mms.tmpl: rework the inclusion hacksRichard Levitte
Because VMS C has some trouble with recursive inclusion of header files, we have had to help it out for object files where there is such an inclusion structure. Previously, we did so with temporary logical names that were the same as the first directory in an inclusion, so for example, to enable this inclusion (found in ssl/ssl_local.h), we created the logical name "record" when building any of the object files in the ssl/ subdirectories: #include "record/record.h" However, there is another way with the VMS C compiler, to selectively specify extra include directories in Unix form directly to the compiler. The logic is that from the directory where the source file to compile is located, the specified inclusion directory merged with the inclusion string should be able to access to specified header file. So for example, when a file in ssl/record/ is compiled, the following inclusion is found: #include "../ssl_local.h" So far so good, VMS C handles it properly. However, the recursive inclusion of "record/record.h" fails. However, if the compiler is helped out a little bit, with the following extra qualifier, then it works: /INCLUDE="../" The reason is that the compiler merges "../" and "record/record.h" into "../record/record.h", which is the correct path to that header file from the directory of the source file being compiled. All that remained was to figure out all places where this trouble may occur, and specify extra Unix formatted inclusion directories to specify on per object file basis. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15369)
2021-05-22configurations: update template makefiles to install documentation imagesPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15399)
2021-05-20Create symlinks when installing man pagesMatt Caswell
In 1.1.1 when installing the man pages we created symlinks to the base page for all functions described on the page. We need to continue doing this. Fixes #14846 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15312)
2021-05-19unix-Makefile.tmpl and ci.yml: Merge cmd-nits into doc-nitsDr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15329)
2021-05-19VMS need to build DSO with name shortening, because of provider codeRichard Levitte
We have pretty long symbol names, so they need to be shortened to fit in the linker's 31 character limit on symbols. Symbol name shortening with the VMS C compiler works in such a way that a symbol name that's longer than 31 characters is mangled into its first original 22 characters, followed by a dollar sign and the 32-bit CRC of the original symbol name in hexadecimal. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15317)
2021-05-19Configurations/descrip.mms.tmpl: Add another inclusion hackRichard Levitte
crypto/ec/curve448/ has a series of inclusions that throws VMS C off, so we compensate for it the same way as we have done before. Fixes #14247 Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15317)
2021-05-19Configurations/descrip.mms.tmpl: Change strategy for include directoriesRichard Levitte
Instead of what we used to do, put all include directories in a number of DCL variables and generate the /INCLUDE qualifier value on the command line, we instead generate VMS C specific header files with include directory pragmas, to be used with the VMS C's /FIRST_INCLUDE qualifier. This also shortens the command line, the size of which is limited. VMS C needs to have those include directories specified in a Unix form, to be able to safely merge #include paths with them when searching through them. Fixes #14247 Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15317)
2021-05-19Thrown away all special descrip.mms variablesRichard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15317)
2021-05-19Fix The VMS variant of platform->staticname()Richard Levitte
It was looking in the wrong place in %unified_info to determine if the library would be installed or not. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15317)
2021-05-19Configurations/descrip.mms.tmpl: Diverse updatesRichard Levitte
Get it back in sync with the other templates, and correct a few syntax errors that have crept in. Fixes #14247 Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15317)
2021-05-19Turn off VMS C's info about unsupported pragmasRichard Levitte
VMS C can be notoriously informative about certain things, such as unsupported pragmas. The case here is that it doesn't support "#pragma once", and since we use those quite a lot, that's a lot of repeated information. We simply turn that warning off. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15317)
2021-05-19Rework how a build file (Makefile, ...) is producedRichard Levitte
The memory footprint of how we produced the Makefile was quite... important, because we have all the processing in one perl snippet, and generate the details of the build file by appending to the "magic" variable $OUT. The result is that this variable gets to hold the majority of the build file text, and depending on memory reallocation strategies for strings, the heap may hold multiple (possibly not just a few) copies of this string, almost all of them "freed" but still taking up space. This has resulted in memory exhaustion. We therefore change strategy, and generate the build file in two phases, where the first phase generates the full template using small perl snippets for each detail, and the second phase processes this template. This is much kinder to process memory. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15310)
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-18find-doc-nits: Make -c option (cmd-nits) independent of app build and executionDr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15298)
2021-05-14Add --banner config optionRich Salz
Use it in the automated workflows. Fixes: #15247 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15248)
2021-05-13update-fips-checksums: Make the dependency on source list workTomas Mraz
Also clean the generated checksums with make clean Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15267)
2021-05-13Makefile: Simplify use of run_testsDr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14901)
2021-05-13Remove the .new suffix inside the fips.checksum.newTomas Mraz
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15263)
2021-05-13Allow diff-fips-checksums in in-tree buildTomas Mraz
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15229)
2021-05-13Add diff-fips-checksums target to compare BLDDIR and SRCDIR checksumsTomas Mraz
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15229)
2021-05-13Compute the FIPS checksums in $(BLDDIR) and remove it from update targetTomas Mraz
Add also update-fips-checksums to update the checksums in the $(SRCDIR) if the $(SRCDIR) and $(BLDDIR) is different. The fips-checksums and generate_fips_sources targets are always produced (regardless of enable-fips) as nothing else depends on them and they are developer targets. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15229)
2021-05-08Remove unused code from the fips moduleShane Lontis
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15167)
2021-05-04FIPS module checksums: add scripts and Makefile ruleRichard Levitte
This adds the following scripts: util/lang-compress.pl: Compress source code, which language is determined by the first argument. For the moment, we know 'perl' (perlasm source code), 'C' (C source code) and 'S' (Assembler with C preprocessor directives). This removes comments and empty lines, and compresses series of horizontal spaces to one single space in the languages where that's appropriate. util/fips-checksums.sh: Takes source file names as arguments, pushes them through util/lang-compress.pl and unifdef with FIPS_MODE defined, and calculates the checksum on the result. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8871)
2021-05-04Unix build file: Add a target to create providers/fips.module.sourcesRichard Levitte
This file will be the basis for the FIPS module checksum calculation Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8871)
2021-05-04Windows build file: add forgotten quotes on POD->html command lineRichard Levitte
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15084)
2021-05-01Add -latomic to threads enabled 32bit linux buildsTomas Mraz
It might not be necessary with the most recent toolchain versions but apparently many 32bit linux architectures and commonly used toolchain versions require this. It is also harmless to include even on architectures that do not need it. Fixes #14083 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15086)
2021-04-29build.info: add the Perl wrapper to build generator programs on WindowsDr. Matthias St. Pierre
Pull request #14320 introduced the ability to use compiled programs as generators in GENERATE rules of build.info files. Those generator calls were wrapped by the Perl wrapper (wrap.pl) in the Unix makefile template, but not on Windows. This commit adds the missing wrapper for Windows, because for the `fipsmodule.cnf` target it is essential that the `openssl fipsinstall` command does not load any preinstalled openssl configuration file. Fixes #13680 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure/Makefile: install the fips provider if it was configuredDr. Matthias St. Pierre
To follow the principle "what you configure is what you install", the `make install` target now includes the installation of the fips provider (`make install_fips`) if (and only if) OpenSSL was configured with fips support (`enable-fips`). The `make install_fips` target exists as well and can be used to install just the fips provider. It requires `enable-fips` and issues an error message if `no-fips` was configured. The anologue holds for the 'uninstall_fips' target. Fixes #13693 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure/Makefile: don't generate a fresh fipsmodule.cnf when installing itDr. Matthias St. Pierre
There is already a `providers/fipsmodule.cnf` target which is required by the tests. Instead of creating another fipsmodule.cnf, the `install_fips` target simply copies that configuration file to its final destination. This commit also restores the minimal dependencies to build the `install_fips` target immediately after configuring, which was broken after the removal of the `install_sw` dependency. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure/Makefile: separate install of the FIPS moduleDr. Matthias St. Pierre
Fixes #13693 Co-authored-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure/Makefile: correct the FIPS module configuration file pathDr. Matthias St. Pierre
According to the OpenSSL 3.0 Wiki, the file should be located at $(DESTDIR)$(OPENSSLDIR)/fipsmodule.cnf next to the openssl.cnf file. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure/Makefile: use the correct openssl app for FIPS installationDr. Matthias St. Pierre
The `openssl` app was previously called without a path, which would generally invoke the system's copy of the openssl application. Currently, that's most likely an openssl version 1.1.1 application, which does not recognize the `fipsinstall` command and terminates with an error message. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure/Makefile: fix the `-macopt` argument of the fipsinstall commandDr. Matthias St. Pierre
The FIPS hmac key is provided as a hexadezimal string, which needs to be be prefixed with `hexkey:`, not `key:`. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-28Configuration: rework how dependency making is handledRichard Levitte
Previously, we had dependency making pretty much hard coded in the build file templates, with a bit of an exception for Unix family platforms, where we had different cases depending on what dependency making program was found. With the Embarcadero C++ builder, a separate scheme appeared, with a different logic. This change merges the two, and introduces two config target attributes: makedepcmd The program to use, where this is relevant. This replaces the earlier configuration attribute 'makedepprog'. makedep_scheme This is a keyword that can be used by build files templates to produce different sorts of commands, but most importantly, to pass as argument to util/add-depend.pl, which uses this keyword as a "producer" for the dependency lines. If the config target doesn't define the 'makedep_scheme' attribute, Configure tries to figure it out by looking for GCC compatible compilers or for the 'makedepend' command. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/15006)
2021-04-28Windows bulding: Make dependency generation not quite as talkativeRichard Levitte
The modified way to generate .d files had an unfortunate side effect, that it outputs the whole preprocessed file and not just the dependency lines, at least with MSVC's cl. That gave util/add-depends.pl a whole lot more to read through, which impacts greatly on the performance of dependency treatment. We modify the process by adding a config target attribute 'make_depend', which can be any suitable command for generating such lines. All it needs is to also accept C flags and macro definitions. Fixes #14994 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/15006)
2021-04-23Don't remove $(TARFILE) when cleaningRichard Levitte
This file is outside the source tree, so we have no business removing it. This is especially concerning if that was the tarball the user had to create the source tree. Fixes #14981 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14985)
2021-04-19Don't worry about magic in the Makefile for 3.0Matt Caswell
We remove a TODO(3.0) from the unix Makefile template. The current approach works. It can be improved later. Fixes #14403 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14887)