aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/engine
Commit message (Collapse)AuthorAgeFilesLines
* Remove /* foo.c */ commentsRich Salz2016-01-2612-12/+0
| | | | | | | | | | | | This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Fix two possible leaks.FdaSilvaYY2016-01-241-0/+2
| | | | | | | Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #580
* Add an engine destructor to eng_cryptodev.Richard Levitte2016-01-201-0/+36
| | | | Reviewed-by: Ben Laurie <ben@openssl.org>
* Adapt BSD cryptodev engine to opaque EVP_MD_CTX, EVP_CIPHER_CTX, etcRichard Levitte2016-01-201-204/+333
| | | | Reviewed-by: Ben Laurie <ben@openssl.org>
* Remove update tagsRich Salz2016-01-201-2/+0
| | | | | Also remove depend/local_depend. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove the GOST engineMatt Caswell2016-01-191-3/+0
| | | | | | | | | | 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-171-12/+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>
* Move Makefiles to Makefile.inRich Salz2016-01-122-458/+71
| | | | | | | | | | 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-121-227/+292
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Adapt all engines that need it to opaque EVP_CIPHERRichard Levitte2016-01-121-34/+72
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Adapt cipher implementations to opaque EVP_CIPHER_CTXRichard Levitte2016-01-121-1/+1
| | | | | | | | 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>
* Use ossl_inline and DEFINE_LHASH_OFDr. Stephen Henson2016-01-111-1/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add lh_doall_arg inliningDr. Stephen Henson2016-01-111-10/+6
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add lh_doall inliningDr. Stephen Henson2016-01-111-4/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add lh_new() inliningDr. Stephen Henson2016-01-111-4/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Inline LHASH_OFDr. Stephen Henson2016-01-112-4/+6
| | | | | | | | | | | Make LHASH_OF use static inline functions. Add new lh_get_down_load and lh_set_down_load functions and their typesafe inline equivalents. Make lh_error a function instead of a macro. Reviewed-by: Rich Salz <rsalz@openssl.org>
* mem functions cleanupRich Salz2016-01-071-2/+0
| | | | | | | | | | | | | | | | | 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>
* Rename DECLARE*STACK_OF to DEFINE*STACK_OFDr. Stephen Henson2016-01-071-2/+2
| | | | | | | | | | Applications wishing to include their own stacks now just need to include DEFINE_STACK_OF(foo) in a header file. 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-161-3/+3
| | | | | | | | | 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-151-3/+0
| | | | Reviewed-by: Ben Laurie <ben@openssl.org>
* Make no-dh work, plus other no-dh problems found by Richard.Ben Laurie2015-12-111-1/+10
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Use NULL comparisonDr. Stephen Henson2015-12-091-2/+2
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* set standard EC method in eng_opensslDr. Stephen Henson2015-12-091-0/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* make updateDr. Stephen Henson2015-12-091-38/+15
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Engine EC_KEY_METHOD functionality.Dr. Stephen Henson2015-12-094-17/+22
| | | | | | | | Rename ENGINE _EC_KEY functions to _EC. Add support for EC_KEY_METHOD in ENGINE_set_default et al. Copy ec_meth. Reviewed-by: Richard Levitte <levitte@openssl.org>
* remove ECDSA_METHOD from ENGINEDr. Stephen Henson2015-12-096-162/+16
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* remove ECDH_METHOD from ENGINEDr. Stephen Henson2015-12-096-149/+2
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Support for EC_KEY_METHOD.Dr. Stephen Henson2015-12-093-2/+127
| | | | | | | | | | | | Add EC_KEY_METHOD. This is part of the EC revision and will make EC behave more like other algorithms. Specifically: EC_KEY_METHOD is part of EC_KEY. It is part of ENGINE. Default or key specific implementations can be provided to redirect some or all operations. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Adapt the rest of the source to the opaque HMAC_CTXRichard Levitte2015-12-071-11/+9
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Adapt all engines that add new EVP_MDsRichard Levitte2015-12-071-18/+55
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Adjust all accesses to EVP_MD_CTX to use accessor functions.Richard Levitte2015-12-071-3/+3
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Adapt HMAC to the EVP_MD_CTX changesRichard Levitte2015-12-071-1/+2
| | | | | | | | | | | | | This change required some special treatment, as HMAC is intertwined with EVP_MD. For now, all local HMAC_CTX variables MUST be initialised with HMAC_CTX_EMPTY, or whatever happens to be on the stack will be mistaken for actual pointers to EVP_MD_CTX. This will change as soon as HMAC_CTX becomes opaque. Also, since HMAC_CTX_init() can fail now, its return type changes from void to int, and it will return 0 on failure, 1 on success. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Remove legacy sign/verify from EVP_MD.Dr. Stephen Henson2015-12-021-1/+0
| | | | | | | | | | | | | 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>
* ex_data part 2: doc fixes and CRYPTO_free_ex_index.Rich Salz2015-12-011-8/+0
| | | | | | | | | | Add CRYPTO_free_ex_index (for shared libraries) Unify and complete the documentation for all "ex_data" API's and objects. Replace xxx_get_ex_new_index functions with a macro. Added an exdata test. Renamed the ex_data internal datatypes. Reviewed-by: Matt Caswell <matt@openssl.org>
* Continue standardising malloc style for libcryptoMatt Caswell2015-11-097-13/+19
| | | | | | | Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Rebuild error source files.Dr. Stephen Henson2015-11-051-12/+12
| | | | | | | Rebuild error source files: the new mkerr.pl functionality will now pick up and translate static function names properly. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Replace "SSLeay" in API with OpenSSLRich Salz2015-10-302-6/+6
| | | | | | | All instances of SSLeay (any combination of case) were replaced with the case-equivalent OpenSSL. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Probably fix travis (wine build).Ben Laurie2015-10-251-9/+9
| | | | Reviewed-by: Stephen Henson <steve@openssl.org>
* Improve make depend.Ben Laurie2015-10-241-16/+18
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix undeclared variable warnings.Ben Laurie2015-10-241-7/+8
| | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Remove Obsolete enginesMatt Caswell2015-10-151-18/+0
| | | | | | | | 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>
* When ENGINE_add finds that id or name is missing, actually returnRichard Levitte2015-10-081-0/+1
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Fix no-stdio buildDavid Woodhouse2015-09-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Much related/similar work also done by Ivan Nestlerode <ivan.nestlerode@sonos.com> +Replace FILE BIO's with dummy ops that fail. +Include <stdio.h> for sscanf() even with no-stdio (since the declaration is there). We rely on sscanf() to parse the OPENSSL_ia32cap environment variable, since it can be larger than a 'long'. And we don't rely on the availability of strtoull(). +Remove OPENSSL_stderr(); not used. +Make OPENSSL_showfatal() do nothing (currently without stdio there's nothing we can do). +Remove file-based functionality from ssl/. The function prototypes were already gone, but not the functions themselves. +Remove unviable conf functionality via SYS_UEFI +Add fallback definition of BUFSIZ. +Remove functions taking FILE * from header files. +Add missing DECLARE_PEM_write_fp_const +Disable X509_LOOKUP_hash_dir(). X509_LOOKUP_file() was already compiled out, so remove its prototype. +Use OPENSSL_showfatal() in CRYPTO_destroy_dynlockid(). +Eliminate SRP_VBASE_init() and supporting functions. Users will need to build the verifier manually instead. +Eliminate compiler warning for unused do_pk8pkey_fp(). +Disable TEST_ENG_OPENSSL_PKEY. +Disable GOST engine as is uses [f]printf all over the place. +Eliminate compiler warning for unused send_fp_chars(). Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Tim Hudson <tjh@openssl.org>
* make updateMatt Caswell2015-09-161-8/+7
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Enable -Wmissing-variable-declarations andBen Laurie2015-09-112-15/+16
| | | | | | | -Wincompatible-pointer-types-discards-qualifiers (the latter did not require any code changes). Reviewed-by: Rich Salz <rsalz@openssl.org>
* remove 0 assignments.Rich Salz2015-09-032-15/+5
| | | | | | | 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-023-6/+3
| | | | | | | | | 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>
* Rewrite crypto/ex_dataRich Salz2015-07-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed ability to set ex_data impl at runtime. This removed these three functions: const CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void); int CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i); int CRYPTO_ex_data_new_class(void); It is no longer possible to change the ex_data implementation at runtime. (Luckily those functions were never documented :) Also removed the ability to add new exdata "classes." We don't believe this received much (if any) use, since you can't add it to OpenSSL objects, and there are probably better (native) methods for developers to add their own extensible data, if they really need that. Replaced the internal hash table (of per-"class" stacks) with a simple indexed array. Reserved an index for "app" application. Each API used to take the lock twice; now it only locks once. Use local stack storage for function pointers, rather than malloc, if possible (i.e., number of ex_data items is under a dozen). Make CRYPTO_EX_DATA_FUNCS opaque/internal. Also fixes RT3710; index zero is reserved. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix the update target and remove duplicate file updatesRichard Levitte2015-05-221-0/+2
| | | | | | | | | | | | | | | 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>