summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/reallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-06-02Stop pretending that openssl(1) applications support the -rand option.jsing15-123/+11
The underlying code has long been removed, making this a no-op. If your random subsystem actually requires that you seed it from a file, then you really should go and buy a new random subsystem that was built after 1990. Diff from Brent Cook. ok deraadt@
2014-06-02A few months back there was a big community fuss regarding direct-usederaadt15-388/+2
of the intel RDRAND instruction. Consensus was RDRAND should probably only be used as an additional source of entropy in a mixer. Guess which library bends over backwards to provide easy access to RDRAND? Yep. Guess which applications are using this support? Not even one... but still, this is being placed as a trap for someone. Send this support straight to the abyss. ok kettenis
2014-06-02Rename more variables for readability and consistency.jsing2-50/+50
2014-06-02move random bytes buffer to be part of mmaped pages; ok tedu@otto1-21/+18
2014-06-02Since pqueue is a private interface and the header defining the structguenther2-8/+6
isn't even exported, there's no (sane) way for someone else to use the typedef. Eliminate the typedef and just use "struct _pqueue *". duplicate typedef pointed out by Brent Cook (busterb (at) gmail.com) ok miod@
2014-06-01Clean up some of the nightmare of string and pointer arithmatic inbeck2-104/+72
this nasty function. This gets rid of the nasty tmp variables used to hold temporary strings and the DECIMAL_SIZE hack. it gets rid of the rather pointless null checks for buf (since the original code dereferences it before checking). It also gets rid of the insane possibility this could return -1 when stuff is using the return values to compute lengths All the failure cases now return 0 and an empty string like the first error case in the original code. ok miod@ tedu@
2014-06-01realloc with NULL is same as mallocderaadt2-8/+2
ok guenther
2014-06-01Make usage for -quiet match the manpage and fix a misspellingguenther1-2/+2
2014-06-01Overhaul the key block handling in tls1_change_cipher_state() - usejsing2-92/+132
meaningful variable names with pointer arithmitic, rather than n, i, j and p with array indexing. Based on Adam Langley's chromium diffs. ok miod@
2014-06-01In tls1_setup_key_block(), use the correct IV length for GCM mode, whichjsing2-34/+48
results in the key block length calculation also being correct. Rename a number of variables so that their purpose becomes clear and simplify some of the code. Inspired by Adam Langley's chromium diffs. ok miod@
2014-06-01There is no need for is{upper,lower}() tests before to{lower,uppper}(),deraadt4-54/+16
since all other characters are mapped through transparently. ok jsing
2014-06-01Commit this before the head-scratching leads to premature baldness:deraadt2-2/+2
memset(a->data, 0, (unsigned int)a->max); but the decl is: size_t max; size_t could be larger than int, especially in some of the systems OpenSSL purports to support. How do _intentionally truncating_ casts like enter into a codebase? Lack of understanding of C, at a minimum. Generally the objects are small, but this code is _intentionally unready_ for large objects. ok miod
2014-06-01Build with WARNINGS=Yes and Werror.miod2-12/+4
2014-06-01Remove __bio_h__attr__ wrapper around __attribute__, since earlier statementsmiod2-20/+8
in this file directly use __attribute__. ok deraadt@
2014-06-01Add a deprecated attribute to all CRYPTO_dbg_ functions.miod2-20/+20
ok deraadt@
2014-06-01Build these tests with WARNINGS=Yes and -Werror, and do the necessarymiod40-65/+143
fixes to keep building.
2014-06-01Avoid the use of an uninitialised variable. In reality, this is a non-issuejsing2-4/+2
since the calculated value is not actually used in the uninitialised case. Change the code so that we only do the calculation if we actually need it. Issue detected by clang and reported by both brad@ and Brent Cook.
2014-06-01EBCDIC support died a while ago, except in a comment.deraadt2-4/+0
2014-06-01Clean up the tls1_change_cipher_state() key length handling and use ajsing2-20/+24
single variable with a descriptive name, instead of two poorly named variables. Largely based on Adam Langley's chromium patches. ok miod@
2014-06-01Use C99 initialisers for cipher_aliases. This improves readability,jsing2-184/+664
removes the need for zero values to be specified (meaning that we usually specify two fields instead of 12), makes the field names grepable and protects from future field reordering/removal. ok beck@ miod@
2014-05-31Get the public headers from the official place with <openssl/ >deraadt12-12/+14
from Brent Cook
2014-05-31annoying whitespacederaadt2-6/+6
2014-05-31Change the actual default for returned asn1 strings to be utf8 in the code,beck2-2/+2
rather than only in the config file, to trip people up later. Found, and fix pleaded for by <spider@skuggor.se> who apparently spent hours chasing it down. ok miod@
2014-05-31BUF_MEM_grow_clean() takes a size_t as the size argument. Remove false commentsmiod4-18/+6
mentioning it's an int, bogus (int) casts and bounds checks against INT_MAX (BUF_MEM_grow_clean has its own integer bounds checks). ok deraadt@
2014-05-31Add a comment documenting where libssl depends upon the current (objectionable)miod2-0/+2
behaviour of this code, to prevent people from blindly changing it.
2014-05-31copy a comment placed in other files; req from miodderaadt2-2/+6
2014-05-31Some KNF and fix the vairable spelling.jsing2-46/+32
2014-05-31Move the cts128 and gcm128 tests to regress.jsing9-924/+530
2014-05-31More KNF.jsing2-206/+244
2014-05-31More manual OPENSSL_NO_EC and OPENSSL_NO_TLSEXT cleanup.jsing8-28/+20
2014-05-31unifdef -UDOXYGEN and manually remove the few doxygen comments that are notjsing2-62/+0
wrapped in #ifdef DOXYGEN... Requested by miod@
2014-05-31ECDH and ECDSA will not work overly well if there is no EC, so unifdefjsing16-100/+0
OPENSSL_NO_EC. ok tedu@
2014-05-31TLS would not be entirely functional without extensions, so unifdefjsing30-360/+0
OPENSSL_NO_TLSEXT. ok tedu@
2014-05-31Delete the extraneous "return" statement at the end of a void function.jca1-2/+1
From Fritjof Bornebusch.
2014-05-31KNF and other cleanup.jsing2-266/+295
2014-05-30Don't add potentially nasty stderr uses to dead CRYPTO_dbg_mem functions.deraadt2-6/+6
But do use the abort(), which we are hoping all future vendors will move towards the more modern "do not flush streams"; hint hint, if you didn't do that already, there are grave risks because much software brings risk without that behaviour. We didn't cause the change.. POSIX did... ok beck
2014-05-30Move sha256 and sha512 tests to regress and wire them up.jsing7-332/+17
2014-05-30Move the AES wrap test code into regress.jsing4-264/+182
2014-05-30More KNF.jsing2-112/+146
2014-05-30remove some #if 0 code. we don't need any more reminders that we're usingtedu38-802/+2
a not quite appropriate data structure. ok jsing
2014-05-30Make use of SSL_IS_DTLS, SSL_USE_EXPLICIT_IV, SSL_USE_SIGALGS andjsing18-128/+100
SSL_USE_TLS1_2_CIPHERS. Largely based on OpenSSL head.
2014-05-30Fix some more nasty stringyness in here by using asprintf instead of cruft.beck2-20/+14
gets rid of the second last use of the awful DECIMAL_SIZE.
2014-05-30more: no need to null check before free; ok guentherderaadt8-8/+8
2014-05-30more: no need for null check before freederaadt88-424/+206
ok tedu guenther
2014-05-30While working on another diff I ended up looking to see why on earth thejsing4-80/+12
DTLS code had a chunk that checked to see if the SSL version was *not* DTLS. Turns out that this is inside a big #if 0 block with a comment explaining why DTLS will never need this code... The DTLS code was clearly written by wholesale copying the SSLv3 code. Any code not applicable to DTLS was seemingly #if 0'd or commented out and left for others to find. d1_pkt.c is copied from s3_pkt.c and it has a do_dtls1_write() function that has the same function signature as do_ssl3_write(), except that the create_empty_fragement (yes, that is the spelling in ssl_locl.h) argument is unused for DTLS (although there is code that pretends to use it) since it uses explicit IV (as the comment notes). Instead of leaving this turd lying around, nuke the #if 0'd code (along with the check for *not* DTLS) and remove the pointless create_empty_fragment argument given the only two do_dtls1_write() calls specify zero. This kind of thing also makes you wonder how much actual peer review occurred before the code was initially committed... ok beck@
2014-05-30Rework parse_name() so that variable declaration is separate from functionjsing1-37/+50
based initialisation, use more readable variable names and use a goto rather than duplicating the frees for the error and non-error paths... ok beck@
2014-05-30remove CONST_STRICT. ok beck deraadttedu6-28/+2
2014-05-30no need for null check before free. from Brendan MacDonelltedu39-112/+57
2014-05-30Don't write out more than we have allocated in obj_txt, as the glorybeck2-2/+4
that is OBJ_obj2txt() can return a larger value.. ok tedu@
2014-05-30remove some of the bigger lies, as applicable to libressl.tedu2-18/+6