1*ebfedea0SLionel Sambuc 2*ebfedea0SLionel Sambuc=pod 3*ebfedea0SLionel Sambuc 4*ebfedea0SLionel Sambuc=head1 NAME 5*ebfedea0SLionel Sambuc 6*ebfedea0SLionel Sambucsess_id - SSL/TLS session handling utility 7*ebfedea0SLionel Sambuc 8*ebfedea0SLionel Sambuc=head1 SYNOPSIS 9*ebfedea0SLionel Sambuc 10*ebfedea0SLionel SambucB<openssl> B<sess_id> 11*ebfedea0SLionel Sambuc[B<-inform PEM|DER>] 12*ebfedea0SLionel Sambuc[B<-outform PEM|DER>] 13*ebfedea0SLionel Sambuc[B<-in filename>] 14*ebfedea0SLionel Sambuc[B<-out filename>] 15*ebfedea0SLionel Sambuc[B<-text>] 16*ebfedea0SLionel Sambuc[B<-noout>] 17*ebfedea0SLionel Sambuc[B<-context ID>] 18*ebfedea0SLionel Sambuc 19*ebfedea0SLionel Sambuc=head1 DESCRIPTION 20*ebfedea0SLionel Sambuc 21*ebfedea0SLionel SambucThe B<sess_id> process the encoded version of the SSL session structure 22*ebfedea0SLionel Sambucand optionally prints out SSL session details (for example the SSL session 23*ebfedea0SLionel Sambucmaster key) in human readable format. Since this is a diagnostic tool that 24*ebfedea0SLionel Sambucneeds some knowledge of the SSL protocol to use properly, most users will 25*ebfedea0SLionel Sambucnot need to use it. 26*ebfedea0SLionel Sambuc 27*ebfedea0SLionel Sambuc=over 4 28*ebfedea0SLionel Sambuc 29*ebfedea0SLionel Sambuc=item B<-inform DER|PEM> 30*ebfedea0SLionel Sambuc 31*ebfedea0SLionel SambucThis specifies the input format. The B<DER> option uses an ASN1 DER encoded 32*ebfedea0SLionel Sambucformat containing session details. The precise format can vary from one version 33*ebfedea0SLionel Sambucto the next. The B<PEM> form is the default format: it consists of the B<DER> 34*ebfedea0SLionel Sambucformat base64 encoded with additional header and footer lines. 35*ebfedea0SLionel Sambuc 36*ebfedea0SLionel Sambuc=item B<-outform DER|PEM> 37*ebfedea0SLionel Sambuc 38*ebfedea0SLionel SambucThis specifies the output format, the options have the same meaning as the 39*ebfedea0SLionel SambucB<-inform> option. 40*ebfedea0SLionel Sambuc 41*ebfedea0SLionel Sambuc=item B<-in filename> 42*ebfedea0SLionel Sambuc 43*ebfedea0SLionel SambucThis specifies the input filename to read session information from or standard 44*ebfedea0SLionel Sambucinput by default. 45*ebfedea0SLionel Sambuc 46*ebfedea0SLionel Sambuc=item B<-out filename> 47*ebfedea0SLionel Sambuc 48*ebfedea0SLionel SambucThis specifies the output filename to write session information to or standard 49*ebfedea0SLionel Sambucoutput if this option is not specified. 50*ebfedea0SLionel Sambuc 51*ebfedea0SLionel Sambuc=item B<-text> 52*ebfedea0SLionel Sambuc 53*ebfedea0SLionel Sambucprints out the various public or private key components in 54*ebfedea0SLionel Sambucplain text in addition to the encoded version. 55*ebfedea0SLionel Sambuc 56*ebfedea0SLionel Sambuc=item B<-cert> 57*ebfedea0SLionel Sambuc 58*ebfedea0SLionel Sambucif a certificate is present in the session it will be output using this option, 59*ebfedea0SLionel Sambucif the B<-text> option is also present then it will be printed out in text form. 60*ebfedea0SLionel Sambuc 61*ebfedea0SLionel Sambuc=item B<-noout> 62*ebfedea0SLionel Sambuc 63*ebfedea0SLionel Sambucthis option prevents output of the encoded version of the session. 64*ebfedea0SLionel Sambuc 65*ebfedea0SLionel Sambuc=item B<-context ID> 66*ebfedea0SLionel Sambuc 67*ebfedea0SLionel Sambucthis option can set the session id so the output session information uses the 68*ebfedea0SLionel Sambucsupplied ID. The ID can be any string of characters. This option wont normally 69*ebfedea0SLionel Sambucbe used. 70*ebfedea0SLionel Sambuc 71*ebfedea0SLionel Sambuc=back 72*ebfedea0SLionel Sambuc 73*ebfedea0SLionel Sambuc=head1 OUTPUT 74*ebfedea0SLionel Sambuc 75*ebfedea0SLionel SambucTypical output: 76*ebfedea0SLionel Sambuc 77*ebfedea0SLionel Sambuc SSL-Session: 78*ebfedea0SLionel Sambuc Protocol : TLSv1 79*ebfedea0SLionel Sambuc Cipher : 0016 80*ebfedea0SLionel Sambuc Session-ID: 871E62626C554CE95488823752CBD5F3673A3EF3DCE9C67BD916C809914B40ED 81*ebfedea0SLionel Sambuc Session-ID-ctx: 01000000 82*ebfedea0SLionel Sambuc Master-Key: A7CEFC571974BE02CAC305269DC59F76EA9F0B180CB6642697A68251F2D2BB57E51DBBB4C7885573192AE9AEE220FACD 83*ebfedea0SLionel Sambuc Key-Arg : None 84*ebfedea0SLionel Sambuc Start Time: 948459261 85*ebfedea0SLionel Sambuc Timeout : 300 (sec) 86*ebfedea0SLionel Sambuc Verify return code 0 (ok) 87*ebfedea0SLionel Sambuc 88*ebfedea0SLionel SambucTheses are described below in more detail. 89*ebfedea0SLionel Sambuc 90*ebfedea0SLionel Sambuc=over 4 91*ebfedea0SLionel Sambuc 92*ebfedea0SLionel Sambuc=item B<Protocol> 93*ebfedea0SLionel Sambuc 94*ebfedea0SLionel Sambucthis is the protocol in use TLSv1, SSLv3 or SSLv2. 95*ebfedea0SLionel Sambuc 96*ebfedea0SLionel Sambuc=item B<Cipher> 97*ebfedea0SLionel Sambuc 98*ebfedea0SLionel Sambucthe cipher used this is the actual raw SSL or TLS cipher code, see the SSL 99*ebfedea0SLionel Sambucor TLS specifications for more information. 100*ebfedea0SLionel Sambuc 101*ebfedea0SLionel Sambuc=item B<Session-ID> 102*ebfedea0SLionel Sambuc 103*ebfedea0SLionel Sambucthe SSL session ID in hex format. 104*ebfedea0SLionel Sambuc 105*ebfedea0SLionel Sambuc=item B<Session-ID-ctx> 106*ebfedea0SLionel Sambuc 107*ebfedea0SLionel Sambucthe session ID context in hex format. 108*ebfedea0SLionel Sambuc 109*ebfedea0SLionel Sambuc=item B<Master-Key> 110*ebfedea0SLionel Sambuc 111*ebfedea0SLionel Sambucthis is the SSL session master key. 112*ebfedea0SLionel Sambuc 113*ebfedea0SLionel Sambuc=item B<Key-Arg> 114*ebfedea0SLionel Sambuc 115*ebfedea0SLionel Sambucthe key argument, this is only used in SSL v2. 116*ebfedea0SLionel Sambuc 117*ebfedea0SLionel Sambuc=item B<Start Time> 118*ebfedea0SLionel Sambuc 119*ebfedea0SLionel Sambucthis is the session start time represented as an integer in standard Unix format. 120*ebfedea0SLionel Sambuc 121*ebfedea0SLionel Sambuc=item B<Timeout> 122*ebfedea0SLionel Sambuc 123*ebfedea0SLionel Sambucthe timeout in seconds. 124*ebfedea0SLionel Sambuc 125*ebfedea0SLionel Sambuc=item B<Verify return code> 126*ebfedea0SLionel Sambuc 127*ebfedea0SLionel Sambucthis is the return code when an SSL client certificate is verified. 128*ebfedea0SLionel Sambuc 129*ebfedea0SLionel Sambuc=back 130*ebfedea0SLionel Sambuc 131*ebfedea0SLionel Sambuc=head1 NOTES 132*ebfedea0SLionel Sambuc 133*ebfedea0SLionel SambucThe PEM encoded session format uses the header and footer lines: 134*ebfedea0SLionel Sambuc 135*ebfedea0SLionel Sambuc -----BEGIN SSL SESSION PARAMETERS----- 136*ebfedea0SLionel Sambuc -----END SSL SESSION PARAMETERS----- 137*ebfedea0SLionel Sambuc 138*ebfedea0SLionel SambucSince the SSL session output contains the master key it is possible to read the contents 139*ebfedea0SLionel Sambucof an encrypted session using this information. Therefore appropriate security precautions 140*ebfedea0SLionel Sambucshould be taken if the information is being output by a "real" application. This is 141*ebfedea0SLionel Sambuchowever strongly discouraged and should only be used for debugging purposes. 142*ebfedea0SLionel Sambuc 143*ebfedea0SLionel Sambuc=head1 BUGS 144*ebfedea0SLionel Sambuc 145*ebfedea0SLionel SambucThe cipher and start time should be printed out in human readable form. 146*ebfedea0SLionel Sambuc 147*ebfedea0SLionel Sambuc=head1 SEE ALSO 148*ebfedea0SLionel Sambuc 149*ebfedea0SLionel SambucL<ciphers(1)|ciphers(1)>, L<s_server(1)|s_server(1)> 150*ebfedea0SLionel Sambuc 151*ebfedea0SLionel Sambuc=cut 152