summaryrefslogtreecommitdiff
path: root/usr.sbin/ocspcheck
AgeCommit message (Collapse)Author
2022-12-28spelling fixes; from paul tagliamonteJason McIntyre
any parts of his diff not taken are noted on tech
2022-12-15The argument to ctype functions must be EOF or representable as anFlorian Obser
unsigned char. Casting to int is particularly useless because that's what the compiler already does. We need to prevent sign extension, not write down that we want sign extension. OK deraadt, kn, miod, op
2021-09-14Add missing void to definition of http_init().Theo Buehler
ok deraadt florian
2021-07-14Remove unneeded calls to tls_init(3)kn
As per the manual and lib/libtls/tls.c revision 1.79 from 2018 "Automatically handle library initialisation for libtls." initialisation is handled automatically by other tls_*(3) functions. Remove explicit tls_init() calls from base to not give the impression of it being needed. Feedback tb OK Tests mestre
2021-07-12Change the error reporting pattern throughout the tree when unveilBob Beck
fails to report the path that the failure occured on. Suggested by deraadt@ after some tech discussion. Work done and verified by Ashton Fagg <ashton@fagg.id.au> ok deraadt@ semarie@ claudio@
2021-02-09Walk over all results from getaddrinfo() instead of giving up after theClaudio Jeker
first entry. This way ocspcheck will try all returned IPs to contact the OCSP server. Found by the regress test and a resolv.conf file with 'family inet6 inet4'. OK kn@ deraadt@
2020-10-16Refactor a bunch of oscpcheck for single return to clean it up,Bob Beck
and add the ability to parse a port in the specified ocsp url. Since this will now pass them, enable regress tests previously committed for ocspcheck. mostly by me with some cleanup by tb after an obvious yak was found to shave in the OCSP routines in libcrypto ok tb@
2020-09-04Ignore ftruncate failure with errno == EAGAINTheo Buehler
This makes piping the OCSP response to other programs with -o - work. input and r+ guenther
2020-01-23The X509_LOOKUP code tries to grope around in /etc/ssl/cert/ to findTheo Buehler
CA certs it couldn't find otherwise. This may lead to a pledge rpath violation reported by Kor, son of Rynar. Unfortunately, providing certs inside a directory is common in linuxes, so we need to keep this functionality for portable. Check if /etc/ssl/cert.pem and /etc/ssl/cert exist and pledge accordingly. Add unveils to restrict this program further on a default OpenBSD install. Fix -C to look only inside the provided root bundle. Input from jsing and sthen, tests by sthen and Kor ok beck, jsing, sthen (after much back and forth)
2020-01-11Set "Content-Type: application/ocsp-request" in ocspcheck(1)'s POSTs,Stuart Henderson
it is required by the RFC and some CAs require it (e.g. sectigo). From daharmasterkor at gmail com, ok jca@
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2019-05-15check result of ftruncate() as we do write() belowBrent Cook
ok beck@
2018-11-29update for libtls default cert changes.Ted Unangst
bonus: this exposed a few missing const qualifiers.
2018-11-06Use TLS_CA_CERT_FILE instead of a separate define.Joel Sing
ok beck@ bluhm@ tb@
2017-12-01Avoid using an uninitialized variable.Visa Hankala
Found by gcc. OK jca@
2017-11-29add -i to SYNOPSIS/usage() and sundry tweaks;Jason McIntyre
ok beck
2017-11-28Add option -i to allow oscpcheck to be used to validate an on-disk stapleBob Beck
ok claudio@ benno@
2017-10-17add missing HISTORY; based on CVS logs and release announcementsIngo Schwarze
2017-05-08Print size_t's correctly.Bob Beck
Fix from Jonas 'Sortie' Termansen <sortie@maxsi.org>
2017-05-07Limit -Werror to gcc4 as was done in libcrypto/libssl/libtls to avoidJonathan Gray
failed builds with different compilers. ok jsing@
2017-03-27repair knf & whitespace that jumped out of the screen during reviewTheo de Raadt
ok beck
2017-03-27use a path of "/" if the URL does not include a trailing / - sinceBob Beck
the web server probably doesn't like it, even though you published the url without the trailing / in the certificate. (hello digicert!) ok claudio@
2017-03-27Fail early if an ocep server returns a non-200 http response, there is noBob Beck
point in trying to parse error pages as an ocsp response.
2017-03-26recallocarray() for data buffer from the net.Theo de Raadt
ok beck
2017-02-25pledge stdio before parsing the http responseBob Beck
ok tb@
2017-02-20Add missing $OpenBSD$Bob Beck
2017-02-03Don't use <sys/param.h> from userland without cause. Sort <sys/*>Philip Guenther
before other includes per style(9) while we're here. ok florian@ bcook@ jsing@ beck@
2017-02-01netinet/in.h should be included, and freebsd and some othersBob Beck
don't have EAI_NODATA, so make this easier for people from bernard spill
2017-01-26oscp -> ocsp;Jason McIntyre
from holger mikolon, plus one more in nc;
2017-01-26Use numeric exit codes consistently rather than a mixBob Beck
ok jsing@
2017-01-26styleBob Beck
2017-01-26Fix the structure initialzation to compile. bad inioguchi and millert :)Bob Beck
ok jsing@ rpe@
2017-01-25Fix array initialization syntax for ocspcheck.cKinichiro Inoguchi
Conformance to C99, and avoiding build break on VisualStudio and HP-UX. OK millert@
2017-01-25remove __BEGIN_DECLS and __END_DECLS from http.hKinichiro Inoguchi
sync with ocspcheck and acme-client ok benno@
2017-01-25bring changes from acme-client over here.Sebastian Benoit
ok beck@
2017-01-24correct usage format; ok beck claudio bennoTheo de Raadt
2017-01-24fix mode on open() and ftruncate(), noticed byBob Beck
bcook@
2017-01-24Say no to two line error messages on failureBob Beck
2017-01-24s/returns/exits/Bob Beck
2017-01-24Break run-on sentence into two.Bob Beck
2017-01-24string terminator is called a NULTheo de Raadt
2017-01-24Actually load the cafile when providede, and error message cleanupBob Beck
2017-01-24use warn, I have errno here. noticed by theoBob Beck
2017-01-24Yes the "if (const == val" idiom provides some safety, but it grates onTheo de Raadt
us too much. ok beck jsing
2017-01-24knfBob Beck
2017-01-24revert accidental commit of theo diffBob Beck
2017-01-24Just don't bother with OpenSSL error strings, they are mostlyBob Beck
irrelevant and look gross here anyway.. we don't need them
2017-01-24various cleanup;Jason McIntyre
2017-01-24slight cleanupsTheo de Raadt
2017-01-24s/exit/exist/ typoBob Beck