aboutsummaryrefslogtreecommitdiffstats
path: root/engines
Commit message (Collapse)AuthorAgeFilesLines
* Fix AFALG kernel and headers mismatch problemMatt Caswell2016-04-141-0/+3
| | | | | | | | | | | | 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>
* Remove OPENSSL_NO_AES guardsMatt Caswell2016-04-131-44/+34
| | | | | | | 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>
* Rename internal symbol to follow internal naming patternRichard Levitte2016-04-131-1/+1
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Rename int_*() functions to *_int()Matt Caswell2016-04-134-9/+9
| | | | | | | | | | 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>
* Rename lots of *_intern or *_internal function to int_*Matt Caswell2016-04-134-10/+10
| | | | | | | | 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>
* Fix forgotten adaptation to opaque RSA and RSA_METHODRichard Levitte2016-04-071-32/+48
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Make the RSA_METHOD structure opaqueRichard Levitte2016-04-061-25/+28
| | | | | | | | | 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>
* Make sure the rand_byte buffer in padlock engine is cleansed.Richard Levitte2016-04-041-1/+1
| | | | | | Submitted by Michael McConville <mmcco@mykolab.com> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Rename get/set_app_data to get0/set0_app_dataMatt Caswell2016-04-031-3/+3
| | | | | | | Also fixed a style issue Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
* Various DSA opacity fixupsMatt Caswell2016-04-031-6/+10
| | | | | | | Numerous fixups based on feedback of the DSA opacity changes. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
* Make DSA_METHOD opaqueMatt Caswell2016-04-031-29/+26
| | | | | | | | 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>
* Move dso.h to internalRich Salz2016-03-232-2/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove the remainder of util/mk1mf.pl and companion scriptsRichard Levitte2016-03-212-7/+0
| | | | | | | This removes all scripts that deal with MINFO as well, since that's only used by mk1mf. Reviewed-by: Andy Polyakov <appro@openssl.org>
* Fix no-deprecatedMatt Caswell2016-03-181-0/+1
| | | | | | | 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>
* Resolved unresolved symbols with no-hwMatt Caswell2016-03-181-7/+10
| | | | | | | Compiling on Windows with no-hw was resulting in unresolved symbols in the padlock engine. Reviewed-by: Richard Levitte <levitte@openssl.org>
* engines/Makefile.in: some [older] shell complain about 'for i ;',Andy Polyakov2016-03-141-1/+1
| | | | | | but not if there is reference to empty variable. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add $(LIB_CFLAGS) for any build.info generator that uses $(CFLAGS)Richard Levitte2016-03-131-1/+1
| | | | | | | 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>
* Fix a memory leak in the afalg engineMatt Caswell2016-03-101-0/+2
| | | | | | | 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>
* Don't add engines if configured "no-engine"Richard Levitte2016-03-091-23/+30
| | | | | | | | Similarly, don't add e_capi if configured "no-capieng" Also, indent a little deeper, for clarity. Reviewed-by: Matt Caswell <matt@openssl.org>
* Don't add afalg engine if configured "no-engine"Richard Levitte2016-03-091-10/+12
| | | | | | Also, indent a little deeper, for clarity. Reviewed-by: Matt Caswell <matt@openssl.org>
* Make sure the effect of "pic" / "no-pic" is used with assembler compilationsRichard Levitte2016-03-091-1/+1
| | | | | | | | | | | | | | 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>
* Convert the dynlocks in e_chil to the new Thread API locksRichard Levitte2016-03-091-14/+10
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Remove another lock from e_chilMatt Caswell2016-03-091-2/+2
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Move chil engine to the new thread apiMatt Caswell2016-03-091-17/+24
| | | | | | | 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>
* Use correct function ID in error pathAlessandro Ghedini2016-03-093-2/+5
| | | | | | | This fixes "make update". Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Adapt e_capi to the DSA_SIG_get0() APIRichard Levitte2016-03-081-6/+4
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix engine/asm/e_padlock-x86.pl for newer semanticsRichard Levitte2016-03-081-0/+5
| | | | Reviewed-by: Andy Polyakov <appro@openssl.org>
* Refactor dasync cipher implementations to improve code reuseMatt Caswell2016-03-071-144/+97
| | | | | | | 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>
* Move the _hidden_* static variables in dasync to be constructed in bindMatt Caswell2016-03-071-61/+83
| | | | | | | | 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>
* Rename EVP_CIPHER_CTX_cipher_data to EVP_CIPHER_CTX_get_cipher_dataMatt Caswell2016-03-073-12/+12
| | | | | | | | 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>
* Add dummy pipeline support for aes128_cbc_hmac_sha1Matt Caswell2016-03-073-10/+221
| | | | | | | 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>
* Update the dasync engine to add a pipeline cipherMatt Caswell2016-03-073-71/+260
| | | | | | | | 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>
* Fix the build tree include directory for afalg engineRichard Levitte2016-03-071-1/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Unified - adapt the generation of padlock assembler to use GENERATERichard Levitte2016-03-072-8/+4
| | | | | | | | | 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>
* GH804: Fix unused-result warnings in dasyncAlessandro Ghedini2016-03-071-2/+4
| | | | | Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Fix some clang warningsMatt Caswell2016-03-071-7/+4
| | | | | | | The af_alg engine and associated test were creating warnings when compiled with clang. This fixes it. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Adding afalg testclucey2016-03-071-4/+4
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Misc afalg build fixesMatt Caswell2016-03-073-24/+14
| | | | | | | Misc afalg build fixes as suggested by Richard Levitte for the latest Configure changes. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Rework based on feedback:clucey2016-03-076-107/+144
| | | | | | | | | | | | | | 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>
* ALG: Add AFALG engineclucey2016-03-078-1/+1310
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* GH758: e_dasync_err.h: honor no-filenames optionViktor Szakats2016-02-291-1/+1
| | | | | Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* Refactor the async wait fd logicMatt Caswell2016-02-291-3/+74
| | | | | | | | | | | | | | | | | | | 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>
* Add forgotten change of check of disabled-dynamic-engineRichard Levitte2016-02-291-1/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Remove Ubsec engineMatt Caswell2016-02-266-1419/+0
| | | | | | | The ubsec engine is now considered obsolete and therefore has been removed. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Build dynamic engines even if configured "no-shared"Richard Levitte2016-02-202-2/+2
| | | | | | | | | | | | | | | 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>
* Always build library object files with shared library cflagsRichard Levitte2016-02-201-1/+1
| | | | | | | | | | | | | | | | 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>
* Big rename fest of engine DSO names, from libFOO.so to FOO.soRichard Levitte2016-02-192-34/+25
| | | | | | | | | | | | | | | | | | | | | | 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>
* Big rename fest in makefile.shared: link_a / link_o -> link_shlib / link_dsoRichard Levitte2016-02-191-1/+1
| | | | | | | | | | | | 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>
* Remove all special make depend flags, as well as OPENSSL_DOING_MAKEDEPENDRichard Levitte2016-02-181-1/+1
| | | | | | | | | | 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>
* Finish 02f7114a7fbb3f3ac171bae87be8c13bc69e4005David Woodhouse2016-02-174-4/+4
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>