summaryrefslogtreecommitdiffstats
path: root/crypto/engine/eng_openssl.c
AgeCommit message (Collapse)Author
2016-02-09Don't run RC4 test with no-rc4Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-09Auto init/deinit libcryptoMatt Caswell
This builds on the previous commit to auto initialise/deinitialise libcrypto. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz
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>
2016-01-12Adapt all engines that need it to opaque EVP_CIPHERRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Adapt cipher implementations to opaque EVP_CIPHER_CTXRichard Levitte
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>
2015-12-09set standard EC method in eng_opensslDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-09remove ECDSA_METHOD from ENGINEDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-09remove ECDH_METHOD from ENGINEDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-07Adapt the rest of the source to the opaque HMAC_CTXRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-07Adapt all engines that add new EVP_MDsRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-07Adjust all accesses to EVP_MD_CTX to use accessor functions.Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-07Adapt HMAC to the EVP_MD_CTX changesRichard Levitte
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>
2015-12-02Remove legacy sign/verify from EVP_MD.Dr. Stephen Henson
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-09Continue standardising malloc style for libcryptoMatt Caswell
Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-10-30Replace "SSLeay" in API with OpenSSLRich Salz
All instances of SSLeay (any combination of case) were replaced with the case-equivalent OpenSSL. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-09-29Fix no-stdio buildDavid Woodhouse
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>
2015-09-03remove 0 assignments.Rich Salz
After openssl_zalloc, cleanup more "set to 0/NULL" assignments. Many are from github feedback. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-14Identify and move common internal libcrypto header filesRichard Levitte
There are header files in crypto/ that are used by a number of crypto/ submodules. Move those to crypto/include/internal and adapt the affected source code and Makefiles. The header files that got moved are: crypto/cryptolib.h crypto/md32_common.h Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-06Use "==0" instead of "!strcmp" etcRich Salz
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-04Use safer sizeof variant in mallocRich Salz
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-04-30free cleanup almost the finaleRich Salz
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-03-11Merge OPENSSL_NO_EC{DH,DSA} into OPENSSL_NO_ECRich Salz
Suggested by John Foley <foleyj@cisco.com>. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-01-27OPENSSL_NO_xxx cleanup: SHARich Salz
Remove support for SHA0 and DSS0 (they were broken), and remove the ability to attempt to build without SHA (it didn't work). For simplicity, remove the option of not building various SHA algorithms; you could argue that SHA_224/256/384/512 should be kept, since they're like crypto algorithms, but I decided to go the other way. So these options are gone: GENUINE_DSA OPENSSL_NO_SHA0 OPENSSL_NO_SHA OPENSSL_NO_SHA1 OPENSSL_NO_SHA224 OPENSSL_NO_SHA256 OPENSSL_NO_SHA384 OPENSSL_NO_SHA512 Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-06Further comment amendments to preserve formatting prior to source reformatMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-08-18RT1815: More const'ness improvementsJustin Blanchard
Add a dozen more const declarations where appropriate. These are from Justin; while adding his patch, I noticed ASN1_BIT_STRING_check could be fixed, too. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2010-11-24fix typo in HMAC redirection, add HMAC INIT tracingDr. Stephen Henson
2010-11-24VERY EXPERIMENTAL HMAC redirection example in OpenSSL ENGINE. Untested at thisDr. Stephen Henson
stage and probably wont work properly.
2008-10-31Fix warnings after commit#17578.Andy Polyakov
2005-08-28fix warnings when building openssl with the following compiler options:Nils Larsch
-Wmissing-prototypes -Wcomment -Wformat -Wimplicit -Wmain -Wmultichar -Wswitch -Wshadow -Wtrigraphs -Werror -Wchar-subscripts -Wstrict-prototypes -Wreturn-type -Wpointer-arith -W -Wunused -Wno-unused-parameter -Wuninitialized
2005-07-16makeNils Larsch
./configure no-deprecated [no-dsa] [no-dh] [no-ec] [no-rsa] make depend all test work again PR: 1159
2004-05-15size_t-fication of message digest APIs. We should size_t-fy more APIs...Andy Polyakov
2004-04-19More updates for the header cleanups (and apologies, again, for not havingGeoff Thorpe
consolidated these prior to committing).
2004-04-19Reduce header interdependencies, initially in engine.h (the rest of theGeoff Thorpe
changes are the fallout). As this could break source code that doesn't directly include headers for interfaces it uses, changes to recursive includes are covered by the OPENSSL_NO_DEPRECATED symbol. It's better to define this when building and using openssl, and then adapt code where necessary - this is how to stay current. However the mechanism exists for the lethargic.
2002-12-04Do not implement RC4 stuff if RC4 is disabled. Concequently, apply the sameRichard Levitte
rule for SHA stuff. PR: 381
2002-10-14makedepend complains when a header file is included more than once inRichard Levitte
the same source file.
2002-08-09Add ECDH support.Bodo Möller
Additional changes: - use EC_GROUP_get_degree() in apps/req.c - add ECDSA and ECDH to apps/speed.c - adds support for EC curves over binary fields to ECDSA - new function EC_KEY_up_ref() in crypto/ec/ec_key.c - reorganize crypto/ecdsa/ecdsatest.c - add engine support for ECDH - fix a few bugs in ECDSA engine support Submitted by: Douglas Stebila <douglas.stebila@sun.com>
2002-03-06ENGINE module additions.Dr. Stephen Henson
Add "init" command to control ENGINE initialization. Call ENGINE_finish on initialized ENGINEs on exit. Reorder shutdown in apps.c: modules should be shut down first. Add test private key loader to openssl ENGINE: this just loads a private key in PEM format. Fix print format for dh length parameter.
2001-11-22The "openssl" ENGINE is no longer used except as a testing/debuggingGeoff Thorpe
device. This change enables it for building as a self-contained "dynamic" ENGINE, to help testing such mechanisms.
2001-09-25"FALLBACK" handling was a hack that was thrown out long ago in theGeoff Thorpe
ENGINE redevelopment. The idea had been that "-1" could be used as a special "ask me later" 'nid' rather than specifying supported cipher and digest 'nid's up front. However the idea turned out to be pretty broken.
2001-09-25This change adds dummy RC4 and SHA1 support to the "openssl" ENGINE forGeoff Thorpe
testing. Because of the recent changes (see crypto/engine/README), the "openssl" ENGINE is no longer needed nor is it loaded automatically or by ENGINE_load_builtin_engines(). So a explicit ENGINE_load_openssl() call is required by applications or a modification to eng_all.c before this ENGINE will be used. This change will send output to stderr as/when its implementations are used.
2001-09-25This change replaces the ENGINE's underlying mechanics with the newGeoff Thorpe
ENGINE_TABLE-based stuff - as described in crypto/engine/README. Associated miscellaneous changes; - the previous cipher/digest hooks that hardwired directly to EVP's OBJ_NAME-based storage have been backed out. New cipher/digest support has been constructed and will be committed shortly. - each implementation defines its own ENGINE_load_<name> function now. - the "openssl" ENGINE isn't needed or loaded any more. - core (not algorithm or class specific) ENGINE code has been split into multiple files to increase readability and decrease linker bloat. - ENGINE_cpy() has been removed as it wasn't really a good idea in the first place and now, because of registration issues, can't be meaningfully defined any more. - BN_MOD_EXP[_CRT] support is removed as per the README. - a bug in enginetest.c has been fixed. NB: This commit almost certainly breaks compilation until subsequent changes are committed.
2001-09-14Some of the ENGINE file names were changed for 8.3 filename uniquenessGeoff Thorpe
recently. So comments including file names have been fixed, and copyright notices brought up to "2001" at the same time.
2001-09-07make engine file names unique in 8.3Ulf Möller