summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/reallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-08-20knfmt(1) to the rescuetb1-139/+146
2023-08-20Another OPENSSL_NO_DEPRECATED hits the bit buckettb1-7/+1
2023-08-20Drop unnecessary OPENSSL_NO_DEPRECATED dancetb1-7/+1
2023-08-20Use a separate flags variable for the error flags in DH_check()tb1-7/+8
2023-08-18Check X509_digest() return in x509v3_cache_extensions()tb1-2/+3
On failure invalidate the cert with EXFLAG_INVALID. It's unlikely that a cert would make it through to the end of this function without setting the flag, but it's bad style anyway. ok jsing
2023-08-17Garbage collect two commented abort()tb1-3/+1
2023-08-17Make the local ASN1_OBJECTs consttb1-2/+2
ok jsing
2023-08-17Remove some unnecessary else branchestb1-7/+5
2023-08-17Remove some parents from return statementstb1-8/+8
2023-08-17Use cmp instead of i for the result of a comparisontb1-5/+5
ok jsing
2023-08-17Use OBJ_cmp() instead of inlining two variantstb1-12/+4
This also avoids more undefined behavior with memcmp(). ok jsing PS: Unsolicited advice for no one in particular: there is this awesome tool called grep. If someone reports an issue, you might want to use it to find more instances.
2023-08-17Avoid memcmp(NULL, x, 0) in OBJ_cmp()tb1-6/+7
If a->length is 0, either a->data or b->data could be NULL and memcmp() will rely on undefined behavior to compare them as equal. So avoid this comparison in the first place. ok jsing
2023-08-16add the missing entry for EVP_CIPHER_CTX_ctrl(3) to the RETURN VALUES sectionschwarze1-2/+11
2023-08-16Describe more precisely how these functions are supposed to be used,schwarze1-19/+185
document the control operations supported by EVP_chacha20_poly1305(3), and add the missing STANDARDS and HISTORY sections. This replaces all text written by Matt Caswell and all text Copyrighted by OpenSSL in the year 2019.
2023-08-15Add regress coverage for ASN1_STRING_cmp()tb1-1/+147
2023-08-15Add some regress coverage for various ASN1_STRING types to codify sometb1-1/+229
quirks and invariants.
2023-08-15Zap extra parenstb1-2/+2
2023-08-15Fix typo in previoustb1-2/+2
2023-08-15Avoid undefined behavior with memcmp(NULL, x, 0) in ASN1_STRING_cmp()tb1-4/+6
ok jsing miod
2023-08-15SHA-3 is not a symmetric cipher.schwarze1-3/+3
Fix a copy and paste mistake that Ronald Tse introduced in 2017 even though Richard Levitte and Bernd Edlinger reviewed his commit - and that i unwittingly copied. Even in the OpenSSL 3 main trunk, it wasn't fixed until 2022, and in OpenSSL-1.1.1, it is still wrong. Unfortunately, we need to be really careful before believing anything the OpenSSL documentation says...
2023-08-15Import the EVP_chacha20(3) manual page from the OpenSSL 1.1 branch,schwarze4-14/+102
which is still under a free license, to work on it in the tree. The required content changes have not been done yet, i only tweaked the markup and wording so far.
2023-08-15Avoid memcmp() with NULL pointer and 0 lengthtb1-3/+3
2023-08-15Clean up alignment handling.jsing2-57/+67
Instead of using HOST_{c2l,l2c} macros, provide and use crypto_load_le32toh() and crypto_store_htole32(). In some cases just use htole32() directly. ok tb@
2023-08-15Use MD5_LONG instead of unsigned int for consistency.jsing1-3/+3
ok tb@
2023-08-15Condition only on #ifdef MD5_ASM.jsing1-15/+5
There are a bunch of unnecessary preprocessor directives - just condition on MD5_ASM, the same as we do elsewhere. ok tb@
2023-08-14Prepare tlsfuzzer.py for ports updatetb1-3/+13
2023-08-14Inline INIT_DATA_* defines.jsing1-10/+7
ok tb@
2023-08-14style(9)jsing1-6/+6
2023-08-14Below SEE ALSO, point to all pages documenting the evp.h sub-library, andschwarze1-11/+56
also point to a selection of functions from other sub-libraries that rely on evp.h objects, in particular on EVP_CIPHER, EVP_MD, and EVP_PKEY. While here, merge a few trivial improvements to orthography and punctuation from the OpenSSL 1.1 branch.
2023-08-14import EVP_sha3_224(3) from the OpenSSL 1.1 branch, which is still underschwarze3-3/+97
a free license, tweaked by me
2023-08-14netcat: avoid issuing syscalls on fd -1tb1-3/+9
In case a socket error condition occurs, readwrite() invalidates the corresponding fd. Later on, readwrite() may still issue a syscall on it. Avoid that by adding a couple of checks for fd == -1. Reported and fix suggested by Leah Neukirchen. Fixes https://github.com/libressl/openbsd/issues/143 "looks right" deraadt
2023-08-13fix whitespacetb1-14/+13
2023-08-13Extent the modf() tests; from Willemijn Coene.miod1-18/+50
2023-08-12document return values of the control function in EVP_MD_meth_set_ctrl(3)schwarze1-5/+15
2023-08-12first batch of intentionally undocumented EVP constants:schwarze1-1/+10
some EVP_MD_CTRL_*, some EVP_MD_CTX_FLAG_*, and all of EVP_F_* and EVP_R_*
2023-08-121. Tweak the descriptions of EVP_MD_CTX_ctrl(3), EVP_MD_CTX_set_flags(3),schwarze1-52/+107
EVP_MD_CTX_clear_flags(3), EVP_MD_CTX_test_flags(3), and the atrocious EVP_MD_CTX_set_pkey_ctx(3) for precision. 2. Tweak the description of EVP_MD_type(3) and EVP_MD_CTX_type(3) for conciseness. 3. Add a few missing HISTORY bits.
2023-08-12Remove a blatant lie about DSA_dup_DHtb1-6/+2
q is copied across since OpenSSL 31360957 which hit our tree with OpenSSL 1.0.1c in October 2012.
2023-08-12The int_ prefix also leaves the ec_ameth messtb1-5/+5
The prefixes in here are all over the place... This removes one variety.
2023-08-12RSA's _free and _size also lose their int_ prefixtb1-7/+7
2023-08-12Drop silly int_ prefix from _free() and _size()tb2-10/+10
2023-08-12Free {priv,pub}_key before assigning to ittb2-2/+7
While it isn't the case for the default implementations, custom DH and DSA methods could conceivably populate private and public keys, which in turn would result in leaks in the pub/priv decode methods. ok jsing
2023-08-12Readability tweak for key parameters in DSAtb1-2/+2
ok jsing
2023-08-12Simplify and unify missing_parameters() for DH and DSAtb2-11/+8
ok jsing
2023-08-12Now that the DH is sensibly called dh instead of a, we can also renametb1-10/+10
abuf, alen and aout to names that make sense, such as buf, buf_len and secret_len.
2023-08-12a is a silly name for a DHtb1-14/+14
2023-08-12Use printf for consistencytb1-5/+5
2023-08-12Check that {DH,DSA}_get0_engine() returns NULL if OPENSSL_NO_ENGINE istb2-2/+16
defined.
2023-08-12Convert {DH,DSA}_new_method() to using calloc()tb2-83/+54
Due to OPENSSL_NO_ENGINE the engine member of dh and dsa is currently uninitialized. As a consequence, {DH,DSA}_get0_engine() will return a garbage pointer, which is particularly bad because the only reason we kept them in the first place is that they are used by some software... A side effect of freeing with {DH,DSA}_free() instead of a hand-rolled version is that we may call ->meth->finish() before ->meth->init() was called. We need a NULL check for ->meth to be on the safe side in case we should need to bring ENGINE back. with nits from djm ok deraadt djm
2023-08-11Add regress coverage for DH and for DSA parameterstb1-2/+267
2023-08-11Merge various improvements from the OpenSSL 1.1 branch,schwarze1-13/+148
which is still under a free license. * document EVP_MD_CTX_set_flags, EVP_MD_CTX_clear_flags, EVP_MD_CTX_test_flags * document EVP_MD_flags, EVP_MD_CTX_md_data * document EVP_MD_CTX_pkey_ctx, EVP_MD_CTX_set_pkey_ctx * correct arg type of EVP_MD_CTX_size, EVP_MD_CTX_block_size, EVP_MD_CTX_type * more information about EVP_MD_CTX_ctrl * add missing <string.h> and correct one variable type below EXAMPLES * two orthographic improvements with a few wording tweaks by me