sess_id.pod 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. =pod
  2. =head1 NAME
  3. sess_id - SSL/TLS session handling utility
  4. =head1 SYNOPSIS
  5. B<openssl> B<sess_id>
  6. [B<-inform PEM|DER>]
  7. [B<-outform PEM|DER>]
  8. [B<-in filename>]
  9. [B<-out filename>]
  10. [B<-text>]
  11. [B<-noout>]
  12. [B<-context ID>]
  13. =head1 DESCRIPTION
  14. The B<sess_id> process the encoded version of the SSL session structure
  15. and optionally prints out SSL session details (for example the SSL session
  16. master key) in human readable format. Since this is a diagnostic tool that
  17. needs some knowledge of the SSL protocol to use properly, most users will
  18. not need to use it.
  19. =over 4
  20. =item B<-inform DER|PEM>
  21. This specifies the input format. The B<DER> option uses an ASN1 DER encoded
  22. format containing session details. The precise format can vary from one version
  23. to the next. The B<PEM> form is the default format: it consists of the B<DER>
  24. format base64 encoded with additional header and footer lines.
  25. =item B<-outform DER|PEM>
  26. This specifies the output format, the options have the same meaning as the
  27. B<-inform> option.
  28. =item B<-in filename>
  29. This specifies the input filename to read session information from or standard
  30. input by default.
  31. =item B<-out filename>
  32. This specifies the output filename to write session information to or standard
  33. output if this option is not specified.
  34. =item B<-text>
  35. prints out the various public or private key components in
  36. plain text in addition to the encoded version.
  37. =item B<-cert>
  38. if a certificate is present in the session it will be output using this option,
  39. if the B<-text> option is also present then it will be printed out in text form.
  40. =item B<-noout>
  41. this option prevents output of the encoded version of the session.
  42. =item B<-context ID>
  43. this option can set the session id so the output session information uses the
  44. supplied ID. The ID can be any string of characters. This option wont normally
  45. be used.
  46. =back
  47. =head1 OUTPUT
  48. Typical output:
  49. SSL-Session:
  50. Protocol : TLSv1
  51. Cipher : 0016
  52. Session-ID: 871E62626C554CE95488823752CBD5F3673A3EF3DCE9C67BD916C809914B40ED
  53. Session-ID-ctx: 01000000
  54. Master-Key: A7CEFC571974BE02CAC305269DC59F76EA9F0B180CB6642697A68251F2D2BB57E51DBBB4C7885573192AE9AEE220FACD
  55. Key-Arg : None
  56. Start Time: 948459261
  57. Timeout : 300 (sec)
  58. Verify return code 0 (ok)
  59. Theses are described below in more detail.
  60. =over 4
  61. =item B<Protocol>
  62. this is the protocol in use TLSv1, SSLv3 or SSLv2.
  63. =item B<Cipher>
  64. the cipher used this is the actual raw SSL or TLS cipher code, see the SSL
  65. or TLS specifications for more information.
  66. =item B<Session-ID>
  67. the SSL session ID in hex format.
  68. =item B<Session-ID-ctx>
  69. the session ID context in hex format.
  70. =item B<Master-Key>
  71. this is the SSL session master key.
  72. =item B<Key-Arg>
  73. the key argument, this is only used in SSL v2.
  74. =item B<Start Time>
  75. this is the session start time represented as an integer in standard Unix format.
  76. =item B<Timeout>
  77. the timeout in seconds.
  78. =item B<Verify return code>
  79. this is the return code when an SSL client certificate is verified.
  80. =back
  81. =head1 NOTES
  82. The PEM encoded session format uses the header and footer lines:
  83. -----BEGIN SSL SESSION PARAMETERS-----
  84. -----END SSL SESSION PARAMETERS-----
  85. Since the SSL session output contains the master key it is possible to read the contents
  86. of an encrypted session using this information. Therefore appropriate security precautions
  87. should be taken if the information is being output by a "real" application. This is
  88. however strongly discouraged and should only be used for debugging purposes.
  89. =head1 BUGS
  90. The cipher and start time should be printed out in human readable form.
  91. =head1 SEE ALSO
  92. L<ciphers(1)|ciphers(1)>, L<s_server(1)|s_server(1)>
  93. =cut