summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/reallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-05-29Make it possible for the large OID test to failtb1-3/+3
failed was set to 0 at the top of the function, so failure and success were indistinguishable. Move failed = 0 to the end so it can actually fail.
2024-05-29Add regress coverage for some corner cases of i2d_ASN1_OBJECT()tb1-1/+40
2024-05-29Add regress coverage for i2d_ASN1_OBJECT() fixestb1-3/+27
2024-05-29Fix i2d_ASN1_OBJECT()tb1-3/+12
When called with a pointer to NULL as an output buffer, one would expect an i2d API to allocate the buffer and return it. The implementation here is special and the allocation dance was forgotten, resulting in a SIGSEGV. Add said dance. ok jsing
2024-05-29Make i2d_ASN1_OBJECT() return -1 on errortb1-2/+2
This is what the (not quite appropriately) referenced ASN1_item_i2d() page documents for errors, matches what the RETURN VALUE section has been documenting for ages, matches BoringSSL, it's the usal behavior for i2d_*. It's also what OpenSSL (of course incorrectly) documents. discussed with jsing
2024-05-29Remove unnecessary parens from i2d_ASN1_OBJECT()tb1-4/+6
2024-05-28Test that invalid operations push the X509V3_R_UNSUPPORTED_OPTION errortb1-1/+53
2024-05-28Clean up and fix X509V3_EXT_add1_i2d()tb1-57/+89
When looking at this code I noticed a few leaks. Fixing those leaks was straightforward, but following the code was really hard. This attempts to make the logic a bit clearer. In short, there are 6 mutually exclusive modes for this function (passed in the variable aptly called flags). The default mode is to append the extension of type nid and to error if such an extension already exists. Then there are other modes with varying degree of madness. The existing code didn't make X509V3_ADD_REPLACE explicit, which is confusing. Operations 6-15 would all be treated like X509V3_ADD_REPLACE due to the way the function was written. Handle the supported operations via a switch and error for operations 6-15. This and the elimination of leaks are the only changes of behavior, as validated by relatively extensive test coverage. ok jsing
2024-05-28Add regress coverage for X509V3_add1_i2d()tb2-2/+605
2024-05-27openssl x509: rename pub_key to dsa_pub_keytb1-4/+4
suggested by jsing
2024-05-27openssl: enable -Wshadow for clangtb1-2/+2
ok job jsing
2024-05-27openssl: avoid shadowed pkeys in x509.ctb1-12/+10
ok job jsing
2024-05-27remove unused typedefs with structs that were removedjsg2-14/+2
ENGINE, SSL and SSL_CTX remain even though the structs in the typedefs don't exist as they are used as incomplete types. feedback, ports bulk build and ok tb@
2024-05-26Remove documentation of optional md in one-step hashestb4-28/+47
This functionality will be removed, so stop documenting it. Instead mention that another implementation still supports this.
2024-05-25Eliminate last timegm() correctly this timetb1-5/+25
Also add a test case with a generalized time representing the moment one second past the 32-bit epoch wrap.
2024-05-25sync inclusion of <stdlib.h> from libcryptotb3-3/+6
2024-05-25Include <stdint.h> in the bytestring .c filestb3-3/+6
They currently depend on bytestring.h pulling that in. discussed with jsing
2024-05-25Revert previoustb1-10/+4
It wasn't quite right, but I also think the test is bogus.
2024-05-25asn1time: another use of gmtime was hiding heretb1-4/+10
2024-05-24des_local.h: Remove some unused macrostb1-20/+1
2024-05-24Remove documentation of DES_enc_{read,write} and DES_rw_modetb1-89/+4
ok jsing
2024-05-24Stub out DES_enc_{read,write}(3)tb3-321/+14
The most terrible code in OpenSSL has its roots in libdes, which came before SSLeay. Hello, LHASH. Hello speed app. Hello DES (obviously). There are some diary-style changelog comments dating all the way back to 1990. /* This has some uglies in it but it works - even over sockets. */ Well, kind of: * - This code cannot handle non-blocking sockets. Also: /* >output is a multiple of 8 byes, if len < rnum * >we must be careful. The user must be aware that this * >routine will write more bytes than he asked for. * >The length of the buffer must be correct. * FIXED - Should be ok now 18-9-90 - eay */ Or /* This is really a bad error - very bad * It will stuff-up both ends. */ Or #ifdef _LIBC extern unsigned long time(); extern int write(); #endif I can't even... Delete, delete, delete. ok jsing
2024-05-23Make signature of SSL_COMP_add_compression_method(3) match realitytb1-3/+3
2024-05-23x509_v3.c: indent labelstb1-4/+4
2024-05-23x509_v3.c: remove an unnecessary elsetb1-3/+3
2024-05-23x509_v3.c: consistently call STACK_OF(X509_EXTENSIONS) arguments sktb1-12/+12
(where it doesn't conflict with a local variable)
2024-05-23x509_v3.c: zap another pointless local variabletb1-7/+2
2024-05-23x509_v3.c: add a few empty linestb1-1/+9
2024-05-23X509v3_get_ext_by_NID: make obj const, test & assigntb1-4/+4
2024-05-23x509_v3.c: remove a pointless local variabletb1-5/+3
2024-05-23x509_v3.c: mechanically replace ex with ext and new_ex with new_exttb1-42/+42
2024-05-22Exercise EVP_chacha20_poly1305() with in-place decryptiontb1-2/+143
This needs quite a bit of cleanup but let's have some tests rather than none.
2024-05-22Fix in-place decryption for EVP_chacha20_poly1305()tb1-3/+3
Take the MAC before clobbering the input value on decryption. Fixes hangs during the QUIC handshake with HAProxy using TLS_CHACHA20_POLY1305_SHA256. Found, issue pinpointed, and initial fix tested by Lucas Gabriel Vuotto: Let me take this opportunity to thank the HAProxy team for going out of their way to keep supporting LibreSSL. It's much appreciated. See https://github.com/haproxy/haproxy/issues/2569 tweak/ok jsing
2024-05-22crib better wording from schwarze's EVP_PKEY_get_attr_by_NID(3)tb1-5/+4
2024-05-22Fix incorrect X509v3_get_ext_by_NID(3) return valuestb1-9/+17
This error comes from upstream, where it is still wrong.
2024-05-21remove prototypes with no matching function and externs with no varjsg1-2/+1
partly checked by millert@
2024-05-20cmac: zero_iv should be consttb1-2/+2
2024-05-19unwrap a linetb1-3/+2
2024-05-19Add space after commastb2-6/+6
2024-05-19KNF for dh_err and dsa_errtb2-63/+59
2024-05-19remove prototypes with no matching functionjsg8-39/+9
feedback and ok tb@
2024-05-18remove extern with no matching var; ok tb@jsg1-2/+1
2024-05-18remove prototypes with no matching function; ok tb@jsg3-6/+3
2024-05-17asn1_str2tag(): no need for tntmp to be statictb1-2/+3
2024-05-17The long primitive function table can be consttb1-2/+2
2024-05-17The bignum primitive function table (bignum_pf) can be consttb1-2/+2
2024-05-16x509_v3.c: remove superfluous parenthesestb1-39/+39
No change in the generated assembly
2024-05-16SSL_CTX_set_keylog_callback: copy-paste error _set_ -> _get_tb1-3/+3
2024-05-15Improve X509V3_get0_uids() documentationtb1-11/+19
Use less horrcble variable names and make it explicit that both output arguments are allowed to be NULL.
2024-05-15X509_check_akid: zap stray spacetb1-2/+2