.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "TSSSLSESSION" "3ts" "Nov 02, 2023" "9.2" "Apache Traffic Server" .SH NAME TSSslSession \- TSSslSession API function .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C #include .ft P .fi .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fI\%TSSslSession\fP TSSslSessionGet(const \fI\%TSSslSessionID\fP *sessionid) .UNINDENT .INDENT 0.0 .TP .B int TSSslSessionGetBuffer(const \fI\%TSSslSessionID\fP *sessionid, char *buffer, int *len_ptr) .UNINDENT .INDENT 0.0 .TP .B \fI\%TSReturnCode\fP TSSslSessionInsert(const \fI\%TSSslSessionID\fP *sessionid, \fI\%TSSslSession\fP addSession, \fI\%TSSslConnection\fP ssl_conn) .UNINDENT .INDENT 0.0 .TP .B \fI\%TSReturnCode\fP TSSslSessionRemove(const \fI\%TSSslSessionID\fP *sessionid) .UNINDENT .INDENT 0.0 .TP .B void TSSslTicketKeyUpdate(char *ticketData, int ticketDataLength) .UNINDENT .SH DESCRIPTION .sp These functions work with the internal ATS session cache. These functions are only useful if the ATS internal session cache is enabled by setting \fI\%proxy.config.ssl.session_cache\fP has been set to 2. .sp These functions tend to be used with the \fI\%TS_SSL_SESSION_HOOK\fP\&. .sp The functions work with the \fI\%TSSslSessionID\fP object to identify sessions to retrieve, insert, or delete. .sp The functions also work with the \fI\%TSSslSession\fP object which can be cast to a pointer to the OpenSSL SSL_SESSION object. .sp These functions perform the appropriate locking on the session cache to avoid errors. .sp The \fI\%TSSslSessionGet()\fP and \fI\%TSSslSessionGetBuffer()\fP functions retrieve the \fI\%TSSslSession\fP object that is identified by the \fI\%TSSslSessionID\fP object. If there is no matching session object, \fI\%TSSslSessionGet()\fP returns NULL and \fI\%TSSslSessionGetBuffer()\fP returns 0. .sp \fI\%TSSslSessionGetBuffer()\fP returns the session information serialized in a buffer that can be shared between processes. When the function is called len_ptr should point to the amount of space available in the buffer parameter. The function returns the amount of data really needed to encode the session. len_ptr is updated with the amount of data actually stored in the buffer. \fI\%TSSslSessionGetBuffer()\fP will not overrun the provided buffer, but the caller should ensure that the data\(aqs size was not larger than the buffer by comparing the returned value with the value of len_ptr. If the returned value is larger than the buffer size, then the session data did not fit in the buffer and the session data stored in the buffer output variable should not be used. .sp \fI\%TSSslSessionInsert()\fP inserts the session specified by the addSession parameter into the ATS session cache under the sessionid key. If there is already an entry in the cache for the session id key, it is first removed before the new entry is added. .sp \fI\%TSSslSessionRemove()\fP removes the session entry from the session cache that is keyed by sessionid. .sp \fI\%TSSslTicketKeyUpdate()\fP updates the running ATS process to use a new set of Session Ticket Encryption keys. This behaves the same way as updating the session ticket encrypt key file with new data and reloading the current ATS process. However, this API does not require writing session ticket encryption keys to disk. .sp If both the ticket key files and \fI\%TSSslTicketKeyUpdate()\fP are used to update session ticket encryption keys, ATS will use the most recent update regardless if whether it was made by file and configuration reload or API. .SH COPYRIGHT 2023, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .