aboutsummaryrefslogtreecommitdiffstats
path: root/engines
Commit message (Collapse)AuthorAgeFilesLines
* Remove update tagsRich Salz2016-01-201-7/+2
| | | | | Also remove depend/local_depend. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove the GOST engineMatt Caswell2016-01-1926-5651/+2
| | | | | | | | | | The GOST engine is now out of date and is removed by this commit. An up to date GOST engine is now being maintained in an external repository. See: https://wiki.openssl.org/index.php/Binaries Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove some old makefile targetsRich Salz2016-01-172-26/+0
| | | | | | | | Remove lint, tags, dclean, tests. This is prep for a new makedepend scheme. This is temporary pending unified makefile, and might help it. Reviewed-by: Richard Levitte <levitte@openssl.org>
* free up gost ciphersDr. Stephen Henson2016-01-153-0/+10
| | | | Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Move Makefiles to Makefile.inRich Salz2016-01-123-322/+87
| | | | | | | | | | Create Makefile's from Makefile.in Rename Makefile.org to Makefile.in Rename Makefiles to Makefile.in Address review feedback from Viktor and Richard Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* make updateRichard Levitte2016-01-122-100/+132
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Adapt all engines that need it to opaque EVP_CIPHERRichard Levitte2016-01-125-114/+164
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Adapt cipher implementations to opaque EVP_CIPHER_CTXRichard Levitte2016-01-123-75/+93
| | | | | | | | Note: there's a larger number of implementations in crypto/evp/ that aren't affected because they include evp_locl.h. They will be handled in a separate commit. Reviewed-by: Rich Salz <rsalz@openssl.org>
* mem functions cleanupRich Salz2016-01-071-7/+8
| | | | | | | | | | | | | | | | | Only two macros CRYPTO_MDEBUG and CRYPTO_MDEBUG_ABORT to control this. If CRYPTO_MDEBUG is not set, #ifdef out the whole debug machinery. (Thanks to Jakob Bohm for the suggestion!) Make the "change wrapper functions" be the only paradigm. Wrote documentation! Format the 'set func' functions so their paramlists are legible. Format some multi-line comments. Remove ability to get/set the "memory debug" functions at runtme. Remove MemCheck_* and CRYPTO_malloc_debug_init macros. Add CRYPTO_mem_debug(int flag) function. Add test/memleaktest. Rename CRYPTO_malloc_init to OPENSSL_malloc_init; remove needless calls. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove the "eay" c-file-style indicatorsRichard Levitte2015-12-181-1/+1
| | | | | | | Since we don't use the eay style any more, there's no point tryint to tell emacs to use it. Reviewed-by: Matt Caswell <matt@openssl.org>
* Rename some BUF_xxx to OPENSSL_xxxRich Salz2015-12-164-7/+7
| | | | | | | | | Rename BUF_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} to OPENSSL_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} Add #define's for the old names. Add CRYPTO_{memdup,strndup}, called by OPENSSL_{memdup,strndup} macros. Reviewed-by: Tim Hudson <tjh@openssl.org>
* Remove GMP engine.Rich Salz2015-12-155-723/+4
| | | | Reviewed-by: Ben Laurie <ben@openssl.org>
* make updateDr. Stephen Henson2015-12-092-25/+10
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* remove ecdsa.h header references.Dr. Stephen Henson2015-12-091-1/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Adapt all engines that add new EVP_MDsRichard Levitte2015-12-077-137/+292
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Adjust all accesses to EVP_MD_CTX to use accessor functions.Richard Levitte2015-12-075-21/+23
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Remove RSA_FLAG_SIGN_VER flag.Dr. Stephen Henson2015-12-021-1/+1
| | | | | | | | Remove RSA_FLAG_SIGN_VER: this was origininally used to retain binary compatibility after RSA_METHOD was extended to include rsa_sign and rsa_verify fields. It is no longer needed. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove legacy sign/verify from EVP_MD.Dr. Stephen Henson2015-12-024-18/+6
| | | | | | | | | | | | | Remove sign/verify and required_pkey_type fields of EVP_MD: these are a legacy from when digests were linked to public key types. All signing is now handled by the corresponding EVP_PKEY_METHOD. Only allow supported digest types in RSA EVP_PKEY_METHOD: other algorithms already block unsupported types. Remove now obsolete EVP_dss1() and EVP_ecdsa(). Reviewed-by: Richard Levitte <levitte@openssl.org>
* Update dasync to use size_t for the sha1 updateKurt Roeckx2015-11-221-2/+2
| | | | | | Reviewed-by: Matt Caswell <matt@openssl.org> MR #1350
* Rename some daysnc functions for consistencyMatt Caswell2015-11-201-11/+11
| | | | | | | | For some reason the dasync sha1 functions did not start with the dasync prefix like all of the other functions do. Changed for consistency. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Initial Async notify code changesMatt Caswell2015-11-201-11/+28
| | | | | | | | | | | | Initial API implemented for notifying applications that an ASYNC_JOB has completed. Currently only s_server is using this. The Dummy Async engine "cheats" in that it notifies that it has completed *before* it pauses the job. A normal async engine would not do that. Only the posix version of this has been implemented so far, so it will probably fail to compile on Windows at the moment. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add the Dummy Async engine (dasync)Matt Caswell2015-11-205-3/+577
| | | | | | | | | This engine is for developers of async aware applications. It simulates asynchronous activity with external hardware. This initial version supports SHA1 and RSA. Certain operations using those algorithms have async job "pauses" in them - using the new libcrypto async capability. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Continue malloc standardisation in enginesMatt Caswell2015-11-096-21/+26
| | | | | | Continuing from previous work standardise use of malloc in the engine code. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Replace "SSLeay" in API with OpenSSLRich Salz2015-10-304-10/+10
| | | | | | | All instances of SSLeay (any combination of case) were replaced with the case-equivalent OpenSSL. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove Obsolete enginesMatt Caswell2015-10-1531-7761/+6
| | | | | | | | There are a number of engines in the OpenSSL source code which are now obsolete. The following engines have been removed: 4758cca, aep, atalla, cswift, nuron, sureware. Reviewed-by: Rich Salz <rsalz@openssl.org>
* engine/e_capi.c: fix various warnings.Andy Polyakov2015-09-291-16/+22
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix prototypes in e_ossttest.c.Andy Polyakov2015-09-291-8/+8
| | | | | | Problem was exposed in mingw64 build, or in other words on P64 platform. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Rationalize .gitignore and harmonize pair of Makefiles.Andy Polyakov2015-09-291-1/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Change ossltest engine to manually allocate cipher_dataMatt Caswell2015-09-253-18/+17
| | | | | | | | | | | | The ossltest engine wraps the built-in implementation of aes128-cbc. Normally in an engine the cipher_data structure is automatically allocated by the EVP layer. However this relies on the engine specifying up front the size of that cipher_data structure. In the case of ossltest this value isn't available at compile time. This change makes the ossltest engine allocate its own cipher_data structure instead of leaving it to the EVP layer. Reviewed-by: Andy Polyakov <appro@openssl.org>
* remove 0 assignments.Rich Salz2015-09-031-6/+1
| | | | | | | After openssl_zalloc, cleanup more "set to 0/NULL" assignments. Many are from github feedback. Reviewed-by: Tim Hudson <tjh@openssl.org>
* Add and use OPENSSL_zallocRich Salz2015-09-021-4/+2
| | | | | | | | | There are many places (nearly 50) where we malloc and then memset. Add an OPENSSL_zalloc routine to encapsulate that. (Missed one conversion; thanks Richard) Also fixes GH328 Reviewed-by: Richard Levitte <levitte@openssl.org>
* BN_bin2bn handle leading zero'sRich Salz2015-08-264-22/+4
| | | | | | If a binary sequence is all zero's, call BN_zero. Reviewed-by: Matt Caswell <matt@openssl.org>
* Remove Gost94 signature algorithm.Rich Salz2015-08-1113-1350/+107
| | | | | | | This was obsolete in 2001. This is not the same as Gost94 digest. Thanks to Dmitry Belyavsky <beldmit@gmail.com> for review and advice. Reviewed-by: Matt Caswell <matt@openssl.org>
* make updateMatt Caswell2015-08-111-14/+15
| | | | | | Run a "make update" for the OSSLTest Engine changes Reviewed-by: Richard Levitte <levitte@openssl.org>
* Use dynamic engine for libssl test harnessRichard Levitte2015-08-112-11/+12
| | | | | | | | | Use a dynamic engine for ossltest engine so that we can build it without subsequently deploying it during install. We do not want people accidentally using this engine. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Add OSSLTest EngineMatt Caswell2015-08-115-3/+779
| | | | | | | | | | | | | This engine is for testing purposes only. It provides crippled crypto implementations and therefore must not be used in any instance where security is required. This will be used by the forthcoming libssl test harness which will operate as a man-in-the-middle proxy. The test harness will be able to modify TLS packets and read their contents. By using this test engine packets are not encrypted and MAC codes always verify. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix error check in GOST engineMatt Caswell2015-05-261-2/+4
| | | | | | | | | | The return value of i2d functions can be negative if an error occurs. Therefore don't assign the return value to an unsigned type and *then* check if it is negative. RT#3862 Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix update and depend in engines/Richard Levitte2015-05-232-2/+3
| | | | | | | The update: target in engines/ didn't recurse into engines/ccgost. The update: and depend: targets in engines/ccgost needed a fixup. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix the update target and remove duplicate file updatesRichard Levitte2015-05-222-11/+14
| | | | | | | | | | | | | | | We had updates of certain header files in both Makefile.org and the Makefile in the directory the header file lived in. This is error prone and also sometimes generates slightly different results (usually just a comment that differs) depending on which way the update was done. This removes the file update targets from the top level Makefile, adds an update: target in all Makefiles and has it depend on the depend: or local_depend: targets, whichever is appropriate, so we don't get a double run through the whole file tree. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Use p==NULL not !p (in if statements, mainly)Rich Salz2015-05-1110-92/+61
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Use "==0" instead of "!strcmp" etcRich Salz2015-05-062-5/+7
| | | | | | | For the various string-compare routines (strcmp, strcasecmp, str.*cmp) use "strcmp()==0" instead of "!strcmp()" Reviewed-by: Tim Hudson <tjh@openssl.org>
* memset, memcpy, sizeof consistency fixesRich Salz2015-05-054-5/+5
| | | | | | | | Just as with the OPENSSL_malloc calls, consistently use sizeof(*ptr) for memset and memcpy. Remove needless casts for those functions. For memset, replace alternative forms of zero with 0. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Use safer sizeof variant in mallocRich Salz2015-05-044-9/+11
| | | | | | | | | | | | | For a local variable: TYPE *p; Allocations like this are "risky": p = OPENSSL_malloc(sizeof(TYPE)); if the type of p changes, and the malloc call isn't updated, you could get memory corruption. Instead do this: p = OPENSSL_malloc(sizeof(*p)); Also fixed a few memset() calls that I noticed while doing this. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove obsolete make variablesRichard Levitte2015-05-021-1/+1
| | | | | | | ONEDIRS, EDIRS and WDIRS aren't used anywhere. Most probably remains from a build system of the past, it's time they get put to rest. Reviewed-by: Rich Salz <rsalz@openssl.org>
* free NULL cleanup -- codaRich Salz2015-05-012-7/+6
| | | | | | | | After the finale, the "real" final part. :) Do a recursive grep with "-B1 -w [a-zA-Z0-9_]*_free" to see if any of the preceeding lines are an "if NULL" check that can be removed. Reviewed-by: Tim Hudson <tjh@openssl.org>
* free NULL cleanup 11Rich Salz2015-05-017-16/+8
| | | | | | | | | | | | | | | | | | | Don't check for NULL before calling free functions. This gets: ERR_STATE_free ENGINE_free DSO_free CMAC_CTX_free COMP_CTX_free CONF_free NCONF_free NCONF_free_data _CONF_free_data A sk_free use within OBJ_sigid_free TS_TST_INFO_free (rest of TS_ API was okay) Doc update for UI_free (all uses were fine) X509V3_conf_free X509V3_section_free X509V3_string_free Reviewed-by: Richard Levitte <levitte@openssl.org>
* free null cleanup finaleRich Salz2015-05-0111-74/+40
| | | | | | Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
* free NULL cleanup 7Rich Salz2015-04-305-94/+39
| | | | | | | | | | | This gets BN_.*free: BN_BLINDING_free BN_CTX_free BN_FLG_FREE BN_GENCB_free BN_MONT_CTX_free BN_RECP_CTX_free BN_clear_free BN_free BUF_MEM_free Also fix a call to DSA_SIG_free to ccgost engine and remove some #ifdef'd dead code in engines/e_ubsec. Reviewed-by: Richard Levitte <levitte@openssl.org>
* free cleanup almost the finaleRich Salz2015-04-302-12/+5
| | | | | | | | | | Add OPENSSL_clear_free which merges cleanse and free. (Names was picked to be similar to BN_clear_free, etc.) Removed OPENSSL_freeFunc macro. Fixed the small simple ones that are left: CRYPTO_free CRYPTO_free_locked OPENSSL_free_locked Reviewed-by: Richard Levitte <levitte@openssl.org>
* remove malloc castsRich Salz2015-04-282-2/+2
| | | | | | | Following ANSI C rules, remove the casts from calls to OPENSSL_malloc and OPENSSL_realloc. Reviewed-by: Richard Levitte <levitte@openssl.org>