1*b077aed3SPierre Pronchery=pod 2*b077aed3SPierre Pronchery{- OpenSSL::safe::output_do_not_edit_headers(); -} 3*b077aed3SPierre Pronchery 4*b077aed3SPierre Pronchery=head1 NAME 5*b077aed3SPierre Pronchery 6*b077aed3SPierre Proncheryopenssl-sess_id - SSL/TLS session handling command 7*b077aed3SPierre Pronchery 8*b077aed3SPierre Pronchery=head1 SYNOPSIS 9*b077aed3SPierre Pronchery 10*b077aed3SPierre ProncheryB<openssl> B<sess_id> 11*b077aed3SPierre Pronchery[B<-help>] 12*b077aed3SPierre Pronchery[B<-inform> B<DER>|B<PEM>] 13*b077aed3SPierre Pronchery[B<-outform> B<DER>|B<PEM>|B<NSS>] 14*b077aed3SPierre Pronchery[B<-in> I<filename>] 15*b077aed3SPierre Pronchery[B<-out> I<filename>] 16*b077aed3SPierre Pronchery[B<-text>] 17*b077aed3SPierre Pronchery[B<-cert>] 18*b077aed3SPierre Pronchery[B<-noout>] 19*b077aed3SPierre Pronchery[B<-context> I<ID>] 20*b077aed3SPierre Pronchery 21*b077aed3SPierre Pronchery=head1 DESCRIPTION 22*b077aed3SPierre Pronchery 23*b077aed3SPierre ProncheryThis command processes the encoded version of the SSL session 24*b077aed3SPierre Proncherystructure and optionally prints out SSL session details (for example 25*b077aed3SPierre Proncherythe SSL session master key) in human readable format. Since this is a 26*b077aed3SPierre Proncherydiagnostic tool that needs some knowledge of the SSL protocol to use 27*b077aed3SPierre Proncheryproperly, most users will not need to use it. 28*b077aed3SPierre Pronchery 29*b077aed3SPierre ProncheryThe precise format of the data can vary across OpenSSL versions and 30*b077aed3SPierre Proncheryis not documented. 31*b077aed3SPierre Pronchery 32*b077aed3SPierre Pronchery=head1 OPTIONS 33*b077aed3SPierre Pronchery 34*b077aed3SPierre Pronchery=over 4 35*b077aed3SPierre Pronchery 36*b077aed3SPierre Pronchery=item B<-help> 37*b077aed3SPierre Pronchery 38*b077aed3SPierre ProncheryPrint out a usage message. 39*b077aed3SPierre Pronchery 40*b077aed3SPierre Pronchery=item B<-inform> B<DER>|B<PEM>, B<-outform> B<DER>|B<PEM>|B<NSS> 41*b077aed3SPierre Pronchery 42*b077aed3SPierre ProncheryThe input and output formats; the default is PEM. 43*b077aed3SPierre ProncherySee L<openssl-format-options(1)> for details. 44*b077aed3SPierre Pronchery 45*b077aed3SPierre ProncheryFor B<NSS> output, the session ID and master key are reported in NSS "keylog" 46*b077aed3SPierre Proncheryformat. 47*b077aed3SPierre Pronchery 48*b077aed3SPierre Pronchery=item B<-in> I<filename> 49*b077aed3SPierre Pronchery 50*b077aed3SPierre ProncheryThis specifies the input filename to read session information from or standard 51*b077aed3SPierre Proncheryinput by default. 52*b077aed3SPierre Pronchery 53*b077aed3SPierre Pronchery=item B<-out> I<filename> 54*b077aed3SPierre Pronchery 55*b077aed3SPierre ProncheryThis specifies the output filename to write session information to or standard 56*b077aed3SPierre Proncheryoutput if this option is not specified. 57*b077aed3SPierre Pronchery 58*b077aed3SPierre Pronchery=item B<-text> 59*b077aed3SPierre Pronchery 60*b077aed3SPierre ProncheryPrints out the various public or private key components in 61*b077aed3SPierre Proncheryplain text in addition to the encoded version. 62*b077aed3SPierre Pronchery 63*b077aed3SPierre Pronchery=item B<-cert> 64*b077aed3SPierre Pronchery 65*b077aed3SPierre ProncheryIf a certificate is present in the session it will be output using this option, 66*b077aed3SPierre Proncheryif the B<-text> option is also present then it will be printed out in text form. 67*b077aed3SPierre Pronchery 68*b077aed3SPierre Pronchery=item B<-noout> 69*b077aed3SPierre Pronchery 70*b077aed3SPierre ProncheryThis option prevents output of the encoded version of the session. 71*b077aed3SPierre Pronchery 72*b077aed3SPierre Pronchery=item B<-context> I<ID> 73*b077aed3SPierre Pronchery 74*b077aed3SPierre ProncheryThis option can set the session id so the output session information uses the 75*b077aed3SPierre Proncherysupplied ID. The ID can be any string of characters. This option won't normally 76*b077aed3SPierre Proncherybe used. 77*b077aed3SPierre Pronchery 78*b077aed3SPierre Pronchery=back 79*b077aed3SPierre Pronchery 80*b077aed3SPierre Pronchery=head1 OUTPUT 81*b077aed3SPierre Pronchery 82*b077aed3SPierre ProncheryTypical output: 83*b077aed3SPierre Pronchery 84*b077aed3SPierre Pronchery SSL-Session: 85*b077aed3SPierre Pronchery Protocol : TLSv1 86*b077aed3SPierre Pronchery Cipher : 0016 87*b077aed3SPierre Pronchery Session-ID: 871E62626C554CE95488823752CBD5F3673A3EF3DCE9C67BD916C809914B40ED 88*b077aed3SPierre Pronchery Session-ID-ctx: 01000000 89*b077aed3SPierre Pronchery Master-Key: A7CEFC571974BE02CAC305269DC59F76EA9F0B180CB6642697A68251F2D2BB57E51DBBB4C7885573192AE9AEE220FACD 90*b077aed3SPierre Pronchery Key-Arg : None 91*b077aed3SPierre Pronchery Start Time: 948459261 92*b077aed3SPierre Pronchery Timeout : 300 (sec) 93*b077aed3SPierre Pronchery Verify return code 0 (ok) 94*b077aed3SPierre Pronchery 95*b077aed3SPierre ProncheryThese are described below in more detail. 96*b077aed3SPierre Pronchery 97*b077aed3SPierre Pronchery=over 4 98*b077aed3SPierre Pronchery 99*b077aed3SPierre Pronchery=item B<Protocol> 100*b077aed3SPierre Pronchery 101*b077aed3SPierre ProncheryThis is the protocol in use TLSv1.3, TLSv1.2, TLSv1.1, TLSv1 or SSLv3. 102*b077aed3SPierre Pronchery 103*b077aed3SPierre Pronchery=item B<Cipher> 104*b077aed3SPierre Pronchery 105*b077aed3SPierre ProncheryThe cipher used this is the actual raw SSL or TLS cipher code, see the SSL 106*b077aed3SPierre Proncheryor TLS specifications for more information. 107*b077aed3SPierre Pronchery 108*b077aed3SPierre Pronchery=item B<Session-ID> 109*b077aed3SPierre Pronchery 110*b077aed3SPierre ProncheryThe SSL session ID in hex format. 111*b077aed3SPierre Pronchery 112*b077aed3SPierre Pronchery=item B<Session-ID-ctx> 113*b077aed3SPierre Pronchery 114*b077aed3SPierre ProncheryThe session ID context in hex format. 115*b077aed3SPierre Pronchery 116*b077aed3SPierre Pronchery=item B<Master-Key> 117*b077aed3SPierre Pronchery 118*b077aed3SPierre ProncheryThis is the SSL session master key. 119*b077aed3SPierre Pronchery 120*b077aed3SPierre Pronchery=item B<Start Time> 121*b077aed3SPierre Pronchery 122*b077aed3SPierre ProncheryThis is the session start time represented as an integer in standard 123*b077aed3SPierre ProncheryUnix format. 124*b077aed3SPierre Pronchery 125*b077aed3SPierre Pronchery=item B<Timeout> 126*b077aed3SPierre Pronchery 127*b077aed3SPierre ProncheryThe timeout in seconds. 128*b077aed3SPierre Pronchery 129*b077aed3SPierre Pronchery=item B<Verify return code> 130*b077aed3SPierre Pronchery 131*b077aed3SPierre ProncheryThis is the return code when an SSL client certificate is verified. 132*b077aed3SPierre Pronchery 133*b077aed3SPierre Pronchery=back 134*b077aed3SPierre Pronchery 135*b077aed3SPierre Pronchery=head1 NOTES 136*b077aed3SPierre Pronchery 137*b077aed3SPierre ProncherySince the SSL session output contains the master key it is 138*b077aed3SPierre Proncherypossible to read the contents of an encrypted session using this 139*b077aed3SPierre Proncheryinformation. Therefore, appropriate security precautions should be taken if 140*b077aed3SPierre Proncherythe information is being output by a "real" application. This is however 141*b077aed3SPierre Proncherystrongly discouraged and should only be used for debugging purposes. 142*b077aed3SPierre Pronchery 143*b077aed3SPierre Pronchery=head1 BUGS 144*b077aed3SPierre Pronchery 145*b077aed3SPierre ProncheryThe cipher and start time should be printed out in human readable form. 146*b077aed3SPierre Pronchery 147*b077aed3SPierre Pronchery=head1 SEE ALSO 148*b077aed3SPierre Pronchery 149*b077aed3SPierre ProncheryL<openssl(1)>, 150*b077aed3SPierre ProncheryL<openssl-ciphers(1)>, 151*b077aed3SPierre ProncheryL<openssl-s_server(1)> 152*b077aed3SPierre Pronchery 153*b077aed3SPierre Pronchery=head1 COPYRIGHT 154*b077aed3SPierre Pronchery 155*b077aed3SPierre ProncheryCopyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved. 156*b077aed3SPierre Pronchery 157*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License"). You may not use 158*b077aed3SPierre Proncherythis file except in compliance with the License. You can obtain a copy 159*b077aed3SPierre Proncheryin the file LICENSE in the source distribution or at 160*b077aed3SPierre ProncheryL<https://www.openssl.org/source/license.html>. 161*b077aed3SPierre Pronchery 162*b077aed3SPierre Pronchery=cut 163