summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa (follow)
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2git to create tag 'OPENBSD_5_8_BASE'.OPENBSD_5_8_BASEcvs2svn2015-08-0214-3584/+0
|
* Fix inverted test in previous. Commit message told what we intended, butmiod2015-07-151-2/+2
| | | | we did not notice my fingers slipping. Noticed by bcook@
* Previous fix for Coverity CID 21785 did not cope correctly with seed_len != 0,miod2015-07-151-1/+3
| | | | | | seed_in == NULL case. Since this situation is an error anyway, bail out early. with and ok beck@
* Avoid calling BN_CTX_end() on a context that wasn't started.doug2015-02-151-4/+4
| | | | | | | | | | | In dsa_builtin_paramgen(), if BN_MONT_CTX_new() fails, the BN_CTX_new() call above it will have allocated a ctx without calling BN_CTX_start() on it. The error handling calls BN_CTX_end() when ctx is allocated. Move the BN_MONT_CTX_new() call up so it will fail first without splitting up the BN_CTX_new() and BN_CTX_start(). tweak + ok miod@, ok bcook@
* If we decide to discard the provided seed buffer because its size is notmiod2015-02-151-8/+6
| | | | | | | | large enough, do it correctly so that the local seed buffer on the stack gets properly initialized in the first iteration of the loop. While there, remove an outdated and bogus comment. Coverity CID 21785 ok doug@ jsing@
* Coverity CID 21733 (unchecked allocation), 78823 (leak on error).miod2015-02-141-1/+6
| | | | ok doug@ jsing@
* Expand ASN1_CHOICE*, ASN1_SEQUENCE* and associated macros, making thejsing2015-02-141-29/+213
| | | | | | | | | data structures visible and easier to review, without having to wade through layers and layers of asn1t.h macros. Change has been scripted and there is no change to the generated assembly. Discussed with beck@ miod@ tedu@
* Guenther has plans for OPENSSL_NO_CMS, so revert this for the moment.beck2015-02-111-1/+24
|
* get rid of OPENSSL_NO_CMS code we do not use.beck2015-02-111-24/+1
| | | | ok miod@
* Enable building with -DOPENSSL_NO_DEPRECATED.doug2015-02-111-1/+2
| | | | | | | | | | | | | | | If you didn't enable deprecated code, there were missing err.h and bn.h includes. This commit allows building with or without deprecated code. This was not derived from an OpenSSL commit. However, they recently enabled OPENSSL_NO_DEPRECATED in git and fixed these header problems in a different way. Verified with clang that this only changes line numbers in the generated asm. ok miod@
* Expand the -IMPLEMENT_ASN1_ENCODE_FUNCTIONS_(const_)?fname macros so thatjsing2015-02-101-5/+53
| | | | | | | | the code is visible and functions can be readily located. Change has been scripted and there is no change to the generated assembly. Discussed with beck@ miod@ tedu@
* BN_CTX_get() can fail - consistently check its return value.jsing2015-02-091-9/+17
| | | | | | | | | | | | | | | There are currently cases where the return from each call is checked, the return from only the last call is checked and cases where it is not checked at all (including code in bn, ec and engine). Checking the last return value is valid as once the function fails it will continue to return NULL. However, in order to be consistent check each call with the same idiom. This makes it easy to verify. Note there are still a handful of cases that do not follow the idiom - these will be handled separately. ok beck@ doug@
* Fix a number of issues relating to algorithms in signatures, Mostlybeck2015-01-281-2/+14
| | | | | | from OpenSSL with a hint of boring and some things done here. Addresses CVE-2014-8275 for OpenSSL fully ok miod@ doug@
* Use arc4random_buf() instead of RAND_bytes() or RAND_pseudo_bytes().jsing2014-10-221-3/+3
| | | | | | | | arc4random_buf() is guaranteed to always succeed - it is worth noting that a number of the replaced function calls were already missing return value checks. ok deraadt@
* None of these need to include <openssl/rand.h>jsing2014-10-185-10/+5
|
* dsa_priv_decode(): only destroy the object we've created, and with themiod2014-07-131-3/+5
| | | | | | appropriate function. Checking for privkey != NULL is not enough since privkey points to a member of ndsa if ndsa != NULL. dsa_priv_encode(): possible double free in error path.
* if (x) FOO_free(x) -> FOO_free(x).miod2014-07-127-62/+36
| | | | | | | Improves readability, keeps the code smaller so that it is warmer in your cache. review & ok deraadt@
* Only import cryptlib.h in the four source files that actually need it.jsing2014-07-1111-38/+41
| | | | | | | | Remove the openssl public includes from cryptlib.h and add a small number of includes into the source files that actually need them. While here, also sort/group/tidy the includes. ok beck@ miod@
* Explicitly include <openssl/opensslconf.h> in every file that referencesjsing2014-07-105-7/+22
| | | | | | | | | an OPENSSL_NO_* define. This avoids relying on something else pulling it in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is never going to do anything, since OPENSSL_NO_XYZ will never defined, due to the fact that opensslconf.h has not been included. This also includes some miscellaneous sorting/tidying of headers.
* Stop including standard headers via cryptlib.h - pull in the headers thatjsing2014-07-102-3/+7
| | | | | | are needed in the source files that actually require them. ok beck@ miod@
* ASN1_STRING_free can handle NULL, so callers don't need to check. ok miodtedu2014-07-091-7/+4
|
* remove unused, private version strings except SSL_version_strbcook2014-07-091-3/+1
| | | | | | Also remove unused des_ver.h, which exports some of these strings, but is not installed. ok miod@ tedu@
* Make use of this wonderful modern C construct known as a `switch', instead ofmiod2014-07-091-11/+17
| | | | 8-line if() tests.
* KNFmiod2014-07-0911-906/+939
|
* hand-KNF macro the do { } while loopsderaadt2014-06-271-16/+20
|
* replace atoi() calls with strtol(). Follow the idiomatic pattern in ourderaadt2014-06-121-15/+35
| | | | | | | | | manual page strictly. Return -2 if the strings are not strict numbers. The numbers remain in the range of "int". Range checking for these parameters is done later in the pkey_*_ctl() functions, or sometimes in functions much further downstream... but not always!!! ok millert miod mikeb
* tags as requested by miod and teduderaadt2014-06-1214-11/+14
|
* Remove various test stubs. The good ones have been moved by jsingderaadt2014-06-071-111/+0
| | | | | | and others to the regress framework. These remaining ones just muddle us up when re-reading code repeatedly. ok jsing
* malloc() result does not need a cast.deraadt2014-06-072-2/+2
| | | | ok miod
* more: no need to null check before free; ok guentherderaadt2014-05-301-1/+1
|
* more: no need for null check before freederaadt2014-05-301-2/+1
| | | | ok tedu guenther
* Everything sane has stdio, and FILE *. we don't need ifdefs for this.beck2014-05-292-4/+0
| | | | ok to firebomb from tedu@
* Almost nothing actually needs to include <openssl/e_os2.h>, however byjsing2014-05-241-1/+1
| | | | | | | including it they get <openssl/opensslconf.h>. So instead of pulling in <openssl/e_os2.h>, just pull in <openssl/opensslconf.h>. "go ahead" miod@
* if (x) free(x) -> free(x); semantic patch generated with coccinelle, carefullymiod2014-05-222-6/+3
| | | | eyeballed before applying. Contributed by Cyril Roelandt on tech@
* Stop being a dummy... presumably these are left overs from pedantic modejsing2014-05-151-2/+0
| | | | | | that were not wrapped with #if PEDANTIC. ok miod@
* Use C99 initializers for the various FOO_METHOD structs. More readable, andmiod2014-04-273-98/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | avoid unreadable/unmaintainable constructs like that: const EVP_PKEY_ASN1_METHOD cmac_asn1_meth = { EVP_PKEY_CMAC, EVP_PKEY_CMAC, 0, "CMAC", "OpenSSL CMAC method", 0,0,0,0, 0,0,0, cmac_size, 0, 0,0,0,0,0,0,0, cmac_key_free, 0, 0,0 }; ok matthew@ deraadt@
* kill REF_PRINT/REF_CHECK debugging framework noone would usederaadt2014-04-171-20/+0
| | | | ok miod
* Change library to use intrinsic memory allocation functions instead ofbeck2014-04-175-16/+16
| | | | | | | | OPENSSL_foo wrappers. This changes: OPENSSL_malloc->malloc OPENSSL_free->free OPENSSL_relloc->realloc OPENSSL_freeFunc->free
* 1. RAND_seed is now DEPRECATEDderaadt2014-04-171-1/+0
| | | | | | | | | | 2. Even passing a digest in as entropy is sloppy. But apparently the OpenSSL guys could find no objects of lesser value to pass to the pluggable random subsystem, and had to resort to private keys and digests. Classy. ok djm
* we don't use these files for buildingtedu2014-04-151-77/+0
|
* remove FIPS mode support. people who require FIPS can buy something thattedu2014-04-155-71/+0
| | | | | meets their needs, but dumping it in here only penalizes the rest of us. ok beck deraadt
* Moved to regress/lib/libcrypto.miod2014-04-151-259/+0
|
* remove auto-generated dependencies from the old unused build system, soderaadt2014-04-141-132/+0
| | | | | that it is easier to find code pieces. They are getting in the way. ok miod
* resolve conflictsdjm2012-10-1310-46/+196
|
* This commit was generated by cvs2git to track changes on a CVS vendordjm2012-10-133-2/+52
|\ | | | | branch.
| * import OpenSSL-1.0.1cdjm2012-10-1312-45/+244
| |
* | openssl-1.0.0e: resolve conflictsdjm2011-11-032-21/+2
| |
* | This commit was generated by cvs2git to track changes on a CVS vendordjm2011-11-031-0/+1
|\| | | | | branch.
| * import OpenSSL 1.0.0edjm2011-11-033-21/+3
| |
* | resolve conflicts, fix local changesdjm2010-10-0113-592/+298
| |