summaryrefslogtreecommitdiff
path: root/usr.sbin/ikectl
AgeCommit message (Collapse)Author
2024-12-12Do not hardcode the CRL lifetime for "ikectl revoke" to 365 days. This valuePascal Stumpf
is supposed to be configurable via ikeca.cnf. ok tobhe@, "probably ok" sthen@
2024-11-21Convert simple stuff in usr.sbin over to new imsgbuf_init behaviourClaudio Jeker
OK tb@
2024-11-21Unify error reporting in various control programs.Claudio Jeker
Just use "read error" since the code also uses "write error" for the imsg_flush case. OK tb@
2024-11-21Convert the common imsgbuf_read calls to the post EAGAIN world.Claudio Jeker
OK tb@
2024-11-21Rename imsg_init, imsg_clear, imsg_read, imsg_write and imsg_flush toClaudio Jeker
imsgbuf_init, imsgbuf_clear, imsgbuf_read, imsgbuf_write and imsgbuf_flush. This separates the imsgbuf API from the per-imsg API. OK tb@
2024-11-21Use imsg_flush() instead of implementing the same by hand.Claudio Jeker
OK tb@
2024-05-21remove prototypes with no matching function and externs with no varJonathan Gray
partly checked by millert@
2023-11-17Set "unique_subject = no" to allow renewing expired certificates.Tobias Heider
Without this, openssl throws an error when creating a second req for the same subject which leads to ikectl deleting the old cert without creating a new one. Reported by Ryan Kavanagh in openiked-portable here: https://github.com/openiked/openiked-portable/issues/125 discussed with tb@ ok patrick@
2022-12-04Rename sun to s_un for portability.Tobias Heider
ok patrick@
2022-12-03Consistently use uintXX_t from <stdint.h> instead of u_intXX_t.Tobias Heider
2022-09-19Add iked connection statistics for successful and failed connections, commonTobias Heider
error types and other events that help analyze errors in larger setups. The counters can be printed with 'ikectl show stats'. ok bluhm@ patrick@ from and ok markus@
2022-03-31man pages: add missing commas between subordinate and main clausesChristian Weisgerber
jmc@ dislikes a comma before "then" in a conditional, so leave those untouched. ok jmc@
2021-11-21Add 'ikectl show certinfo' to show trusted CAs and certificates.Tobias Heider
This helps debug authentication issues with x509 certificates. ok markus@
2021-01-23Handle write() errors.tobhe
ok patrick@
2021-01-23Handle errors and truncated output from snprintf().tobhe
ok patrick@
2020-06-10Cast imsg->data to char pointer to silence GCC warningkn
warning: format '%s' expects type 'char *', but argument 2 has type 'void *' Seen on sparc64. OK tobhe
2020-04-25Document 'ikectl show sa'.tobhe
2020-03-22Add 'ikectl show sa' command to print information about the state oftobhe
negotiated IKE SAs, their Child SAs and resulting IPsec flows. ok patrick@
2020-03-18Add 'ikectl reset id <ID>' command to reset all SAs from policies withtobhe
matching destination ID. ok patrick@ markus@
2019-05-08convert system() calls to an execv() like interface.Ted Unangst
avoids sh difficulties, etc. from Matthew Martin. ok deraadt reyk
2019-02-26ikectl's built-in CA command for simple configurations has a fixed certificateStuart Henderson
validity for the ca certificate. Raise this from 365 days to 4500 as expiry means installing new CA certificates on all client machines which can cause significant pain. This doesn't change the default validity for server certificates which remains at 1 year (controlled by ikeca.cnf) - refreshing key and certificate on these can be done easily without visiting all machines. ok deraadt@
2018-06-18fix memory leak: freeaddrinfo() the data from getaddrinfo().Sebastian Benoit
From Thomas Barabosch <thomas DOT barabosch AT fkie DOT fraunhofer DOT de> Thanks. ok jca@
2017-11-08Since r1.41 the extensions are included in the CSR. Thus ca_request()Patrick Wildt
already sets the extension values and returns. ca_sign() re-uses the information to write out the extension file. Since ca_request() uses strings stored on the stack, on return the pointers to those strings will be unusable. To fix this, strdup() the strings passed ca_setenv() so we can re-use them in another scope. And free() them when we clear the environment in ca_clrenv(). Initial report and diff from Andrei-Marius Radu. ok markus@
2017-06-08Invoke openssl with -passin file rather than -key in ca_revoke().Jonathan Gray
From Andrei-Marius Radu via sthen@
2017-05-31ca_revoke() gets called two ways. Directly from ca_opt() with keynameJonathan Gray
set to the cert to revoke, and indirectly from ca_create() with a keyname set to NULL. ca_create() sets REQ_EXT so avoid setting it in ca_revoke() when keyname is NULL and the crl database is being initialised. Avoids "REQ_EXT already set" when creating a CA error introduced in rev 1.44 which set REQ_EXT unconditionally in ca_revoke().
2017-05-24Set REQ_EXT in req section so ikectl ca certificate revoke will work again.Jonathan Gray
2017-05-21A few more freezero() usesTheo de Raadt
ok yasuoka mikeb
2017-03-29set REQ_EXT to x509v3_CA, fixing "ikectl ca XX create" inadvertently brokenStuart Henderson
in r1.41. ok reyk deraadt
2017-01-31Teach ikectl to include extensions in the CSR, rather than just adding themStuart Henderson
when signing the certificates by the local CA. This can make things easier if you want to take a CSR from ikectl to another CA for signing, they often copy extensions from the request. ok reyk@
2016-09-11Files in /etc/ssl belong to root. ok deraadtMartin Natano
2016-06-14Remove unused variable, found by clangReyk Floeter
2016-03-01add LIBCRYPTO to DPADDGleydson Soares
OK deraadt@ mikeb@
2015-12-05EAGAIN handling for imsg_read. OK henning@ benno@Claudio Jeker
2015-11-10With ikectl now requiring ca specific sections not present in theJonathan Gray
general openssl cnf files install the ikeca.cnf file. ok sthen@ requested by reyk@
2015-11-06Use pledge in ikectl. For now one request for sending imsgs to ikedJonathan Gray
another request for the ca portion. ok deraadt@
2015-11-02switch from using sha1 to sha256Jonathan Gray
As the ca section of the cnf file requires a default_md line (unlike req) this change also requires updating the installed ikeca.cnf or equivalent files. Requested by and ok reyk@ who also tested this against ios9 with iked.
2015-11-02sign csrs with openssl ca instead of x509 -reqJonathan Gray
This way openssl will add valid signed certs to the index file which is required to use the builtin openssl OCSP server. This change requires installing a new ikeca.cnf or updating the default cnf files with equivalent sections. Requested by and ok reyk@
2015-11-02sign csrs with openssl ca instead of x509 -reqJonathan Gray
This way openssl will add valid signed certs to the index file which is required to use the builtin openssl OCSP server. This change requires installing a new ikeca.cnf or updating the default cnf files with equivalent sections. Requested by and ok reyk@
2015-11-02Accept an ocsp option when creating certificates to set the extendedJonathan Gray
key usage for OCSP signing. Requested by and ok reyk@
2015-09-07append a slash immediately after a file system path that is a directory;Igor Sobrado
uppercase the description of /var/run/iked.sock (found by jmc@); add missing full stop. ok jmc@
2015-08-19ca_hier() und ca_newpass() abort on failure, return void instead of int.Reyk Floeter
Based on previous observation by semarie@
2015-08-19spacingReyk Floeter
2015-08-19fcopy_env() should return void as it aborts on failure.Reyk Floeter
Pointed out by semarie@
2015-08-19Use C99 integer types in ikectl(8).Reyk Floeter
OK jsg@
2015-08-19Support for overwriting $ENV:: variables in OpenSSL .cnf files fromReyk Floeter
the environment has been removed in LibreSSL. This was a good step but it unintentionally broke the "ikectl ca" commands. Rework the implementation for copying the .cnf files and expanding the $ENV:: variables ourselves before passing the generated .cnf file to the "openssl" command. Reported and tested by Jona Joachim (thanks!) OK jsg@
2015-08-15correct mode_t 644 to 0644Sebastien Marie
ok sthen@
2015-08-15corrects three err() to errx() callsSebastien Marie
- a if condition don't set errno - strlcpy(3) don't set errno (no mention is man page) - ca_readpass() already manage errno error message with warn(3) ok sthen@
2015-07-27use file system path (.Pa) semantic markup macros where appropriate.Igor Sobrado
ok jmc@
2015-06-11Use "compliant" header guards by avoiding the reserved '_' namespace.Reyk Floeter
Pointed out by Markus Elfring OK mikeb@ millert@
2015-02-28Reduce usage of predefined strings in manpages.Anthony J. Bentley
Predefined strings are not very portable across troff implementations, and they make the source much harder to read. Usually the intended character can be written directly. No output changes, except for two instances where the incorrect escape was used in the first place. tweaks + ok schwarze@