From bf7b88a9914343808cc010487bc7461296a45499 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sun, 4 Jul 2021 08:49:26 -0400 Subject: Explicitly tls_handshake(3) in ircPrintCert Otherwise we won't have any certificate to print yet, as reported by Klemens Nanni. Fixes 981ebc4f12b88fbf52ed0352428a0612dd2c2568. --- irc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/irc.c b/irc.c index dc40201..5f14c9e 100644 --- a/irc.c +++ b/irc.c @@ -166,6 +166,12 @@ int ircConnect(const char *bindHost, const char *host, const char *port) { } void ircPrintCert(void) { + int error; + do { + error = tls_handshake(client); + } while (error == TLS_WANT_POLLIN || error == TLS_WANT_POLLOUT); + if (error) errx(EX_PROTOCOL, "tls_handshake: %s", tls_error(client)); + size_t len; const byte *pem = tls_peer_cert_chain_pem(client, &len); printf("subject= %s\n", tls_peer_cert_subject(client)); -- cgit 1.4.1 collaborative ASCII art
about summary refs log tree commit diff homepage
path: root/meta.c (unfollow)
Commit message (Expand)Author
2018-03-05Generate tagsJune McEnroe
2017-10-03Simplify Makefile with pattern ruleJune McEnroe
2017-09-27Remove leading blank linesJune McEnroe
2017-09-27Add merge.c to READMEJune McEnroe
2017-09-03Assert client coords are valid after movementJune McEnroe
2017-09-03Relicense AGPLJune McEnroe
2017-09-01Revert "Add client readOnly mode"June McEnroe
2017-09-01Remove clientRemove call from clientCastJune McEnroe
2017-09-01Add client readOnly modeJune McEnroe
2017-08-31Clean up merge toolJune McEnroe
2017-08-31Choose B for tiles with equal modify timesJune McEnroe
2017-08-31Add quick data file merge toolJune McEnroe
2017-08-30Use only foreground color for selecting spawnJune McEnroe
2017-08-29Add four additional spawnsJune McEnroe
2017-08-28Add respawningJune McEnroe
2017-08-26Move license above includesJune McEnroe
2017-08-26Snapshot metadataJune McEnroe
2017-08-26Add meta.c to READMEJune McEnroe
2017-08-26Use MakefileJune McEnroe