aboutsummaryrefslogtreecommitdiff
path: root/engines
AgeCommit message (Collapse)AuthorFilesLines
2015-12-18Remove the "eay" c-file-style indicatorsRichard Levitte1-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>
2015-12-16Rename some BUF_xxx to OPENSSL_xxxRich Salz4-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>
2015-12-15Remove GMP engine.Rich Salz5-723/+4
Reviewed-by: Ben Laurie <ben@openssl.org>
2015-12-09make updateDr. Stephen Henson2-25/+10
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-09remove ecdsa.h header references.Dr. Stephen Henson1-1/+1
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-07Adapt all engines that add new EVP_MDsRichard Levitte7-137/+292
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-07Adjust all accesses to EVP_MD_CTX to use accessor functions.Richard Levitte5-21/+23
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-02Remove RSA_FLAG_SIGN_VER flag.Dr. Stephen Henson1-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>
2015-12-02Remove legacy sign/verify from EVP_MD.Dr. Stephen Henson4-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>
2015-11-22Update dasync to use size_t for the sha1 updateKurt Roeckx1-2/+2
Reviewed-by: Matt Caswell <matt@openssl.org> MR #1350
2015-11-20Rename some daysnc functions for consistencyMatt Caswell1-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>
2015-11-20Initial Async notify code changesMatt Caswell1-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>
2015-11-20Add the Dummy Async engine (dasync)Matt Caswell5-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>
2015-11-09Continue malloc standardisation in enginesMatt Caswell6-21/+26
Continuing from previous work standardise use of malloc in the engine code. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-10-30Replace "SSLeay" in API with OpenSSLRich Salz4-10/+10
All instances of SSLeay (any combination of case) were replaced with the case-equivalent OpenSSL. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-15Remove Obsolete enginesMatt Caswell31-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>
2015-09-29engine/e_capi.c: fix various warnings.Andy Polyakov1-16/+22
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-09-29Fix prototypes in e_ossttest.c.Andy Polyakov1-8/+8
Problem was exposed in mingw64 build, or in other words on P64 platform. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-09-29Rationalize .gitignore and harmonize pair of Makefiles.Andy Polyakov1-1/+1
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-09-25Change ossltest engine to manually allocate cipher_dataMatt Caswell3-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>
2015-09-03remove 0 assignments.Rich Salz1-6/+1
After openssl_zalloc, cleanup more "set to 0/NULL" assignments. Many are from github feedback. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-02Add and use OPENSSL_zallocRich Salz1-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>
2015-08-26BN_bin2bn handle leading zero'sRich Salz4-22/+4
If a binary sequence is all zero's, call BN_zero. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-08-11Remove Gost94 signature algorithm.Rich Salz13-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>
2015-08-11make updateMatt Caswell1-14/+15
Run a "make update" for the OSSLTest Engine changes Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-08-11Use dynamic engine for libssl test harnessRichard Levitte2-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>
2015-08-11Add OSSLTest EngineMatt Caswell5-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>
2015-05-26Fix error check in GOST engineMatt Caswell1-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>
2015-05-23Fix update and depend in engines/Richard Levitte2-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>
2015-05-22Fix the update target and remove duplicate file updatesRichard Levitte2-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>
2015-05-11Use p==NULL not !p (in if statements, mainly)Rich Salz10-92/+61
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-06Use "==0" instead of "!strcmp" etcRich Salz2-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>
2015-05-05memset, memcpy, sizeof consistency fixesRich Salz4-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>
2015-05-04Use safer sizeof variant in mallocRich Salz4-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>
2015-05-02Remove obsolete make variablesRichard Levitte1-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>
2015-05-01free NULL cleanup -- codaRich Salz2-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>
2015-05-01free NULL cleanup 11Rich Salz7-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>
2015-05-01free null cleanup finaleRich Salz11-74/+40
Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-30free NULL cleanup 7Rich Salz5-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>
2015-04-30free cleanup almost the finaleRich Salz2-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>
2015-04-28remove malloc castsRich Salz2-2/+2
Following ANSI C rules, remove the casts from calls to OPENSSL_malloc and OPENSSL_realloc. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-16Code style: space after 'if'Viktor Dukhovni4-52/+55
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-04-15Initialize variableEmilia Kasper1-1/+1
newsig may be used (freed) uninitialized on a malloc error. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-03-31Remove EXHEADER, TEST, APPS, links:, install: and uninstall: where relevantRichard Levitte2-12/+1
With no more symlinks, there's no need for those variables, or the links target. This also goes for all install: and uninstall: targets that do nothing but copy $(EXHEADER) files, since that's now taken care of by the top Makefile. Also, removed METHTEST from test/Makefile. It looks like an old test that's forgotten... Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-03-31Stop symlinking, move files to intended directoryRichard Levitte1-1437/+0
Rather than making include/openssl/foo.h a symlink to crypto/foo/foo.h, this change moves the file to include/openssl/foo.h once and for all. Likewise, move crypto/foo/footest.c to test/footest.c, instead of symlinking it there. Originally-by: Geoff Thorpe <geoff@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-03-30Initialised 'ok' and redo the logic.Richard Levitte1-4/+4
The logic with how 'ok' was calculated didn't quite convey what's "ok", so the logic is slightly redone to make it less confusing. Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-03-28free NULL cleanupRich Salz2-6/+4
EVP_.*free; this gets: EVP_CIPHER_CTX_free EVP_PKEY_CTX_free EVP_PKEY_asn1_free EVP_PKEY_asn1_set_free EVP_PKEY_free EVP_PKEY_free_it EVP_PKEY_meth_free; and also EVP_CIPHER_CTX_cleanup Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-03-25free NULL cleanup.Rich Salz1-3/+1
This gets EC_GROUP_clear_free EC_GROUP_free, EC_KEY_free, EC_POINT_clear_free, EC_POINT_free Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-03-25free NULL cleanupRich Salz2-12/+6
This commit handles BIO_ACCEPT_free BIO_CB_FREE BIO_CONNECT_free BIO_free BIO_free_all BIO_vfree Reviewed-by: Matt Caswell <matt@openssl.org>
2015-03-25Fix return checks in GOST engineMatt Caswell6-71/+279
Filled in lots of return value checks that were missing the GOST engine, and added appropriate error handling. Reviewed-by: Richard Levitte <levitte@openssl.org>