TLSPOOL_CONTROL_REATTACH(3)
π TLSPOOL_CONTROL_REATTACH π
okay bestie, welcome to section 3 of the manual β Library Calls, the TLSPOOL_CONTROL_REATTACH page β¨ this one's short and sweet and it's literally about snatching a TLS session back and holding onto it, so let's get into it π«Ά
β¨ NAME β¨
tlspool_control_reattach β Detach a TLS connection from the current process
(yes babes, that's the official one-liner word-for-word β keep reading, the DESCRIPTION clears the whole vibe up π)
π¦ SYNOPSIS π¦
#include <stdint.h>
#include <tlspool/commands.h>
#include <tlspool/starttls.h>
int tlspool_control_reattach (uint8_t *ctlkey);
three includes, one function, one uint8_t * argument. that's the whole menu, no cap π
πΈ DESCRIPTION πΈ
okay so here's the tea, bestie π tlspool_control_reattach() attaches a TLS session that is currently not attached to any TLS Pool client β and it attaches it to the calling TLS Pool client. main character behaviour, honestly π
and what that means is: control connections (including ones coming from other processes and other programs) can no longer reattach that same TLS session, not until they've used tlspool_control_detach() and made the ctlkey value known to the intended recipient process. so like, the door is locked and only you have the key π
so what's ctlkey actually doing? it's the identifier, babes β the value of ctlkey is used to identify a TLS session from among the set of sessions that are not currently controlled by any TLS Pool client. it's a random byte string constructed during the tlspool_starttls(3) call. you can pass that value from the place where this call initiated the TLS session over to another process π
and now the fork situation, listen up π§ if the flag PIOF_STARTTLS_FORK is set during this operation, then the TLS session is detached immediately. without that flag? it gets attached to the current TLS Pool client. two different vibes, one flag π
okay and now the part where you have to pay attention π when the current TLS Pool client closes its connection β for instance because the last process dies that held the connection to the TLS Pool open β then all attached TLS sessions will be closed by the TLS Pool. but TLS sessions in detached state will continue to run. so, like, attached = comes down with the ship, detached = lives on π
and for the reverse move: you use the tlspool_control_detach() call to detach a TLS session from the current TLS Pool client. it also uses the ctlkey, but this time to identify the TLS session from among the set of sessions that are controlled by the current TLS Pool client. same key, different pile π
β RETURN VALUE β
0β slay, it worked, success π-1β it did not work π anderrnois set appropriately, so go read it
π AUTHOR π
Written by Rick van Rein of OpenFortress.nl, for the ARPA2.net project. iconic. no notes π«Ά
π REPORTING BUGS π
for any discussion β yes, including about bugs π β please use the mailing list found on http://lists.arpa2.org/mailman/listinfo/tls-pool. come chat, we don't bite β¨
also, please read the software distribution's README, INSTALL and TODO files for information about the tlspool-daemon implementation status π (yes, the TODO file exists for a reason, be nice)
π COPYRIGHT π
Copyright Β© 2015 Rick van Rein, ARPA2.net.
ARPA2 is funded from InternetWide.org, which in turns receives donations from various funding sources with an interest in a private and secure Internet that gives users control over their online presence. this particular project has been sponsored in part by NCSC ποΈβ¨
π SEE ALSO π
the TLS Pool API is documented in the include file <tlspool/commands.h> and <tlspool/starttls.h> for C, and the tlspool.py module for Python π
online resources may be found on the project home page, http://tlspool.arpa2.net β go snoop, iykyk π₯
and that's the whole page, bestie π brought to you by ARPA2.net, dated November 2015, living at the bottom of TLSPOOL_CONTROL_REATTACH(3) β go reattach something responsibly π
π
π¦ where this page comes from
- nixos 26.05: tlspool 0.9.7
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms