aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/hmac
Commit message (Collapse)AuthorAgeFilesLines
* Continue standardising malloc style for libcryptoMatt Caswell2015-11-092-2/+2
| | | | | | | Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Fix memory leaks and other mistakes on errorsAlessandro Ghedini2015-10-231-2/+7
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* remove 0 assignments.Rich Salz2015-09-031-5/+2
| | | | | | | After openssl_zalloc, cleanup more "set to 0/NULL" assignments. Many are from github feedback. Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fix ABI break with HMACMatt Caswell2015-06-121-12/+8
| | | | | | | | | Recent HMAC changes broke ABI compatibility due to a new field in HMAC_CTX. This backs that change out, and does it a different way. Thanks to Timo Teras for the concept. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix leak in HMAC error pathMatt Caswell2015-06-101-0/+1
| | | | | | | | | In the event of an error in the HMAC function, leaks can occur because the HMAC_CTX does not get cleaned up. Thanks to the BoringSSL project for reporting this issue. 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>
* make dependRichard Levitte2015-05-141-4/+5
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Identify and move common internal libcrypto header filesRichard Levitte2015-05-143-3/+3
| | | | | | | | | | | | | 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>
* Use "==0" instead of "!strcmp" etcRich Salz2015-05-061-2/+2
| | | | | | | For the various string-compare routines (strcmp, strcasecmp, str.*cmp) use "strcmp()==0" instead of "!strcmp()" Reviewed-by: Tim Hudson <tjh@openssl.org>
* Use safer sizeof variant in mallocRich Salz2015-05-042-2/+2
| | | | | | | | | | | | | 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>
* free cleanup almost the finaleRich Salz2015-04-301-6/+2
| | | | | | | | | | 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>
* Code style: space after 'if'Viktor Dukhovni2015-04-161-6/+6
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Remove EXHEADER, TEST, APPS, links:, install: and uninstall: where relevantRichard Levitte2015-03-311-17/+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>
* Stop symlinking, move files to intended directoryRichard Levitte2015-03-312-430/+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>
* Fix HMAC to pass invalid key len testMatt Caswell2015-03-251-1/+2
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add HMAC test for invalid key lenMatt Caswell2015-03-251-0/+5
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Ensure that both the MD and key have been initialised before attempting toMatt Caswell2015-03-252-3/+21
| | | | | | | | create an HMAC Inspired by BoringSSL commit 2fe7f2d0d9a6fcc75b4e594eeec306cc55acd594 Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add more HMAC testsMatt Caswell2015-03-251-7/+162
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* make dependDr. Stephen Henson2015-03-241-3/+3
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Move some EVP internals to evp_int.hDr. Stephen Henson2015-03-241-1/+1
| | | | | | Move EVP internals to evp_int.h, remove -Ievp hack from crypto/Makefile Reviewed-by: Matt Caswell <matt@openssl.org>
* Move some ASN.1 internals to asn1_int.hDr. Stephen Henson2015-03-241-1/+1
| | | | | | | | Move ASN.1 internals used across multiple directories into new internal header file asn1_int.h remove crypto/Makefile hack which allowed other directories to include "asn1_locl.h" Reviewed-by: Matt Caswell <matt@openssl.org>
* HMAC_cleanup, and HMAC_Init are stated as deprecated in the docs and source.Matt Caswell2015-02-102-3/+8
| | | | | | Mark them as such with OPENSSL_USE_DEPRECATED Reviewed-by: Tim Hudson <tjh@openssl.org>
* Remove OPENSSL_NO_HMACDr. Stephen Henson2015-02-062-12/+0
| | | | | | | Disabling HMAC doesn't work. If it did it would end up disabling a lot of OpenSSL functionality (it is required for all versions of TLS for example). Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* clang on Linux x86_64 complains about unreachable code.Richard Levitte2015-01-291-1/+0
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-225-546/+516
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fix strange formatting by indentMatt Caswell2015-01-221-2/+4
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* remove OPENSSL_FIPSAPIDr. Stephen Henson2014-12-081-1/+1
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Remove fipscanister build functionality from makefiles.Dr. Stephen Henson2014-12-081-1/+1
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Remove all .cvsignore filesRich Salz2014-11-281-4/+0
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* RT2626: Change default_bits from 1K to 2KKurt Roeckx2014-09-081-1/+1
| | | | | | | | | | This is a more comprehensive fix. It changes all keygen apps to use 2K keys. It also changes the default to use SHA256 not SHA1. This is from Kurt's upstream Debian changes. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* old_hmac_encode: check for NULL result when allocating *pderJonas Maebe2014-08-171-0/+2
| | | | | Signed-off-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add functions returning security bits.Dr. Stephen Henson2014-03-281-1/+1
| | | | | Add functions to return the "bits of security" for various public key algorithms. Based on SP800-57.
* Fix some warnings caused by __owur. Temporarily (I hope) remove the moreBen Laurie2011-11-141-3/+3
| | | | aspirational __owur annotations.
* make updateBodo Möller2011-09-051-7/+6
|
* inherit HMAC flags from MD_CTXDr. Stephen Henson2011-05-191-0/+2
|
* make updateRichard Levitte2011-03-241-6/+7
|
* Add SRP support.Ben Laurie2011-03-121-7/+6
|
* Update dependencies.Dr. Stephen Henson2011-02-211-6/+7
|
* Change OPENSSL_FIPSEVP to OPENSSL_FIPSAPI as it doesn't just referDr. Stephen Henson2011-01-271-1/+1
| | | | | | | | to EVP any more. Move locking #define into fips.h. Set FIPS locking callbacks at same time as OpenSSL locking callbacks.
* FIPS HMAC changes:Dr. Stephen Henson2011-01-261-9/+13
| | | | | | Use EVP macros. Use tiny EVP in FIPS mode.
* Change AR to ARX to allow exclusion of fips object modulesDr. Stephen Henson2011-01-261-1/+1
|
* Fix warnings.Ben Laurie2010-06-121-3/+0
|
* Add algorithm specific signature printing. An individual ASN1 method canDr. Stephen Henson2010-03-061-1/+1
| | | | | | | | | | | now print out signatures instead of the standard hex dump. More complex signatures (e.g. PSS) can print out more meaningful information. Sample DSA version included that prints out the signature parameters r, s. [Note EVP_PKEY_ASN1_METHOD is an application opaque structure so adding new fields in the middle has no compatibility issues]
* Add flags functions which were added to 0.9.8 for fips but not 1.0.0 andDr. Stephen Henson2010-01-262-0/+7
| | | | later.
* Audit libcrypto for unchecked return values: fix all cases enounteredDr. Stephen Henson2009-09-231-5/+9
|
* Add more return value checking attributes to evp.h and hmac.hDr. Stephen Henson2009-09-231-5/+5
|
* If we're going to return errors (no matter how stupid), then we shouldBen Laurie2008-12-291-1/+5
| | | | test for them!
* Revert the size_t modifications from HEAD that had led to moreGeoff Thorpe2008-11-123-7/+7
| | | | | | knock-on work than expected - they've been extracted into a patch series that can be completed elsewhere, or in a different branch, before merging back to HEAD.
* Update obsolete email address...Dr. Stephen Henson2008-11-052-2/+2
|
* Update HMAC functions to return an error where relevant.Dr. Stephen Henson2008-11-022-32/+61
|