SSL_GET_HANDSHAKE_RTT(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸ’… 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 ServerFinished in TLS 1.3 and ServerHelloDone in 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 ClientHello and early data (if any)
  • the other is taken when client is done reading the server's response β€” that's after ServerFinished in TLS 1.3 and after ServerHelloDone in 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 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