summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2024-06-12piuid, psuid -> issuerUID, subjectUIDTheo Buehler
2024-06-11reentrant functions were not in 386BSDJonathan Gray
spotted by and ok deraadt@
2024-06-11sync includes in tls_signer.cOmar Polo
pthread -> mutex stdint -> uint8_t stdio.h -> asprintf stdlib.h -> calloc string.h -> memcpy ecdsa -> ECDSA_METHOD leftover, remove ec -> EC_KEY evp -> EVP_PKEY pem -> PEM_read_bio_X509 x509 -> X509 90% of the diff is from tb@, I only spotted the missing string.h :) ok tb@
2024-06-07Align documentation with realityJob Snijders
OK tb@
2024-06-07Fix non-xsc path in x509_verify_potential_parent()Theo Buehler
The combination of two bugs made this unexpectedly work as intended. To appreciate this, let's first note that a) check_issued(..., child, parent) checks if child was issued by parent. b) X509_check_issued(child, parent) checks if parent was issued by child. Now like in the real world, b) will only be true in unusual circumstances (child is known not to be self-issued at this point). X509_check_issued() fails by returning something different from X509_V_OK, so return X509_check_issued(child, parent) != X509_V_OK; will return true if child was issued by parent since then parent was indeed not issued by child. On the other hand, if child was not issued by parent, the verifier will notice elsewhere, e.g., in a signature check. Fix this by reversing the order of child and parent in the above return line and check for equality instead. This is nearly impossible to detect in regress. ok beck
2024-06-07Call out argument reversal between check_issued() and X509_check_issued()Theo Buehler
It's a trap!
2024-06-06ssl_tlsext: fix uninitialized variable warning with gccTheo Buehler
This is a false positive but as is well-known, gcc is terrible at understanding conditionally initialized variables and it is tedious to explain this to downstream maintainers who look at warnings. ok miod
2024-06-05Revert __bounded__ hack in chacha-merged.cTheo Buehler
Thanks to Viktor Szakats for figuring out that stdint.h was missing in the portable tarballs.
2024-06-04enable -fret-clean on amd64, for libc libcrypto ld.so kernel, and all theTheo de Raadt
ssh tools. The dynamic objects are entirely ret-clean, static binaries will contain a blend of cleaning and non-cleaning callers.
2024-06-01md4/ripemd: remove misplaced semicolonsTheo Buehler
2024-06-01Neuter the bounded attribute as was done elsewhere for portableTheo Buehler
2024-06-01Remove mention of SHA-0, update STANDARDS sectionTheo Buehler
2024-06-01Missed SHA224() in previous: reverse order of attributesTheo Buehler
2024-06-01Reverse order of attributesTheo Buehler
requested by jsing on review
2024-06-01Remove support for static buffers in HMAC/digestsTheo Buehler
HMAC() and the one-step digests used to support passing a NULL buffer and would return the digest in a static buffer. This design is firmly from the nineties, not thread safe and it saves callers a single line. The few ports that used to rely this were fixed with patches sent to non-hostile (and non-dead) upstreams. It's early enough in the release cycle that remaining uses hidden from the compiler should be caught, at least the ones that matter. There won't be that many since BoringSSL removed this feature in 2017. https://boringssl-review.googlesource.com/14528 Add non-null attributes to the headers and add a few missing bounded attributes. ok beck jsing
2024-05-29Fix i2d_ASN1_OBJECT()Theo Buehler
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 errorTheo Buehler
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()Theo Buehler
2024-05-28Clean up and fix X509V3_EXT_add1_i2d()Theo Buehler
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-28remove outdated zlib version informationTheo Buehler
from jan stary fine with jmc
2024-05-27remove unused typedefs with structs that were removedJonathan Gray
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 hashesTheo Buehler
This functionality will be removed, so stop documenting it. Instead mention that another implementation still supports this.
2024-05-25sync inclusion of <stdlib.h> from libcryptoTheo Buehler
2024-05-25Include <stdint.h> in the bytestring .c filesTheo Buehler
They currently depend on bytestring.h pulling that in. discussed with jsing
2024-05-24des_local.h: Remove some unused macrosTheo Buehler
2024-05-24Remove documentation of DES_enc_{read,write} and DES_rw_modeTheo Buehler
ok jsing
2024-05-24Stub out DES_enc_{read,write}(3)Theo Buehler
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-24sndiod: Propagate the controls' display string to clients.Alexandre Ratchov
with help from edd@ and armani@
2024-05-24sndio: Add a display string to the sioctl_open APIAlexandre Ratchov
For hardware devices, add a server.device control with a single item and the device name as display string. Add the necessary sndioctl(1) bits to print it.
2024-05-23Make signature of SSL_COMP_add_compression_method(3) match realityTheo Buehler
2024-05-23x509_v3.c: indent labelsTheo Buehler
2024-05-23x509_v3.c: remove an unnecessary elseTheo Buehler
2024-05-23x509_v3.c: consistently call STACK_OF(X509_EXTENSIONS) arguments skTheo Buehler
(where it doesn't conflict with a local variable)
2024-05-23x509_v3.c: zap another pointless local variableTheo Buehler
2024-05-23x509_v3.c: add a few empty linesTheo Buehler
2024-05-23X509v3_get_ext_by_NID: make obj const, test & assignTheo Buehler
2024-05-23x509_v3.c: remove a pointless local variableTheo Buehler
2024-05-23x509_v3.c: mechanically replace ex with ext and new_ex with new_extTheo Buehler
2024-05-22Fix in-place decryption for EVP_chacha20_poly1305()Theo Buehler
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)Theo Buehler
2024-05-22Fix incorrect X509v3_get_ext_by_NID(3) return valuesTheo Buehler
This error comes from upstream, where it is still wrong.
2024-05-21remove prototypes with no matching functionJonathan Gray
2024-05-21remove prototypes with no matching function; ok ratchov@Jonathan Gray
2024-05-20cmac: zero_iv should be constTheo Buehler
2024-05-19unwrap a lineTheo Buehler
2024-05-19Add space after commasTheo Buehler
2024-05-19KNF for dh_err and dsa_errTheo Buehler
2024-05-19remove prototypes with no matching functionJonathan Gray
feedback and ok tb@
2024-05-18Add pathconfat(2): pathconf(2) but with at-fd and flags arguments,Philip Guenther
the latter supporting the ability to get timestamp resolution of symlinks. ok deraadt@ millert@
2024-05-17asn1_str2tag(): no need for tntmp to be staticTheo Buehler