SSL_GET_HANDSHAKE_RTT(3SSL)
๐ SSL_GET_HANDSHAKE_RTT ๐
okay bestie, gather round, because today we're talking about SSL_get_handshake_rtt from the OpenSSL manuals (that's the 3SSL girlies, you know the vibe) โจ
๐ธ NAME ๐ธ
SSL_get_handshake_rtt โ get the round trip time for the SSL Handshake ๐ฐ๏ธ๐ซ
๐ SYNOPSIS ๐
#include <openssl/ssl.h>
int SSL_get_handshake_rtt(const SSL *s, uint64_t *rtt);
๐ฆ DESCRIPTION ๐ฆ
So SSL_get_handshake_rtt() goes and grabs the round-trip time (RTT) for your ssl, like, the whole journey there and back ๐๐จ
And the units? microseconds (us), stored as a uint64_t data type. Tiny units, big feelings. No cap ๐
โญ NOTES โญ
Okay so here's the tea โ โ this metric is made by taking two timestamps during the handshake and giving you the difference between those two times. Two little clock-pokes, one lil subtraction, slay โจ
๐ When you're the server ๐
One timestamp gets taken when the server is finished writing to the client. That's during the ServerFinished in TLS 1.3 and ServerHelloDone in TLS 1.2. The other timestamp gets taken when the server is done reading the client's response โ which is after the client has responded with ClientFinished. Two stamps, that's it, iconic ๐ฎ
๐ง When you're the client ๐ง
One timestamp gets taken when the client is finished writing the ClientHello and early data (if any). The other one gets taken when the client is done reading the server's response โ which is after ServerFinished in TLS 1.3 and after ServerHelloDone in TLS 1.2. Symmetry? We love to see it ๐
๐ The reality check ๐
ngl bestie, this number is not just "the network". In addition to network propagation delay and network stack overhead, this metric includes processing time on both endpoints โ because it's based on TLS protocol-level messages, and the TLS protocol was not designed to measure network timings. In some cases that processing time can be significant, especially when the processing includes asymmetric cryptographic operations. so likeโฆ don't cite this in your physics paper okay ๐ญ
๐ซถ RETURN VALUES ๐ซถ
1โ yay!! the TLS handshake RTT was successfully retrieved ๐0โ the TLS handshake RTT cannot be determined yet, bestie, be patient โณ-1โ an error occurred while retrieving the TLS handshake RTT ๐ญ๐
๐ HISTORY ๐
This function was added in OpenSSL 3.2. baby girl is new here, be nice to her ๐ฅบ
๐ COPYRIGHT ๐
Copyright 2023-2024 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
and that's the whole page, babe ๐
โจ version 4.0.3, dated 2026-09-29 โ go forth and measure those round trips responsibly, mwah ๐๐ฆ
๐ฆ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 ยท Apache-2.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms