summaryrefslogtreecommitdiffstats
path: root/engines
AgeCommit message (Collapse)Author
2016-05-02Remove obsolete defined(__INTEL__) condition.Andy Polyakov
This macro was defined by no-longer-supported __MWERKS__ compiler. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-22Fix capi engine for no-dsaMatt Caswell
The capi engine was failing to compile on Windows if the no-dsa option was selected. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-20Remove --classic build entirelyRichard Levitte
The Unix build was the last to retain the classic build scheme. The new unified scheme has matured enough, even though some details may need polishing. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-14Fix AFALG kernel and headers mismatch problemMatt Caswell
During Configure we attempt to check the kernel version of this platform to see whether we can compile the AFALG engine. If the kernel version looks recent enough then we enable AFALG. However when we compile e_afalg.c we check the version of the linux headers. If there is a mismatch between the linux headers and the currently running kernel then we don't compile the AFLAG engine and continue. This was causing a link error. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-13Remove OPENSSL_NO_AES guardsMatt Caswell
no-aes is no longer a Configure option and therefore the OPENSSL_NO_AES guards can be removed. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-13Rename internal symbol to follow internal naming patternRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-04-13Rename int_*() functions to *_int()Matt Caswell
There is a preference for suffixes to indicate that a function is internal rather than prefixes. Note: the suffix is only required to disambiguate internal functions and public symbols with the same name (but different case) Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-13Rename lots of *_intern or *_internal function to int_*Matt Caswell
There was a lot of naming inconsistency, so we try and standardise on one form. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-07Fix forgotten adaptation to opaque RSA and RSA_METHODRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-06Make the RSA_METHOD structure opaqueRichard Levitte
Move rsa_meth_st away from public headers. Add RSA_METHOD creator/destructor functions. Add RSA_METHOD accessor/writer functions. Adapt all other source to use the creator, destructor, accessors and writers. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-04-04Make sure the rand_byte buffer in padlock engine is cleansed.Richard Levitte
Submitted by Michael McConville <mmcco@mykolab.com> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-03Rename get/set_app_data to get0/set0_app_dataMatt Caswell
Also fixed a style issue Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
2016-04-03Various DSA opacity fixupsMatt Caswell
Numerous fixups based on feedback of the DSA opacity changes. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
2016-04-03Make DSA_METHOD opaqueMatt Caswell
Move the dsa_method structure out of the public header file, and provide getter and setter functions for creating and modifying custom DSA_METHODs. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
2016-03-23Move dso.h to internalRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-21Remove the remainder of util/mk1mf.pl and companion scriptsRichard Levitte
This removes all scripts that deal with MINFO as well, since that's only used by mk1mf. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-18Fix no-deprecatedMatt Caswell
The no-deprecated build was failing because afalg was relying on a transitive include that does not exist in a no-deprecated build. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-18Resolved unresolved symbols with no-hwMatt Caswell
Compiling on Windows with no-hw was resulting in unresolved symbols in the padlock engine. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-14engines/Makefile.in: some [older] shell complain about 'for i ;',Andy Polyakov
but not if there is reference to empty variable. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-13Add $(LIB_CFLAGS) for any build.info generator that uses $(CFLAGS)Richard Levitte
The reason to do so is that some of the generators detect PIC flags like -fPIC and -KPIC, and those are normally delivered in LD_CFLAGS. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-10Fix a memory leak in the afalg engineMatt Caswell
The AFALG engine created a global EVP_CIPHER instance but was not freeing it up when the engine was destroyed. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09Don't add engines if configured "no-engine"Richard Levitte
Similarly, don't add e_capi if configured "no-capieng" Also, indent a little deeper, for clarity. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-09Don't add afalg engine if configured "no-engine"Richard Levitte
Also, indent a little deeper, for clarity. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-09Make sure the effect of "pic" / "no-pic" is used with assembler compilationsRichard Levitte
Before the 'Introduce the "pic" / "no-pic" config option' commit, the shared_cflag value for the chosen config would be part of the make variable CFLAG, which got replicated into CFLAGS and ASFLAGS. Since said commit, the shared_cflag value has become a make variable of its own, SHARED_CFLAG (which is left empty in a "no-pic" build). However, ASFLAGS was forgotten. That's what's corrected with this change. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-09Convert the dynlocks in e_chil to the new Thread API locksRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-09Remove another lock from e_chilMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-09Move chil engine to the new thread apiMatt Caswell
Move the chil engine to use the new thread API. As I don't have access to the hardware I can't test this :-(. I think its ok... Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-09Use correct function ID in error pathAlessandro Ghedini
This fixes "make update". Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-08Adapt e_capi to the DSA_SIG_get0() APIRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-08Fix engine/asm/e_padlock-x86.pl for newer semanticsRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-07Refactor dasync cipher implementations to improve code reuseMatt Caswell
Move out most of the boiler plate code that is common between aes128-cbc and aes128-cbc-hmac-sha1 into helper functions to improve code reuse. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-03-07Move the _hidden_* static variables in dasync to be constructed in bindMatt Caswell
The _hidden_* variables were being created on-the-fly. It is better to create them once up front during bind to avoid any potential race conditions. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-03-07Rename EVP_CIPHER_CTX_cipher_data to EVP_CIPHER_CTX_get_cipher_dataMatt Caswell
We had the function EVP_CIPHER_CTX_cipher_data which is newly added for 1.1.0. As we now also need an EVP_CIPHER_CTX_set_cipher_data it makes more sense for the former to be called EVP_CIPHER_CTX_get_cipher_data. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-03-07Add dummy pipeline support for aes128_cbc_hmac_sha1Matt Caswell
Add dummy pipline support to dasync for the aes128_cbc_hmac_sha1 cipher. This is treated as an AEAD cipher. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-03-07Update the dasync engine to add a pipeline cipherMatt Caswell
Implement aes128-cbc as a pipeline capable cipher in the dasync engine. As dasync is just a dummy engine, it actually just performs the parallel encrypts/decrypts in serial. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-03-07Fix the build tree include directory for afalg engineRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-07Unified - adapt the generation of padlock assembler to use GENERATERichard Levitte
This gets rid of the BEGINRAW..ENDRAW sections in engines/build.info. This also moves the assembler generating perl scripts to take the output file name as last command line argument, where necessary. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-07GH804: Fix unused-result warnings in dasyncAlessandro Ghedini
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-07Fix some clang warningsMatt Caswell
The af_alg engine and associated test were creating warnings when compiled with clang. This fixes it. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-07Adding afalg testclucey
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-07Misc afalg build fixesMatt Caswell
Misc afalg build fixes as suggested by Richard Levitte for the latest Configure changes. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-07Rework based on feedback:clucey
1. Cleaned up eventfd handling 2. Reworked socket setup code to allow other algorithms to be added in future 3. Fixed compile errors for static build 4. Added error to error stack in all cases of ALG_PERR/ALG_ERR 5. Called afalg_aes_128_cbc() from bind() to avoid race conditions 6. Used MAX_INFLIGHT define in io_getevents system call 7. Coding style fixes Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-07ALG: Add AFALG engineclucey
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-02-29GH758: e_dasync_err.h: honor no-filenames optionViktor Szakats
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-29Refactor the async wait fd logicMatt Caswell
Implementation experience has shown that the original plan for async wait fds was too simplistic. Originally the async logic created a pipe internally and user/engine code could then get access to it via API calls. It is more flexible if the engine is able to create its own fd and provide it to the async code. Another issue is that there can be a lot of churn in the fd value within the context of (say) a single SSL connection leading to continually adding and removing fds from (say) epoll. It is better if we can provide some stability of the fd value across a whole SSL connection. This is problematic because an engine has no concept of an SSL connection. This commit refactors things to introduce an ASYNC_WAIT_CTX which acts as a proxy for an SSL connection down at the engine layer. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-29Add forgotten change of check of disabled-dynamic-engineRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-26Remove Ubsec engineMatt Caswell
The ubsec engine is now considered obsolete and therefore has been removed. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-20Build dynamic engines even if configured "no-shared"Richard Levitte
Until now, the engines in engines/ were only built as dynamicaly loadable ones if shared libraries were built. We not dissociate the two and can build dynamicaly loadable engines even if we only build static libcrypto and libssl. This is controlled with the option (enable|disable|no)-static-engine, defaulting to no-static-engine. Note that the engines in crypto/engine/ (dynamic and cryptodev) will always be built into libcrypto. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-20Always build library object files with shared library cflagsRichard Levitte
This takes us away from the idea that we know exactly how our static libraries are going to get used. Instead, we make them available to build shareable things with, be it other shared libraries or DSOs. On the other hand, we also have greater control of when the shared library cflags. They will never be used with object files meant got binaries, such as apps/openssl or test/test*. With unified, we take this a bit further and prepare for having to deal with extra cflags specifically to be used with DSOs (dynamic engines), libraries and binaries (applications). Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-19Big rename fest of engine DSO names, from libFOO.so to FOO.soRichard Levitte
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>