SSL_GET_HANDSHAKE_RTT(3ossl)
π SSL_GET_HANDSHAKE_RTT π
okay so bestie, welcome to the SSL_GET_HANDSHAKE_RTT(3ossl) page β yes that's the 3ossl manual, we're in OpenSSL land now, put ur hair up π
β¨ NAME β¨
SSL_get_handshake_rtt β get the round trip time for the SSL handshake, literally what it says on the tin π¦
πΈ SYNOPSIS πΈ
#include <openssl/ssl.h>
int SSL_get_handshake_rtt(const SSL *s, uint64_t *rtt);
π DESCRIPTION π
SSL_get_handshake_rtt() retrieves the round-trip time (RTT) for ssl. no cap, that's the whole vibe π«Ά
This metric is represented in microseconds (us) as a uint64_t data type β so yeah, micro, not milli, don't come for me π
π₯ NOTES π₯
so how does this number even get made? it's created by taking two timestamps during the handshake and providing the difference between these two times. iconic little subtraction moment β
when ur the server π
- one timestamp is taken when the server is finished writing to the client β that's during the
ServerFinishedin TLS 1.3 andServerHelloDonein TLS 1.2 - the other timestamp is taken when the server is done reading the client's response β that's after the client has responded with
ClientFinished
when ur the client π§
- one timestamp is taken when the client is finished writing the
ClientHelloand early data (if any) - the other is taken when client is done reading the server's response β that's after
ServerFinishedin TLS 1.3 and afterServerHelloDonein TLS 1.2
β οΈ okay real talk, important caveat: 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 is not designed to measure network timings. in some cases the processing time can be significant, especially when the processing includes asymmetric cryptographic operations. so likeβ¦ don't @ me if the number looks kinda chunky, it's not pure network, periodt π
π RETURN VALUES π
1β yay, the TLS handshake RTT is successfully retrieved β¨0β the TLS handshake RTT cannot be determined yet, chill, it's not ready π-1β while retrieving the TLS handshake RTT, an error occurs π
β HISTORY β
This function was added in OpenSSL 3.2. she's new-ish but she ate π
π 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>.
k bye bestie, mwah π β this was 3.5.0, dated 2026-09-25, SSL_GET_HANDSHAKE_RTT(3ossl), go measure some round trips π¦πΈ
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms