SSL_get_handshake_rtt.3ossl 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. .\" -*- mode: troff; coding: utf-8 -*-
  2. .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
  3. .\"
  4. .\" Standard preamble:
  5. .\" ========================================================================
  6. .de Sp \" Vertical space (when we can't use .PP)
  7. .if t .sp .5v
  8. .if n .sp
  9. ..
  10. .de Vb \" Begin verbatim text
  11. .ft CW
  12. .nf
  13. .ne \\$1
  14. ..
  15. .de Ve \" End verbatim text
  16. .ft R
  17. .fi
  18. ..
  19. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
  20. .ie n \{\
  21. . ds C` ""
  22. . ds C' ""
  23. 'br\}
  24. .el\{\
  25. . ds C`
  26. . ds C'
  27. 'br\}
  28. .\"
  29. .\" Escape single quotes in literal strings from groff's Unicode transform.
  30. .ie \n(.g .ds Aq \(aq
  31. .el .ds Aq '
  32. .\"
  33. .\" If the F register is >0, we'll generate index entries on stderr for
  34. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  35. .\" entries marked with X<> in POD. Of course, you'll have to process the
  36. .\" output yourself in some meaningful fashion.
  37. .\"
  38. .\" Avoid warning from groff about undefined register 'F'.
  39. .de IX
  40. ..
  41. .nr rF 0
  42. .if \n(.g .if rF .nr rF 1
  43. .if (\n(rF:(\n(.g==0)) \{\
  44. . if \nF \{\
  45. . de IX
  46. . tm Index:\\$1\t\\n%\t"\\$2"
  47. ..
  48. . if !\nF==2 \{\
  49. . nr % 0
  50. . nr F 2
  51. . \}
  52. . \}
  53. .\}
  54. .rr rF
  55. .\" ========================================================================
  56. .\"
  57. .IX Title "SSL_GET_HANDSHAKE_RTT 3ossl"
  58. .TH SSL_GET_HANDSHAKE_RTT 3ossl 2025-01-17 3.4.0 OpenSSL
  59. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  60. .\" way too many mistakes in technical documents.
  61. .if n .ad l
  62. .nh
  63. .SH NAME
  64. SSL_get_handshake_rtt
  65. \&\- get round trip time for SSL Handshake
  66. .SH SYNOPSIS
  67. .IX Header "SYNOPSIS"
  68. .Vb 1
  69. \& #include <openssl/ssl.h>
  70. \&
  71. \& int SSL_get_handshake_rtt(const SSL *s, uint64_t *rtt);
  72. .Ve
  73. .SH DESCRIPTION
  74. .IX Header "DESCRIPTION"
  75. \&\fBSSL_get_handshake_rtt()\fR retrieves the round-trip time (RTT) for \fIssl\fR.
  76. .PP
  77. This metric is represented in microseconds (us) as a uint64_t data type.
  78. .SH NOTES
  79. .IX Header "NOTES"
  80. This metric is created by taking two timestamps during the handshake and
  81. providing the difference between these two times.
  82. .PP
  83. When acting as the server, one timestamp is taken when the server is finished
  84. writing to the client. This is during the ServerFinished in TLS 1.3 and
  85. ServerHelloDone in TLS 1.2. The other timestamp is taken when the server is
  86. done reading the client's response. This is after the client has responded
  87. with ClientFinished.
  88. .PP
  89. When acting as the client, one timestamp is taken when the client is finished
  90. writing the ClientHello and early data (if any). The other is taken when
  91. client is done reading the server's response. This is after ServerFinished in
  92. TLS 1.3 and after ServerHelloDone in TLS 1.2.
  93. .PP
  94. In addition to network propagation delay and network stack overhead, this
  95. metric includes processing time on both endpoints, as this is based on TLS
  96. protocol-level messages and the TLS protocol is not designed to measure
  97. network timings. In some cases the processing time can be significant,
  98. especially when the processing includes asymmetric cryptographic operations.
  99. .SH "RETURN VALUES"
  100. .IX Header "RETURN VALUES"
  101. Returns 1 if the TLS handshake RTT is successfully retrieved.
  102. Returns 0 if the TLS handshake RTT cannot be determined yet.
  103. Returns \-1 if, while retrieving the TLS handshake RTT, an error occurs.
  104. .SH COPYRIGHT
  105. .IX Header "COPYRIGHT"
  106. Copyright 2023 The OpenSSL Project Authors. All Rights Reserved.
  107. .PP
  108. Licensed under the Apache License 2.0 (the "License"). You may not use
  109. this file except in compliance with the License. You can obtain a copy
  110. in the file LICENSE in the source distribution or at
  111. <https://www.openssl.org/source/license.html>.