Instead of having the installation recipe rely on special knowledge,
feed it with information, including what shared library files belong
together. For Cygwin and Mingw, that's the .dll and its import
library .dll.a. For Unixen, it's the shared library file name with SO
version and the one without.
Reviewed-by: Andy Polyakov <appro@openssl.org>
The engine DSOs were named as if they were shared libraries, and could
end up having all sorts of fancy names:
Cygwin: cygFOO.dll
Mingw: FOOeay32.dll
Unix: libFOO.so / libFOO.sl / libFOO.dylib / ...
This may be confusing, since they look like libraries one should link
with at link time, when they're just DSOs.
It's therefore time to rename them, and do it consistently on all
platforms:
Cygwin & Mingw: FOO.dll
Unix: FOO.{so,sl,dylib,...}
Interestingly enough, the MSVC and VMS builds always did it this way.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Because we know for certain that the link_shlib targets are used
exclusively for shared libraries (libcrypto and libssl) and that they
must have an associated .num file, we don't need to check the library
name to produce an ld script. Just do it unconditionally.
link_shlib.linux-shared can be simplified further, as most of it is
exactly the same as $(DO_GNU_SO) with just one variable modification.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Originally, the Makefile.shared targets described what they used as
input for a shared object, be it a shared library or a DSO. It turned
out, however, that the link_o targets were used exclusively for
engines and the link_a targets were for libcrypto and libssl.
This rename fest turns and indication on the kind of input the targets
get to the intention with using them.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Then it can pass around the information where it belongs. The
Makefile templates pick it up along with other target data, the
DSO module gets to pick up the information through
crypto/include/internal/dso_conf.h
Reviewed-by: Andy Polyakov <appro@openssl.org>
- install_sw had a display of text that belongs under the install target
- previous layout installed architecture dependent files in
dev:['prefix'.'arch'.LIB], dev:['prefix'.'arch'.EXE] and
dev:['prefix'.'arch'.ENGINES]. Changed to dev:['prefix'.LIB.'arch'],
dev:['prefix'.EXE.'arch'] and dev:['prefix'.ENGINES.'arch'] instead.
Reviewed-by: Andy Polyakov <appro@openssl.org>
This is done with a simple file name comparison. We could think of
something more elegant in the future.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Adding uplink and applink to some builds was done by "magic", the
configuration for "mingw" only had a macro definition, the Configure
would react to its presence by adding the uplink source files to
cpuid_asm_src, and crypto/build.info inherited dance to get it
compiled, and Makefile.shared made sure applink.o would be
appropriately linked in. That was a lot under the hood.
To replace this, we create a few template configurations in
Configurations/00-base-templates.conf, inherit one of them in the
"mingw" configuration, the rest is just about refering to the
$target{apps_aux_src} / $target{apps_obj} in the right places.
Reviewed-by: Andy Polyakov <appro@openssl.org>
VMS DIFF tries to calculate all the differences, which is slower than
just reading the files and stopping at the first difference. The
latter doesn't exist as a command, so the problem is solved with perl
and File::Compare (has been in core perl since very early version 5).
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
DCL may be in extended parsing style, which makes it less case
insensitive, so when removing a string from another, make sure to get
casing correctly.
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
This isn't the fully featured combination of compiler generated
dependency files and Makefile include directives, but a cheaper
variant of the same.
The dependency files are generated automatically, but then we have the
usual "depend" target. However, we depend on it in the bigger phony
targets that are the most likely to be used. That make this feature
automatic enough.
A side effect is that we can't use the build file's timestamp to check
if reconfiguring might be in order. In its place, we use a flag file
that depends on Configure and the build file template and depend on it
in spots where it makes sense to check for the need to reconfigure.
Reviewed-by: Rich Salz <rsalz@openssl.org>
The uninstall_sw target tried to 'make uninstall' in all subdirs.
Change it to only go into $(INSTALL_SUBS), just like install_sw does.
Reviewed-by: Rich Salz <rsalz@openssl.org>
When cross compiling, we may end up with someting like apps/openssl.exe
and a number of test/*.exe. However, util/shlib_wrap.sh doesn't know
what the executable extension should be, if any, so we need to make
sure it has access to that information when testing, since
OpenSSL::Test uses that script to execute all programs.
Reviewed-by: Rich Salz <rsalz@openssl.org>
All those flags existed because we had all the dependencies versioned
in the repository, and wanted to have it be consistent, no matter what
the local configuration was. Now that the dependencies are gone from
the versioned Makefile.ins, it makes much more sense to use the exact
same flags as when compiling the object files.
Reviewed-by: Rich Salz <rsalz@openssl.org>
.d (.MMS in the VMS world) files with just dependencies are built from
exactly the same conditions as the object files. Therefore, the rules
for them can be built at the same time as the rules for the
corresponding object files.
This removes the requirement for a src2dep function in the build file
templates, and for common.tmpl to call it. In the end, the existence
of depend files is entirely up to the build file.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Add -DBIO_DEBUG to --strict-warnings.
Remove comments about outdated debugging ifdef guards.
Remove md_rand ifdef guarding an assert; it doesn't seem used.
Remove the conf guards in conf_api since we use OPENSSL_assert, not assert.
For pkcs12 stuff put OPENSSL_ in front of the macro name.
Merge TLS_DEBUG into SSL_DEBUG.
Various things just turned on/off asserts, mainly for checking non-NULL
arguments, which is now removed: camellia, bn_ctx, crypto/modes.
Remove some old debug code, that basically just printed things to stderr:
DEBUG_PRINT_UNKNOWN_CIPHERSUITES, DEBUG_ZLIB, OPENSSL_RI_DEBUG,
RL_DEBUG, RSA_DEBUG, SCRYPT_DEBUG.
Remove OPENSSL_SSL_DEBUG_BROKEN_PROTOCOL.
Reviewed-by: Richard Levitte <levitte@openssl.org>
enc:
- typo in -base64 option
- missing help opt text
ocsp, req, rsautl, s_client:
- missing help opt text
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
The windows thread stop code was erroneously not just deleting the thread
local variable on thread stop, but also deleting the thread local *key*
(thus removing thread local data for *all* threads in one go!).
Reviewed-by: Rich Salz <rsalz@openssl.org>
Certain code paths in tls_decrypt_ticket could return early without first
freeing the HMAC_CTX or the EVP_CIPHER_CTX.
Reviewed-by: Rich Salz <rsalz@openssl.org>
As handshake_func is a function pointer, it should compare to NULL
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Although I explicitly don't care about the tinfoil-hat reason given in
the initial opening of RT#3628, that "paths usually contain private
information", there *are* situations where it's useful to eliminate the
filenames from the compiled binary.
The two reasons we do care about in the context of firmware such as EDK2
are that it allows for a smaller footprint, and it is also a necessary
component of a binary-reproducible build.
To that end, introduce OPENSSL_FILE and OPENSSL_LINE macros, defining
them to __FILE__ and __LINE__ respectively in the normal case, but to
"" and 0 when OPENSSL_NO_FILENAMES is set.
This is mostly a naïve invocation of
$ sed 's/__\([FL]I[NL]E\)__/OPENSSL_\1/g' -i `git grep -l __LINE__`
but with a few instances change to just print the function name instead
(although those probably need to die anyway) and test cases left untouched.
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
For example, this works instead of giving a big error message (note
the lack of '--unified'):
mkdir ../_build
(cd ../_build/; ../openssl-src/config; make)
Reviewed-by: Andy Polyakov <appro@openssl.org>
The previous fix wasn't right.
Also, change all (^|\s) and (\s|$) constructs to (?:^|\s) and (?:\s|$).
Perl seems to like that better.
Reviewed-by: Andy Polyakov <appro@openssl.org>
When OPENSSL_NO_ASYNC is set, make ASYNC_{un,}block_pause() do nothing.
This prevents md_rand.c from failing to build. Probably better to do it
this way than to wrap every instance in an explicit #ifdef.
A bunch of new socket code got added to a new file crypto/bio/b_addr.c.
Make it all go away if OPENSSL_NO_SOCK is defined.
Allow configuration with no-ripemd, no-ts, no-ui
We use these for the UEFI build.
Also remove the 'Really???' comment from no-err and no-locking. We use
those too.
We need to drop the crypto/engine directory from the build too, and also
set OPENSSL_NO_ENGINE
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Commit e634b448c ("Defines OSSL_SSIZE_MAX") introduced a definition of
OSSL_SSIZE_MAX which broke the UEFI build. Fix that by making UEFI take
the same definition as Ultrix (ssize_t == int).
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
We don't have atexit() in the EDK2 environment. Firmware never exits.
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Commit 05c7b1631 ("Implement the use of heap manipulator implementions")
added 'file' and 'line' arguments to CRYPTO_free() and friends, but neglected
to fix up the !IMPLEMENTED case within CRYPTO_secure_free(). Add the missing
arguments there too.
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>