0000: 27 5c 22 0a 27 5c 22 20 47 65 6e 65 72 61 74 65 '\".'\" Generate
0010: 64 20 66 72 6f 6d 20 66 69 6c 65 20 27 74 6c 73 d from file 'tls
0020: 5c 26 2e 6d 61 6e 27 20 62 79 20 74 63 6c 6c 69 \&.man' by tclli
0030: 62 2f 64 6f 63 74 6f 6f 6c 73 20 77 69 74 68 20 b/doctools with
0040: 66 6f 72 6d 61 74 20 27 6e 72 6f 66 66 27 0a 27 format 'nroff'.'
0050: 5c 22 20 43 6f 70 79 72 69 67 68 74 20 28 63 29 \" Copyright (c)
0060: 20 31 39 39 39 20 4d 61 74 74 20 4e 65 77 6d 61 1999 Matt Newma
0070: 6e 0a 27 5c 22 20 43 6f 70 79 72 69 67 68 74 20 n.'\" Copyright
0080: 28 63 29 20 32 30 30 34 20 53 74 61 72 66 69 73 (c) 2004 Starfis
0090: 68 20 53 79 73 74 65 6d 73 0a 27 5c 22 20 43 6f h Systems.'\" Co
00a0: 70 79 72 69 67 68 74 20 28 63 29 20 32 30 32 34 pyright (c) 2024
00b0: 20 42 72 69 61 6e 20 4f 27 48 61 67 61 6e 0a 27 Brian O'Hagan.'
00c0: 5c 22 0a 2e 54 48 20 22 74 6c 73 22 20 6e 20 31 \"..TH "tls" n 1
00d0: 5c 26 2e 38 20 74 6c 73 20 22 54 63 6c 20 54 4c \&.8 tls "Tcl TL
00e0: 53 20 65 78 74 65 6e 73 69 6f 6e 22 0a 2e 5c 22 S extension"..\"
00f0: 20 54 68 65 20 2d 2a 2d 20 6e 72 6f 66 66 20 2d The -*- nroff -
0100: 2a 2d 20 64 65 66 69 6e 69 74 69 6f 6e 73 20 62 *- definitions b
0110: 65 6c 6f 77 20 61 72 65 20 66 6f 72 20 73 75 70 elow are for sup
0120: 70 6c 65 6d 65 6e 74 61 6c 20 6d 61 63 72 6f 73 plemental macros
0130: 20 75 73 65 64 0a 2e 5c 22 20 69 6e 20 54 63 6c used..\" in Tcl
0140: 2f 54 6b 20 6d 61 6e 75 61 6c 20 65 6e 74 72 69 /Tk manual entri
0150: 65 73 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 41 50 20 es...\"..\" .AP
0160: 74 79 70 65 20 6e 61 6d 65 20 69 6e 2f 6f 75 74 type name in/out
0170: 20 3f 69 6e 64 65 6e 74 3f 0a 2e 5c 22 09 53 74 ?indent?..\".St
0180: 61 72 74 20 70 61 72 61 67 72 61 70 68 20 64 65 art paragraph de
0190: 73 63 72 69 62 69 6e 67 20 61 6e 20 61 72 67 75 scribing an argu
01a0: 6d 65 6e 74 20 74 6f 20 61 20 6c 69 62 72 61 72 ment to a librar
01b0: 79 20 70 72 6f 63 65 64 75 72 65 2e 0a 2e 5c 22 y procedure...\"
01c0: 09 74 79 70 65 20 69 73 20 74 79 70 65 20 6f 66 .type is type of
01d0: 20 61 72 67 75 6d 65 6e 74 20 28 69 6e 74 2c 20 argument (int,
01e0: 65 74 63 2e 29 2c 20 69 6e 2f 6f 75 74 20 69 73 etc.), in/out is
01f0: 20 65 69 74 68 65 72 20 22 69 6e 22 2c 20 22 6f either "in", "o
0200: 75 74 22 2c 0a 2e 5c 22 09 6f 72 20 22 69 6e 2f ut",..\".or "in/
0210: 6f 75 74 22 20 74 6f 20 64 65 73 63 72 69 62 65 out" to describe
0220: 20 77 68 65 74 68 65 72 20 70 72 6f 63 65 64 75 whether procedu
0230: 72 65 20 72 65 61 64 73 20 6f 72 20 6d 6f 64 69 re reads or modi
0240: 66 69 65 73 20 61 72 67 2c 0a 2e 5c 22 09 61 6e fies arg,..\".an
0250: 64 20 69 6e 64 65 6e 74 20 69 73 20 65 71 75 69 d indent is equi
0260: 76 61 6c 65 6e 74 20 74 6f 20 73 65 63 6f 6e 64 valent to second
0270: 20 61 72 67 20 6f 66 20 2e 49 50 20 28 73 68 6f arg of .IP (sho
0280: 75 6c 64 6e 27 74 20 65 76 65 72 20 62 65 0a 2e uldn't ever be..
0290: 5c 22 09 6e 65 65 64 65 64 3b 20 20 75 73 65 20 \".needed; use
02a0: 2e 41 53 20 62 65 6c 6f 77 20 69 6e 73 74 65 61 .AS below instea
02b0: 64 29 0a 2e 5c 22 0a 2e 5c 22 20 2e 41 53 20 3f d)..\"..\" .AS ?
02c0: 74 79 70 65 3f 20 3f 6e 61 6d 65 3f 0a 2e 5c 22 type? ?name?..\"
02d0: 09 47 69 76 65 20 6d 61 78 69 6d 75 6d 20 73 69 .Give maximum si
02e0: 7a 65 73 20 6f 66 20 61 72 67 75 6d 65 6e 74 73 zes of arguments
02f0: 20 66 6f 72 20 73 65 74 74 69 6e 67 20 74 61 62 for setting tab
0300: 20 73 74 6f 70 73 2e 20 20 54 79 70 65 20 61 6e stops. Type an
0310: 64 0a 2e 5c 22 09 6e 61 6d 65 20 61 72 65 20 65 d..\".name are e
0320: 78 61 6d 70 6c 65 73 20 6f 66 20 6c 61 72 67 65 xamples of large
0330: 73 74 20 70 6f 73 73 69 62 6c 65 20 61 72 67 75 st possible argu
0340: 6d 65 6e 74 73 20 74 68 61 74 20 77 69 6c 6c 20 ments that will
0350: 62 65 20 70 61 73 73 65 64 0a 2e 5c 22 09 74 6f be passed..\".to
0360: 20 2e 41 50 20 6c 61 74 65 72 2e 20 20 49 66 20 .AP later. If
0370: 61 72 67 73 20 61 72 65 20 6f 6d 69 74 74 65 64 args are omitted
0380: 2c 20 64 65 66 61 75 6c 74 20 74 61 62 20 73 74 , default tab st
0390: 6f 70 73 20 61 72 65 20 75 73 65 64 2e 0a 2e 5c ops are used...\
03a0: 22 0a 2e 5c 22 20 2e 42 53 0a 2e 5c 22 09 53 74 "..\" .BS..\".St
03b0: 61 72 74 20 62 6f 78 20 65 6e 63 6c 6f 73 75 72 art box enclosur
03c0: 65 2e 20 20 46 72 6f 6d 20 68 65 72 65 20 75 6e e. From here un
03d0: 74 69 6c 20 6e 65 78 74 20 2e 42 45 2c 20 65 76 til next .BE, ev
03e0: 65 72 79 74 68 69 6e 67 20 77 69 6c 6c 20 62 65 erything will be
03f0: 0a 2e 5c 22 09 65 6e 63 6c 6f 73 65 64 20 69 6e ..\".enclosed in
0400: 20 6f 6e 65 20 6c 61 72 67 65 20 62 6f 78 2e 0a one large box..
0410: 2e 5c 22 0a 2e 5c 22 20 2e 42 45 0a 2e 5c 22 09 .\"..\" .BE..\".
0420: 45 6e 64 20 6f 66 20 62 6f 78 20 65 6e 63 6c 6f End of box enclo
0430: 73 75 72 65 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 43 sure...\"..\" .C
0440: 53 0a 2e 5c 22 09 42 65 67 69 6e 20 63 6f 64 65 S..\".Begin code
0450: 20 65 78 63 65 72 70 74 2e 0a 2e 5c 22 0a 2e 5c excerpt...\"..\
0460: 22 20 2e 43 45 0a 2e 5c 22 09 45 6e 64 20 63 6f " .CE..\".End co
0470: 64 65 20 65 78 63 65 72 70 74 2e 0a 2e 5c 22 0a de excerpt...\".
0480: 2e 5c 22 20 2e 56 53 20 3f 76 65 72 73 69 6f 6e .\" .VS ?version
0490: 3f 20 3f 62 72 3f 0a 2e 5c 22 09 42 65 67 69 6e ? ?br?..\".Begin
04a0: 20 76 65 72 74 69 63 61 6c 20 73 69 64 65 62 61 vertical sideba
04b0: 72 2c 20 66 6f 72 20 75 73 65 20 69 6e 20 6d 61 r, for use in ma
04c0: 72 6b 69 6e 67 20 6e 65 77 6c 79 2d 63 68 61 6e rking newly-chan
04d0: 67 65 64 20 70 61 72 74 73 0a 2e 5c 22 09 6f 66 ged parts..\".of
04e0: 20 6d 61 6e 20 70 61 67 65 73 2e 20 20 54 68 65 man pages. The
04f0: 20 66 69 72 73 74 20 61 72 67 75 6d 65 6e 74 20 first argument
0500: 69 73 20 69 67 6e 6f 72 65 64 20 61 6e 64 20 75 is ignored and u
0510: 73 65 64 20 66 6f 72 20 72 65 63 6f 72 64 69 6e sed for recordin
0520: 67 0a 2e 5c 22 09 74 68 65 20 76 65 72 73 69 6f g..\".the versio
0530: 6e 20 77 68 65 6e 20 74 68 65 20 2e 56 53 20 77 n when the .VS w
0540: 61 73 20 61 64 64 65 64 2c 20 73 6f 20 74 68 61 as added, so tha
0550: 74 20 74 68 65 20 73 69 64 65 62 61 72 73 20 63 t the sidebars c
0560: 61 6e 20 62 65 0a 2e 5c 22 09 66 6f 75 6e 64 20 an be..\".found
0570: 61 6e 64 20 72 65 6d 6f 76 65 64 20 77 68 65 6e and removed when
0580: 20 74 68 65 79 20 72 65 61 63 68 20 61 20 63 65 they reach a ce
0590: 72 74 61 69 6e 20 61 67 65 2e 20 20 49 66 20 61 rtain age. If a
05a0: 6e 6f 74 68 65 72 20 61 72 67 75 6d 65 6e 74 0a nother argument.
05b0: 2e 5c 22 09 69 73 20 70 72 65 73 65 6e 74 2c 20 .\".is present,
05c0: 74 68 65 6e 20 61 20 6c 69 6e 65 20 62 72 65 61 then a line brea
05d0: 6b 20 69 73 20 66 6f 72 63 65 64 20 62 65 66 6f k is forced befo
05e0: 72 65 20 73 74 61 72 74 69 6e 67 20 74 68 65 20 re starting the
05f0: 73 69 64 65 62 61 72 2e 0a 2e 5c 22 0a 2e 5c 22 sidebar...\"..\"
0600: 20 2e 56 45 0a 2e 5c 22 09 45 6e 64 20 6f 66 20 .VE..\".End of
0610: 76 65 72 74 69 63 61 6c 20 73 69 64 65 62 61 72 vertical sidebar
0620: 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 44 53 0a 2e 5c ...\"..\" .DS..\
0630: 22 09 42 65 67 69 6e 20 61 6e 20 69 6e 64 65 6e ".Begin an inden
0640: 74 65 64 20 75 6e 66 69 6c 6c 65 64 20 64 69 73 ted unfilled dis
0650: 70 6c 61 79 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 44 play...\"..\" .D
0660: 45 0a 2e 5c 22 09 45 6e 64 20 6f 66 20 69 6e 64 E..\".End of ind
0670: 65 6e 74 65 64 20 75 6e 66 69 6c 6c 65 64 20 64 ented unfilled d
0680: 69 73 70 6c 61 79 2e 0a 2e 5c 22 0a 2e 5c 22 20 isplay...\"..\"
0690: 2e 53 4f 20 3f 6d 61 6e 70 61 67 65 3f 0a 2e 5c .SO ?manpage?..\
06a0: 22 09 53 74 61 72 74 20 6f 66 20 6c 69 73 74 20 ".Start of list
06b0: 6f 66 20 73 74 61 6e 64 61 72 64 20 6f 70 74 69 of standard opti
06c0: 6f 6e 73 20 66 6f 72 20 61 20 54 6b 20 77 69 64 ons for a Tk wid
06d0: 67 65 74 2e 20 54 68 65 20 6d 61 6e 70 61 67 65 get. The manpage
06e0: 0a 2e 5c 22 09 61 72 67 75 6d 65 6e 74 20 64 65 ..\".argument de
06f0: 66 69 6e 65 73 20 77 68 65 72 65 20 74 6f 20 6c fines where to l
0700: 6f 6f 6b 20 75 70 20 74 68 65 20 73 74 61 6e 64 ook up the stand
0710: 61 72 64 20 6f 70 74 69 6f 6e 73 3b 20 69 66 0a ard options; if.
0720: 2e 5c 22 09 6f 6d 69 74 74 65 64 2c 20 64 65 66 .\".omitted, def
0730: 61 75 6c 74 73 20 74 6f 20 22 6f 70 74 69 6f 6e aults to "option
0740: 73 22 2e 20 54 68 65 20 6f 70 74 69 6f 6e 73 20 s". The options
0750: 66 6f 6c 6c 6f 77 20 6f 6e 20 73 75 63 63 65 73 follow on succes
0760: 73 69 76 65 0a 2e 5c 22 09 6c 69 6e 65 73 2c 20 sive..\".lines,
0770: 69 6e 20 74 68 72 65 65 20 63 6f 6c 75 6d 6e 73 in three columns
0780: 20 73 65 70 61 72 61 74 65 64 20 62 79 20 74 61 separated by ta
0790: 62 73 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 53 45 0a bs...\"..\" .SE.
07a0: 2e 5c 22 09 45 6e 64 20 6f 66 20 6c 69 73 74 20 .\".End of list
07b0: 6f 66 20 73 74 61 6e 64 61 72 64 20 6f 70 74 69 of standard opti
07c0: 6f 6e 73 20 66 6f 72 20 61 20 54 6b 20 77 69 64 ons for a Tk wid
07d0: 67 65 74 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 4f 50 get...\"..\" .OP
07e0: 20 63 6d 64 4e 61 6d 65 20 64 62 4e 61 6d 65 20 cmdName dbName
07f0: 64 62 43 6c 61 73 73 0a 2e 5c 22 09 53 74 61 72 dbClass..\".Star
0800: 74 20 6f 66 20 64 65 73 63 72 69 70 74 69 6f 6e t of description
0810: 20 6f 66 20 61 20 73 70 65 63 69 66 69 63 20 6f of a specific o
0820: 70 74 69 6f 6e 2e 20 20 63 6d 64 4e 61 6d 65 20 ption. cmdName
0830: 67 69 76 65 73 20 74 68 65 0a 2e 5c 22 09 6f 70 gives the..\".op
0840: 74 69 6f 6e 27 73 20 6e 61 6d 65 20 61 73 20 73 tion's name as s
0850: 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 20 pecified in the
0860: 63 6c 61 73 73 20 63 6f 6d 6d 61 6e 64 2c 20 64 class command, d
0870: 62 4e 61 6d 65 20 67 69 76 65 73 0a 2e 5c 22 09 bName gives..\".
0880: 74 68 65 20 6f 70 74 69 6f 6e 27 73 20 6e 61 6d the option's nam
0890: 65 20 69 6e 20 74 68 65 20 6f 70 74 69 6f 6e 20 e in the option
08a0: 64 61 74 61 62 61 73 65 2c 20 61 6e 64 20 64 62 database, and db
08b0: 43 6c 61 73 73 20 67 69 76 65 73 0a 2e 5c 22 09 Class gives..\".
08c0: 74 68 65 20 6f 70 74 69 6f 6e 27 73 20 63 6c 61 the option's cla
08d0: 73 73 20 69 6e 20 74 68 65 20 6f 70 74 69 6f 6e ss in the option
08e0: 20 64 61 74 61 62 61 73 65 2e 0a 2e 5c 22 0a 2e database...\"..
08f0: 5c 22 20 2e 55 4c 20 61 72 67 31 20 61 72 67 32 \" .UL arg1 arg2
0900: 0a 2e 5c 22 09 50 72 69 6e 74 20 61 72 67 31 20 ..\".Print arg1
0910: 75 6e 64 65 72 6c 69 6e 65 64 2c 20 74 68 65 6e underlined, then
0920: 20 70 72 69 6e 74 20 61 72 67 32 20 6e 6f 72 6d print arg2 norm
0930: 61 6c 6c 79 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 51 ally...\"..\" .Q
0940: 57 20 61 72 67 31 20 3f 61 72 67 32 3f 0a 2e 5c W arg1 ?arg2?..\
0950: 22 09 50 72 69 6e 74 20 61 72 67 31 20 69 6e 20 ".Print arg1 in
0960: 71 75 6f 74 65 73 2c 20 74 68 65 6e 20 61 72 67 quotes, then arg
0970: 32 20 6e 6f 72 6d 61 6c 6c 79 20 28 66 6f 72 20 2 normally (for
0980: 74 72 61 69 6c 69 6e 67 20 70 75 6e 63 74 75 61 trailing punctua
0990: 74 69 6f 6e 29 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e tion)...\"..\" .
09a0: 50 51 20 61 72 67 31 20 3f 61 72 67 32 3f 0a 2e PQ arg1 ?arg2?..
09b0: 5c 22 09 50 72 69 6e 74 20 61 6e 20 6f 70 65 6e \".Print an open
09c0: 20 70 61 72 65 6e 74 68 65 73 69 73 2c 20 61 72 parenthesis, ar
09d0: 67 31 20 69 6e 20 71 75 6f 74 65 73 2c 20 74 68 g1 in quotes, th
09e0: 65 6e 20 61 72 67 32 20 6e 6f 72 6d 61 6c 6c 79 en arg2 normally
09f0: 0a 2e 5c 22 09 28 66 6f 72 20 74 72 61 69 6c 69 ..\".(for traili
0a00: 6e 67 20 70 75 6e 63 74 75 61 74 69 6f 6e 29 20 ng punctuation)
0a10: 61 6e 64 20 74 68 65 6e 20 61 20 63 6c 6f 73 69 and then a closi
0a20: 6e 67 20 70 61 72 65 6e 74 68 65 73 69 73 2e 0a ng parenthesis..
0a30: 2e 5c 22 0a 2e 5c 22 09 23 20 53 65 74 20 75 70 .\"..\".# Set up
0a40: 20 74 72 61 70 73 20 61 6e 64 20 6f 74 68 65 72 traps and other
0a50: 20 6d 69 73 63 65 6c 6c 61 6e 65 6f 75 73 20 73 miscellaneous s
0a60: 74 75 66 66 20 66 6f 72 20 54 63 6c 2f 54 6b 20 tuff for Tcl/Tk
0a70: 6d 61 6e 20 70 61 67 65 73 2e 0a 2e 69 66 20 74 man pages...if t
0a80: 20 2e 77 68 20 2d 31 2e 33 69 20 5e 42 0a 2e 6e .wh -1.3i ^B..n
0a90: 72 20 5e 6c 20 5c 6e 28 2e 6c 0a 2e 61 64 20 62 r ^l \n(.l..ad b
0aa0: 0a 2e 5c 22 09 23 20 53 74 61 72 74 20 61 6e 20 ..\".# Start an
0ab0: 61 72 67 75 6d 65 6e 74 20 64 65 73 63 72 69 70 argument descrip
0ac0: 74 69 6f 6e 0a 2e 64 65 20 41 50 0a 2e 69 65 20 tion..de AP..ie
0ad0: 21 22 5c 5c 24 34 22 22 20 2e 54 50 20 5c 5c 24 !"\\$4"" .TP \\$
0ae0: 34 0a 2e 65 6c 20 5c 7b 5c 0a 2e 20 20 20 69 65 4..el \{\.. ie
0af0: 20 21 22 5c 5c 24 32 22 22 20 2e 54 50 20 5c 5c !"\\$2"" .TP \\
0b00: 6e 28 29 43 75 0a 2e 20 20 20 65 6c 20 20 20 20 n()Cu.. el
0b10: 20 20 20 20 20 20 2e 54 50 20 31 35 0a 2e 5c 7d .TP 15..\}
0b20: 0a 2e 74 61 20 5c 5c 6e 28 29 41 75 20 5c 5c 6e ..ta \\n()Au \\n
0b30: 28 29 42 75 0a 2e 69 65 20 21 22 5c 5c 24 33 22 ()Bu..ie !"\\$3"
0b40: 22 20 5c 7b 5c 0a 5c 26 5c 5c 24 31 20 5c 5c 66 " \{\.\&\\$1 \\f
0b50: 49 5c 5c 24 32 5c 5c 66 50 20 28 5c 5c 24 33 29 I\\$2\\fP (\\$3)
0b60: 0a 2e 5c 22 2e 62 0a 2e 5c 7d 0a 2e 65 6c 20 5c ..\".b..\}..el \
0b70: 7b 5c 0a 2e 62 72 0a 2e 69 65 20 21 22 5c 5c 24 {\..br..ie !"\\$
0b80: 32 22 22 20 5c 7b 5c 0a 5c 26 5c 5c 24 31 09 5c 2"" \{\.\&\\$1.\
0b90: 5c 66 49 5c 5c 24 32 5c 5c 66 50 0a 2e 5c 7d 0a \fI\\$2\\fP..\}.
0ba0: 2e 65 6c 20 5c 7b 5c 0a 5c 26 5c 5c 66 49 5c 5c .el \{\.\&\\fI\\
0bb0: 24 31 5c 5c 66 50 0a 2e 5c 7d 0a 2e 5c 7d 0a 2e $1\\fP..\}..\}..
0bc0: 2e 0a 2e 5c 22 09 23 20 64 65 66 69 6e 65 20 74 ...\".# define t
0bd0: 61 62 62 69 6e 67 20 76 61 6c 75 65 73 20 66 6f abbing values fo
0be0: 72 20 2e 41 50 0a 2e 64 65 20 41 53 0a 2e 6e 72 r .AP..de AS..nr
0bf0: 20 29 41 20 31 30 6e 0a 2e 69 66 20 21 22 5c 5c )A 10n..if !"\\
0c00: 24 31 22 22 20 2e 6e 72 20 29 41 20 5c 5c 77 27 $1"" .nr )A \\w'
0c10: 5c 5c 24 31 27 75 2b 33 6e 0a 2e 6e 72 20 29 42 \\$1'u+3n..nr )B
0c20: 20 5c 5c 6e 28 29 41 75 2b 31 35 6e 0a 2e 5c 22 \\n()Au+15n..\"
0c30: 0a 2e 69 66 20 21 22 5c 5c 24 32 22 22 20 2e 6e ..if !"\\$2"" .n
0c40: 72 20 29 42 20 5c 5c 77 27 5c 5c 24 32 27 75 2b r )B \\w'\\$2'u+
0c50: 5c 5c 6e 28 29 41 75 2b 33 6e 0a 2e 6e 72 20 29 \\n()Au+3n..nr )
0c60: 43 20 5c 5c 6e 28 29 42 75 2b 5c 5c 77 27 28 69 C \\n()Bu+\\w'(i
0c70: 6e 2f 6f 75 74 29 27 75 2b 32 6e 0a 2e 2e 0a 2e n/out)'u+2n.....
0c80: 41 53 20 54 63 6c 5f 49 6e 74 65 72 70 20 54 63 AS Tcl_Interp Tc
0c90: 6c 5f 43 72 65 61 74 65 49 6e 74 65 72 70 20 69 l_CreateInterp i
0ca0: 6e 2f 6f 75 74 0a 2e 5c 22 09 23 20 42 53 20 2d n/out..\".# BS -
0cb0: 20 73 74 61 72 74 20 62 6f 78 65 64 20 74 65 78 start boxed tex
0cc0: 74 0a 2e 5c 22 09 23 20 5e 79 20 3d 20 73 74 61 t..\".# ^y = sta
0cd0: 72 74 69 6e 67 20 79 20 6c 6f 63 61 74 69 6f 6e rting y location
0ce0: 0a 2e 5c 22 09 23 20 5e 62 20 3d 20 31 0a 2e 64 ..\".# ^b = 1..d
0cf0: 65 20 42 53 0a 2e 62 72 0a 2e 6d 6b 20 5e 79 0a e BS..br..mk ^y.
0d00: 2e 6e 72 20 5e 62 20 31 75 0a 2e 69 66 20 6e 20 .nr ^b 1u..if n
0d10: 2e 6e 66 0a 2e 69 66 20 6e 20 2e 74 69 20 30 0a .nf..if n .ti 0.
0d20: 2e 69 66 20 6e 20 5c 6c 27 5c 5c 6e 28 2e 6c 75 .if n \l'\\n(.lu
0d30: 5c 28 75 6c 27 0a 2e 69 66 20 6e 20 2e 66 69 0a \(ul'..if n .fi.
0d40: 2e 2e 0a 2e 5c 22 09 23 20 42 45 20 2d 20 65 6e ....\".# BE - en
0d50: 64 20 62 6f 78 65 64 20 74 65 78 74 20 28 64 72 d boxed text (dr
0d60: 61 77 20 62 6f 78 20 6e 6f 77 29 0a 2e 64 65 20 aw box now)..de
0d70: 42 45 0a 2e 6e 66 0a 2e 74 69 20 30 0a 2e 6d 6b BE..nf..ti 0..mk
0d80: 20 5e 74 0a 2e 69 65 20 6e 20 5c 6c 27 5c 5c 6e ^t..ie n \l'\\n
0d90: 28 5e 6c 75 5c 28 75 6c 27 0a 2e 65 6c 20 5c 7b (^lu\(ul'..el \{
0da0: 5c 0a 2e 5c 22 09 44 72 61 77 20 66 6f 75 72 2d \..\".Draw four-
0db0: 73 69 64 65 64 20 62 6f 78 20 6e 6f 72 6d 61 6c sided box normal
0dc0: 6c 79 2c 20 62 75 74 20 64 6f 6e 27 74 20 64 72 ly, but don't dr
0dd0: 61 77 20 74 6f 70 20 6f 66 0a 2e 5c 22 09 62 6f aw top of..\".bo
0de0: 78 20 69 66 20 74 68 65 20 62 6f 78 20 73 74 61 x if the box sta
0df0: 72 74 65 64 20 6f 6e 20 61 6e 20 65 61 72 6c 69 rted on an earli
0e00: 65 72 20 70 61 67 65 2e 0a 2e 69 65 20 21 5c 5c er page...ie !\\
0e10: 6e 28 5e 62 2d 31 20 5c 7b 5c 0a 5c 68 27 2d 31 n(^b-1 \{\.\h'-1
0e20: 2e 35 6e 27 5c 4c 27 7c 5c 5c 6e 28 5e 79 75 2d .5n'\L'|\\n(^yu-
0e30: 31 76 27 5c 6c 27 5c 5c 6e 28 5e 6c 75 2b 33 6e 1v'\l'\\n(^lu+3n
0e40: 5c 28 75 6c 27 5c 4c 27 5c 5c 6e 28 5e 74 75 2b \(ul'\L'\\n(^tu+
0e50: 31 76 2d 5c 5c 6e 28 5e 79 75 27 5c 6c 27 7c 30 1v-\\n(^yu'\l'|0
0e60: 75 2d 31 2e 35 6e 5c 28 75 6c 27 0a 2e 5c 7d 0a u-1.5n\(ul'..\}.
0e70: 2e 65 6c 20 5c 7d 5c 0a 5c 68 27 2d 31 2e 35 6e .el \}\.\h'-1.5n
0e80: 27 5c 4c 27 7c 5c 5c 6e 28 5e 79 75 2d 31 76 27 '\L'|\\n(^yu-1v'
0e90: 5c 68 27 5c 5c 6e 28 5e 6c 75 2b 33 6e 27 5c 4c \h'\\n(^lu+3n'\L
0ea0: 27 5c 5c 6e 28 5e 74 75 2b 31 76 2d 5c 5c 6e 28 '\\n(^tu+1v-\\n(
0eb0: 5e 79 75 27 5c 6c 27 7c 30 75 2d 31 2e 35 6e 5c ^yu'\l'|0u-1.5n\
0ec0: 28 75 6c 27 0a 2e 5c 7d 0a 2e 5c 7d 0a 2e 66 69 (ul'..\}..\}..fi
0ed0: 0a 2e 62 72 0a 2e 6e 72 20 5e 62 20 30 0a 2e 2e ..br..nr ^b 0...
0ee0: 0a 2e 5c 22 09 23 20 56 53 20 2d 20 73 74 61 72 ..\".# VS - star
0ef0: 74 20 76 65 72 74 69 63 61 6c 20 73 69 64 65 62 t vertical sideb
0f00: 61 72 0a 2e 5c 22 09 23 20 5e 59 20 3d 20 73 74 ar..\".# ^Y = st
0f10: 61 72 74 69 6e 67 20 79 20 6c 6f 63 61 74 69 6f arting y locatio
0f20: 6e 0a 2e 5c 22 09 23 20 5e 76 20 3d 20 31 20 28 n..\".# ^v = 1 (
0f30: 66 6f 72 20 74 72 6f 66 66 3b 20 20 66 6f 72 20 for troff; for
0f40: 6e 72 6f 66 66 20 74 68 69 73 20 64 6f 65 73 6e nroff this doesn
0f50: 27 74 20 6d 61 74 74 65 72 29 0a 2e 64 65 20 56 't matter)..de V
0f60: 53 0a 2e 69 66 20 21 22 5c 5c 24 32 22 22 20 2e S..if !"\\$2"" .
0f70: 62 72 0a 2e 6d 6b 20 5e 59 0a 2e 69 65 20 6e 20 br..mk ^Y..ie n
0f80: 27 6d 63 20 5c 73 31 32 5c 28 62 72 5c 73 30 0a 'mc \s12\(br\s0.
0f90: 2e 65 6c 20 2e 6e 72 20 5e 76 20 31 75 0a 2e 2e .el .nr ^v 1u...
0fa0: 0a 2e 5c 22 09 23 20 56 45 20 2d 20 65 6e 64 20 ..\".# VE - end
0fb0: 6f 66 20 76 65 72 74 69 63 61 6c 20 73 69 64 65 of vertical side
0fc0: 62 61 72 0a 2e 64 65 20 56 45 0a 2e 69 65 20 6e bar..de VE..ie n
0fd0: 20 27 6d 63 0a 2e 65 6c 20 5c 7b 5c 0a 2e 65 76 'mc..el \{\..ev
0fe0: 20 32 0a 2e 6e 66 0a 2e 74 69 20 30 0a 2e 6d 6b 2..nf..ti 0..mk
0ff0: 20 5e 74 0a 5c 68 27 7c 5c 5c 6e 28 5e 6c 75 2b ^t.\h'|\\n(^lu+
1000: 33 6e 27 5c 4c 27 7c 5c 5c 6e 28 5e 59 75 2d 31 3n'\L'|\\n(^Yu-1
1010: 76 5c 28 62 76 27 5c 76 27 5c 5c 6e 28 5e 74 75 v\(bv'\v'\\n(^tu
1020: 2b 31 76 2d 5c 5c 6e 28 5e 59 75 27 5c 68 27 2d +1v-\\n(^Yu'\h'-
1030: 7c 5c 5c 6e 28 5e 6c 75 2b 33 6e 27 0a 2e 73 70 |\\n(^lu+3n'..sp
1040: 20 2d 31 0a 2e 66 69 0a 2e 65 76 0a 2e 5c 7d 0a -1..fi..ev..\}.
1050: 2e 6e 72 20 5e 76 20 30 0a 2e 2e 0a 2e 5c 22 09 .nr ^v 0.....\".
1060: 23 20 53 70 65 63 69 61 6c 20 6d 61 63 72 6f 20 # Special macro
1070: 74 6f 20 68 61 6e 64 6c 65 20 70 61 67 65 20 62 to handle page b
1080: 6f 74 74 6f 6d 3a 20 20 66 69 6e 69 73 68 20 6f ottom: finish o
1090: 66 66 20 63 75 72 72 65 6e 74 0a 2e 5c 22 09 23 ff current..\".#
10a0: 20 62 6f 78 2f 73 69 64 65 62 61 72 20 69 66 20 box/sidebar if
10b0: 69 6e 20 62 6f 78 2f 73 69 64 65 62 61 72 20 6d in box/sidebar m
10c0: 6f 64 65 2c 20 74 68 65 6e 20 69 6e 76 6f 6b 65 ode, then invoke
10d0: 64 20 73 74 61 6e 64 61 72 64 0a 2e 5c 22 09 23 d standard..\".#
10e0: 20 70 61 67 65 20 62 6f 74 74 6f 6d 20 6d 61 63 page bottom mac
10f0: 72 6f 2e 0a 2e 64 65 20 5e 42 0a 2e 65 76 20 32 ro...de ^B..ev 2
1100: 0a 27 74 69 20 30 0a 27 6e 66 0a 2e 6d 6b 20 5e .'ti 0.'nf..mk ^
1110: 74 0a 2e 69 66 20 5c 5c 6e 28 5e 62 20 5c 7b 5c t..if \\n(^b \{\
1120: 0a 2e 5c 22 09 44 72 61 77 20 74 68 72 65 65 2d ..\".Draw three-
1130: 73 69 64 65 64 20 62 6f 78 20 69 66 20 74 68 69 sided box if thi
1140: 73 20 69 73 20 74 68 65 20 62 6f 78 27 73 20 66 s is the box's f
1150: 69 72 73 74 20 70 61 67 65 2c 0a 2e 5c 22 09 64 irst page,..\".d
1160: 72 61 77 20 74 77 6f 20 73 69 64 65 73 20 62 75 raw two sides bu
1170: 74 20 6e 6f 20 74 6f 70 20 6f 74 68 65 72 77 69 t no top otherwi
1180: 73 65 2e 0a 2e 69 65 20 21 5c 5c 6e 28 5e 62 2d se...ie !\\n(^b-
1190: 31 20 5c 68 27 2d 31 2e 35 6e 27 5c 4c 27 7c 5c 1 \h'-1.5n'\L'|\
11a0: 5c 6e 28 5e 79 75 2d 31 76 27 5c 6c 27 5c 5c 6e \n(^yu-1v'\l'\\n
11b0: 28 5e 6c 75 2b 33 6e 5c 28 75 6c 27 5c 4c 27 5c (^lu+3n\(ul'\L'\
11c0: 5c 6e 28 5e 74 75 2b 31 76 2d 5c 5c 6e 28 5e 79 \n(^tu+1v-\\n(^y
11d0: 75 27 5c 68 27 7c 30 75 27 5c 63 0a 2e 65 6c 20 u'\h'|0u'\c..el
11e0: 5c 68 27 2d 31 2e 35 6e 27 5c 4c 27 7c 5c 5c 6e \h'-1.5n'\L'|\\n
11f0: 28 5e 79 75 2d 31 76 27 5c 68 27 5c 5c 6e 28 5e (^yu-1v'\h'\\n(^
1200: 6c 75 2b 33 6e 27 5c 4c 27 5c 5c 6e 28 5e 74 75 lu+3n'\L'\\n(^tu
1210: 2b 31 76 2d 5c 5c 6e 28 5e 79 75 27 5c 68 27 7c +1v-\\n(^yu'\h'|
1220: 30 75 27 5c 63 0a 2e 5c 7d 0a 2e 69 66 20 5c 5c 0u'\c..\}..if \\
1230: 6e 28 5e 76 20 5c 7b 5c 0a 2e 6e 72 20 5e 78 20 n(^v \{\..nr ^x
1240: 5c 5c 6e 28 5e 74 75 2b 31 76 2d 5c 5c 6e 28 5e \\n(^tu+1v-\\n(^
1250: 59 75 0a 5c 6b 78 5c 68 27 2d 5c 5c 6e 78 75 27 Yu.\kx\h'-\\nxu'
1260: 5c 68 27 7c 5c 5c 6e 28 5e 6c 75 2b 33 6e 27 5c \h'|\\n(^lu+3n'\
1270: 6b 79 5c 4c 27 2d 5c 5c 6e 28 5e 78 75 27 5c 76 ky\L'-\\n(^xu'\v
1280: 27 5c 5c 6e 28 5e 78 75 27 5c 68 27 7c 30 75 27 '\\n(^xu'\h'|0u'
1290: 5c 63 0a 2e 5c 7d 0a 2e 62 70 0a 27 66 69 0a 2e \c..\}..bp.'fi..
12a0: 65 76 0a 2e 69 66 20 5c 5c 6e 28 5e 62 20 5c 7b ev..if \\n(^b \{
12b0: 5c 0a 2e 6d 6b 20 5e 79 0a 2e 6e 72 20 5e 62 20 \..mk ^y..nr ^b
12c0: 32 0a 2e 5c 7d 0a 2e 69 66 20 5c 5c 6e 28 5e 76 2..\}..if \\n(^v
12d0: 20 5c 7b 5c 0a 2e 6d 6b 20 5e 59 0a 2e 5c 7d 0a \{\..mk ^Y..\}.
12e0: 2e 2e 0a 2e 5c 22 09 23 20 44 53 20 2d 20 62 65 ....\".# DS - be
12f0: 67 69 6e 20 64 69 73 70 6c 61 79 0a 2e 64 65 20 gin display..de
1300: 44 53 0a 2e 52 53 0a 2e 6e 66 0a 2e 73 70 0a 2e DS..RS..nf..sp..
1310: 2e 0a 2e 5c 22 09 23 20 44 45 20 2d 20 65 6e 64 ...\".# DE - end
1320: 20 64 69 73 70 6c 61 79 0a 2e 64 65 20 44 45 0a display..de DE.
1330: 2e 66 69 0a 2e 52 45 0a 2e 73 70 0a 2e 2e 0a 2e .fi..RE..sp.....
1340: 5c 22 09 23 20 53 4f 20 2d 20 73 74 61 72 74 20 \".# SO - start
1350: 6f 66 20 6c 69 73 74 20 6f 66 20 73 74 61 6e 64 of list of stand
1360: 61 72 64 20 6f 70 74 69 6f 6e 73 0a 2e 64 65 20 ard options..de
1370: 53 4f 0a 27 69 65 20 27 5c 5c 24 31 27 27 20 2e SO.'ie '\\$1'' .
1380: 64 73 20 53 6f 20 5c 5c 66 42 6f 70 74 69 6f 6e ds So \\fBoption
1390: 73 5c 5c 66 52 0a 27 65 6c 20 2e 64 73 20 53 6f s\\fR.'el .ds So
13a0: 20 5c 5c 66 42 5c 5c 24 31 5c 5c 66 52 0a 2e 53 \\fB\\$1\\fR..S
13b0: 48 20 22 53 54 41 4e 44 41 52 44 20 4f 50 54 49 H "STANDARD OPTI
13c0: 4f 4e 53 22 0a 2e 4c 50 0a 2e 6e 66 0a 2e 74 61 ONS"..LP..nf..ta
13d0: 20 35 2e 35 63 20 31 31 63 0a 2e 66 74 20 42 0a 5.5c 11c..ft B.
13e0: 2e 2e 0a 2e 5c 22 09 23 20 53 45 20 2d 20 65 6e ....\".# SE - en
13f0: 64 20 6f 66 20 6c 69 73 74 20 6f 66 20 73 74 61 d of list of sta
1400: 6e 64 61 72 64 20 6f 70 74 69 6f 6e 73 0a 2e 64 ndard options..d
1410: 65 20 53 45 0a 2e 66 69 0a 2e 66 74 20 52 0a 2e e SE..fi..ft R..
1420: 4c 50 0a 53 65 65 20 74 68 65 20 5c 5c 2a 28 53 LP.See the \\*(S
1430: 6f 20 6d 61 6e 75 61 6c 20 65 6e 74 72 79 20 66 o manual entry f
1440: 6f 72 20 64 65 74 61 69 6c 73 20 6f 6e 20 74 68 or details on th
1450: 65 20 73 74 61 6e 64 61 72 64 20 6f 70 74 69 6f e standard optio
1460: 6e 73 2e 0a 2e 2e 0a 2e 5c 22 09 23 20 4f 50 20 ns......\".# OP
1470: 2d 20 73 74 61 72 74 20 6f 66 20 66 75 6c 6c 20 - start of full
1480: 64 65 73 63 72 69 70 74 69 6f 6e 20 66 6f 72 20 description for
1490: 61 20 73 69 6e 67 6c 65 20 6f 70 74 69 6f 6e 0a a single option.
14a0: 2e 64 65 20 4f 50 0a 2e 4c 50 0a 2e 6e 66 0a 2e .de OP..LP..nf..
14b0: 74 61 20 34 63 0a 43 6f 6d 6d 61 6e 64 2d 4c 69 ta 4c.Command-Li
14c0: 6e 65 20 4e 61 6d 65 3a 09 5c 5c 66 42 5c 5c 24 ne Name:.\\fB\\$
14d0: 31 5c 5c 66 52 0a 44 61 74 61 62 61 73 65 20 4e 1\\fR.Database N
14e0: 61 6d 65 3a 09 5c 5c 66 42 5c 5c 24 32 5c 5c 66 ame:.\\fB\\$2\\f
14f0: 52 0a 44 61 74 61 62 61 73 65 20 43 6c 61 73 73 R.Database Class
1500: 3a 09 5c 5c 66 42 5c 5c 24 33 5c 5c 66 52 0a 2e :.\\fB\\$3\\fR..
1510: 66 69 0a 2e 49 50 0a 2e 2e 0a 2e 5c 22 09 23 20 fi..IP.....\".#
1520: 43 53 20 2d 20 62 65 67 69 6e 20 63 6f 64 65 20 CS - begin code
1530: 65 78 63 65 72 70 74 0a 2e 64 65 20 43 53 0a 2e excerpt..de CS..
1540: 52 53 0a 2e 6e 66 0a 2e 74 61 20 2e 32 35 69 20 RS..nf..ta .25i
1550: 2e 35 69 20 2e 37 35 69 20 31 69 0a 2e 2e 0a 2e .5i .75i 1i.....
1560: 5c 22 09 23 20 43 45 20 2d 20 65 6e 64 20 63 6f \".# CE - end co
1570: 64 65 20 65 78 63 65 72 70 74 0a 2e 64 65 20 43 de excerpt..de C
1580: 45 0a 2e 66 69 0a 2e 52 45 0a 2e 2e 0a 2e 5c 22 E..fi..RE.....\"
1590: 09 23 20 55 4c 20 2d 20 75 6e 64 65 72 6c 69 6e .# UL - underlin
15a0: 65 20 77 6f 72 64 0a 2e 64 65 20 55 4c 0a 5c 5c e word..de UL.\\
15b0: 24 31 5c 6c 27 7c 30 5c 28 75 6c 27 5c 5c 24 32 $1\l'|0\(ul'\\$2
15c0: 0a 2e 2e 0a 2e 5c 22 09 23 20 51 57 20 2d 20 61 .....\".# QW - a
15d0: 70 70 6c 79 20 71 75 6f 74 61 74 69 6f 6e 20 6d pply quotation m
15e0: 61 72 6b 73 20 74 6f 20 77 6f 72 64 0a 2e 64 65 arks to word..de
15f0: 20 51 57 0a 2e 69 65 20 27 5c 5c 2a 28 6c 71 27 QW..ie '\\*(lq'
1600: 22 27 20 60 60 5c 5c 24 31 27 27 5c 5c 24 32 0a "' ``\\$1''\\$2.
1610: 2e 5c 22 22 20 66 69 78 20 65 6d 61 63 73 20 68 .\"" fix emacs h
1620: 69 67 68 6c 69 67 68 74 69 6e 67 0a 2e 65 6c 20 ighlighting..el
1630: 5c 5c 2a 28 6c 71 5c 5c 24 31 5c 5c 2a 28 72 71 \\*(lq\\$1\\*(rq
1640: 5c 5c 24 32 0a 2e 2e 0a 2e 5c 22 09 23 20 50 51 \\$2.....\".# PQ
1650: 20 2d 20 61 70 70 6c 79 20 70 61 72 65 6e 73 20 - apply parens
1660: 61 6e 64 20 71 75 6f 74 61 74 69 6f 6e 20 6d 61 and quotation ma
1670: 72 6b 73 20 74 6f 20 77 6f 72 64 0a 2e 64 65 20 rks to word..de
1680: 50 51 0a 2e 69 65 20 27 5c 5c 2a 28 6c 71 27 22 PQ..ie '\\*(lq'"
1690: 27 20 28 60 60 5c 5c 24 31 27 27 5c 5c 24 32 29 ' (``\\$1''\\$2)
16a0: 5c 5c 24 33 0a 2e 5c 22 22 20 66 69 78 20 65 6d \\$3..\"" fix em
16b0: 61 63 73 20 68 69 67 68 6c 69 67 68 74 69 6e 67 acs highlighting
16c0: 0a 2e 65 6c 20 28 5c 5c 2a 28 6c 71 5c 5c 24 31 ..el (\\*(lq\\$1
16d0: 5c 5c 2a 28 72 71 5c 5c 24 32 29 5c 5c 24 33 0a \\*(rq\\$2)\\$3.
16e0: 2e 2e 0a 2e 5c 22 09 23 20 51 52 20 2d 20 71 75 ....\".# QR - qu
16f0: 6f 74 65 64 20 72 61 6e 67 65 0a 2e 64 65 20 51 oted range..de Q
1700: 52 0a 2e 69 65 20 27 5c 5c 2a 28 6c 71 27 22 27 R..ie '\\*(lq'"'
1710: 20 60 60 5c 5c 24 31 27 27 5c 5c 2d 60 60 5c 5c ``\\$1''\\-``\\
1720: 24 32 27 27 5c 5c 24 33 0a 2e 5c 22 22 20 66 69 $2''\\$3..\"" fi
1730: 78 20 65 6d 61 63 73 20 68 69 67 68 6c 69 67 68 x emacs highligh
1740: 74 69 6e 67 0a 2e 65 6c 20 5c 5c 2a 28 6c 71 5c ting..el \\*(lq\
1750: 5c 24 31 5c 5c 2a 28 72 71 5c 5c 2d 5c 5c 2a 28 \$1\\*(rq\\-\\*(
1760: 6c 71 5c 5c 24 32 5c 5c 2a 28 72 71 5c 5c 24 33 lq\\$2\\*(rq\\$3
1770: 0a 2e 2e 0a 2e 5c 22 09 23 20 4d 54 20 2d 20 22 .....\".# MT - "
1780: 65 6d 70 74 79 22 20 73 74 72 69 6e 67 0a 2e 64 empty" string..d
1790: 65 20 4d 54 0a 2e 51 57 20 22 22 0a 2e 2e 0a 2e e MT..QW "".....
17a0: 42 53 0a 2e 53 48 20 4e 41 4d 45 0a 74 6c 73 20 BS..SH NAME.tls
17b0: 5c 2d 20 62 69 6e 64 69 6e 67 20 74 6f 20 74 68 \- binding to th
17c0: 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 e OpenSSL librar
17d0: 79 20 66 6f 72 20 65 6e 63 72 79 70 74 65 64 20 y for encrypted
17e0: 73 6f 63 6b 65 74 20 61 6e 64 20 49 2f 4f 20 63 socket and I/O c
17f0: 68 61 6e 6e 65 6c 20 63 6f 6d 6d 75 6e 69 63 61 hannel communica
1800: 74 69 6f 6e 73 0a 2e 53 48 20 53 59 4e 4f 50 53 tions..SH SYNOPS
1810: 49 53 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 IS.package requi
1820: 72 65 20 5c 66 42 54 63 6c 20 38 5c 26 2e 35 2d re \fBTcl 8\&.5-
1830: 5c 66 52 0a 2e 73 70 0a 70 61 63 6b 61 67 65 20 \fR..sp.package
1840: 72 65 71 75 69 72 65 20 5c 66 42 74 6c 73 20 31 require \fBtls 1
1850: 5c 26 2e 38 5c 66 52 0a 2e 73 70 0a 5c 66 42 74 \&.8\fR..sp.\fBt
1860: 6c 73 3a 3a 69 6e 69 74 5c 66 52 20 3f 5c 66 49 ls::init\fR ?\fI
1870: 2d 6f 70 74 69 6f 6e 5c 66 52 3f 20 3f 5c 66 49 -option\fR? ?\fI
1880: 76 61 6c 75 65 5c 66 52 3f 20 3f 5c 66 49 2d 6f value\fR? ?\fI-o
1890: 70 74 69 6f 6e 20 76 61 6c 75 65 20 5c 26 2e 5c ption value \&.\
18a0: 26 2e 5c 26 2e 5c 66 52 3f 0a 2e 73 70 0a 5c 66 &.\&.\fR?..sp.\f
18b0: 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 20 Btls::socket\fR
18c0: 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 3f 20 ?\fI-option\fR?
18d0: 3f 5c 66 49 76 61 6c 75 65 5c 66 52 3f 20 3f 5c ?\fIvalue\fR? ?\
18e0: 66 49 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 fI-option value
18f0: 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 20 5c 66 \&.\&.\&.\fR? \f
1900: 49 68 6f 73 74 5c 66 52 20 5c 66 49 70 6f 72 74 Ihost\fR \fIport
1910: 5c 66 52 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a 3a \fR..sp.\fBtls::
1920: 73 6f 63 6b 65 74 5c 66 52 20 5c 66 42 2d 73 65 socket\fR \fB-se
1930: 72 76 65 72 5c 66 52 20 5c 66 49 63 6f 6d 6d 61 rver\fR \fIcomma
1940: 6e 64 5c 66 52 20 3f 5c 66 49 2d 6f 70 74 69 6f nd\fR ?\fI-optio
1950: 6e 5c 66 52 3f 20 3f 5c 66 49 76 61 6c 75 65 5c n\fR? ?\fIvalue\
1960: 66 52 3f 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 20 fR? ?\fI-option
1970: 76 61 6c 75 65 20 5c 26 2e 5c 26 2e 5c 26 2e 5c value \&.\&.\&.\
1980: 66 52 3f 20 5c 66 49 70 6f 72 74 5c 66 52 0a 2e fR? \fIport\fR..
1990: 73 70 0a 5c 66 42 74 6c 73 3a 3a 69 6d 70 6f 72 sp.\fBtls::impor
19a0: 74 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 5c t\fR \fIchannel\
19b0: 66 52 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 fR ?\fI-option\f
19c0: 52 3f 20 3f 5c 66 49 76 61 6c 75 65 5c 66 52 3f R? ?\fIvalue\fR?
19d0: 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 20 76 61 6c ?\fI-option val
19e0: 75 65 20 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f ue \&.\&.\&.\fR?
19f0: 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a 3a 75 6e 69 ..sp.\fBtls::uni
1a00: 6d 70 6f 72 74 5c 66 52 20 5c 66 49 63 68 61 6e mport\fR \fIchan
1a10: 6e 65 6c 5c 66 52 0a 2e 73 70 0a 5c 66 42 74 6c nel\fR..sp.\fBtl
1a20: 73 3a 3a 68 61 6e 64 73 68 61 6b 65 5c 66 52 20 s::handshake\fR
1a30: 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 0a 2e 73 \fIchannel\fR..s
1a40: 70 0a 5c 66 42 74 6c 73 3a 3a 73 74 61 74 75 73 p.\fBtls::status
1a50: 5c 66 52 20 3f 5c 66 42 2d 6c 6f 63 61 6c 5c 66 \fR ?\fB-local\f
1a60: 52 3f 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 R? \fIchannel\fR
1a70: 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a 3a 63 6f 6e ..sp.\fBtls::con
1a80: 6e 65 63 74 69 6f 6e 5c 66 52 20 5c 66 49 63 68 nection\fR \fIch
1a90: 61 6e 6e 65 6c 5c 66 52 0a 2e 73 70 0a 5c 66 42 annel\fR..sp.\fB
1aa0: 74 6c 73 3a 3a 63 69 70 68 65 72 73 5c 66 52 20 tls::ciphers\fR
1ab0: 3f 5c 66 49 70 72 6f 74 6f 63 6f 6c 5c 66 52 3f ?\fIprotocol\fR?
1ac0: 20 3f 5c 66 49 76 65 72 62 6f 73 65 5c 66 52 3f ?\fIverbose\fR?
1ad0: 20 3f 5c 66 49 73 75 70 70 6f 72 74 65 64 5c 66 ?\fIsupported\f
1ae0: 52 3f 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a 3a 70 R?..sp.\fBtls::p
1af0: 72 6f 74 6f 63 6f 6c 73 5c 66 52 0a 2e 73 70 0a rotocols\fR..sp.
1b00: 5c 66 42 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 5c \fBtls::version\
1b10: 66 52 0a 2e 73 70 0a 2e 42 45 0a 2e 53 48 20 44 fR..sp..BE..SH D
1b20: 45 53 43 52 49 50 54 49 4f 4e 0a 54 68 69 73 20 ESCRIPTION.This
1b30: 65 78 74 65 6e 73 69 6f 6e 20 70 72 6f 76 69 64 extension provid
1b40: 65 73 20 54 43 4c 20 73 63 72 69 70 74 20 61 63 es TCL script ac
1b50: 63 65 73 73 20 74 6f 20 73 65 63 75 72 65 20 73 cess to secure s
1b60: 6f 63 6b 65 74 20 63 6f 6d 6d 75 6e 69 63 61 74 ocket communicat
1b70: 69 6f 6e 73 0a 75 73 69 6e 67 20 74 68 65 20 54 ions.using the T
1b80: 72 61 6e 73 70 6f 72 74 20 4c 61 79 65 72 20 53 ransport Layer S
1b90: 65 63 75 72 69 74 79 20 28 54 4c 53 29 20 70 72 ecurity (TLS) pr
1ba0: 6f 74 6f 63 6f 6c 5c 26 2e 20 49 74 20 70 72 6f otocol\&. It pro
1bb0: 76 69 64 65 73 20 61 20 67 65 6e 65 72 69 63 0a vides a generic.
1bc0: 62 69 6e 64 69 6e 67 20 74 6f 20 5c 66 49 4f 70 binding to \fIOp
1bd0: 65 6e 53 53 4c 5c 66 52 20 5b 68 74 74 70 73 3a enSSL\fR [https:
1be0: 2f 2f 77 77 77 5c 26 2e 6f 70 65 6e 73 73 6c 5c //www\&.openssl\
1bf0: 26 2e 6f 72 67 2f 5d 2c 20 75 74 69 6c 69 7a 69 &.org/], utilizi
1c00: 6e 67 20 74 68 65 0a 5c 66 42 54 63 6c 5f 53 74 ng the.\fBTcl_St
1c10: 61 63 6b 43 68 61 6e 6e 65 6c 5c 66 52 20 41 50 ackChannel\fR AP
1c20: 49 20 69 6e 20 54 43 4c 20 38 5c 26 2e 34 20 61 I in TCL 8\&.4 a
1c30: 6e 64 20 68 69 67 68 65 72 5c 26 2e 0a 54 68 65 nd higher\&..The
1c40: 73 65 20 73 6f 63 6b 65 74 73 20 62 65 68 61 76 se sockets behav
1c50: 65 20 65 78 61 63 74 6c 79 20 74 68 65 20 73 61 e exactly the sa
1c60: 6d 65 20 61 73 20 63 68 61 6e 6e 65 6c 73 20 63 me as channels c
1c70: 72 65 61 74 65 64 20 75 73 69 6e 67 20 74 68 65 reated using the
1c80: 20 62 75 69 6c 74 2d 69 6e 0a 5c 66 42 73 6f 63 built-in.\fBsoc
1c90: 6b 65 74 5c 66 52 20 63 6f 6d 6d 61 6e 64 2c 20 ket\fR command,
1ca0: 61 6c 6f 6e 67 20 77 69 74 68 20 61 64 64 69 74 along with addit
1cb0: 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 66 6f ional options fo
1cc0: 72 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 0a 74 68 r controlling.th
1cd0: 65 20 53 53 4c 2f 54 4c 53 20 73 65 73 73 69 6f e SSL/TLS sessio
1ce0: 6e 5c 26 2e 0a 2e 53 48 20 43 4f 4d 4d 41 4e 44 n\&...SH COMMAND
1cf0: 53 0a 54 79 70 69 63 61 6c 6c 79 20 6f 6e 65 20 S.Typically one
1d00: 77 6f 75 6c 64 20 75 73 65 20 74 68 65 20 5c 66 would use the \f
1d10: 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 20 Btls::socket\fR
1d20: 63 6f 6d 6d 61 6e 64 20 74 6f 20 63 72 65 61 74 command to creat
1d30: 65 20 61 20 6e 65 77 20 65 6e 63 72 79 70 74 65 e a new encrypte
1d40: 64 0a 54 43 50 20 73 6f 63 6b 65 74 5c 26 2e 20 d.TCP socket\&.
1d50: 49 74 20 69 73 20 63 6f 6d 70 61 74 69 62 6c 65 It is compatible
1d60: 20 77 69 74 68 20 74 68 65 20 6e 61 74 69 76 65 with the native
1d70: 20 54 43 4c 20 5c 66 42 3a 3a 73 6f 63 6b 65 74 TCL \fB::socket
1d80: 5c 66 52 20 63 6f 6d 6d 61 6e 64 5c 26 2e 0a 41 \fR command\&..A
1d90: 6c 74 65 72 6e 61 74 69 76 65 6c 79 20 66 6f 72 lternatively for
1da0: 20 61 6e 20 65 78 69 73 74 69 6e 67 20 54 43 50 an existing TCP
1db0: 20 73 6f 63 6b 65 74 2c 20 74 68 65 20 5c 66 42 socket, the \fB
1dc0: 74 6c 73 3a 3a 69 6d 70 6f 72 74 5c 66 52 20 63 tls::import\fR c
1dd0: 6f 6d 6d 61 6e 64 20 63 61 6e 20 62 65 0a 75 73 ommand can be.us
1de0: 65 64 20 74 6f 20 73 74 61 72 74 20 54 4c 53 20 ed to start TLS
1df0: 6f 6e 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f on the connectio
1e00: 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a n\&...TP.\fBtls:
1e10: 3a 69 6e 69 74 5c 66 52 20 3f 5c 66 49 2d 6f 70 :init\fR ?\fI-op
1e20: 74 69 6f 6e 5c 66 52 3f 20 3f 5c 66 49 76 61 6c tion\fR? ?\fIval
1e30: 75 65 5c 66 52 3f 20 3f 5c 66 49 2d 6f 70 74 69 ue\fR? ?\fI-opti
1e40: 6f 6e 20 76 61 6c 75 65 20 5c 26 2e 5c 26 2e 5c on value \&.\&.\
1e50: 26 2e 5c 66 52 3f 0a 4f 70 74 69 6f 6e 61 6c 20 &.\fR?.Optional
1e60: 66 75 6e 63 74 69 6f 6e 20 74 6f 20 73 65 74 20 function to set
1e70: 74 68 65 20 64 65 66 61 75 6c 74 20 6f 70 74 69 the default opti
1e80: 6f 6e 73 20 75 73 65 64 20 62 79 20 5c 66 42 74 ons used by \fBt
1e90: 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 5c 26 2e ls::socket\fR\&.
1ea0: 20 49 66 20 79 6f 75 0a 63 61 6c 6c 20 5c 66 42 If you.call \fB
1eb0: 74 6c 73 3a 3a 69 6d 70 6f 72 74 5c 66 52 20 64 tls::import\fR d
1ec0: 69 72 65 63 74 6c 79 2c 20 74 68 69 73 20 63 6f irectly, this co
1ed0: 6d 6d 61 6e 64 20 68 61 73 20 6e 6f 20 65 66 66 mmand has no eff
1ee0: 65 63 74 5c 26 2e 20 54 68 69 73 20 63 6f 6d 6d ect\&. This comm
1ef0: 61 6e 64 0a 73 75 70 70 6f 72 74 73 20 61 6c 6c and.supports all
1f00: 20 6f 66 20 74 68 65 20 73 61 6d 65 20 6f 70 74 of the same opt
1f10: 69 6f 6e 73 20 61 73 20 74 68 65 20 5c 66 42 74 ions as the \fBt
1f20: 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 20 63 6f ls::socket\fR co
1f30: 6d 6d 61 6e 64 2c 20 74 68 6f 75 67 68 20 79 6f mmand, though yo
1f40: 75 0a 73 68 6f 75 6c 64 20 6c 69 6d 69 74 20 79 u.should limit y
1f50: 6f 75 72 20 6f 70 74 69 6f 6e 73 20 74 6f 20 6f our options to o
1f60: 6e 6c 79 20 54 4c 53 20 72 65 6c 61 74 65 64 20 nly TLS related
1f70: 6f 6e 65 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 ones\&...TP.\fBt
1f80: 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 20 3f 5c ls::socket\fR ?\
1f90: 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 3f 20 3f 5c fI-option\fR? ?\
1fa0: 66 49 76 61 6c 75 65 5c 66 52 3f 20 3f 5c 66 49 fIvalue\fR? ?\fI
1fb0: 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 5c 26 -option value \&
1fc0: 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 20 5c 66 49 68 .\&.\&.\fR? \fIh
1fd0: 6f 73 74 5c 66 52 20 5c 66 49 70 6f 72 74 5c 66 ost\fR \fIport\f
1fe0: 52 0a 54 68 69 73 20 69 73 20 61 20 68 65 6c 70 R.This is a help
1ff0: 65 72 20 66 75 6e 63 74 69 6f 6e 20 74 68 61 74 er function that
2000: 20 75 74 69 6c 69 7a 65 73 20 74 68 65 20 75 6e utilizes the un
2010: 64 65 72 6c 79 69 6e 67 20 63 6f 6d 6d 61 6e 64 derlying command
2020: 73 20 5c 66 42 73 6f 63 6b 65 74 5c 66 52 0a 61 s \fBsocket\fR.a
2030: 6e 64 20 5c 66 42 74 6c 73 3a 3a 69 6d 70 6f 72 nd \fBtls::impor
2040: 74 5c 66 52 20 74 6f 20 63 72 65 61 74 65 20 74 t\fR to create t
2050: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 5c 26 2e he connection\&.
2060: 20 49 74 20 62 65 68 61 76 65 73 20 74 68 65 20 It behaves the
2070: 73 61 6d 65 20 61 73 20 74 68 65 0a 6e 61 74 69 same as the.nati
2080: 76 65 20 54 43 4c 20 5c 66 42 73 6f 63 6b 65 74 ve TCL \fBsocket
2090: 5c 66 52 20 63 6f 6d 6d 61 6e 64 2c 20 62 75 74 \fR command, but
20a0: 20 61 6c 73 6f 20 73 75 70 70 6f 72 74 73 20 74 also supports t
20b0: 68 65 20 5c 66 42 74 6c 73 3a 69 6d 70 6f 72 74 he \fBtls:import
20c0: 5c 66 52 0a 63 6f 6d 6d 61 6e 64 20 6f 70 74 69 \fR.command opti
20d0: 6f 6e 73 20 77 69 74 68 20 6f 6e 65 20 61 64 64 ons with one add
20e0: 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 5c 26 itional option\&
20f0: 2e 20 49 74 20 72 65 74 75 72 6e 73 20 74 68 65 . It returns the
2100: 20 63 68 61 6e 6e 65 6c 20 68 61 6e 64 6c 65 20 channel handle
2110: 69 64 0a 66 6f 72 20 74 68 65 20 6e 65 77 20 73 id.for the new s
2120: 6f 63 6b 65 74 5c 26 2e 0a 2e 52 53 0a 2e 54 50 ocket\&...RS..TP
2130: 0a 5c 66 42 2d 61 75 74 6f 73 65 72 76 65 72 6e .\fB-autoservern
2140: 61 6d 65 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 ame\fR \fIbool\f
2150: 52 0a 49 66 20 5c 66 42 74 72 75 65 5c 66 52 2c R.If \fBtrue\fR,
2160: 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 73 automatically s
2170: 65 74 20 74 68 65 20 5c 66 42 2d 73 65 72 76 65 et the \fB-serve
2180: 72 6e 61 6d 65 5c 66 52 20 61 72 67 75 6d 65 6e rname\fR argumen
2190: 74 20 74 6f 20 74 68 65 0a 5c 66 49 68 6f 73 74 t to the.\fIhost
21a0: 5c 66 52 20 61 72 67 75 6d 65 6e 74 5c 26 2e 20 \fR argument\&.
21b0: 44 65 66 61 75 6c 74 20 69 73 20 5c 66 42 66 61 Default is \fBfa
21c0: 6c 73 65 5c 66 52 5c 26 2e 0a 2e 52 45 0a 2e 54 lse\fR\&...RE..T
21d0: 50 0a 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 P.\fBtls::socket
21e0: 5c 66 52 20 5c 66 42 2d 73 65 72 76 65 72 5c 66 \fR \fB-server\f
21f0: 52 20 5c 66 49 63 6f 6d 6d 61 6e 64 5c 66 52 20 R \fIcommand\fR
2200: 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 3f 20 ?\fI-option\fR?
2210: 3f 5c 66 49 76 61 6c 75 65 5c 66 52 3f 20 3f 5c ?\fIvalue\fR? ?\
2220: 66 49 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 fI-option value
2230: 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 20 5c 66 \&.\&.\&.\fR? \f
2240: 49 70 6f 72 74 5c 66 52 0a 53 61 6d 65 20 61 73 Iport\fR.Same as
2250: 20 70 72 65 76 69 6f 75 73 2c 20 62 75 74 20 69 previous, but i
2260: 6e 73 74 65 61 64 20 63 72 65 61 74 65 73 20 61 nstead creates a
2270: 20 73 65 72 76 65 72 20 73 6f 63 6b 65 74 20 66 server socket f
2280: 6f 72 20 63 6c 69 65 6e 74 73 20 74 6f 20 63 6f or clients to co
2290: 6e 6e 65 63 74 20 74 6f 0a 6a 75 73 74 20 6c 69 nnect to.just li
22a0: 6b 65 20 74 68 65 20 54 63 6c 20 5c 66 42 73 6f ke the Tcl \fBso
22b0: 63 6b 65 74 20 2d 73 65 72 76 65 72 5c 66 52 20 cket -server\fR
22c0: 63 6f 6d 6d 61 6e 64 5c 26 2e 20 49 74 20 72 65 command\&. It re
22d0: 74 75 72 6e 73 20 74 68 65 20 63 68 61 6e 6e 65 turns the channe
22e0: 6c 0a 68 61 6e 64 6c 65 20 69 64 20 66 6f 72 20 l.handle id for
22f0: 74 68 65 20 6e 65 77 20 73 6f 63 6b 65 74 5c 26 the new socket\&
2300: 2e 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 69 6d ...TP.\fBtls::im
2310: 70 6f 72 74 5c 66 52 20 5c 66 49 63 68 61 6e 6e port\fR \fIchann
2320: 65 6c 5c 66 52 20 3f 5c 66 49 2d 6f 70 74 69 6f el\fR ?\fI-optio
2330: 6e 5c 66 52 3f 20 3f 5c 66 49 76 61 6c 75 65 5c n\fR? ?\fIvalue\
2340: 66 52 3f 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 20 fR? ?\fI-option
2350: 76 61 6c 75 65 20 5c 26 2e 5c 26 2e 5c 26 2e 5c value \&.\&.\&.\
2360: 66 52 3f 0a 53 74 61 72 74 20 54 4c 53 20 65 6e fR?.Start TLS en
2370: 63 72 79 70 74 69 6f 6e 20 6f 6e 20 54 43 4c 20 cryption on TCL
2380: 63 68 61 6e 6e 65 6c 20 5c 66 49 63 68 61 6e 6e channel \fIchann
2390: 65 6c 5c 66 52 20 76 69 61 20 61 20 73 74 61 63 el\fR via a stac
23a0: 6b 65 64 20 63 68 61 6e 6e 65 6c 5c 26 2e 20 49 ked channel\&. I
23b0: 74 0a 6e 65 65 64 20 6e 6f 74 20 62 65 20 61 20 t.need not be a
23c0: 73 6f 63 6b 65 74 2c 20 62 75 74 20 6d 75 73 74 socket, but must
23d0: 20 70 72 6f 76 69 64 65 20 62 69 2d 64 69 72 65 provide bi-dire
23e0: 63 74 69 6f 6e 61 6c 20 66 6c 6f 77 5c 26 2e 20 ctional flow\&.
23f0: 41 6c 73 6f 20 73 65 74 73 20 73 65 73 73 69 6f Also sets sessio
2400: 6e 0a 70 61 72 61 6d 65 74 65 72 73 20 66 6f 72 n.parameters for
2410: 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 5c 26 SSL handshake\&
2420: 2e 20 56 61 6c 69 64 20 6f 70 74 69 6f 6e 73 20 . Valid options
2430: 61 72 65 3a 0a 2e 52 53 0a 2e 54 50 0a 5c 66 42 are:..RS..TP.\fB
2440: 2d 61 6c 70 6e 5c 66 52 20 5c 66 49 6c 69 73 74 -alpn\fR \fIlist
2450: 5c 66 52 0a 4c 69 73 74 20 6f 66 20 70 72 6f 74 \fR.List of prot
2460: 6f 63 6f 6c 73 20 74 6f 20 6f 66 66 65 72 20 64 ocols to offer d
2470: 75 72 69 6e 67 20 41 70 70 6c 69 63 61 74 69 6f uring Applicatio
2480: 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c n-Layer Protocol
2490: 20 4e 65 67 6f 74 69 61 74 69 6f 6e 0a 28 41 4c Negotiation.(AL
24a0: 50 4e 29 5c 26 2e 20 46 6f 72 20 65 78 61 6d 70 PN)\&. For examp
24b0: 6c 65 3a 20 5c 66 42 68 32 5c 66 52 20 61 6e 64 le: \fBh2\fR and
24c0: 20 5c 66 42 68 74 74 70 2f 31 5c 26 2e 31 5c 66 \fBhttp/1\&.1\f
24d0: 52 2c 20 62 75 74 20 6e 6f 74 20 5c 66 42 68 33 R, but not \fBh3
24e0: 5c 66 52 20 6f 72 0a 5c 66 42 71 75 69 63 5c 66 \fR or.\fBquic\f
24f0: 52 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 61 64 R\&...TP.\fB-cad
2500: 69 72 5c 66 52 20 5c 66 49 64 69 72 65 63 74 6f ir\fR \fIdirecto
2510: 72 79 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 ry\fR.Specifies
2520: 74 68 65 20 64 69 72 65 63 74 6f 72 79 20 77 68 the directory wh
2530: 65 72 65 20 74 68 65 20 43 65 72 74 69 66 69 63 ere the Certific
2540: 61 74 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 ate Authority (C
2550: 41 29 20 63 65 72 74 69 66 69 63 61 74 65 73 20 A) certificates
2560: 61 72 65 0a 73 74 6f 72 65 64 5c 26 2e 20 54 68 are.stored\&. Th
2570: 65 20 64 65 66 61 75 6c 74 20 69 73 20 70 6c 61 e default is pla
2580: 74 66 6f 72 6d 20 73 70 65 63 69 66 69 63 20 61 tform specific a
2590: 6e 64 20 63 61 6e 20 62 65 20 73 65 74 20 61 74 nd can be set at
25a0: 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 5c 26 2e compile time\&.
25b0: 20 54 68 65 0a 64 65 66 61 75 6c 74 20 6c 6f 63 The.default loc
25c0: 61 74 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76 65 ation can be ove
25d0: 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 5c rridden by the \
25e0: 66 42 53 53 4c 5f 43 45 52 54 5f 44 49 52 5c 66 fBSSL_CERT_DIR\f
25f0: 52 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 61 R environment.va
2600: 72 69 61 62 6c 65 5c 26 2e 20 53 65 65 20 5c 66 riable\&. See \f
2610: 42 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c BCertificate Val
2620: 69 64 61 74 69 6f 6e 5c 66 52 20 66 6f 72 20 6d idation\fR for m
2630: 6f 72 65 20 64 65 74 61 69 6c 73 5c 26 2e 0a 2e ore details\&...
2640: 54 50 0a 5c 66 42 2d 63 61 66 69 6c 65 5c 66 52 TP.\fB-cafile\fR
2650: 20 5c 66 49 66 69 6c 65 6e 61 6d 65 5c 66 52 0a \fIfilename\fR.
2660: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 66 69 Specifies the fi
2670: 6c 65 20 77 69 74 68 20 74 68 65 20 43 65 72 74 le with the Cert
2680: 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 ificate Authorit
2690: 79 20 28 43 41 29 20 63 65 72 74 69 66 69 63 61 y (CA) certifica
26a0: 74 65 73 20 74 6f 20 75 73 65 20 69 6e 0a 5c 66 tes to use in.\f
26b0: 42 50 45 4d 5c 66 52 20 66 69 6c 65 20 66 6f 72 BPEM\fR file for
26c0: 6d 61 74 5c 26 2e 20 54 68 65 20 64 65 66 61 75 mat\&. The defau
26d0: 6c 74 20 69 73 20 22 5c 66 49 63 65 72 74 5c 26 lt is "\fIcert\&
26e0: 2e 70 65 6d 5c 66 52 22 2c 20 69 6e 20 74 68 65 .pem\fR", in the
26f0: 20 4f 70 65 6e 53 53 4c 0a 64 69 72 65 63 74 6f OpenSSL.directo
2700: 72 79 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c ry\&. The defaul
2710: 74 20 66 69 6c 65 20 63 61 6e 20 62 65 20 6f 76 t file can be ov
2720: 65 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 erridden by the
2730: 5c 66 42 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 \fBSSL_CERT_FILE
2740: 5c 66 52 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a \fR environment.
2750: 76 61 72 69 61 62 6c 65 5c 26 2e 20 53 65 65 20 variable\&. See
2760: 5c 66 42 43 65 72 74 69 66 69 63 61 74 65 20 56 \fBCertificate V
2770: 61 6c 69 64 61 74 69 6f 6e 5c 66 52 20 66 6f 72 alidation\fR for
2780: 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 5c 26 2e more details\&.
2790: 0a 2e 54 50 0a 5c 66 42 2d 63 61 73 74 6f 72 65 ..TP.\fB-castore
27a0: 5c 66 52 20 5c 66 49 55 52 49 5c 66 52 0a 53 70 \fR \fIURI\fR.Sp
27b0: 65 63 69 66 69 65 73 20 74 68 65 20 55 6e 69 66 ecifies the Unif
27c0: 6f 72 6d 20 52 65 73 6f 75 72 63 65 20 49 64 65 orm Resource Ide
27d0: 6e 74 69 66 69 65 72 20 28 55 52 49 29 20 66 6f ntifier (URI) fo
27e0: 72 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74 r the Certificat
27f0: 65 20 41 75 74 68 6f 72 69 74 79 0a 28 43 41 29 e Authority.(CA)
2800: 20 73 74 6f 72 65 2c 20 77 68 69 63 68 20 6d 61 store, which ma
2810: 79 20 62 65 20 61 20 73 69 6e 67 6c 65 20 63 6f y be a single co
2820: 6e 74 61 69 6e 65 72 20 6f 72 20 61 20 63 61 74 ntainer or a cat
2830: 61 6c 6f 67 20 6f 66 20 63 6f 6e 74 61 69 6e 65 alog of containe
2840: 72 73 5c 26 2e 0a 53 74 61 72 74 69 6e 67 20 77 rs\&..Starting w
2850: 69 74 68 20 4f 70 65 6e 53 53 4c 20 33 5c 26 2e ith OpenSSL 3\&.
2860: 32 20 6f 6e 20 4d 53 20 57 69 6e 64 6f 77 73 2c 2 on MS Windows,
2870: 20 73 65 74 20 74 6f 20 22 5c 66 42 6f 72 67 5c set to "\fBorg\
2880: 26 2e 6f 70 65 6e 73 73 6c 5c 26 2e 77 69 6e 73 &.openssl\&.wins
2890: 74 6f 72 65 3a 2f 2f 5c 66 52 22 0a 74 6f 20 75 tore://\fR".to u
28a0: 73 65 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 20 se the built-in
28b0: 4d 53 20 57 69 6e 64 6f 77 73 20 43 65 72 74 69 MS Windows Certi
28c0: 66 69 63 61 74 65 20 53 74 6f 72 65 5c 26 2e 20 ficate Store\&.
28d0: 53 65 65 0a 5c 66 42 43 65 72 74 69 66 69 63 61 See.\fBCertifica
28e0: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 5c 66 52 te Validation\fR
28f0: 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c for more detail
2900: 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 65 72 s\&...TP.\fB-cer
2910: 74 66 69 6c 65 5c 66 52 20 5c 66 49 66 69 6c 65 tfile\fR \fIfile
2920: 6e 61 6d 65 5c 66 52 0a 53 70 65 63 69 66 69 65 name\fR.Specifie
2930: 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 s the name of th
2940: 65 20 66 69 6c 65 20 77 69 74 68 20 74 68 65 20 e file with the
2950: 63 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 certificate to u
2960: 73 65 20 69 6e 20 50 45 4d 20 66 6f 72 6d 61 74 se in PEM format
2970: 0a 61 73 20 74 68 65 20 6c 6f 63 61 6c 20 28 63 .as the local (c
2980: 6c 69 65 6e 74 20 6f 72 20 73 65 72 76 65 72 29 lient or server)
2990: 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 2e 20 certificate\&.
29a0: 49 74 20 61 6c 73 6f 20 63 6f 6e 74 61 69 6e 73 It also contains
29b0: 20 74 68 65 20 70 75 62 6c 69 63 20 6b 65 79 5c the public key\
29c0: 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 65 72 74 5c &...TP.\fB-cert\
29d0: 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a fR \fIstring\fR.
29e0: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 63 65 Specifies the ce
29f0: 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 73 65 rtificate to use
2a00: 20 61 73 20 61 20 44 45 52 20 65 6e 63 6f 64 65 as a DER encode
2a10: 64 20 73 74 72 69 6e 67 20 28 58 5c 26 2e 35 30 d string (X\&.50
2a20: 39 20 44 45 52 29 5c 26 2e 0a 2e 54 50 0a 5c 66 9 DER)\&...TP.\f
2a30: 42 2d 63 69 70 68 65 72 5c 66 52 20 5c 66 49 73 B-cipher\fR \fIs
2a40: 74 72 69 6e 67 5c 66 52 0a 53 70 65 63 69 66 69 tring\fR.Specifi
2a50: 65 73 20 74 68 65 20 6c 69 73 74 20 6f 66 20 63 es the list of c
2a60: 69 70 68 65 72 73 20 74 6f 20 75 73 65 20 66 6f iphers to use fo
2a70: 72 20 54 4c 53 20 31 5c 26 2e 32 20 61 6e 64 20 r TLS 1\&.2 and
2a80: 65 61 72 6c 69 65 72 20 63 6f 6e 6e 65 63 74 69 earlier connecti
2a90: 6f 6e 73 5c 26 2e 0a 53 74 72 69 6e 67 20 69 73 ons\&..String is
2aa0: 20 61 20 63 6f 6c 6f 6e 20 22 5c 66 42 3a 5c 66 a colon "\fB:\f
2ab0: 52 22 20 73 65 70 61 72 61 74 65 64 20 6c 69 73 R" separated lis
2ac0: 74 20 6f 66 20 63 69 70 68 65 72 73 5c 26 2e 0a t of ciphers\&..
2ad0: 43 69 70 68 65 72 73 20 63 61 6e 20 62 65 20 63 Ciphers can be c
2ae0: 6f 6d 62 69 6e 65 64 20 75 73 69 6e 67 20 74 68 ombined using th
2af0: 65 20 22 5c 66 42 2b 5c 66 52 22 20 63 68 61 72 e "\fB+\fR" char
2b00: 61 63 74 65 72 5c 26 2e 0a 50 72 65 66 69 78 65 acter\&..Prefixe
2b10: 73 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f s can be used to
2b20: 20 70 65 72 6d 61 6e 65 6e 74 6c 79 20 72 65 6d permanently rem
2b30: 6f 76 65 20 22 5c 66 42 21 5c 66 52 22 2c 20 64 ove "\fB!\fR", d
2b40: 65 6c 65 74 65 20 22 5c 66 42 2d 5c 66 52 22 2c elete "\fB-\fR",
2b50: 20 6f 72 0a 6d 6f 76 65 20 74 6f 20 74 68 65 20 or.move to the
2b60: 65 6e 64 20 22 5c 66 42 2b 5c 66 52 22 20 61 20 end "\fB+\fR" a
2b70: 73 70 65 63 69 66 69 65 64 20 63 69 70 68 65 72 specified cipher
2b80: 5c 26 2e 0a 4b 65 79 77 6f 72 64 73 20 5c 66 42 \&..Keywords \fB
2b90: 40 53 54 52 45 4e 47 54 48 5c 66 52 20 28 73 6f @STRENGTH\fR (so
2ba0: 72 74 20 62 79 20 61 6c 67 6f 72 69 74 68 6d 20 rt by algorithm
2bb0: 6b 65 79 20 6c 65 6e 67 74 68 29 2c 0a 5c 66 42 key length),.\fB
2bc0: 40 53 45 43 4c 45 56 45 4c 3d 5c 66 52 5c 66 49 @SECLEVEL=\fR\fI
2bd0: 6e 5c 66 52 20 28 73 65 74 20 73 65 63 75 72 69 n\fR (set securi
2be0: 74 79 20 6c 65 76 65 6c 20 74 6f 20 6e 29 2c 20 ty level to n),
2bf0: 61 6e 64 0a 5c 66 42 44 45 46 41 55 4c 54 5c 66 and.\fBDEFAULT\f
2c00: 52 20 28 75 73 65 20 64 65 66 61 75 6c 74 20 63 R (use default c
2c10: 69 70 68 65 72 20 6c 69 73 74 2c 20 61 74 20 73 ipher list, at s
2c20: 74 61 72 74 20 6f 6e 6c 79 29 20 63 61 6e 20 61 tart only) can a
2c30: 6c 73 6f 20 62 65 20 73 70 65 63 69 66 69 65 64 lso be specified
2c40: 5c 26 2e 0a 53 65 65 20 74 68 65 20 5c 66 49 4f \&..See the \fIO
2c50: 70 65 6e 53 53 4c 5c 66 52 20 5b 68 74 74 70 73 penSSL\fR [https
2c60: 3a 2f 2f 64 6f 63 73 5c 26 2e 6f 70 65 6e 73 73 ://docs\&.openss
2c70: 6c 5c 26 2e 6f 72 67 2f 6d 61 73 74 65 72 2f 6d l\&.org/master/m
2c80: 61 6e 31 2f 6f 70 65 6e 73 73 6c 2d 63 69 70 68 an1/openssl-ciph
2c90: 65 72 73 2f 23 6f 70 74 69 6f 6e 73 5d 0a 64 6f ers/#options].do
2ca0: 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 cumentation for
2cb0: 74 68 65 20 66 75 6c 6c 20 6c 69 73 74 20 6f 66 the full list of
2cc0: 20 76 61 6c 69 64 20 76 61 6c 75 65 73 5c 26 2e valid values\&.
2cd0: 0a 2e 54 50 0a 5c 66 42 2d 63 69 70 68 65 72 73 ..TP.\fB-ciphers
2ce0: 75 69 74 65 73 5c 66 52 20 5c 66 49 73 74 72 69 uites\fR \fIstri
2cf0: 6e 67 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 ng\fR.Specifies
2d00: 74 68 65 20 6c 69 73 74 20 6f 66 20 63 69 70 68 the list of ciph
2d10: 65 72 20 73 75 69 74 65 73 20 74 6f 20 75 73 65 er suites to use
2d20: 20 66 6f 72 20 54 4c 53 20 31 5c 26 2e 33 20 61 for TLS 1\&.3 a
2d30: 73 20 61 20 63 6f 6c 6f 6e 0a 22 5c 66 42 3a 5c s a colon."\fB:\
2d40: 66 52 22 20 73 65 70 61 72 61 74 65 64 20 6c 69 fR" separated li
2d50: 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 75 69 st of cipher sui
2d60: 74 65 20 6e 61 6d 65 73 5c 26 2e 20 53 65 65 20 te names\&. See
2d70: 74 68 65 0a 5c 66 49 4f 70 65 6e 53 53 4c 5c 66 the.\fIOpenSSL\f
2d80: 52 20 5b 68 74 74 70 73 3a 2f 2f 64 6f 63 73 5c R [https://docs\
2d90: 26 2e 6f 70 65 6e 73 73 6c 5c 26 2e 6f 72 67 2f &.openssl\&.org/
2da0: 6d 61 73 74 65 72 2f 6d 61 6e 31 2f 6f 70 65 6e master/man1/open
2db0: 73 73 6c 2d 63 69 70 68 65 72 73 2f 23 6f 70 74 ssl-ciphers/#opt
2dc0: 69 6f 6e 73 5d 0a 64 6f 63 75 6d 65 6e 74 61 74 ions].documentat
2dd0: 69 6f 6e 20 66 6f 72 20 74 68 65 20 66 75 6c 6c ion for the full
2de0: 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 64 20 76 list of valid v
2df0: 61 6c 75 65 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 alues\&...TP.\fB
2e00: 2d 63 6f 6d 6d 61 6e 64 5c 66 52 20 5c 66 49 63 -command\fR \fIc
2e10: 61 6c 6c 62 61 63 6b 5c 66 52 0a 53 70 65 63 69 allback\fR.Speci
2e20: 66 69 65 73 20 74 68 65 20 63 61 6c 6c 62 61 63 fies the callbac
2e30: 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 62 65 20 k command to be
2e40: 69 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 65 72 invoked at sever
2e50: 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 69 6e 67 al points during
2e60: 20 74 68 65 0a 68 61 6e 64 73 68 61 6b 65 20 74 the.handshake t
2e70: 6f 20 70 61 73 73 20 65 72 72 6f 72 73 2c 20 74 o pass errors, t
2e80: 72 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61 74 69 racing informati
2e90: 6f 6e 2c 20 61 6e 64 20 70 72 6f 74 6f 63 6f 6c on, and protocol
2ea0: 20 6d 65 73 73 61 67 65 73 5c 26 2e 0a 53 65 65 messages\&..See
2eb0: 20 5c 66 42 43 61 6c 6c 62 61 63 6b 20 4f 70 74 \fBCallback Opt
2ec0: 69 6f 6e 73 5c 66 52 20 66 6f 72 20 6d 6f 72 65 ions\fR for more
2ed0: 20 69 6e 66 6f 5c 26 2e 0a 2e 54 50 0a 5c 66 42 info\&...TP.\fB
2ee0: 2d 64 68 70 61 72 61 6d 73 5c 66 52 20 5c 66 49 -dhparams\fR \fI
2ef0: 66 69 6c 65 6e 61 6d 65 5c 66 52 0a 53 70 65 63 filename\fR.Spec
2f00: 69 66 69 65 73 20 74 68 65 20 44 69 66 66 69 65 ifies the Diffie
2f10: 2d 48 65 6c 6c 6d 61 6e 20 28 44 48 29 20 70 61 -Hellman (DH) pa
2f20: 72 61 6d 65 74 65 72 73 20 66 69 6c 65 5c 26 2e rameters file\&.
2f30: 0a 2e 54 50 0a 5c 66 42 2d 6b 65 79 66 69 6c 65 ..TP.\fB-keyfile
2f40: 5c 66 52 20 5c 66 49 66 69 6c 65 6e 61 6d 65 5c \fR \fIfilename\
2f50: 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 fR.Specifies the
2f60: 20 70 72 69 76 61 74 65 20 6b 65 79 20 66 69 6c private key fil
2f70: 65 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 e\&. The default
2f80: 20 69 73 20 74 6f 20 75 73 65 20 74 68 65 20 66 is to use the f
2f90: 69 6c 65 0a 73 70 65 63 69 66 69 65 64 20 62 79 ile.specified by
2fa0: 20 74 68 65 20 5c 66 49 2d 63 65 72 74 66 69 6c the \fI-certfil
2fb0: 65 5c 66 52 20 6f 70 74 69 6f 6e 5c 26 2e 0a 2e e\fR option\&...
2fc0: 54 50 0a 5c 66 42 2d 6b 65 79 5c 66 52 20 5c 66 TP.\fB-key\fR \f
2fd0: 49 73 74 72 69 6e 67 5c 66 52 0a 53 70 65 63 69 Istring\fR.Speci
2fe0: 66 69 65 73 20 74 68 65 20 70 72 69 76 61 74 65 fies the private
2ff0: 20 6b 65 79 20 74 6f 20 75 73 65 20 61 73 20 61 key to use as a
3000: 20 44 45 52 20 65 6e 63 6f 64 65 64 20 73 74 72 DER encoded str
3010: 69 6e 67 20 28 50 4b 43 53 23 31 20 44 45 52 29 ing (PKCS#1 DER)
3020: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 6d 6f 64 65 \&...TP.\fB-mode
3030: 6c 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 5c l\fR \fIchannel\
3040: 66 52 0a 46 6f 72 63 65 20 74 68 69 73 20 63 68 fR.Force this ch
3050: 61 6e 6e 65 6c 20 74 6f 20 73 68 61 72 65 20 74 annel to share t
3060: 68 65 20 73 61 6d 65 20 5c 66 49 53 53 4c 5f 43 he same \fISSL_C
3070: 54 58 5c 66 52 20 73 74 72 75 63 74 75 72 65 20 TX\fR structure
3080: 61 73 20 74 68 65 0a 73 70 65 63 69 66 69 65 64 as the.specified
3090: 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 2c 20 \fIchannel\fR,
30a0: 61 6e 64 20 74 68 65 72 65 66 6f 72 65 20 73 68 and therefore sh
30b0: 61 72 65 20 63 6f 6e 66 69 67 2c 20 63 61 6c 6c are config, call
30c0: 62 61 63 6b 73 2c 20 65 74 63 5c 26 2e 0a 2e 54 backs, etc\&...T
30d0: 50 0a 5c 66 42 2d 70 61 73 73 77 6f 72 64 5c 66 P.\fB-password\f
30e0: 52 20 5c 66 49 63 61 6c 6c 62 61 63 6b 5c 66 52 R \fIcallback\fR
30f0: 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 20 63 .Specifies the c
3100: 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 allback command
3110: 74 6f 20 69 6e 76 6f 6b 65 20 77 68 65 6e 20 4f to invoke when O
3120: 70 65 6e 53 53 4c 20 6e 65 65 64 73 20 74 6f 20 penSSL needs to
3130: 6f 62 74 61 69 6e 20 61 0a 70 61 73 73 77 6f 72 obtain a.passwor
3140: 64 5c 26 2e 20 54 68 69 73 20 69 73 20 74 79 70 d\&. This is typ
3150: 69 63 61 6c 6c 79 20 75 73 65 64 20 74 6f 20 75 ically used to u
3160: 6e 6c 6f 63 6b 20 74 68 65 20 70 72 69 76 61 74 nlock the privat
3170: 65 20 6b 65 79 20 6f 66 20 61 20 63 65 72 74 69 e key of a certi
3180: 66 69 63 61 74 65 5c 26 2e 0a 54 68 65 20 63 61 ficate\&..The ca
3190: 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 llback should re
31a0: 74 75 72 6e 20 61 20 70 61 73 73 77 6f 72 64 20 turn a password
31b0: 73 74 72 69 6e 67 5c 26 2e 20 53 65 65 20 5c 66 string\&. See \f
31c0: 42 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e BCallback Option
31d0: 73 5c 66 52 0a 66 6f 72 20 6d 6f 72 65 20 69 6e s\fR.for more in
31e0: 66 6f 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 70 6f fo\&...TP.\fB-po
31f0: 73 74 5f 68 61 6e 64 73 68 61 6b 65 5c 66 52 20 st_handshake\fR
3200: 5c 66 49 62 6f 6f 6c 5c 66 52 0a 41 6c 6c 6f 77 \fIbool\fR.Allow
3210: 20 70 6f 73 74 2d 68 61 6e 64 73 68 61 6b 65 20 post-handshake
3220: 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 75 session ticket u
3230: 70 64 61 74 65 73 5c 26 2e 0a 2e 54 50 0a 5c 66 pdates\&...TP.\f
3240: 42 2d 72 65 71 75 65 73 74 5c 66 52 20 5c 66 49 B-request\fR \fI
3250: 62 6f 6f 6c 5c 66 52 0a 52 65 71 75 65 73 74 20 bool\fR.Request
3260: 61 20 63 65 72 74 69 66 69 63 61 74 65 20 66 72 a certificate fr
3270: 6f 6d 20 74 68 65 20 70 65 65 72 20 64 75 72 69 om the peer duri
3280: 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e 64 73 ng the SSL hands
3290: 68 61 6b 65 5c 26 2e 20 54 68 69 73 20 69 73 20 hake\&. This is
32a0: 6e 65 65 64 65 64 0a 74 6f 20 64 6f 20 43 65 72 needed.to do Cer
32b0: 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 tificate Validat
32c0: 69 6f 6e 5c 26 2e 20 53 74 61 72 74 69 6e 67 20 ion\&. Starting
32d0: 69 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 2c in TclTLS 1\&.8,
32e0: 20 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 0a the default is.
32f0: 5c 66 42 74 72 75 65 5c 66 52 5c 26 2e 0a 53 65 \fBtrue\fR\&..Se
3300: 65 20 5c 66 42 43 65 72 74 69 66 69 63 61 74 65 e \fBCertificate
3310: 20 56 61 6c 69 64 61 74 69 6f 6e 5c 66 52 20 66 Validation\fR f
3320: 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 5c or more details\
3330: 26 2e 0a 2e 54 50 0a 5c 66 42 2d 72 65 71 75 69 &...TP.\fB-requi
3340: 72 65 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 re\fR \fIbool\fR
3350: 0a 52 65 71 75 69 72 65 20 61 20 76 61 6c 69 64 .Require a valid
3360: 20 63 65 72 74 69 66 69 63 61 74 65 20 66 72 6f certificate fro
3370: 6d 20 74 68 65 20 70 65 65 72 20 64 75 72 69 6e m the peer durin
3380: 67 20 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 g the SSL handsh
3390: 61 6b 65 5c 26 2e 20 49 66 20 74 68 69 73 20 69 ake\&. If this i
33a0: 73 0a 73 65 74 20 74 6f 20 74 72 75 65 2c 20 74 s.set to true, t
33b0: 68 65 6e 20 5c 66 42 2d 72 65 71 75 65 73 74 5c hen \fB-request\
33c0: 66 52 20 6d 75 73 74 20 61 6c 73 6f 20 62 65 20 fR must also be
33d0: 73 65 74 20 74 6f 20 74 72 75 65 20 61 6e 64 20 set to true and
33e0: 61 20 65 69 74 68 65 72 0a 5c 66 42 2d 63 61 64 a either.\fB-cad
33f0: 69 72 5c 66 52 2c 20 5c 66 42 2d 63 61 66 69 6c ir\fR, \fB-cafil
3400: 65 5c 66 52 2c 20 5c 66 42 2d 63 61 73 74 6f 72 e\fR, \fB-castor
3410: 65 5c 66 52 2c 20 6f 72 20 61 20 70 6c 61 74 66 e\fR, or a platf
3420: 6f 72 6d 20 64 65 66 61 75 6c 74 0a 6d 75 73 74 orm default.must
3430: 20 62 65 20 70 72 6f 76 69 64 65 64 20 69 6e 20 be provided in
3440: 6f 72 64 65 72 20 74 6f 20 76 61 6c 69 64 61 74 order to validat
3450: 65 20 61 67 61 69 6e 73 74 5c 26 2e 20 54 68 65 e against\&. The
3460: 20 64 65 66 61 75 6c 74 20 69 6e 20 54 63 6c 54 default in TclT
3470: 4c 53 20 31 5c 26 2e 38 20 61 6e 64 0a 65 61 72 LS 1\&.8 and.ear
3480: 6c 69 65 72 20 76 65 72 73 69 6f 6e 73 20 69 73 lier versions is
3490: 20 5c 66 42 66 61 6c 73 65 5c 66 52 20 73 69 6e \fBfalse\fR sin
34a0: 63 65 20 6e 6f 74 20 61 6c 6c 20 70 6c 61 74 66 ce not all platf
34b0: 6f 72 6d 73 20 68 61 76 65 20 63 65 72 74 69 66 orms have certif
34c0: 69 63 61 74 65 73 20 74 6f 0a 76 61 6c 69 64 61 icates to.valida
34d0: 74 65 20 61 67 61 69 6e 73 74 20 69 6e 20 61 20 te against in a
34e0: 66 6f 72 6d 20 63 6f 6d 70 61 74 69 62 6c 65 20 form compatible
34f0: 77 69 74 68 20 4f 70 65 6e 53 53 4c 5c 26 2e 0a with OpenSSL\&..
3500: 53 65 65 20 5c 66 42 43 65 72 74 69 66 69 63 61 See \fBCertifica
3510: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 5c 66 52 te Validation\fR
3520: 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c for more detail
3530: 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 73 65 63 s\&...TP.\fB-sec
3540: 75 72 69 74 79 5f 6c 65 76 65 6c 5c 66 52 20 5c urity_level\fR \
3550: 66 49 69 6e 74 65 67 65 72 5c 66 52 0a 53 70 65 fIinteger\fR.Spe
3560: 63 69 66 69 65 73 20 74 68 65 20 73 65 63 75 72 cifies the secur
3570: 69 74 79 20 6c 65 76 65 6c 20 28 76 61 6c 75 65 ity level (value
3580: 20 66 72 6f 6d 20 30 20 74 6f 20 35 29 5c 26 2e from 0 to 5)\&.
3590: 20 54 68 65 20 73 65 63 75 72 69 74 79 20 6c 65 The security le
35a0: 76 65 6c 20 61 66 66 65 63 74 73 0a 74 68 65 20 vel affects.the
35b0: 61 6c 6c 6f 77 65 64 20 63 69 70 68 65 72 20 73 allowed cipher s
35c0: 75 69 74 65 20 65 6e 63 72 79 70 74 69 6f 6e 20 uite encryption
35d0: 61 6c 67 6f 72 69 74 68 6d 73 2c 20 73 75 70 70 algorithms, supp
35e0: 6f 72 74 65 64 20 45 43 43 20 63 75 72 76 65 73 orted ECC curves
35f0: 2c 0a 73 75 70 70 6f 72 74 65 64 20 73 69 67 6e ,.supported sign
3600: 61 74 75 72 65 20 61 6c 67 6f 72 69 74 68 6d 73 ature algorithms
3610: 2c 20 44 48 20 70 61 72 61 6d 65 74 65 72 20 73 , DH parameter s
3620: 69 7a 65 73 2c 20 63 65 72 74 69 66 69 63 61 74 izes, certificat
3630: 65 20 6b 65 79 20 73 69 7a 65 73 0a 61 6e 64 20 e key sizes.and
3640: 73 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 69 signature algori
3650: 74 68 6d 73 5c 26 2e 20 54 68 65 20 64 65 66 61 thms\&. The defa
3660: 75 6c 74 20 69 73 20 31 20 70 72 69 6f 72 20 74 ult is 1 prior t
3670: 6f 20 4f 70 65 6e 53 53 4c 20 33 5c 26 2e 32 20 o OpenSSL 3\&.2
3680: 61 6e 64 20 32 0a 74 68 65 72 65 61 66 74 65 72 and 2.thereafter
3690: 5c 26 2e 20 4c 65 76 65 6c 20 33 20 61 6e 64 20 \&. Level 3 and
36a0: 68 69 67 68 65 72 20 64 69 73 61 62 6c 65 20 73 higher disable s
36b0: 75 70 70 6f 72 74 20 66 6f 72 20 73 65 73 73 69 upport for sessi
36c0: 6f 6e 20 74 69 63 6b 65 74 73 20 61 6e 64 0a 6f on tickets and.o
36d0: 6e 6c 79 20 61 63 63 65 70 74 20 63 69 70 68 65 nly accept ciphe
36e0: 72 20 73 75 69 74 65 73 20 74 68 61 74 20 70 72 r suites that pr
36f0: 6f 76 69 64 65 20 66 6f 72 77 61 72 64 20 73 65 ovide forward se
3700: 63 72 65 63 79 5c 26 2e 0a 2e 54 50 0a 5c 66 42 crecy\&...TP.\fB
3710: 2d 73 65 72 76 65 72 5c 66 52 20 5c 66 49 62 6f -server\fR \fIbo
3720: 6f 6c 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 ol\fR.Specifies
3730: 77 68 65 74 68 65 72 20 74 6f 20 61 63 74 20 61 whether to act a
3740: 73 20 61 20 73 65 72 76 65 72 20 61 6e 64 20 72 s a server and r
3750: 65 73 70 6f 6e 64 20 77 69 74 68 20 61 20 73 65 espond with a se
3760: 72 76 65 72 20 68 61 6e 64 73 68 61 6b 65 20 77 rver handshake w
3770: 68 65 6e 20 61 0a 63 6c 69 65 6e 74 20 63 6f 6e hen a.client con
3780: 6e 65 63 74 73 20 61 6e 64 20 70 72 6f 76 69 64 nects and provid
3790: 65 73 20 61 20 63 6c 69 65 6e 74 20 68 61 6e 64 es a client hand
37a0: 73 68 61 6b 65 5c 26 2e 20 54 68 65 20 64 65 66 shake\&. The def
37b0: 61 75 6c 74 20 69 73 20 5c 66 42 66 61 6c 73 65 ault is \fBfalse
37c0: 5c 66 52 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 73 \fR\&...TP.\fB-s
37d0: 65 72 76 65 72 6e 61 6d 65 5c 66 52 20 5c 66 49 ervername\fR \fI
37e0: 68 6f 73 74 6e 61 6d 65 5c 66 52 0a 53 70 65 63 hostname\fR.Spec
37f0: 69 66 79 20 74 68 65 20 70 65 65 72 27 73 20 68 ify the peer's h
3800: 6f 73 74 6e 61 6d 65 5c 26 2e 20 54 68 69 73 20 ostname\&. This
3810: 69 73 20 75 73 65 64 20 74 6f 20 73 65 74 20 74 is used to set t
3820: 68 65 20 54 4c 53 20 53 65 72 76 65 72 20 4e 61 he TLS Server Na
3830: 6d 65 0a 49 6e 64 69 63 61 74 69 6f 6e 20 28 53 me.Indication (S
3840: 4e 49 29 20 65 78 74 65 6e 73 69 6f 6e 5c 26 2e NI) extension\&.
3850: 20 53 65 74 20 74 68 69 73 20 74 6f 20 74 68 65 Set this to the
3860: 20 65 78 70 65 63 74 65 64 20 73 65 72 76 65 72 expected server
3870: 6e 61 6d 65 20 69 6e 20 74 68 65 0a 73 65 72 76 name in the.serv
3880: 65 72 27 73 20 63 65 72 74 69 66 69 63 61 74 65 er's certificate
3890: 20 6f 72 20 6f 6e 65 20 6f 66 20 74 68 65 20 53 or one of the S
38a0: 75 62 6a 65 63 74 20 41 6c 74 65 72 6e 61 74 65 ubject Alternate
38b0: 20 4e 61 6d 65 73 20 28 53 41 4e 29 5c 26 2e 0a Names (SAN)\&..
38c0: 2e 54 50 0a 5c 66 42 2d 73 65 73 73 69 6f 6e 5f .TP.\fB-session_
38d0: 69 64 5c 66 52 20 5c 66 49 62 69 6e 61 72 79 5f id\fR \fIbinary_
38e0: 73 74 72 69 6e 67 5c 66 52 0a 53 70 65 63 69 66 string\fR.Specif
38f0: 69 65 73 20 74 68 65 20 73 65 73 73 69 6f 6e 20 ies the session
3900: 69 64 20 74 6f 20 72 65 73 75 6d 65 20 61 20 73 id to resume a s
3910: 65 73 73 69 6f 6e 5c 26 2e 20 4e 6f 74 20 73 75 ession\&. Not su
3920: 70 70 6f 72 74 65 64 20 79 65 74 5c 26 2e 0a 2e pported yet\&...
3930: 54 50 0a 5c 66 42 2d 73 73 6c 32 5c 66 52 20 5c TP.\fB-ssl2\fR \
3940: 66 49 62 6f 6f 6c 5c 66 52 0a 45 6e 61 62 6c 65 fIbool\fR.Enable
3950: 20 75 73 65 20 6f 66 20 53 53 4c 20 76 32 5c 26 use of SSL v2\&
3960: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 . The default is
3970: 20 5c 66 42 66 61 6c 73 65 5c 66 52 5c 26 2e 20 \fBfalse\fR\&.
3980: 4e 6f 74 65 3a 20 52 65 63 65 6e 74 20 76 65 72 Note: Recent ver
3990: 73 69 6f 6e 73 20 6f 66 0a 4f 70 65 6e 53 53 4c sions of.OpenSSL
39a0: 20 6e 6f 20 6c 6f 6e 67 65 72 20 73 75 70 70 6f no longer suppo
39b0: 72 74 20 53 53 4c 76 32 2c 20 73 6f 20 74 68 69 rt SSLv2, so thi
39c0: 73 20 6d 61 79 20 6e 6f 74 20 68 61 76 65 20 61 s may not have a
39d0: 6e 79 20 65 66 66 65 63 74 5c 26 2e 20 53 65 65 ny effect\&. See
39e0: 20 74 68 65 0a 5c 66 42 74 6c 73 3a 3a 70 72 6f the.\fBtls::pro
39f0: 74 6f 63 6f 6c 73 5c 66 52 20 63 6f 6d 6d 61 6e tocols\fR comman
3a00: 64 20 66 6f 72 20 73 75 70 70 6f 72 74 65 64 20 d for supported
3a10: 70 72 6f 74 6f 63 6f 6c 73 5c 26 2e 0a 2e 54 50 protocols\&...TP
3a20: 0a 5c 66 42 2d 73 73 6c 33 5c 66 52 20 5c 66 49 .\fB-ssl3\fR \fI
3a30: 62 6f 6f 6c 5c 66 52 0a 45 6e 61 62 6c 65 20 75 bool\fR.Enable u
3a40: 73 65 20 6f 66 20 53 53 4c 20 76 33 5c 26 2e 20 se of SSL v3\&.
3a50: 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 5c The default is \
3a60: 66 42 66 61 6c 73 65 5c 66 52 5c 26 2e 20 4e 6f fBfalse\fR\&. No
3a70: 74 65 3a 20 52 65 63 65 6e 74 20 76 65 72 73 69 te: Recent versi
3a80: 6f 6e 73 0a 6f 66 20 4f 70 65 6e 53 53 4c 20 6d ons.of OpenSSL m
3a90: 61 79 20 68 61 76 65 20 74 68 69 73 20 64 69 73 ay have this dis
3aa0: 61 62 6c 65 64 20 61 74 20 63 6f 6d 70 69 6c 65 abled at compile
3ab0: 20 74 69 6d 65 2c 20 73 6f 20 74 68 69 73 20 6d time, so this m
3ac0: 61 79 20 6e 6f 74 20 68 61 76 65 20 61 6e 79 0a ay not have any.
3ad0: 65 66 66 65 63 74 5c 26 2e 20 53 65 65 20 74 68 effect\&. See th
3ae0: 65 20 5c 66 42 74 6c 73 3a 3a 70 72 6f 74 6f 63 e \fBtls::protoc
3af0: 6f 6c 73 5c 66 52 20 63 6f 6d 6d 61 6e 64 20 66 ols\fR command f
3b00: 6f 72 20 73 75 70 70 6f 72 74 65 64 20 70 72 6f or supported pro
3b10: 74 6f 63 6f 6c 73 5c 26 2e 0a 2e 54 50 0a 5c 66 tocols\&...TP.\f
3b20: 42 2d 74 6c 73 31 5c 66 52 20 5c 66 49 62 6f 6f B-tls1\fR \fIboo
3b30: 6c 5c 66 52 0a 45 6e 61 62 6c 65 20 75 73 65 20 l\fR.Enable use
3b40: 6f 66 20 54 4c 53 20 76 31 5c 26 2e 20 54 68 65 of TLS v1\&. The
3b50: 20 64 65 66 61 75 6c 74 20 69 73 20 5c 66 42 74 default is \fBt
3b60: 72 75 65 5c 66 52 5c 26 2e 20 4e 6f 74 65 3a 20 rue\fR\&. Note:
3b70: 54 4c 53 20 31 5c 26 2e 30 20 6e 65 65 64 73 0a TLS 1\&.0 needs.
3b80: 53 48 41 31 20 74 6f 20 6f 70 65 72 61 74 65 2c SHA1 to operate,
3b90: 20 77 68 69 63 68 20 69 73 20 6f 6e 6c 79 20 61 which is only a
3ba0: 76 61 69 6c 61 62 6c 65 20 69 6e 20 73 65 63 75 vailable in secu
3bb0: 72 69 74 79 20 6c 65 76 65 6c 20 30 20 66 6f 72 rity level 0 for
3bc0: 20 4f 70 65 6e 20 53 53 4c 20 33 5c 26 2e 30 2b Open SSL 3\&.0+
3bd0: 5c 26 2e 0a 53 65 65 20 74 68 65 20 5c 66 49 2d \&..See the \fI-
3be0: 73 65 63 75 72 69 74 79 5f 6c 65 76 65 6c 5c 66 security_level\f
3bf0: 52 20 6f 70 74 69 6f 6e 5c 26 2e 0a 2e 54 50 0a R option\&...TP.
3c00: 5c 66 42 2d 74 6c 73 31 5c 26 2e 31 5c 66 52 20 \fB-tls1\&.1\fR
3c10: 5c 66 49 62 6f 6f 6c 5c 66 52 0a 45 6e 61 62 6c \fIbool\fR.Enabl
3c20: 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 5c e use of TLS v1\
3c30: 26 2e 31 5c 26 2e 20 54 68 65 20 64 65 66 61 75 &.1\&. The defau
3c40: 6c 74 20 69 73 20 5c 66 42 74 72 75 65 5c 66 52 lt is \fBtrue\fR
3c50: 5c 26 2e 20 4e 6f 74 65 3a 20 54 4c 53 20 31 5c \&. Note: TLS 1\
3c60: 26 2e 31 20 6e 65 65 64 73 0a 53 48 41 31 20 74 &.1 needs.SHA1 t
3c70: 6f 20 6f 70 65 72 61 74 65 2c 20 77 68 69 63 68 o operate, which
3c80: 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 is only availab
3c90: 6c 65 20 69 6e 20 73 65 63 75 72 69 74 79 20 6c le in security l
3ca0: 65 76 65 6c 20 30 20 66 6f 72 20 4f 70 65 6e 20 evel 0 for Open
3cb0: 53 53 4c 20 33 5c 26 2e 30 2b 5c 26 2e 0a 53 65 SSL 3\&.0+\&..Se
3cc0: 65 20 74 68 65 20 5c 66 49 2d 73 65 63 75 72 69 e the \fI-securi
3cd0: 74 79 5f 6c 65 76 65 6c 5c 66 52 20 6f 70 74 69 ty_level\fR opti
3ce0: 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 74 6c on\&...TP.\fB-tl
3cf0: 73 31 5c 26 2e 32 5c 66 52 20 5c 66 49 62 6f 6f s1\&.2\fR \fIboo
3d00: 6c 5c 66 52 0a 45 6e 61 62 6c 65 20 75 73 65 20 l\fR.Enable use
3d10: 6f 66 20 54 4c 53 20 76 31 5c 26 2e 32 5c 26 2e of TLS v1\&.2\&.
3d20: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 The default is
3d30: 5c 66 42 74 72 75 65 5c 66 52 5c 26 2e 0a 2e 54 \fBtrue\fR\&...T
3d40: 50 0a 5c 66 42 2d 74 6c 73 31 5c 26 2e 33 5c 66 P.\fB-tls1\&.3\f
3d50: 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 45 6e 61 R \fIbool\fR.Ena
3d60: 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 ble use of TLS v
3d70: 31 5c 26 2e 33 5c 26 2e 20 54 68 65 20 64 65 66 1\&.3\&. The def
3d80: 61 75 6c 74 20 69 73 20 5c 66 42 74 72 75 65 5c ault is \fBtrue\
3d90: 66 52 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 76 61 fR\&...TP.\fB-va
3da0: 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 5c 66 52 lidatecommand\fR
3db0: 20 5c 66 49 63 61 6c 6c 62 61 63 6b 5c 66 52 0a \fIcallback\fR.
3dc0: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 63 61 Specifies the ca
3dd0: 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 llback command t
3de0: 6f 20 69 6e 76 6f 6b 65 20 74 6f 20 76 61 6c 69 o invoke to vali
3df0: 64 61 74 65 20 74 68 65 20 70 65 65 72 20 63 65 date the peer ce
3e00: 72 74 69 66 69 63 61 74 65 73 0a 61 6e 64 20 6f rtificates.and o
3e10: 74 68 65 72 20 63 6f 6e 66 69 67 20 69 6e 66 6f ther config info
3e20: 20 64 75 72 69 6e 67 20 74 68 65 20 70 72 6f 74 during the prot
3e30: 6f 63 6f 6c 20 6e 65 67 6f 74 69 61 74 69 6f 6e ocol negotiation
3e40: 20 70 68 61 73 65 5c 26 2e 20 54 68 69 73 20 63 phase\&. This c
3e50: 61 6e 20 62 65 20 75 73 65 64 0a 62 79 20 54 43 an be used.by TC
3e60: 4c 20 73 63 72 69 70 74 73 20 74 6f 20 70 65 72 L scripts to per
3e70: 66 6f 72 6d 20 74 68 65 69 72 20 6f 77 6e 20 43 form their own C
3e80: 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 ertificate Valid
3e90: 61 74 69 6f 6e 20 74 6f 20 73 75 70 70 6c 65 6d ation to supplem
3ea0: 65 6e 74 20 74 68 65 0a 64 65 66 61 75 6c 74 20 ent the.default
3eb0: 76 61 6c 69 64 61 74 69 6f 6e 20 70 72 6f 76 69 validation provi
3ec0: 64 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 5c 26 ded by OpenSSL\&
3ed0: 2e 20 54 68 65 20 73 63 72 69 70 74 20 6d 75 73 . The script mus
3ee0: 74 20 72 65 74 75 72 6e 20 61 20 62 6f 6f 6c 65 t return a boole
3ef0: 61 6e 20 74 72 75 65 0a 74 6f 20 63 6f 6e 74 69 an true.to conti
3f00: 6e 75 65 20 74 68 65 20 6e 65 67 6f 74 69 61 74 nue the negotiat
3f10: 69 6f 6e 5c 26 2e 20 53 65 65 20 5c 66 42 43 61 ion\&. See \fBCa
3f20: 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73 5c 66 llback Options\f
3f30: 52 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 5c R for more info\
3f40: 26 2e 0a 2e 52 45 0a 2e 54 50 0a 5c 66 42 74 6c &...RE..TP.\fBtl
3f50: 73 3a 3a 75 6e 69 6d 70 6f 72 74 5c 66 52 20 5c s::unimport\fR \
3f60: 66 49 63 68 61 6e 6e 65 6c 5c 66 52 0a 43 6f 6d fIchannel\fR.Com
3f70: 70 6c 69 6d 65 6e 74 20 74 6f 20 5c 66 42 74 6c pliment to \fBtl
3f80: 73 3a 3a 69 6d 70 6f 72 74 5c 66 52 5c 26 2e 20 s::import\fR\&.
3f90: 55 73 65 64 20 74 6f 20 72 65 6d 6f 76 65 20 74 Used to remove t
3fa0: 68 65 20 74 6f 70 20 6c 65 76 65 6c 20 73 74 61 he top level sta
3fb0: 63 6b 65 64 20 63 68 61 6e 6e 65 6c 0a 66 72 6f cked channel.fro
3fc0: 6d 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 5c m \fIchannel\fR\
3fd0: 26 2e 20 54 68 69 73 20 75 6e 73 74 61 63 6b 73 &. This unstacks
3fe0: 20 74 68 65 20 65 6e 63 72 79 70 74 69 6f 6e 20 the encryption
3ff0: 6f 66 20 61 20 72 65 67 75 6c 61 72 20 54 43 4c of a regular TCL
4000: 20 63 68 61 6e 6e 65 6c 5c 26 2e 20 41 6e 0a 65 channel\&. An.e
4010: 72 72 6f 72 20 69 73 20 74 68 72 6f 77 6e 20 69 rror is thrown i
4020: 66 20 54 4c 53 20 69 73 20 6e 6f 74 20 74 68 65 f TLS is not the
4030: 20 74 6f 70 20 73 74 61 63 6b 65 64 20 63 68 61 top stacked cha
4040: 6e 6e 65 6c 20 74 79 70 65 5c 26 2e 0a 2e 54 50 nnel type\&...TP
4050: 0a 5c 66 42 74 6c 73 3a 3a 68 61 6e 64 73 68 61 .\fBtls::handsha
4060: 6b 65 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c ke\fR \fIchannel
4070: 5c 66 52 0a 46 6f 72 63 65 73 20 74 68 65 20 54 \fR.Forces the T
4080: 4c 53 20 6e 65 67 6f 74 69 61 74 69 6f 6e 20 68 LS negotiation h
4090: 61 6e 64 73 68 61 6b 65 20 74 6f 20 74 61 6b 65 andshake to take
40a0: 20 70 6c 61 63 65 20 69 6d 6d 65 64 69 61 74 65 place immediate
40b0: 6c 79 2c 20 61 6e 64 20 72 65 74 75 72 6e 73 20 ly, and returns
40c0: 30 0a 69 66 20 68 61 6e 64 73 68 61 6b 65 20 69 0.if handshake i
40d0: 73 20 73 74 69 6c 6c 20 69 6e 20 70 72 6f 67 72 s still in progr
40e0: 65 73 73 20 28 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e ess (non-blockin
40f0: 67 29 2c 20 6f 72 20 31 20 69 66 20 74 68 65 20 g), or 1 if the
4100: 68 61 6e 64 73 68 61 6b 65 20 77 61 73 0a 73 75 handshake was.su
4110: 63 63 65 73 73 66 75 6c 5c 26 2e 20 49 66 20 74 ccessful\&. If t
4120: 68 65 20 68 61 6e 64 73 68 61 6b 65 20 66 61 69 he handshake fai
4130: 6c 65 64 2c 20 61 6e 20 65 72 72 6f 72 20 77 69 led, an error wi
4140: 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 5c 26 ll be returned\&
4150: 2e 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 73 74 ...TP.\fBtls::st
4160: 61 74 75 73 5c 66 52 20 3f 5c 66 42 2d 6c 6f 63 atus\fR ?\fB-loc
4170: 61 6c 5c 66 52 3f 20 5c 66 49 63 68 61 6e 6e 65 al\fR? \fIchanne
4180: 6c 5c 66 52 0a 52 65 74 75 72 6e 73 20 74 68 65 l\fR.Returns the
4190: 20 63 75 72 72 65 6e 74 20 73 74 61 74 75 73 20 current status
41a0: 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 of an SSL channe
41b0: 6c 5c 26 2e 20 54 68 65 20 72 65 73 75 6c 74 20 l\&. The result
41c0: 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 is a list of key
41d0: 2d 76 61 6c 75 65 0a 70 61 69 72 73 20 64 65 73 -value.pairs des
41e0: 63 72 69 62 69 6e 67 20 74 68 65 20 53 53 4c 2c cribing the SSL,
41f0: 20 63 65 72 74 69 66 69 63 61 74 65 2c 20 61 6e certificate, an
4200: 64 20 63 65 72 74 69 66 69 63 61 74 65 20 76 65 d certificate ve
4210: 72 69 66 69 63 61 74 69 6f 6e 20 73 74 61 74 75 rification statu
4220: 73 5c 26 2e 20 49 66 0a 74 68 65 20 53 53 4c 20 s\&. If.the SSL
4230: 68 61 6e 64 73 68 61 6b 65 20 68 61 73 20 6e 6f handshake has no
4240: 74 20 79 65 74 20 63 6f 6d 70 6c 65 74 65 64 2c t yet completed,
4250: 20 61 6e 20 65 6d 70 74 79 20 6c 69 73 74 20 69 an empty list i
4260: 73 20 72 65 74 75 72 6e 65 64 5c 26 2e 20 49 66 s returned\&. If
4270: 20 74 68 65 0a 5c 66 42 2d 6c 6f 63 61 6c 5c 66 the.\fB-local\f
4280: 52 20 6f 70 74 69 6f 6e 20 69 73 20 73 70 65 63 R option is spec
4290: 69 66 69 65 64 2c 20 74 68 65 6e 20 74 68 65 20 ified, then the
42a0: 6c 6f 63 61 6c 20 63 65 72 74 69 66 69 63 61 74 local certificat
42b0: 65 20 69 73 20 75 73 65 64 5c 26 2e 20 52 65 74 e is used\&. Ret
42c0: 75 72 6e 65 64 0a 76 61 6c 75 65 73 20 69 6e 63 urned.values inc
42d0: 6c 75 64 65 3a 0a 2e 73 70 0a 53 53 4c 20 53 74 lude:..sp.SSL St
42e0: 61 74 75 73 0a 2e 52 53 0a 2e 54 50 0a 5c 66 42 atus..RS..TP.\fB
42f0: 61 6c 70 6e 5c 66 52 20 5c 66 49 70 72 6f 74 6f alpn\fR \fIproto
4300: 63 6f 6c 5c 66 52 0a 54 68 65 20 70 72 6f 74 6f col\fR.The proto
4310: 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 66 74 col selected aft
4320: 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c er Application-L
4330: 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 ayer Protocol Ne
4340: 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29 gotiation (ALPN)
4350: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 63 69 70 68 65 \&...TP.\fBciphe
4360: 72 5c 66 52 20 5c 66 49 63 69 70 68 65 72 5c 66 r\fR \fIcipher\f
4370: 52 0a 54 68 65 20 63 75 72 72 65 6e 74 20 63 69 R.The current ci
4380: 70 68 65 72 20 69 6e 20 75 73 65 20 66 6f 72 20 pher in use for
4390: 74 68 65 20 73 65 73 73 69 6f 6e 5c 26 2e 0a 2e the session\&...
43a0: 54 50 0a 5c 66 42 70 65 65 72 6e 61 6d 65 5c 66 TP.\fBpeername\f
43b0: 52 20 5c 66 49 6e 61 6d 65 5c 66 52 0a 54 68 65 R \fIname\fR.The
43c0: 20 70 65 65 72 6e 61 6d 65 20 66 72 6f 6d 20 74 peername from t
43d0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 he certificate\&
43e0: 2e 0a 2e 54 50 0a 5c 66 42 70 72 6f 74 6f 63 6f ...TP.\fBprotoco
43f0: 6c 5c 66 52 20 5c 66 49 76 65 72 73 69 6f 6e 5c l\fR \fIversion\
4400: 66 52 0a 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 fR.The protocol
4410: 76 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f 72 version used for
4420: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a the connection:
4430: 20 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 SSL2, SSL3, TLS
4440: 31 2c 20 54 4c 53 31 5c 26 2e 31 2c 20 54 4c 53 1, TLS1\&.1, TLS
4450: 31 5c 26 2e 32 2c 20 54 4c 53 31 5c 26 2e 33 2c 1\&.2, TLS1\&.3,
4460: 20 6f 72 20 75 6e 6b 6e 6f 77 6e 5c 26 2e 0a 2e or unknown\&...
4470: 54 50 0a 5c 66 42 73 62 69 74 73 5c 66 52 20 5c TP.\fBsbits\fR \
4480: 66 49 6e 5c 66 52 0a 54 68 65 20 6e 75 6d 62 65 fIn\fR.The numbe
4490: 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 20 66 r of bits used f
44a0: 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 6b or the session k
44b0: 65 79 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 69 67 ey\&...TP.\fBsig
44c0: 6e 61 74 75 72 65 48 61 73 68 41 6c 67 6f 72 69 natureHashAlgori
44d0: 74 68 6d 5c 66 52 20 5c 66 49 61 6c 67 6f 72 69 thm\fR \fIalgori
44e0: 74 68 6d 5c 66 52 0a 54 68 65 20 73 69 67 6e 61 thm\fR.The signa
44f0: 74 75 72 65 20 68 61 73 68 20 61 6c 67 6f 72 69 ture hash algori
4500: 74 68 6d 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 69 thm\&...TP.\fBsi
4510: 67 6e 61 74 75 72 65 54 79 70 65 5c 66 52 20 5c gnatureType\fR \
4520: 66 49 74 79 70 65 5c 66 52 0a 54 68 65 20 73 69 fItype\fR.The si
4530: 67 6e 61 74 75 72 65 20 74 79 70 65 20 76 61 6c gnature type val
4540: 75 65 5c 26 2e 0a 2e 54 50 0a 5c 66 42 76 65 72 ue\&...TP.\fBver
4550: 69 66 79 44 65 70 74 68 5c 66 52 20 5c 66 49 6e ifyDepth\fR \fIn
4560: 5c 66 52 0a 4d 61 78 69 6d 75 6d 20 64 65 70 74 \fR.Maximum dept
4570: 68 20 66 6f 72 20 74 68 65 20 63 65 72 74 69 66 h for the certif
4580: 69 63 61 74 65 20 63 68 61 69 6e 20 76 65 72 69 icate chain veri
4590: 66 69 63 61 74 69 6f 6e 5c 26 2e 20 44 65 66 61 fication\&. Defa
45a0: 75 6c 74 20 69 73 20 2d 31 2c 20 74 6f 20 63 68 ult is -1, to ch
45b0: 65 63 6b 20 61 6c 6c 5c 26 2e 0a 2e 54 50 0a 5c eck all\&...TP.\
45c0: 66 42 76 65 72 69 66 79 4d 6f 64 65 5c 66 52 20 fBverifyMode\fR
45d0: 5c 66 49 6c 69 73 74 5c 66 52 0a 4c 69 73 74 20 \fIlist\fR.List
45e0: 6f 66 20 63 65 72 74 69 66 69 63 61 74 65 20 76 of certificate v
45f0: 65 72 69 66 69 63 61 74 69 6f 6e 20 6d 6f 64 65 erification mode
4600: 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 76 65 72 69 s\&...TP.\fBveri
4610: 66 79 52 65 73 75 6c 74 5c 66 52 20 5c 66 49 72 fyResult\fR \fIr
4620: 65 73 75 6c 74 5c 66 52 0a 43 65 72 74 69 66 69 esult\fR.Certifi
4630: 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f cate verificatio
4640: 6e 20 72 65 73 75 6c 74 5c 26 2e 0a 2e 54 50 0a n result\&...TP.
4650: 5c 66 42 63 61 5f 6e 61 6d 65 73 5c 66 52 20 5c \fBca_names\fR \
4660: 66 49 6c 69 73 74 5c 66 52 0a 4c 69 73 74 20 6f fIlist\fR.List o
4670: 66 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74 f the Certificat
4680: 65 20 41 75 74 68 6f 72 69 74 69 65 73 20 75 73 e Authorities us
4690: 65 64 20 74 6f 20 63 72 65 61 74 65 20 74 68 65 ed to create the
46a0: 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 2e 0a certificate\&..
46b0: 2e 52 45 0a 2e 49 50 0a 43 65 72 74 69 66 69 63 .RE..IP.Certific
46c0: 61 74 65 20 53 74 61 74 75 73 0a 2e 52 53 0a 2e ate Status..RS..
46d0: 54 50 0a 5c 66 42 61 6c 6c 5c 66 52 20 5c 66 49 TP.\fBall\fR \fI
46e0: 73 74 72 69 6e 67 5c 66 52 0a 44 75 6d 70 20 6f string\fR.Dump o
46f0: 66 20 61 6c 6c 20 63 65 72 74 69 66 69 63 61 74 f all certificat
4700: 65 20 69 6e 66 6f 5c 26 2e 0a 2e 54 50 0a 5c 66 e info\&...TP.\f
4710: 42 76 65 72 73 69 6f 6e 5c 66 52 20 5c 66 49 76 Bversion\fR \fIv
4720: 61 6c 75 65 5c 66 52 0a 54 68 65 20 63 65 72 74 alue\fR.The cert
4730: 69 66 69 63 61 74 65 20 76 65 72 73 69 6f 6e 5c ificate version\
4740: 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 72 69 61 6c &...TP.\fBserial
4750: 4e 75 6d 62 65 72 5c 66 52 20 5c 66 49 73 74 72 Number\fR \fIstr
4760: 69 6e 67 5c 66 52 0a 54 68 65 20 73 65 72 69 61 ing\fR.The seria
4770: 6c 20 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 l number of the
4780: 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 61 certificate as a
4790: 20 68 65 78 20 73 74 72 69 6e 67 5c 26 2e 0a 2e hex string\&...
47a0: 54 50 0a 5c 66 42 73 69 67 6e 61 74 75 72 65 5c TP.\fBsignature\
47b0: 66 52 20 5c 66 49 61 6c 67 6f 72 69 74 68 6d 5c fR \fIalgorithm\
47c0: 66 52 0a 43 69 70 68 65 72 20 61 6c 67 6f 72 69 fR.Cipher algori
47d0: 74 68 6d 20 75 73 65 64 20 66 6f 72 20 63 65 72 thm used for cer
47e0: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 tificate signatu
47f0: 72 65 5c 26 2e 0a 2e 54 50 0a 5c 66 42 69 73 73 re\&...TP.\fBiss
4800: 75 65 72 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 uer\fR \fIstring
4810: 5c 66 52 0a 54 68 65 20 64 69 73 74 69 6e 67 75 \fR.The distingu
4820: 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 ished name (DN)
4830: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 of the certifica
4840: 74 65 20 69 73 73 75 65 72 5c 26 2e 0a 2e 54 50 te issuer\&...TP
4850: 0a 5c 66 42 6e 6f 74 42 65 66 6f 72 65 5c 66 52 .\fBnotBefore\fR
4860: 20 5c 66 49 64 61 74 65 5c 66 52 0a 54 68 65 20 \fIdate\fR.The
4870: 62 65 67 69 6e 6e 69 6e 67 20 64 61 74 65 20 6f beginning date o
4880: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 f the certificat
4890: 65 20 76 61 6c 69 64 69 74 79 5c 26 2e 0a 2e 54 e validity\&...T
48a0: 50 0a 5c 66 42 6e 6f 74 41 66 74 65 72 5c 66 52 P.\fBnotAfter\fR
48b0: 20 5c 66 49 64 61 74 65 5c 66 52 0a 54 68 65 20 \fIdate\fR.The
48c0: 65 78 70 69 72 61 74 69 6f 6e 20 64 61 74 65 20 expiration date
48d0: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 of the certifica
48e0: 74 65 20 76 61 6c 69 64 69 74 79 5c 26 2e 0a 2e te validity\&...
48f0: 54 50 0a 5c 66 42 73 75 62 6a 65 63 74 5c 66 52 TP.\fBsubject\fR
4900: 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 54 68 \fIstring\fR.Th
4910: 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 20 e distinguished
4920: 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65 name (DN) of the
4930: 20 63 65 72 74 69 66 69 63 61 74 65 20 73 75 62 certificate sub
4940: 6a 65 63 74 5c 26 2e 20 46 69 65 6c 64 73 20 69 ject\&. Fields i
4950: 6e 63 6c 75 64 65 3a 20 43 6f 6d 6d 6f 6e 0a 4e nclude: Common.N
4960: 61 6d 65 20 28 43 4e 29 2c 20 4f 72 67 61 6e 69 ame (CN), Organi
4970: 7a 61 74 69 6f 6e 20 28 4f 29 2c 20 4c 6f 63 61 zation (O), Loca
4980: 6c 69 74 79 20 6f 72 20 43 69 74 79 20 28 4c 29 lity or City (L)
4990: 2c 20 53 74 61 74 65 20 6f 72 20 50 72 6f 76 69 , State or Provi
49a0: 6e 63 65 20 28 53 29 2c 20 61 6e 64 0a 43 6f 75 nce (S), and.Cou
49b0: 6e 74 72 79 20 4e 61 6d 65 20 28 43 29 5c 26 2e ntry Name (C)\&.
49c0: 0a 2e 54 50 0a 5c 66 42 69 73 73 75 65 72 55 6e ..TP.\fBissuerUn
49d0: 69 71 75 65 49 44 5c 66 52 20 5c 66 49 73 74 72 iqueID\fR \fIstr
49e0: 69 6e 67 5c 66 52 0a 54 68 65 20 69 73 73 75 65 ing\fR.The issue
49f0: 72 20 75 6e 69 71 75 65 20 69 64 5c 26 2e 0a 2e r unique id\&...
4a00: 54 50 0a 5c 66 42 73 75 62 6a 65 63 74 55 6e 69 TP.\fBsubjectUni
4a10: 71 75 65 49 44 5c 66 52 20 5c 66 49 73 74 72 69 queID\fR \fIstri
4a20: 6e 67 5c 66 52 0a 54 68 65 20 73 75 62 6a 65 63 ng\fR.The subjec
4a30: 74 20 75 6e 69 71 75 65 20 69 64 5c 26 2e 0a 2e t unique id\&...
4a40: 54 50 0a 5c 66 42 6e 75 6d 5f 65 78 74 65 6e 73 TP.\fBnum_extens
4a50: 69 6f 6e 73 5c 66 52 20 5c 66 49 6e 5c 66 52 0a ions\fR \fIn\fR.
4a60: 4e 75 6d 62 65 72 20 6f 66 20 63 65 72 74 69 66 Number of certif
4a70: 69 63 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 73 icate extensions
4a80: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 65 78 74 65 6e \&...TP.\fBexten
4a90: 73 69 6f 6e 73 5c 66 52 20 5c 66 49 6c 69 73 74 sions\fR \fIlist
4aa0: 5c 66 52 0a 4c 69 73 74 20 6f 66 20 63 65 72 74 \fR.List of cert
4ab0: 69 66 69 63 61 74 65 20 65 78 74 65 6e 73 69 6f ificate extensio
4ac0: 6e 20 6e 61 6d 65 73 5c 26 2e 0a 2e 54 50 0a 5c n names\&...TP.\
4ad0: 66 42 61 75 74 68 6f 72 69 74 79 4b 65 79 49 64 fBauthorityKeyId
4ae0: 65 6e 74 69 66 69 65 72 5c 66 52 20 5c 66 49 73 entifier\fR \fIs
4af0: 74 72 69 6e 67 5c 66 52 0a 41 75 74 68 6f 72 69 tring\fR.Authori
4b00: 74 79 20 4b 65 79 20 49 64 65 6e 74 69 66 69 65 ty Key Identifie
4b10: 72 20 28 41 4b 49 29 20 6f 66 20 74 68 65 20 49 r (AKI) of the I
4b20: 73 73 75 69 6e 67 20 43 41 20 63 65 72 74 69 66 ssuing CA certif
4b30: 69 63 61 74 65 20 74 68 61 74 20 73 69 67 6e 65 icate that signe
4b40: 64 20 74 68 65 0a 53 53 4c 20 63 65 72 74 69 66 d the.SSL certif
4b50: 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73 icate as a hex s
4b60: 74 72 69 6e 67 5c 26 2e 20 54 68 69 73 20 76 61 tring\&. This va
4b70: 6c 75 65 20 6d 61 74 63 68 65 73 20 74 68 65 20 lue matches the
4b80: 53 4b 49 20 76 61 6c 75 65 20 6f 66 20 74 68 65 SKI value of the
4b90: 0a 49 6e 74 65 72 6d 65 64 69 61 74 65 20 43 41 .Intermediate CA
4ba0: 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 2e 0a certificate\&..
4bb0: 2e 54 50 0a 5c 66 42 73 75 62 6a 65 63 74 4b 65 .TP.\fBsubjectKe
4bc0: 79 49 64 65 6e 74 69 66 69 65 72 5c 66 52 20 5c yIdentifier\fR \
4bd0: 66 49 73 74 72 69 6e 67 5c 66 52 0a 53 75 62 6a fIstring\fR.Subj
4be0: 65 63 74 20 4b 65 79 20 49 64 65 6e 74 69 66 69 ect Key Identifi
4bf0: 65 72 20 28 53 4b 49 29 20 68 61 73 68 20 6f 66 er (SKI) hash of
4c00: 20 74 68 65 20 70 75 62 6c 69 63 20 6b 65 79 20 the public key
4c10: 69 6e 73 69 64 65 20 74 68 65 20 63 65 72 74 69 inside the certi
4c20: 66 69 63 61 74 65 20 61 73 20 61 0a 68 65 78 20 ficate as a.hex
4c30: 73 74 72 69 6e 67 5c 26 2e 20 55 73 65 64 20 74 string\&. Used t
4c40: 6f 20 69 64 65 6e 74 69 66 79 20 63 65 72 74 69 o identify certi
4c50: 66 69 63 61 74 65 73 20 74 68 61 74 20 63 6f 6e ficates that con
4c60: 74 61 69 6e 20 61 20 70 61 72 74 69 63 75 6c 61 tain a particula
4c70: 72 20 70 75 62 6c 69 63 20 6b 65 79 5c 26 2e 0a r public key\&..
4c80: 2e 54 50 0a 5c 66 42 73 75 62 6a 65 63 74 41 6c .TP.\fBsubjectAl
4c90: 74 4e 61 6d 65 5c 66 52 20 5c 66 49 6c 69 73 74 tName\fR \fIlist
4ca0: 5c 66 52 0a 4c 69 73 74 20 6f 66 20 61 6c 6c 20 \fR.List of all
4cb0: 6f 66 20 74 68 65 20 53 75 62 6a 65 63 74 20 41 of the Subject A
4cc0: 6c 74 65 72 6e 61 74 69 76 65 20 4e 61 6d 65 73 lternative Names
4cd0: 20 28 53 41 4e 29 20 69 6e 63 6c 75 64 69 6e 67 (SAN) including
4ce0: 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 73 2c 20 73 domain names, s
4cf0: 75 62 0a 64 6f 6d 61 69 6e 73 2c 20 61 6e 64 20 ub.domains, and
4d00: 49 50 20 61 64 64 72 65 73 73 65 73 20 74 68 61 IP addresses tha
4d10: 74 20 61 72 65 20 73 65 63 75 72 65 64 20 62 79 t are secured by
4d20: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
4d30: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 6f 63 73 70 5c \&...TP.\fBocsp\
4d40: 66 52 20 5c 66 49 6c 69 73 74 5c 66 52 0a 4c 69 fR \fIlist\fR.Li
4d50: 73 74 20 6f 66 20 61 6c 6c 20 4f 6e 6c 69 6e 65 st of all Online
4d60: 20 43 65 72 74 69 66 69 63 61 74 65 20 53 74 61 Certificate Sta
4d70: 74 75 73 20 50 72 6f 74 6f 63 6f 6c 20 28 4f 43 tus Protocol (OC
4d80: 53 50 29 20 55 52 4c 73 20 74 68 61 74 20 63 61 SP) URLs that ca
4d90: 6e 20 62 65 20 75 73 65 64 20 74 6f 0a 63 68 65 n be used to.che
4da0: 63 6b 20 74 68 65 20 76 61 6c 69 64 69 74 79 20 ck the validity
4db0: 6f 66 20 74 68 69 73 20 63 65 72 74 69 66 69 63 of this certific
4dc0: 61 74 65 5c 26 2e 0a 2e 54 50 0a 5c 66 42 63 65 ate\&...TP.\fBce
4dd0: 72 74 69 66 69 63 61 74 65 5c 66 52 20 5c 66 49 rtificate\fR \fI
4de0: 63 65 72 74 5c 66 52 0a 54 68 65 20 50 45 4d 20 cert\fR.The PEM
4df0: 65 6e 63 6f 64 65 64 20 63 65 72 74 69 66 69 63 encoded certific
4e00: 61 74 65 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 69 ate\&...TP.\fBsi
4e10: 67 6e 61 74 75 72 65 41 6c 67 6f 72 69 74 68 6d gnatureAlgorithm
4e20: 5c 66 52 20 5c 66 49 61 6c 67 6f 72 69 74 68 6d \fR \fIalgorithm
4e30: 5c 66 52 0a 43 69 70 68 65 72 20 61 6c 67 6f 72 \fR.Cipher algor
4e40: 69 74 68 6d 20 75 73 65 64 20 66 6f 72 20 74 68 ithm used for th
4e50: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 73 69 e certificate si
4e60: 67 6e 61 74 75 72 65 5c 26 2e 0a 2e 54 50 0a 5c gnature\&...TP.\
4e70: 66 42 73 69 67 6e 61 74 75 72 65 56 61 6c 75 65 fBsignatureValue
4e80: 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 \fR \fIstring\fR
4e90: 0a 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 .Certificate sig
4ea0: 6e 61 74 75 72 65 20 61 73 20 61 20 68 65 78 20 nature as a hex
4eb0: 73 74 72 69 6e 67 5c 26 2e 0a 2e 54 50 0a 5c 66 string\&...TP.\f
4ec0: 42 73 69 67 6e 61 74 75 72 65 44 69 67 65 73 74 BsignatureDigest
4ed0: 5c 66 52 20 5c 66 49 76 65 72 73 69 6f 6e 5c 66 \fR \fIversion\f
4ee0: 52 0a 43 65 72 74 69 66 69 63 61 74 65 20 73 69 R.Certificate si
4ef0: 67 6e 69 6e 67 20 64 69 67 65 73 74 20 61 73 20 gning digest as
4f00: 61 20 68 65 78 20 73 74 72 69 6e 67 5c 26 2e 0a a hex string\&..
4f10: 2e 54 50 0a 5c 66 42 70 75 62 6c 69 63 4b 65 79 .TP.\fBpublicKey
4f20: 41 6c 67 6f 72 69 74 68 6d 5c 66 52 20 5c 66 49 Algorithm\fR \fI
4f30: 61 6c 67 6f 72 69 74 68 6d 5c 66 52 0a 43 65 72 algorithm\fR.Cer
4f40: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 tificate signatu
4f50: 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61 6c re public key al
4f60: 67 6f 72 69 74 68 6d 5c 26 2e 0a 2e 54 50 0a 5c gorithm\&...TP.\
4f70: 66 42 70 75 62 6c 69 63 4b 65 79 5c 66 52 20 5c fBpublicKey\fR \
4f80: 66 49 73 74 72 69 6e 67 5c 66 52 0a 43 65 72 74 fIstring\fR.Cert
4f90: 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 ificate signatur
4fa0: 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61 73 20 e public key as
4fb0: 61 20 68 65 78 20 73 74 72 69 6e 67 5c 26 2e 0a a hex string\&..
4fc0: 2e 54 50 0a 5c 66 42 62 69 74 73 5c 66 52 20 5c .TP.\fBbits\fR \
4fd0: 66 49 6e 5c 66 52 0a 4e 75 6d 62 65 72 20 6f 66 fIn\fR.Number of
4fe0: 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 bits used for c
4ff0: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 ertificate signa
5000: 74 75 72 65 20 6b 65 79 5c 26 2e 0a 2e 54 50 0a ture key\&...TP.
5010: 5c 66 42 73 65 6c 66 5f 73 69 67 6e 65 64 5c 66 \fBself_signed\f
5020: 52 20 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a R \fIboolean\fR.
5030: 57 68 65 74 68 65 72 20 74 68 65 20 63 65 72 74 Whether the cert
5040: 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 ificate signatur
5050: 65 20 69 73 20 73 65 6c 66 20 73 69 67 6e 65 64 e is self signed
5060: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 68 61 31 5f \&...TP.\fBsha1_
5070: 68 61 73 68 5c 66 52 20 5c 66 49 68 61 73 68 5c hash\fR \fIhash\
5080: 66 52 0a 54 68 65 20 53 48 41 31 20 68 61 73 68 fR.The SHA1 hash
5090: 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 of the certific
50a0: 61 74 65 20 61 73 20 61 20 68 65 78 20 73 74 72 ate as a hex str
50b0: 69 6e 67 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 68 ing\&...TP.\fBsh
50c0: 61 32 35 36 5f 68 61 73 68 5c 66 52 20 5c 66 49 a256_hash\fR \fI
50d0: 68 61 73 68 5c 66 52 0a 54 68 65 20 53 48 41 32 hash\fR.The SHA2
50e0: 35 36 20 68 61 73 68 20 6f 66 20 74 68 65 20 63 56 hash of the c
50f0: 65 72 74 69 66 69 63 61 74 65 20 61 73 20 61 20 ertificate as a
5100: 68 65 78 20 73 74 72 69 6e 67 5c 26 2e 0a 2e 52 hex string\&...R
5110: 45 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 63 6f E..TP.\fBtls::co
5120: 6e 6e 65 63 74 69 6f 6e 5c 66 52 20 5c 66 49 63 nnection\fR \fIc
5130: 68 61 6e 6e 65 6c 5c 66 52 0a 52 65 74 75 72 6e hannel\fR.Return
5140: 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 63 6f s the current co
5150: 6e 6e 65 63 74 69 6f 6e 20 73 74 61 74 75 73 20 nnection status
5160: 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 of an SSL channe
5170: 6c 5c 26 2e 20 54 68 65 20 72 65 73 75 6c 74 20 l\&. The result
5180: 69 73 20 61 20 6c 69 73 74 0a 6f 66 20 6b 65 79 is a list.of key
5190: 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 65 73 -value pairs des
51a0: 63 72 69 62 69 6e 67 20 74 68 65 20 63 6f 6e 6e cribing the conn
51b0: 65 63 74 69 6f 6e 5c 26 2e 20 52 65 74 75 72 6e ection\&. Return
51c0: 65 64 20 76 61 6c 75 65 73 20 69 6e 63 6c 75 64 ed values includ
51d0: 65 3a 0a 2e 73 70 0a 53 53 4c 20 53 74 61 74 75 e:..sp.SSL Statu
51e0: 73 0a 2e 52 53 0a 2e 54 50 0a 5c 66 42 73 74 61 s..RS..TP.\fBsta
51f0: 74 65 5c 66 52 20 5c 66 49 73 74 61 74 65 5c 66 te\fR \fIstate\f
5200: 52 0a 53 74 61 74 65 20 6f 66 20 74 68 65 20 63 R.State of the c
5210: 6f 6e 6e 65 63 74 69 6f 6e 5c 26 2e 0a 2e 54 50 onnection\&...TP
5220: 0a 5c 66 42 73 65 72 76 65 72 6e 61 6d 65 5c 66 .\fBservername\f
5230: 52 20 5c 66 49 6e 61 6d 65 5c 66 52 0a 54 68 65 R \fIname\fR.The
5240: 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 6f 6e name of the con
5250: 6e 65 63 74 65 64 20 74 6f 20 73 65 72 76 65 72 nected to server
5260: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 70 72 6f 74 6f \&...TP.\fBproto
5270: 63 6f 6c 5c 66 52 20 5c 66 49 76 65 72 73 69 6f col\fR \fIversio
5280: 6e 5c 66 52 0a 54 68 65 20 70 72 6f 74 6f 63 6f n\fR.The protoco
5290: 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20 66 l version used f
52a0: 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f or the connectio
52b0: 6e 3a 20 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 n: SSL2, SSL3, T
52c0: 4c 53 31 2c 20 54 4c 53 31 5c 26 2e 31 2c 20 54 LS1, TLS1\&.1, T
52d0: 4c 53 31 5c 26 2e 32 2c 20 54 4c 53 31 5c 26 2e LS1\&.2, TLS1\&.
52e0: 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e 5c 26 2e 3, or unknown\&.
52f0: 0a 2e 54 50 0a 5c 66 42 72 65 6e 65 67 6f 74 69 ..TP.\fBrenegoti
5300: 61 74 69 6f 6e 5f 61 6c 6c 6f 77 65 64 5c 66 52 ation_allowed\fR
5310: 20 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a 57 \fIboolean\fR.W
5320: 68 65 74 68 65 72 20 70 72 6f 74 6f 63 6f 6c 20 hether protocol
5330: 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 20 69 73 renegotiation is
5340: 20 73 75 70 70 6f 72 74 65 64 20 6f 72 20 6e 6f supported or no
5350: 74 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 63 75 t\&...TP.\fBsecu
5360: 72 69 74 79 5f 6c 65 76 65 6c 5c 66 52 20 5c 66 rity_level\fR \f
5370: 49 6c 65 76 65 6c 5c 66 52 0a 54 68 65 20 73 65 Ilevel\fR.The se
5380: 63 75 72 69 74 79 20 6c 65 76 65 6c 20 75 73 65 curity level use
5390: 64 20 66 6f 72 20 73 65 6c 65 63 74 69 6f 6e 20 d for selection
53a0: 6f 66 20 63 69 70 68 65 72 73 2c 20 6b 65 79 20 of ciphers, key
53b0: 73 69 7a 65 2c 20 65 74 63 5c 26 2e 0a 2e 54 50 size, etc\&...TP
53c0: 0a 5c 66 42 73 65 73 73 69 6f 6e 5f 72 65 75 73 .\fBsession_reus
53d0: 65 64 5c 66 52 20 5c 66 49 62 6f 6f 6c 65 61 6e ed\fR \fIboolean
53e0: 5c 66 52 0a 57 68 65 74 68 65 72 20 74 68 65 20 \fR.Whether the
53f0: 73 65 73 73 69 6f 6e 20 68 61 73 20 62 65 65 6e session has been
5400: 20 72 65 75 73 65 64 20 6f 72 20 6e 6f 74 5c 26 reused or not\&
5410: 2e 0a 2e 54 50 0a 5c 66 42 69 73 5f 73 65 72 76 ...TP.\fBis_serv
5420: 65 72 5c 66 52 20 5c 66 49 62 6f 6f 6c 65 61 6e er\fR \fIboolean
5430: 5c 66 52 0a 57 68 65 74 68 65 72 20 74 68 65 20 \fR.Whether the
5440: 63 6f 6e 6e 65 63 74 69 6f 6e 20 69 73 20 63 6f connection is co
5450: 6e 66 69 67 75 72 65 64 20 61 73 20 61 20 73 65 nfigured as a se
5460: 72 76 65 72 20 28 31 29 20 6f 72 20 63 6c 69 65 rver (1) or clie
5470: 6e 74 20 28 30 29 5c 26 2e 0a 2e 54 50 0a 5c 66 nt (0)\&...TP.\f
5480: 42 63 6f 6d 70 72 65 73 73 69 6f 6e 5c 66 52 20 Bcompression\fR
5490: 5c 66 49 6d 6f 64 65 5c 66 52 0a 43 6f 6d 70 72 \fImode\fR.Compr
54a0: 65 73 73 69 6f 6e 20 6d 65 74 68 6f 64 5c 26 2e ession method\&.
54b0: 0a 2e 54 50 0a 5c 66 42 65 78 70 61 6e 73 69 6f ..TP.\fBexpansio
54c0: 6e 5c 66 52 20 5c 66 49 6d 6f 64 65 5c 66 52 0a n\fR \fImode\fR.
54d0: 45 78 70 61 6e 73 69 6f 6e 20 6d 65 74 68 6f 64 Expansion method
54e0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 63 61 4c 69 73 \&...TP.\fBcaLis
54f0: 74 5c 66 52 20 5c 66 49 6c 69 73 74 5c 66 52 0a t\fR \fIlist\fR.
5500: 4c 69 73 74 20 6f 66 20 43 65 72 74 69 66 69 63 List of Certific
5510: 61 74 65 20 41 75 74 68 6f 72 69 74 69 65 73 20 ate Authorities
5520: 28 43 41 29 20 66 6f 72 20 58 5c 26 2e 35 30 39 (CA) for X\&.509
5530: 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 2e 0a certificate\&..
5540: 2e 52 45 0a 2e 49 50 0a 43 69 70 68 65 72 20 49 .RE..IP.Cipher I
5550: 6e 66 6f 0a 2e 52 53 0a 2e 54 50 0a 5c 66 42 63 nfo..RS..TP.\fBc
5560: 69 70 68 65 72 5c 66 52 20 5c 66 49 63 69 70 68 ipher\fR \fIciph
5570: 65 72 5c 66 52 0a 54 68 65 20 63 75 72 72 65 6e er\fR.The curren
5580: 74 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 t cipher in use
5590: 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 for the connecti
55a0: 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 74 61 on\&...TP.\fBsta
55b0: 6e 64 61 72 64 5f 6e 61 6d 65 5c 66 52 20 5c 66 ndard_name\fR \f
55c0: 49 6e 61 6d 65 5c 66 52 0a 54 68 65 20 73 74 61 Iname\fR.The sta
55d0: 6e 64 61 72 64 20 52 46 43 20 6e 61 6d 65 20 6f ndard RFC name o
55e0: 66 20 63 69 70 68 65 72 5c 26 2e 0a 2e 54 50 0a f cipher\&...TP.
55f0: 5c 66 42 61 6c 67 6f 72 69 74 68 6d 5f 62 69 74 \fBalgorithm_bit
5600: 73 5c 66 52 20 5c 66 49 6e 5c 66 52 0a 54 68 65 s\fR \fIn\fR.The
5610: 20 6e 75 6d 62 65 72 20 6f 66 20 70 72 6f 63 65 number of proce
5620: 73 73 65 64 20 62 69 74 73 20 75 73 65 64 20 66 ssed bits used f
5630: 6f 72 20 63 69 70 68 65 72 5c 26 2e 0a 2e 54 50 or cipher\&...TP
5640: 0a 5c 66 42 73 65 63 72 65 74 5f 62 69 74 73 5c .\fBsecret_bits\
5650: 66 52 20 5c 66 49 6e 5c 66 52 0a 54 68 65 20 6e fR \fIn\fR.The n
5660: 75 6d 62 65 72 20 6f 66 20 73 65 63 72 65 74 20 umber of secret
5670: 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 69 bits used for ci
5680: 70 68 65 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 6d pher\&...TP.\fBm
5690: 69 6e 5f 76 65 72 73 69 6f 6e 5c 66 52 20 5c 66 in_version\fR \f
56a0: 49 76 65 72 73 69 6f 6e 5c 66 52 0a 54 68 65 20 Iversion\fR.The
56b0: 6d 69 6e 69 6d 75 6d 20 70 72 6f 74 6f 63 6f 6c minimum protocol
56c0: 20 76 65 72 73 69 6f 6e 20 66 6f 72 20 63 69 70 version for cip
56d0: 68 65 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 63 69 her\&...TP.\fBci
56e0: 70 68 65 72 5f 69 73 5f 61 65 61 64 5c 66 52 20 pher_is_aead\fR
56f0: 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a 57 68 \fIboolean\fR.Wh
5700: 65 74 68 65 72 20 74 68 65 20 63 69 70 68 65 72 ether the cipher
5710: 20 69 73 20 41 75 74 68 65 6e 74 69 63 61 74 65 is Authenticate
5720: 64 20 45 6e 63 72 79 70 74 69 6f 6e 20 77 69 74 d Encryption wit
5730: 68 20 41 73 73 6f 63 69 61 74 65 64 20 44 61 74 h Associated Dat
5740: 61 20 28 41 45 41 44 29 5c 26 2e 0a 2e 54 50 0a a (AEAD)\&...TP.
5750: 5c 66 42 63 69 70 68 65 72 5f 69 64 5c 66 52 20 \fBcipher_id\fR
5760: 5c 66 49 69 64 5c 66 52 0a 54 68 65 20 4f 70 65 \fIid\fR.The Ope
5770: 6e 53 53 4c 20 63 69 70 68 65 72 20 69 64 5c 26 nSSL cipher id\&
5780: 2e 0a 2e 54 50 0a 5c 66 42 64 65 73 63 72 69 70 ...TP.\fBdescrip
5790: 74 69 6f 6e 5c 66 52 20 5c 66 49 73 74 72 69 6e tion\fR \fIstrin
57a0: 67 5c 66 52 0a 41 20 74 65 78 74 20 64 65 73 63 g\fR.A text desc
57b0: 72 69 70 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 ription of the c
57c0: 69 70 68 65 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 ipher\&...TP.\fB
57d0: 68 61 6e 64 73 68 61 6b 65 5f 64 69 67 65 73 74 handshake_digest
57e0: 5c 66 52 20 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 \fR \fIboolean\f
57f0: 52 0a 44 69 67 65 73 74 20 75 73 65 64 20 64 75 R.Digest used du
5800: 72 69 6e 67 20 68 61 6e 64 73 68 61 6b 65 5c 26 ring handshake\&
5810: 2e 0a 2e 52 45 0a 2e 49 50 0a 53 65 73 73 69 6f ...RE..IP.Sessio
5820: 6e 20 49 6e 66 6f 0a 2e 52 53 0a 2e 54 50 0a 5c n Info..RS..TP.\
5830: 66 42 61 6c 70 6e 5c 66 52 20 5c 66 49 70 72 6f fBalpn\fR \fIpro
5840: 74 6f 63 6f 6c 5c 66 52 0a 54 68 65 20 70 72 6f tocol\fR.The pro
5850: 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 tocol selected a
5860: 66 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e fter Application
5870: 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 20 -Layer Protocol
5880: 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 Negotiation (ALP
5890: 4e 29 5c 26 2e 0a 2e 54 50 0a 5c 66 42 72 65 73 N)\&...TP.\fBres
58a0: 75 6d 61 62 6c 65 5c 66 52 20 5c 66 49 62 6f 6f umable\fR \fIboo
58b0: 6c 65 61 6e 5c 66 52 0a 57 68 65 74 68 65 72 20 lean\fR.Whether
58c0: 74 68 65 20 73 65 73 73 69 6f 6e 20 63 61 6e 20 the session can
58d0: 62 65 20 72 65 73 75 6d 65 64 20 6f 72 20 6e 6f be resumed or no
58e0: 74 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 74 61 72 t\&...TP.\fBstar
58f0: 74 5f 74 69 6d 65 5c 66 52 20 5c 66 49 73 65 63 t_time\fR \fIsec
5900: 6f 6e 64 73 5c 66 52 0a 54 69 6d 65 20 73 69 6e onds\fR.Time sin
5910: 63 65 20 73 65 73 73 69 6f 6e 20 73 74 61 72 74 ce session start
5920: 65 64 20 69 6e 20 73 65 63 6f 6e 64 73 20 73 69 ed in seconds si
5930: 6e 63 65 20 65 70 6f 63 68 5c 26 2e 0a 2e 54 50 nce epoch\&...TP
5940: 0a 5c 66 42 74 69 6d 65 6f 75 74 5c 66 52 20 5c .\fBtimeout\fR \
5950: 66 49 73 65 63 6f 6e 64 73 5c 66 52 0a 4d 61 78 fIseconds\fR.Max
5960: 20 64 75 72 61 74 69 6f 6e 20 6f 66 20 73 65 73 duration of ses
5970: 73 69 6f 6e 20 69 6e 20 73 65 63 6f 6e 64 73 20 sion in seconds
5980: 62 65 66 6f 72 65 20 74 69 6d 65 2d 6f 75 74 5c before time-out\
5990: 26 2e 0a 2e 54 50 0a 5c 66 42 6c 69 66 65 74 69 &...TP.\fBlifeti
59a0: 6d 65 5c 66 52 20 5c 66 49 73 65 63 6f 6e 64 73 me\fR \fIseconds
59b0: 5c 66 52 0a 53 65 73 73 69 6f 6e 20 74 69 63 6b \fR.Session tick
59c0: 65 74 20 6c 69 66 65 74 69 6d 65 20 68 69 6e 74 et lifetime hint
59d0: 20 69 6e 20 73 65 63 6f 6e 64 73 5c 26 2e 0a 2e in seconds\&...
59e0: 54 50 0a 5c 66 42 73 65 73 73 69 6f 6e 5f 69 64 TP.\fBsession_id
59f0: 5c 66 52 20 5c 66 49 62 69 6e 61 72 79 5f 73 74 \fR \fIbinary_st
5a00: 72 69 6e 67 5c 66 52 0a 55 6e 69 71 75 65 20 73 ring\fR.Unique s
5a10: 65 73 73 69 6f 6e 20 69 64 20 66 6f 72 20 75 73 ession id for us
5a20: 65 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 e in resuming th
5a30: 65 20 73 65 73 73 69 6f 6e 5c 26 2e 0a 2e 54 50 e session\&...TP
5a40: 0a 5c 66 42 73 65 73 73 69 6f 6e 5f 74 69 63 6b .\fBsession_tick
5a50: 65 74 5c 66 52 20 5c 66 49 62 69 6e 61 72 79 5f et\fR \fIbinary_
5a60: 73 74 72 69 6e 67 5c 66 52 0a 55 6e 69 71 75 65 string\fR.Unique
5a70: 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 session ticket
5a80: 66 6f 72 20 75 73 65 20 69 6e 20 72 65 73 75 6d for use in resum
5a90: 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e 5c ing the session\
5aa0: 26 2e 0a 2e 54 50 0a 5c 66 42 74 69 63 6b 65 74 &...TP.\fBticket
5ab0: 5f 61 70 70 5f 64 61 74 61 5c 66 52 20 5c 66 49 _app_data\fR \fI
5ac0: 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 5c 66 52 binary_string\fR
5ad0: 0a 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 .Unique session
5ae0: 74 69 63 6b 65 74 20 61 70 70 6c 69 63 61 74 69 ticket applicati
5af0: 6f 6e 20 64 61 74 61 5c 26 2e 0a 2e 54 50 0a 5c on data\&...TP.\
5b00: 66 42 6d 61 73 74 65 72 5f 6b 65 79 5c 66 52 20 fBmaster_key\fR
5b10: 5c 66 49 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 \fIbinary_string
5b20: 5c 66 52 0a 55 6e 69 71 75 65 20 73 65 73 73 69 \fR.Unique sessi
5b30: 6f 6e 20 6d 61 73 74 65 72 20 6b 65 79 5c 26 2e on master key\&.
5b40: 0a 2e 54 50 0a 5c 66 42 73 65 73 73 69 6f 6e 5f ..TP.\fBsession_
5b50: 63 61 63 68 65 5f 6d 6f 64 65 5c 66 52 20 5c 66 cache_mode\fR \f
5b60: 49 6d 6f 64 65 5c 66 52 0a 53 65 72 76 65 72 20 Imode\fR.Server
5b70: 63 61 63 68 65 20 6d 6f 64 65 20 28 63 6c 69 65 cache mode (clie
5b80: 6e 74 2c 20 73 65 72 76 65 72 2c 20 6f 72 20 62 nt, server, or b
5b90: 6f 74 68 29 5c 26 2e 0a 2e 52 45 0a 2e 54 50 0a oth)\&...RE..TP.
5ba0: 5c 66 42 74 6c 73 3a 3a 63 69 70 68 65 72 73 5c \fBtls::ciphers\
5bb0: 66 52 20 3f 5c 66 49 70 72 6f 74 6f 63 6f 6c 5c fR ?\fIprotocol\
5bc0: 66 52 3f 20 3f 5c 66 49 76 65 72 62 6f 73 65 5c fR? ?\fIverbose\
5bd0: 66 52 3f 20 3f 5c 66 49 73 75 70 70 6f 72 74 65 fR? ?\fIsupporte
5be0: 64 5c 66 52 3f 0a 57 69 74 68 6f 75 74 20 61 6e d\fR?.Without an
5bf0: 79 20 61 72 67 73 2c 20 72 65 74 75 72 6e 73 20 y args, returns
5c00: 61 20 6c 69 73 74 20 6f 66 20 61 6c 6c 20 73 79 a list of all sy
5c10: 6d 6d 65 74 72 69 63 20 63 69 70 68 65 72 73 20 mmetric ciphers
5c20: 66 6f 72 20 75 73 65 20 77 69 74 68 20 74 68 65 for use with the
5c30: 0a 5c 66 49 2d 63 69 70 68 65 72 5c 66 52 20 6f .\fI-cipher\fR o
5c40: 70 74 69 6f 6e 5c 26 2e 20 57 69 74 68 20 5c 66 ption\&. With \f
5c50: 49 70 72 6f 74 6f 63 6f 6c 5c 66 52 2c 20 6f 6e Iprotocol\fR, on
5c60: 6c 79 20 74 68 65 20 63 69 70 68 65 72 73 20 73 ly the ciphers s
5c70: 75 70 70 6f 72 74 65 64 20 66 6f 72 20 74 68 61 upported for tha
5c80: 74 0a 70 72 6f 74 6f 63 6f 6c 20 61 72 65 20 72 t.protocol are r
5c90: 65 74 75 72 6e 65 64 5c 26 2e 20 53 65 65 20 74 eturned\&. See t
5ca0: 68 65 20 5c 66 42 74 6c 73 3a 3a 70 72 6f 74 6f he \fBtls::proto
5cb0: 63 6f 6c 73 5c 66 52 20 63 6f 6d 6d 61 6e 64 20 cols\fR command
5cc0: 66 6f 72 20 74 68 65 20 73 75 70 70 6f 72 74 65 for the supporte
5cd0: 64 0a 70 72 6f 74 6f 63 6f 6c 73 5c 26 2e 20 49 d.protocols\&. I
5ce0: 66 20 5c 66 49 76 65 72 62 6f 73 65 5c 66 52 20 f \fIverbose\fR
5cf0: 69 73 20 73 70 65 63 69 66 69 65 64 20 61 73 20 is specified as
5d00: 74 72 75 65 20 74 68 65 6e 20 61 20 76 65 72 62 true then a verb
5d10: 6f 73 65 2c 20 68 75 6d 61 6e 20 72 65 61 64 61 ose, human reada
5d20: 62 6c 65 0a 6c 69 73 74 20 69 73 20 72 65 74 75 ble.list is retu
5d30: 72 6e 65 64 20 77 69 74 68 20 61 64 64 69 74 69 rned with additi
5d40: 6f 6e 61 6c 20 69 6e 66 6f 72 6d 61 74 69 6f 6e onal information
5d50: 20 6f 6e 20 74 68 65 20 63 69 70 68 65 72 5c 26 on the cipher\&
5d60: 2e 20 49 66 20 5c 66 49 73 75 70 70 6f 72 74 65 . If \fIsupporte
5d70: 64 5c 66 52 0a 69 73 20 73 70 65 63 69 66 69 65 d\fR.is specifie
5d80: 64 20 61 73 20 74 72 75 65 2c 20 74 68 65 6e 20 d as true, then
5d90: 6f 6e 6c 79 20 74 68 65 20 63 69 70 68 65 72 73 only the ciphers
5da0: 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20 70 supported for p
5db0: 72 6f 74 6f 63 6f 6c 20 77 69 6c 6c 20 62 65 20 rotocol will be
5dc0: 6c 69 73 74 65 64 5c 26 2e 0a 2e 54 50 0a 5c 66 listed\&...TP.\f
5dd0: 42 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 5c Btls::protocols\
5de0: 66 52 0a 52 65 74 75 72 6e 73 20 61 20 6c 69 73 fR.Returns a lis
5df0: 74 20 6f 66 20 74 68 65 20 73 75 70 70 6f 72 74 t of the support
5e00: 65 64 20 53 53 4c 2f 54 4c 53 20 70 72 6f 74 6f ed SSL/TLS proto
5e10: 63 6f 6c 73 5c 26 2e 20 56 61 6c 69 64 20 76 61 cols\&. Valid va
5e20: 6c 75 65 73 20 61 72 65 3a 0a 5c 66 42 73 73 6c lues are:.\fBssl
5e30: 32 5c 66 52 2c 20 5c 66 42 73 73 6c 33 5c 66 52 2\fR, \fBssl3\fR
5e40: 2c 20 5c 66 42 74 6c 73 31 5c 66 52 2c 20 5c 66 , \fBtls1\fR, \f
5e50: 42 74 6c 73 31 5c 26 2e 31 5c 66 52 2c 20 5c 66 Btls1\&.1\fR, \f
5e60: 42 74 6c 73 31 5c 26 2e 32 5c 66 52 2c 20 61 6e Btls1\&.2\fR, an
5e70: 64 0a 5c 66 42 74 6c 73 31 5c 26 2e 33 5c 66 52 d.\fBtls1\&.3\fR
5e80: 5c 26 2e 20 45 78 61 63 74 20 6c 69 73 74 20 64 \&. Exact list d
5e90: 65 70 65 6e 64 73 20 6f 6e 20 4f 70 65 6e 53 53 epends on OpenSS
5ea0: 4c 20 76 65 72 73 69 6f 6e 20 61 6e 64 20 63 6f L version and co
5eb0: 6d 70 69 6c 65 20 74 69 6d 65 20 66 6c 61 67 73 mpile time flags
5ec0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a \&...TP.\fBtls::
5ed0: 76 65 72 73 69 6f 6e 5c 66 52 0a 52 65 74 75 72 version\fR.Retur
5ee0: 6e 73 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 76 ns the OpenSSL v
5ef0: 65 72 73 69 6f 6e 20 73 74 72 69 6e 67 5c 26 2e ersion string\&.
5f00: 0a 2e 50 50 0a 2e 53 48 20 22 43 45 52 54 49 46 ..PP..SH "CERTIF
5f10: 49 43 41 54 45 20 56 41 4c 49 44 41 54 49 4f 4e ICATE VALIDATION
5f20: 22 0a 2e 53 53 20 22 50 4b 49 20 41 4e 44 20 43 "..SS "PKI AND C
5f30: 45 52 54 49 46 49 43 41 54 45 53 22 0a 55 73 69 ERTIFICATES".Usi
5f40: 6e 67 20 74 68 65 20 50 75 62 6c 69 63 20 4b 65 ng the Public Ke
5f50: 79 20 49 6e 66 72 61 73 74 72 75 63 74 75 72 65 y Infrastructure
5f60: 20 28 50 4b 49 29 2c 20 65 61 63 68 20 75 73 65 (PKI), each use
5f70: 72 20 63 72 65 61 74 65 73 20 61 20 70 72 69 76 r creates a priv
5f80: 61 74 65 20 6b 65 79 20 74 68 61 74 0a 6f 6e 6c ate key that.onl
5f90: 79 20 74 68 65 79 20 6b 6e 6f 77 20 61 62 6f 75 y they know abou
5fa0: 74 20 61 6e 64 20 61 20 70 75 62 6c 69 63 20 6b t and a public k
5fb0: 65 79 20 74 68 65 79 20 63 61 6e 20 65 78 63 68 ey they can exch
5fc0: 61 6e 67 65 20 77 69 74 68 20 6f 74 68 65 72 73 ange with others
5fd0: 20 66 6f 72 20 75 73 65 20 69 6e 0a 65 6e 63 72 for use in.encr
5fe0: 79 70 74 69 6e 67 20 61 6e 64 20 64 65 63 72 79 ypting and decry
5ff0: 70 74 69 6e 67 20 64 61 74 61 5c 26 2e 20 54 68 pting data\&. Th
6000: 65 20 70 72 6f 63 65 73 73 20 69 73 20 74 68 65 e process is the
6010: 20 73 65 6e 64 65 72 20 65 6e 63 72 79 70 74 73 sender encrypts
6020: 20 74 68 65 69 72 20 64 61 74 61 0a 75 73 69 6e their data.usin
6030: 67 20 74 68 65 69 72 20 70 72 69 76 61 74 65 20 g their private
6040: 6b 65 79 20 61 6e 64 20 74 68 65 20 72 65 63 65 key and the rece
6050: 69 76 65 72 27 73 20 70 75 62 6c 69 63 20 6b 65 iver's public ke
6060: 79 5c 26 2e 20 54 68 65 20 64 61 74 61 20 69 73 y\&. The data is
6070: 20 74 68 65 6e 20 73 65 6e 74 0a 74 6f 20 74 68 then sent.to th
6080: 65 20 72 65 63 65 69 76 65 72 5c 26 2e 20 49 6e e receiver\&. In
6090: 20 61 20 73 69 6d 69 6c 61 72 20 6d 61 6e 6e 65 a similar manne
60a0: 72 2c 20 74 68 65 20 72 65 63 65 69 76 65 72 20 r, the receiver
60b0: 75 73 65 73 20 74 68 65 69 72 20 70 72 69 76 61 uses their priva
60c0: 74 65 20 6b 65 79 20 61 6e 64 0a 74 68 65 20 73 te key and.the s
60d0: 65 6e 64 65 72 27 73 20 70 75 62 6c 69 63 20 6b ender's public k
60e0: 65 79 20 74 6f 20 64 65 63 72 79 70 74 20 74 68 ey to decrypt th
60f0: 65 20 64 61 74 61 5c 26 2e 20 54 68 69 73 20 70 e data\&. This p
6100: 72 6f 76 69 64 65 73 20 64 61 74 61 20 69 6e 74 rovides data int
6110: 65 67 72 69 74 79 2c 20 74 6f 0a 65 6e 73 75 72 egrity, to.ensur
6120: 65 20 74 68 65 20 64 61 74 61 20 63 61 6e 27 74 e the data can't
6130: 20 62 65 20 76 69 65 77 65 64 20 6f 72 20 61 6c be viewed or al
6140: 74 65 72 65 64 20 64 75 72 69 6e 67 20 74 72 61 tered during tra
6150: 6e 73 70 6f 72 74 5c 26 2e 20 53 65 65 20 74 68 nsport\&. See th
6160: 65 0a 5c 66 42 2d 6b 65 79 5c 66 52 20 61 6e 64 e.\fB-key\fR and
6170: 20 5c 66 42 2d 6b 65 79 66 69 6c 65 5c 66 52 20 \fB-keyfile\fR
6180: 6f 70 74 69 6f 6e 73 20 66 6f 72 20 68 6f 77 20 options for how
6190: 74 6f 20 73 70 65 63 69 66 79 20 74 68 65 20 70 to specify the p
61a0: 72 69 76 61 74 65 20 6b 65 79 5c 26 2e 0a 41 6c rivate key\&..Al
61b0: 73 6f 20 73 65 65 20 74 68 65 20 5c 66 42 2d 70 so see the \fB-p
61c0: 61 73 73 77 6f 72 64 5c 66 52 20 6f 70 74 69 6f assword\fR optio
61d0: 6e 20 66 6f 72 20 68 6f 77 20 74 6f 20 70 72 6f n for how to pro
61e0: 76 69 64 65 20 74 68 65 20 70 61 73 73 77 6f 72 vide the passwor
61f0: 64 5c 26 2e 0a 2e 50 50 0a 49 6e 20 6f 72 64 65 d\&...PP.In orde
6200: 72 20 74 6f 20 70 72 6f 76 69 64 65 20 61 75 74 r to provide aut
6210: 68 65 6e 74 69 63 61 74 69 6f 6e 2c 20 69 5c 26 hentication, i\&
6220: 2e 65 5c 26 2e 20 65 6e 73 75 72 69 6e 67 20 73 .e\&. ensuring s
6230: 6f 6d 65 6f 6e 65 20 69 73 20 77 68 6f 20 74 68 omeone is who th
6240: 65 79 20 73 61 79 20 74 68 65 79 0a 61 72 65 2c ey say they.are,
6250: 20 74 68 65 20 70 75 62 6c 69 63 20 6b 65 79 20 the public key
6260: 61 6e 64 20 75 73 65 72 20 69 64 65 6e 74 69 66 and user identif
6270: 69 63 61 74 69 6f 6e 20 69 6e 66 6f 20 69 73 20 ication info is
6280: 73 74 6f 72 65 64 20 69 6e 20 61 20 58 5c 26 2e stored in a X\&.
6290: 35 30 39 0a 63 65 72 74 69 66 69 63 61 74 65 20 509.certificate
62a0: 61 6e 64 20 74 68 61 74 20 63 65 72 74 69 66 69 and that certifi
62b0: 63 61 74 65 20 69 73 20 61 75 74 68 65 6e 74 69 cate is authenti
62c0: 63 61 74 65 64 20 28 69 5c 26 2e 65 5c 26 2e 20 cated (i\&.e\&.
62d0: 73 69 67 6e 65 64 29 20 62 79 20 61 20 43 65 72 signed) by a Cer
62e0: 74 69 66 69 63 61 74 65 0a 41 75 74 68 6f 72 69 tificate.Authori
62f0: 74 79 20 28 43 41 29 5c 26 2e 20 55 73 65 72 73 ty (CA)\&. Users
6300: 20 63 61 6e 20 74 68 65 6e 20 65 78 63 68 61 6e can then exchan
6310: 67 65 20 74 68 65 73 65 20 63 65 72 74 69 66 69 ge these certifi
6320: 63 61 74 65 73 20 64 75 72 69 6e 67 20 74 68 65 cates during the
6330: 20 54 4c 53 0a 69 6e 69 74 69 61 6c 69 7a 61 74 TLS.initializat
6340: 69 6f 6e 20 70 72 6f 63 65 73 73 20 61 6e 64 20 ion process and
6350: 63 68 65 63 6b 20 74 68 65 6d 20 61 67 61 69 6e check them again
6360: 73 74 20 74 68 65 20 72 6f 6f 74 20 43 41 20 63 st the root CA c
6370: 65 72 74 69 66 69 63 61 74 65 73 20 74 6f 20 65 ertificates to e
6380: 6e 73 75 72 65 0a 74 68 65 79 20 61 72 65 20 76 nsure.they are v
6390: 61 6c 69 64 5c 26 2e 20 54 68 69 73 20 69 73 20 alid\&. This is
63a0: 68 61 6e 64 6c 65 64 20 62 79 20 4f 70 65 6e 53 handled by OpenS
63b0: 53 4c 20 76 69 61 20 74 68 65 20 5c 66 42 2d 72 SL via the \fB-r
63c0: 65 71 75 65 73 74 5c 66 52 20 61 6e 64 0a 5c 66 equest\fR and.\f
63d0: 42 2d 72 65 71 75 69 72 65 5c 66 52 20 6f 70 74 B-require\fR opt
63e0: 69 6f 6e 73 5c 26 2e 20 53 65 65 20 74 68 65 20 ions\&. See the
63f0: 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c 20 5c 66 \fB-cadir\fR, \f
6400: 42 2d 63 61 64 69 72 5c 66 52 2c 20 61 6e 64 0a B-cadir\fR, and.
6410: 5c 66 42 2d 63 61 73 74 6f 72 65 5c 66 52 20 6f \fB-castore\fR o
6420: 70 74 69 6f 6e 73 20 66 6f 72 20 68 6f 77 20 74 ptions for how t
6430: 70 20 73 70 65 63 69 66 79 20 77 68 65 72 65 20 p specify where
6440: 74 6f 20 66 69 6e 64 20 74 68 65 20 43 41 20 63 to find the CA c
6450: 65 72 74 69 66 69 63 61 74 65 73 5c 26 2e 0a 4f ertificates\&..O
6460: 70 74 69 6f 6e 61 6c 6c 79 2c 20 69 6e 20 61 20 ptionally, in a
6470: 66 75 74 75 72 65 20 72 65 6c 65 61 73 65 2c 20 future release,
6480: 74 68 65 79 20 63 61 6e 20 61 6c 73 6f 20 62 65 they can also be
6490: 20 63 68 65 63 6b 65 64 20 61 67 61 69 6e 73 74 checked against
64a0: 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 the Certificate
64b0: 0a 52 65 76 6f 63 61 74 69 6f 6e 20 4c 69 73 74 .Revocation List
64c0: 20 28 43 52 4c 29 20 6f 66 20 72 65 76 6f 6b 65 (CRL) of revoke
64d0: 64 20 63 65 72 74 69 66 69 63 61 74 65 73 5c 26 d certificates\&
64e0: 2e 20 43 65 72 74 69 66 69 63 61 74 65 73 20 63 . Certificates c
64f0: 61 6e 20 61 6c 73 6f 20 62 65 0a 73 65 6c 66 2d an also be.self-
6500: 73 69 67 6e 65 64 2c 20 62 75 74 20 74 68 65 79 signed, but they
6510: 20 61 72 65 20 62 79 20 64 65 66 61 75 6c 74 20 are by default
6520: 6e 6f 74 20 74 72 75 73 74 65 64 20 75 6e 6c 65 not trusted unle
6530: 73 73 20 79 6f 75 20 61 64 64 20 74 68 65 6d 20 ss you add them
6540: 74 6f 20 79 6f 75 72 0a 63 65 72 74 69 66 69 63 to your.certific
6550: 61 74 65 20 73 74 6f 72 65 5c 26 2e 0a 2e 50 50 ate store\&...PP
6560: 0a 54 79 70 69 63 61 6c 6c 79 20 77 68 65 6e 20 .Typically when
6570: 76 69 73 69 74 69 6e 67 20 77 65 62 20 73 69 74 visiting web sit
6580: 65 73 2c 20 6f 6e 6c 79 20 74 68 65 20 63 6c 69 es, only the cli
6590: 65 6e 74 20 6e 65 65 64 73 20 74 6f 20 63 68 65 ent needs to che
65a0: 63 6b 20 74 68 65 20 73 65 72 76 65 72 27 73 0a ck the server's.
65b0: 63 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 65 certificate to e
65c0: 6e 73 75 72 65 20 69 74 20 69 73 20 76 61 6c 69 nsure it is vali
65d0: 64 5c 26 2e 20 54 68 65 20 73 65 72 76 65 72 20 d\&. The server
65e0: 64 6f 65 73 6e 27 74 20 6e 65 65 64 20 74 6f 20 doesn't need to
65f0: 63 68 65 63 6b 20 74 68 65 20 63 6c 69 65 6e 74 check the client
6600: 0a 63 65 72 74 69 66 69 63 61 74 65 20 75 6e 6c .certificate unl
6610: 65 73 73 20 79 6f 75 20 6e 65 65 64 20 74 6f 20 ess you need to
6620: 61 75 74 68 65 6e 74 69 63 61 74 65 20 77 69 74 authenticate wit
6630: 68 20 74 68 65 6d 20 74 6f 20 6c 6f 67 69 6e 2c h them to login,
6640: 20 65 74 63 5c 26 2e 20 53 65 65 20 74 68 65 0a etc\&. See the.
6650: 5c 66 42 2d 63 65 72 74 5c 66 52 20 61 6e 64 20 \fB-cert\fR and
6660: 5c 66 42 2d 63 65 72 74 66 69 6c 65 5c 66 52 20 \fB-certfile\fR
6670: 6f 70 74 69 6f 6e 73 20 69 66 20 79 6f 75 20 6e options if you n
6680: 65 65 64 20 74 6f 20 70 72 6f 76 69 64 65 20 61 eed to provide a
6690: 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 2e 0a certificate\&..
66a0: 2e 53 53 20 22 53 55 4d 4d 41 52 59 20 4f 46 20 .SS "SUMMARY OF
66b0: 43 4f 4d 4d 41 4e 44 20 4c 49 4e 45 20 4f 50 54 COMMAND LINE OPT
66c0: 49 4f 4e 53 22 0a 54 68 65 20 66 6f 6c 6c 6f 77 IONS".The follow
66d0: 69 6e 67 20 6f 70 74 69 6f 6e 73 20 61 72 65 20 ing options are
66e0: 75 73 65 64 20 66 6f 72 20 70 65 65 72 20 63 65 used for peer ce
66f0: 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 rtificate valida
6700: 74 69 6f 6e 3a 0a 2e 54 50 0a 5c 66 42 2d 63 61 tion:..TP.\fB-ca
6710: 64 69 72 5c 66 52 20 5c 66 49 64 69 72 65 63 74 dir\fR \fIdirect
6720: 6f 72 79 5c 66 52 0a 53 70 65 63 69 66 69 65 73 ory\fR.Specifies
6730: 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 20 77 the directory w
6740: 68 65 72 65 20 74 68 65 20 43 65 72 74 69 66 69 here the Certifi
6750: 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20 28 cate Authority (
6760: 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65 73 CA) certificates
6770: 20 61 72 65 0a 73 74 6f 72 65 64 5c 26 2e 20 54 are.stored\&. T
6780: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 70 6c he default is pl
6790: 61 74 66 6f 72 6d 20 73 70 65 63 69 66 69 63 2c atform specific,
67a0: 20 62 75 74 20 69 73 20 75 73 75 61 6c 6c 79 20 but is usually
67b0: 22 5c 66 49 2f 65 74 63 2f 73 73 6c 2f 63 65 72 "\fI/etc/ssl/cer
67c0: 74 73 5c 66 52 22 20 6f 6e 0a 4c 69 6e 75 78 2f ts\fR" on.Linux/
67d0: 55 6e 69 78 20 73 79 73 74 65 6d 73 5c 26 2e 20 Unix systems\&.
67e0: 54 68 65 20 64 65 66 61 75 6c 74 20 6c 6f 63 61 The default loca
67f0: 74 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76 65 72 tion can be over
6800: 72 69 64 64 65 6e 20 62 79 20 74 68 65 0a 5c 66 ridden by the.\f
6810: 42 53 53 4c 5f 43 45 52 54 5f 44 49 52 5c 66 52 BSSL_CERT_DIR\fR
6820: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 environment var
6830: 69 61 62 6c 65 5c 26 2e 0a 2e 54 50 0a 5c 66 42 iable\&...TP.\fB
6840: 2d 63 61 66 69 6c 65 5c 66 52 20 5c 66 49 66 69 -cafile\fR \fIfi
6850: 6c 65 6e 61 6d 65 5c 66 52 0a 53 70 65 63 69 66 lename\fR.Specif
6860: 69 65 73 20 74 68 65 20 66 69 6c 65 20 77 69 74 ies the file wit
6870: 68 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74 h the Certificat
6880: 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 e Authority (CA)
6890: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 6f certificates to
68a0: 20 75 73 65 20 69 6e 0a 5c 66 42 50 45 4d 5c 66 use in.\fBPEM\f
68b0: 52 20 66 69 6c 65 20 66 6f 72 6d 61 74 5c 26 2e R file format\&.
68c0: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 The default is
68d0: 22 5c 66 49 63 65 72 74 5c 26 2e 70 65 6d 5c 66 "\fIcert\&.pem\f
68e0: 52 22 2c 20 69 6e 20 74 68 65 20 4f 70 65 6e 53 R", in the OpenS
68f0: 53 4c 0a 64 69 72 65 63 74 6f 72 79 5c 26 2e 20 SL.directory\&.
6900: 4f 6e 20 4c 69 6e 75 78 2f 55 6e 69 78 20 73 79 On Linux/Unix sy
6910: 73 74 65 6d 73 2c 20 74 68 69 73 20 69 73 20 75 stems, this is u
6920: 73 75 61 6c 6c 79 20 22 5c 66 49 2f 65 74 63 2f sually "\fI/etc/
6930: 73 73 6c 2f 63 61 2d 62 75 6e 64 6c 65 5c 26 2e ssl/ca-bundle\&.
6940: 70 65 6d 5c 66 52 22 5c 26 2e 0a 54 68 65 20 64 pem\fR"\&..The d
6950: 65 66 61 75 6c 74 20 66 69 6c 65 20 63 61 6e 20 efault file can
6960: 62 65 20 6f 76 65 72 72 69 64 64 65 6e 20 62 79 be overridden by
6970: 20 74 68 65 20 5c 66 42 53 53 4c 5f 43 45 52 54 the \fBSSL_CERT
6980: 5f 46 49 4c 45 5c 66 52 20 65 6e 76 69 72 6f 6e _FILE\fR environ
6990: 6d 65 6e 74 0a 76 61 72 69 61 62 6c 65 5c 26 2e ment.variable\&.
69a0: 0a 2e 54 50 0a 5c 66 42 2d 63 61 73 74 6f 72 65 ..TP.\fB-castore
69b0: 5c 66 52 20 5c 66 49 55 52 49 5c 66 52 0a 53 70 \fR \fIURI\fR.Sp
69c0: 65 63 69 66 69 65 73 20 74 68 65 20 55 6e 69 66 ecifies the Unif
69d0: 6f 72 6d 20 52 65 73 6f 75 72 63 65 20 49 64 65 orm Resource Ide
69e0: 6e 74 69 66 69 65 72 20 28 55 52 49 29 20 66 6f ntifier (URI) fo
69f0: 72 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74 r the Certificat
6a00: 65 20 41 75 74 68 6f 72 69 74 79 0a 28 43 41 29 e Authority.(CA)
6a10: 20 73 74 6f 72 65 2c 20 77 68 69 63 68 20 6d 61 store, which ma
6a20: 79 20 62 65 20 61 20 73 69 6e 67 6c 65 20 63 6f y be a single co
6a30: 6e 74 61 69 6e 65 72 20 6f 72 20 61 20 63 61 74 ntainer or a cat
6a40: 61 6c 6f 67 20 6f 66 20 63 6f 6e 74 61 69 6e 65 alog of containe
6a50: 72 73 5c 26 2e 0a 53 74 61 72 74 69 6e 67 20 77 rs\&..Starting w
6a60: 69 74 68 20 4f 70 65 6e 53 53 4c 20 33 5c 26 2e ith OpenSSL 3\&.
6a70: 32 20 6f 6e 20 4d 53 20 57 69 6e 64 6f 77 73 2c 2 on MS Windows,
6a80: 20 73 65 74 20 74 6f 20 22 5c 66 42 6f 72 67 5c set to "\fBorg\
6a90: 26 2e 6f 70 65 6e 73 73 6c 5c 26 2e 77 69 6e 73 &.openssl\&.wins
6aa0: 74 6f 72 65 3a 2f 2f 5c 66 52 22 0a 74 6f 20 75 tore://\fR".to u
6ab0: 73 65 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 20 se the built-in
6ac0: 4d 53 20 57 69 6e 64 6f 77 73 20 43 65 72 74 69 MS Windows Certi
6ad0: 66 69 63 61 74 65 20 53 74 6f 72 65 5c 26 2e 0a ficate Store\&..
6ae0: 54 68 69 73 20 73 74 6f 72 65 20 6f 6e 6c 79 20 This store only
6af0: 73 75 70 70 6f 72 74 73 20 72 6f 6f 74 20 63 65 supports root ce
6b00: 72 74 69 66 69 63 61 74 65 20 73 74 6f 72 65 73 rtificate stores
6b10: 5c 26 2e 20 53 65 65 0a 5c 66 42 43 65 72 74 69 \&. See.\fBCerti
6b20: 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f ficate Validatio
6b30: 6e 5c 66 52 20 66 6f 72 20 6d 6f 72 65 20 64 65 n\fR for more de
6b40: 74 61 69 6c 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 tails\&...TP.\fB
6b50: 2d 72 65 71 75 65 73 74 5c 66 52 20 5c 66 49 62 -request\fR \fIb
6b60: 6f 6f 6c 5c 66 52 0a 52 65 71 75 65 73 74 20 61 ool\fR.Request a
6b70: 20 63 65 72 74 69 66 69 63 61 74 65 20 66 72 6f certificate fro
6b80: 6d 20 74 68 65 20 70 65 65 72 20 64 75 72 69 6e m the peer durin
6b90: 67 20 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 g the SSL handsh
6ba0: 61 6b 65 5c 26 2e 20 54 68 69 73 20 69 73 20 6e ake\&. This is n
6bb0: 65 65 64 65 64 0a 74 6f 20 64 6f 20 43 65 72 74 eeded.to do Cert
6bc0: 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 ificate Validati
6bd0: 6f 6e 5c 26 2e 20 53 74 61 72 74 69 6e 67 20 69 on\&. Starting i
6be0: 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 2c 20 n TclTLS 1\&.8,
6bf0: 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 0a 5c the default is.\
6c00: 66 42 74 72 75 65 5c 66 52 5c 26 2e 20 49 6e 20 fBtrue\fR\&. In
6c10: 61 64 64 69 74 69 6f 6e 2c 20 74 68 65 20 63 6c addition, the cl
6c20: 69 65 6e 74 20 63 61 6e 20 6d 61 6e 75 61 6c 6c ient can manuall
6c30: 79 20 69 6e 73 70 65 63 74 20 61 6e 64 20 61 63 y inspect and ac
6c40: 63 65 70 74 20 6f 72 20 72 65 6a 65 63 74 0a 65 cept or reject.e
6c50: 61 63 68 20 63 65 72 74 69 66 69 63 61 74 65 20 ach certificate
6c60: 75 73 69 6e 67 20 74 68 65 20 5c 66 49 2d 76 61 using the \fI-va
6c70: 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 5c 66 52 lidatecommand\fR
6c80: 20 6f 70 74 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c option\&...TP.\
6c90: 66 42 2d 72 65 71 75 69 72 65 5c 66 52 20 5c 66 fB-require\fR \f
6ca0: 49 62 6f 6f 6c 5c 66 52 0a 52 65 71 75 69 72 65 Ibool\fR.Require
6cb0: 20 61 20 76 61 6c 69 64 20 63 65 72 74 69 66 69 a valid certifi
6cc0: 63 61 74 65 20 66 72 6f 6d 20 74 68 65 20 70 65 cate from the pe
6cd0: 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 53 53 er during the SS
6ce0: 4c 20 68 61 6e 64 73 68 61 6b 65 5c 26 2e 20 49 L handshake\&. I
6cf0: 66 20 74 68 69 73 20 69 73 0a 73 65 74 20 74 6f f this is.set to
6d00: 20 74 72 75 65 2c 20 74 68 65 6e 20 5c 66 42 2d true, then \fB-
6d10: 72 65 71 75 65 73 74 5c 66 52 20 6d 75 73 74 20 request\fR must
6d20: 61 6c 73 6f 20 62 65 20 73 65 74 20 74 6f 20 74 also be set to t
6d30: 72 75 65 20 61 6e 64 20 61 20 65 69 74 68 65 72 rue and a either
6d40: 0a 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c 20 5c .\fB-cadir\fR, \
6d50: 66 42 2d 63 61 66 69 6c 65 5c 66 52 2c 20 5c 66 fB-cafile\fR, \f
6d60: 42 2d 63 61 73 74 6f 72 65 5c 66 52 2c 20 6f 72 B-castore\fR, or
6d70: 20 61 20 70 6c 61 74 66 6f 72 6d 20 64 65 66 61 a platform defa
6d80: 75 6c 74 0a 6d 75 73 74 20 62 65 20 70 72 6f 76 ult.must be prov
6d90: 69 64 65 64 20 69 6e 20 6f 72 64 65 72 20 74 6f ided in order to
6da0: 20 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 validate agains
6db0: 74 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 t\&. The default
6dc0: 20 69 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 in TclTLS 1\&.8
6dd0: 20 61 6e 64 0a 65 61 72 6c 69 65 72 20 76 65 72 and.earlier ver
6de0: 73 69 6f 6e 73 20 69 73 20 5c 66 42 66 61 6c 73 sions is \fBfals
6df0: 65 5c 66 52 20 73 69 6e 63 65 20 6e 6f 74 20 61 e\fR since not a
6e00: 6c 6c 20 70 6c 61 74 66 6f 72 6d 73 20 68 61 76 ll platforms hav
6e10: 65 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 e certificates t
6e20: 6f 0a 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e o.validate again
6e30: 73 74 20 69 6e 20 61 20 66 6f 72 6d 20 63 6f 6d st in a form com
6e40: 70 61 74 69 62 6c 65 20 77 69 74 68 20 4f 70 65 patible with Ope
6e50: 6e 53 53 4c 5c 26 2e 0a 2e 50 50 0a 2e 53 53 20 nSSL\&...PP..SS
6e60: 22 57 48 45 4e 20 41 52 45 20 43 4f 4d 4d 41 4e "WHEN ARE COMMAN
6e70: 44 20 4c 49 4e 45 20 4f 50 54 49 4f 4e 53 20 4e D LINE OPTIONS N
6e80: 45 45 44 45 44 3f 22 0a 49 6e 20 54 63 6c 54 4c EEDED?".In TclTL
6e90: 53 20 31 5c 26 2e 38 20 61 6e 64 20 65 61 72 6c S 1\&.8 and earl
6ea0: 69 65 72 20 76 65 72 73 69 6f 6e 73 2c 20 63 65 ier versions, ce
6eb0: 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 rtificate valida
6ec0: 74 69 6f 6e 20 69 73 0a 5c 66 49 4e 4f 54 5c 66 tion is.\fINOT\f
6ed0: 52 20 65 6e 61 62 6c 65 64 20 62 79 20 64 65 66 R enabled by def
6ee0: 61 75 6c 74 5c 26 2e 20 54 68 69 73 20 6c 69 6d ault\&. This lim
6ef0: 69 74 61 74 69 6f 6e 20 69 73 20 64 75 65 20 74 itation is due t
6f00: 6f 20 74 68 65 20 6c 61 63 6b 20 6f 66 20 61 20 o the lack of a
6f10: 63 6f 6d 6d 6f 6e 0a 63 72 6f 73 73 20 70 6c 61 common.cross pla
6f20: 74 66 6f 72 6d 20 64 61 74 61 62 61 73 65 20 6f tform database o
6f30: 66 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 f Certificate Au
6f40: 74 68 6f 72 69 74 79 20 28 43 41 29 20 70 72 6f thority (CA) pro
6f50: 76 69 64 65 64 20 63 65 72 74 69 66 69 63 61 74 vided certificat
6f60: 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 es to.validate a
6f70: 67 61 69 6e 73 74 5c 26 2e 20 4d 61 6e 79 20 4c gainst\&. Many L
6f80: 69 6e 75 78 20 73 79 73 74 65 6d 73 20 6e 61 74 inux systems nat
6f90: 69 76 65 6c 79 20 73 75 70 70 6f 72 74 20 4f 70 ively support Op
6fa0: 65 6e 53 53 4c 20 61 6e 64 20 74 68 75 73 20 68 enSSL and thus h
6fb0: 61 76 65 0a 74 68 65 73 65 20 63 65 72 74 69 66 ave.these certif
6fc0: 69 63 61 74 65 73 20 69 6e 73 74 61 6c 6c 65 64 icates installed
6fd0: 20 61 73 20 70 61 72 74 20 6f 66 20 74 68 65 20 as part of the
6fe0: 4f 53 2c 20 62 75 74 20 4d 61 63 4f 53 20 61 6e OS, but MacOS an
6ff0: 64 20 4d 53 20 57 69 6e 64 6f 77 73 20 64 6f 20 d MS Windows do
7000: 6e 6f 74 5c 26 2e 0a 49 6e 20 6f 72 64 65 72 20 not\&..In order
7010: 74 6f 20 75 73 65 20 74 68 65 20 5c 66 42 2d 72 to use the \fB-r
7020: 65 71 75 69 72 65 5c 66 52 20 6f 70 74 69 6f 6e equire\fR option
7030: 2c 20 6f 6e 65 20 6f 66 20 74 68 65 20 66 6f 6c , one of the fol
7040: 6c 6f 77 69 6e 67 0a 6d 75 73 74 20 62 65 20 74 lowing.must be t
7050: 72 75 65 3a 0a 2e 49 50 20 5c 28 62 75 0a 4f 6e rue:..IP \(bu.On
7060: 20 4c 69 6e 75 78 20 61 6e 64 20 55 6e 69 78 20 Linux and Unix
7070: 73 79 73 74 65 6d 73 20 77 69 74 68 20 4f 70 65 systems with Ope
7080: 6e 53 53 4c 20 61 6c 72 65 61 64 79 20 69 6e 73 nSSL already ins
7090: 74 61 6c 6c 65 64 20 6f 72 20 69 66 20 74 68 65 talled or if the
70a0: 20 43 41 0a 63 65 72 74 69 66 69 63 61 74 65 73 CA.certificates
70b0: 20 61 72 65 20 61 76 61 69 6c 61 62 6c 65 20 69 are available i
70c0: 6e 20 50 45 4d 20 66 6f 72 6d 61 74 2c 20 61 6e n PEM format, an
70d0: 64 20 69 66 20 74 68 65 79 20 61 72 65 20 73 74 d if they are st
70e0: 6f 72 65 64 20 69 6e 20 74 68 65 0a 73 74 61 6e ored in the.stan
70f0: 64 61 72 64 20 6c 6f 63 61 74 69 6f 6e 73 2c 20 dard locations,
7100: 6f 72 20 69 66 20 74 68 65 20 5c 66 42 53 53 4c or if the \fBSSL
7110: 5f 43 45 52 54 5f 44 49 52 5c 66 52 20 6f 72 20 _CERT_DIR\fR or
7120: 5c 66 42 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 \fBSSL_CERT_FILE
7130: 5c 66 52 0a 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 \fR.environment
7140: 76 61 72 69 61 62 6c 65 73 20 61 72 65 20 73 65 variables are se
7150: 74 2c 20 74 68 65 6e 20 5c 66 42 2d 63 61 64 69 t, then \fB-cadi
7160: 72 5c 66 52 2c 20 5c 66 42 2d 63 61 64 69 72 5c r\fR, \fB-cadir\
7170: 66 52 2c 0a 61 6e 64 20 5c 66 42 2d 63 61 73 74 fR,.and \fB-cast
7180: 6f 72 65 5c 66 52 20 61 72 65 6e 27 74 20 6e 65 ore\fR aren't ne
7190: 65 64 65 64 5c 26 2e 0a 2e 49 50 20 5c 28 62 75 eded\&...IP \(bu
71a0: 0a 49 66 20 4f 70 65 6e 53 53 4c 20 69 73 20 6e .If OpenSSL is n
71b0: 6f 74 20 69 6e 73 74 61 6c 6c 65 64 20 69 6e 20 ot installed in
71c0: 74 68 65 20 64 65 66 61 75 6c 74 20 6c 6f 63 61 the default loca
71d0: 74 69 6f 6e 2c 20 6f 72 20 77 68 65 6e 20 75 73 tion, or when us
71e0: 69 6e 67 20 4d 61 63 20 4f 53 0a 6f 72 20 4d 53 ing Mac OS.or MS
71f0: 20 57 69 6e 64 6f 77 73 20 61 6e 64 20 4f 70 65 Windows and Ope
7200: 6e 53 53 4c 20 69 73 20 69 6e 73 74 61 6c 6c 65 nSSL is installe
7210: 64 2c 20 74 68 65 20 5c 66 42 53 53 4c 5f 43 45 d, the \fBSSL_CE
7220: 52 54 5f 44 49 52 5c 66 52 20 61 6e 64 2f 6f 72 RT_DIR\fR and/or
7230: 0a 5c 66 42 53 53 4c 5f 43 45 52 54 5f 46 49 4c .\fBSSL_CERT_FIL
7240: 45 5c 66 52 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 E\fR environment
7250: 20 76 61 72 69 61 62 6c 65 73 20 6f 72 20 74 68 variables or th
7260: 65 20 6f 6e 65 20 6f 66 20 74 68 65 20 5c 66 42 e one of the \fB
7270: 2d 63 61 64 69 72 5c 66 52 2c 0a 5c 66 42 2d 63 -cadir\fR,.\fB-c
7280: 61 64 69 72 5c 66 52 2c 20 6f 72 20 5c 66 42 2d adir\fR, or \fB-
7290: 63 61 73 74 6f 72 65 5c 66 52 20 6f 70 74 69 6f castore\fR optio
72a0: 6e 73 20 6d 75 73 74 20 62 65 20 64 65 66 69 6e ns must be defin
72b0: 65 64 5c 26 2e 0a 2e 49 50 20 5c 28 62 75 0a 4f ed\&...IP \(bu.O
72c0: 6e 20 4d 53 20 57 69 6e 64 6f 77 73 2c 20 73 74 n MS Windows, st
72d0: 61 72 74 69 6e 67 20 69 6e 20 4f 70 65 6e 53 53 arting in OpenSS
72e0: 4c 20 33 5c 26 2e 32 2c 20 69 74 20 69 73 20 6e L 3\&.2, it is n
72f0: 6f 77 20 70 6f 73 73 69 62 6c 65 20 74 6f 20 61 ow possible to a
7300: 63 63 65 73 73 20 74 68 65 0a 62 75 69 6c 74 2d ccess the.built-
7310: 69 6e 20 57 69 6e 64 6f 77 73 20 43 65 72 74 69 in Windows Certi
7320: 66 69 63 61 74 65 20 53 74 6f 72 65 20 66 72 6f ficate Store fro
7330: 6d 20 4f 70 65 6e 53 53 4c 5c 26 2e 20 54 68 69 m OpenSSL\&. Thi
7340: 73 20 63 61 6e 20 75 74 69 6c 69 7a 65 64 20 62 s can utilized b
7350: 79 0a 73 65 74 74 69 6e 67 20 74 68 65 20 5c 66 y.setting the \f
7360: 42 2d 63 61 73 74 6f 72 65 5c 66 52 20 6f 70 74 B-castore\fR opt
7370: 69 6f 6e 20 74 6f 20 22 5c 66 42 6f 72 67 5c 26 ion to "\fBorg\&
7380: 2e 6f 70 65 6e 73 73 6c 5c 26 2e 77 69 6e 73 74 .openssl\&.winst
7390: 6f 72 65 3a 2f 2f 5c 66 52 22 5c 26 2e 0a 2e 49 ore://\fR"\&...I
73a0: 50 20 5c 28 62 75 0a 49 66 20 4f 70 65 6e 53 53 P \(bu.If OpenSS
73b0: 4c 20 69 73 20 6e 6f 74 20 69 6e 73 74 61 6c 6c L is not install
73c0: 65 64 20 6f 72 20 74 68 65 20 43 41 20 63 65 72 ed or the CA cer
73d0: 74 69 66 69 63 61 74 65 73 20 61 72 65 20 6e 6f tificates are no
73e0: 74 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 50 t available in P
73f0: 45 4d 0a 66 6f 72 6d 61 74 2c 20 74 68 65 20 43 EM.format, the C
7400: 41 20 63 65 72 74 69 66 69 63 61 74 65 73 20 6d A certificates m
7410: 75 73 74 20 62 65 20 64 6f 77 6e 6c 6f 61 64 65 ust be downloade
7420: 64 20 61 6e 64 20 69 6e 73 74 61 6c 6c 65 64 20 d and installed
7430: 77 69 74 68 20 74 68 65 20 75 73 65 72 0a 73 6f with the user.so
7440: 66 74 77 61 72 65 5c 26 2e 20 54 68 65 20 43 55 ftware\&. The CU
7450: 52 4c 20 74 65 61 6d 20 6d 61 6b 65 73 20 74 68 RL team makes th
7460: 65 6d 20 61 76 61 69 6c 61 62 6c 65 20 61 74 0a em available at.
7470: 5c 66 49 43 41 20 63 65 72 74 69 66 69 63 61 74 \fICA certificat
7480: 65 73 20 65 78 74 72 61 63 74 65 64 0a 66 72 6f es extracted.fro
7490: 6d 20 4d 6f 7a 69 6c 6c 61 5c 66 52 20 5b 68 74 m Mozilla\fR [ht
74a0: 74 70 73 3a 2f 2f 63 75 72 6c 5c 26 2e 73 65 2f tps://curl\&.se/
74b0: 64 6f 63 73 2f 63 61 65 78 74 72 61 63 74 5c 26 docs/caextract\&
74c0: 2e 68 74 6d 6c 5d 20 69 6e 20 74 68 65 20 22 5c .html] in the "\
74d0: 66 49 63 61 63 65 72 74 5c 26 2e 70 65 6d 5c 66 fIcacert\&.pem\f
74e0: 52 22 20 66 69 6c 65 5c 26 2e 20 59 6f 75 20 6d R" file\&. You m
74f0: 75 73 74 20 74 68 65 6e 20 65 69 74 68 65 72 20 ust then either
7500: 73 65 74 20 74 68 65 0a 5c 66 42 53 53 4c 5f 43 set the.\fBSSL_C
7510: 45 52 54 5f 44 49 52 5c 66 52 20 61 6e 64 2f 6f ERT_DIR\fR and/o
7520: 72 20 5c 66 42 53 53 4c 5f 43 45 52 54 5f 46 49 r \fBSSL_CERT_FI
7530: 4c 45 5c 66 52 20 65 6e 76 69 72 6f 6e 6d 65 6e LE\fR environmen
7540: 74 20 76 61 72 69 61 62 6c 65 73 20 6f 72 20 74 t variables or t
7550: 68 65 0a 5c 66 42 2d 63 61 64 69 72 5c 66 52 20 he.\fB-cadir\fR
7560: 6f 72 20 5c 66 42 2d 63 61 66 69 6c 65 5c 66 52 or \fB-cafile\fR
7570: 20 6f 70 74 69 6f 6e 73 20 74 6f 20 74 68 65 20 options to the
7580: 43 41 20 63 65 72 74 20 66 69 6c 65 27 73 20 69 CA cert file's i
7590: 6e 73 74 61 6c 6c 0a 6c 6f 63 61 74 69 6f 6e 5c nstall.location\
75a0: 26 2e 20 49 74 20 69 73 20 79 6f 75 72 20 72 65 &. It is your re
75b0: 73 70 6f 6e 73 69 62 69 6c 69 74 79 20 74 6f 20 sponsibility to
75c0: 6b 65 65 70 20 74 68 69 73 20 66 69 6c 65 20 75 keep this file u
75d0: 70 20 74 6f 20 64 61 74 65 5c 26 2e 0a 2e 50 50 p to date\&...PP
75e0: 0a 2e 53 48 20 22 43 41 4c 4c 42 41 43 4b 20 4f ..SH "CALLBACK O
75f0: 50 54 49 4f 4e 53 22 0a 41 73 20 70 72 65 76 69 PTIONS".As previ
7600: 6f 75 73 6c 79 20 64 65 73 63 72 69 62 65 64 2c ously described,
7610: 20 65 61 63 68 20 63 68 61 6e 6e 65 6c 20 63 61 each channel ca
7620: 6e 20 62 65 20 67 69 76 65 6e 20 74 68 65 69 72 n be given their
7630: 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 73 0a 74 own callbacks.t
7640: 6f 20 68 61 6e 64 6c 65 20 69 6e 74 65 72 6d 65 o handle interme
7650: 64 69 61 74 65 20 70 72 6f 63 65 73 73 69 6e 67 diate processing
7660: 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 by the OpenSSL
7670: 6c 69 62 72 61 72 79 2c 20 75 73 69 6e 67 20 74 library, using t
7680: 68 65 0a 5c 66 42 2d 63 6f 6d 6d 61 6e 64 5c 66 he.\fB-command\f
7690: 52 2c 20 5c 66 42 2d 70 61 73 73 77 6f 72 64 5c R, \fB-password\
76a0: 66 52 2c 20 61 6e 64 20 5c 66 42 2d 76 61 6c 69 fR, and \fB-vali
76b0: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 52 20 date_command\fR
76c0: 6f 70 74 69 6f 6e 73 0a 70 61 73 73 65 64 20 74 options.passed t
76d0: 6f 20 65 69 74 68 65 72 20 6f 66 20 5c 66 42 74 o either of \fBt
76e0: 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 20 6f 72 ls::socket\fR or
76f0: 20 5c 66 42 74 6c 73 3a 3a 69 6d 70 6f 72 74 5c \fBtls::import\
7700: 66 52 5c 26 2e 0a 55 6e 6c 69 6b 65 20 70 72 65 fR\&..Unlike pre
7710: 76 69 6f 75 73 20 76 65 72 73 69 6f 6e 73 20 6f vious versions o
7720: 66 20 54 63 6c 54 4c 53 2c 20 6f 6e 6c 79 20 69 f TclTLS, only i
7730: 66 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 67 f the callback g
7740: 65 6e 65 72 61 74 65 73 20 61 6e 20 65 72 72 6f enerates an erro
7750: 72 2c 0a 77 69 6c 6c 20 74 68 65 20 5c 66 42 62 r,.will the \fBb
7760: 67 65 72 72 6f 72 5c 66 52 20 63 6f 6d 6d 61 6e gerror\fR comman
7770: 64 20 62 65 20 69 6e 76 6f 6b 65 64 20 77 69 74 d be invoked wit
7780: 68 20 74 68 65 20 65 72 72 6f 72 20 69 6e 66 6f h the error info
7790: 72 6d 61 74 69 6f 6e 5c 26 2e 0a 2e 53 53 20 22 rmation\&...SS "
77a0: 56 41 4c 55 45 53 20 46 4f 52 20 43 4f 4d 4d 41 VALUES FOR COMMA
77b0: 4e 44 20 43 41 4c 4c 42 41 43 4b 22 0a 54 68 65 ND CALLBACK".The
77c0: 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 callback for th
77d0: 65 20 5c 66 42 2d 63 6f 6d 6d 61 6e 64 5c 66 52 e \fB-command\fR
77e0: 20 6f 70 74 69 6f 6e 20 69 73 20 69 6e 76 6f 6b option is invok
77f0: 65 64 20 61 74 20 73 65 76 65 72 61 6c 20 70 6f ed at several po
7800: 69 6e 74 73 20 64 75 72 69 6e 67 20 74 68 65 0a ints during the.
7810: 4f 70 65 6e 53 53 4c 20 68 61 6e 64 73 68 61 6b OpenSSL handshak
7820: 65 20 61 6e 64 20 64 75 72 69 6e 67 20 72 6f 75 e and during rou
7830: 74 69 6e 65 20 6f 70 65 72 61 74 69 6f 6e 73 5c tine operations\
7840: 26 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 &. See below for
7850: 20 74 68 65 20 70 6f 73 73 69 62 6c 65 0a 61 72 the possible.ar
7860: 67 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20 74 guments passed t
7870: 6f 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 o the callback s
7880: 63 72 69 70 74 5c 26 2e 20 56 61 6c 75 65 73 20 cript\&. Values
7890: 72 65 74 75 72 6e 65 64 20 66 72 6f 6d 20 74 68 returned from th
78a0: 65 20 63 61 6c 6c 62 61 63 6b 20 61 72 65 0a 69 e callback are.i
78b0: 67 6e 6f 72 65 64 5c 26 2e 0a 2e 54 50 0a 5c 66 gnored\&...TP.\f
78c0: 42 65 72 72 6f 72 5c 66 52 20 5c 66 49 63 68 61 Berror\fR \fIcha
78d0: 6e 6e 65 6c 49 64 20 6d 65 73 73 61 67 65 5c 66 nnelId message\f
78e0: 52 0a 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 R.This form of c
78f0: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b allback is invok
7900: 65 64 20 77 68 65 6e 65 76 65 72 20 61 6e 20 65 ed whenever an e
7910: 72 72 6f 72 20 6f 63 63 75 72 73 20 64 75 72 69 rror occurs duri
7920: 6e 67 20 74 68 65 20 69 6e 69 74 69 61 6c 0a 63 ng the initial.c
7930: 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 61 6e 64 73 onnection, hands
7940: 68 61 6b 65 2c 20 6f 72 20 49 2f 4f 20 6f 70 65 hake, or I/O ope
7950: 72 61 74 69 6f 6e 73 5c 26 2e 20 54 68 65 20 5c rations\&. The \
7960: 66 49 6d 65 73 73 61 67 65 5c 66 52 20 61 72 67 fImessage\fR arg
7970: 75 6d 65 6e 74 20 63 61 6e 20 62 65 0a 66 72 6f ument can be.fro
7980: 6d 20 74 68 65 20 54 63 6c 5f 45 72 72 6e 6f 4d m the Tcl_ErrnoM
7990: 73 67 2c 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 sg, OpenSSL func
79a0: 74 69 6f 6e 20 5c 66 42 45 52 52 5f 72 65 61 73 tion \fBERR_reas
79b0: 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e 67 28 on_error_string(
79c0: 29 5c 66 52 2c 0a 6f 72 20 61 20 63 75 73 74 6f )\fR,.or a custo
79d0: 6d 20 6d 65 73 73 61 67 65 5c 26 2e 20 54 68 69 m message\&. Thi
79e0: 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 s callback is ne
79f0: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 w for TclTLS 1\&
7a00: 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 69 6e 66 .8\&...TP.\fBinf
7a10: 6f 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 o\fR \fIchannelI
7a20: 64 20 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20 6d 65 d major minor me
7a30: 73 73 61 67 65 20 74 79 70 65 5c 66 52 0a 54 68 ssage type\fR.Th
7a40: 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 is form of callb
7a50: 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 ack is invoked b
7a60: 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 y the OpenSSL fu
7a70: 6e 63 74 69 6f 6e 0a 5c 66 42 53 53 4c 5f 73 65 nction.\fBSSL_se
7a80: 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 t_info_callback(
7a90: 29 5c 66 52 20 64 75 72 69 6e 67 20 74 68 65 20 )\fR during the
7aa0: 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 initial connecti
7ab0: 6f 6e 20 61 6e 64 20 68 61 6e 64 73 68 61 6b 65 on and handshake
7ac0: 0a 6f 70 65 72 61 74 69 6f 6e 73 5c 26 2e 20 54 .operations\&. T
7ad0: 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 he arguments are
7ae0: 3a 0a 2e 52 53 0a 2e 54 50 0a 5c 66 49 6d 61 6a :..RS..TP.\fImaj
7af0: 6f 72 5c 66 52 0a 4d 61 6a 6f 72 20 63 61 74 65 or\fR.Major cate
7b00: 67 6f 72 79 20 66 6f 72 20 65 72 72 6f 72 5c 26 gory for error\&
7b10: 2e 20 56 61 6c 69 64 20 65 6e 75 6d 73 20 61 72 . Valid enums ar
7b20: 65 3a 20 5c 66 42 68 61 6e 64 73 68 61 6b 65 5c e: \fBhandshake\
7b30: 66 52 2c 20 5c 66 42 61 6c 65 72 74 5c 66 52 2c fR, \fBalert\fR,
7b40: 0a 5c 66 42 63 6f 6e 6e 65 63 74 5c 66 52 2c 20 .\fBconnect\fR,
7b50: 5c 66 42 61 63 63 65 70 74 5c 66 52 5c 26 2e 0a \fBaccept\fR\&..
7b60: 2e 54 50 0a 5c 66 49 6d 69 6e 6f 72 5c 66 52 0a .TP.\fIminor\fR.
7b70: 4d 69 6e 6f 72 20 63 61 74 65 67 6f 72 79 20 66 Minor category f
7b80: 6f 72 20 65 72 72 6f 72 5c 26 2e 20 56 61 6c 69 or error\&. Vali
7b90: 64 20 65 6e 75 6d 73 20 61 72 65 3a 20 5c 66 42 d enums are: \fB
7ba0: 73 74 61 72 74 5c 66 52 2c 20 5c 66 42 64 6f 6e start\fR, \fBdon
7bb0: 65 5c 66 52 2c 20 5c 66 42 72 65 61 64 5c 66 52 e\fR, \fBread\fR
7bc0: 2c 0a 5c 66 42 77 72 69 74 65 5c 66 52 2c 20 5c ,.\fBwrite\fR, \
7bd0: 66 42 6c 6f 6f 70 5c 66 52 2c 20 5c 66 42 65 78 fBloop\fR, \fBex
7be0: 69 74 5c 66 52 5c 26 2e 0a 2e 54 50 0a 5c 66 49 it\fR\&...TP.\fI
7bf0: 6d 65 73 73 61 67 65 5c 66 52 0a 44 65 73 63 72 message\fR.Descr
7c00: 69 70 74 69 76 65 20 6d 65 73 73 61 67 65 20 73 iptive message s
7c10: 74 72 69 6e 67 20 77 68 69 63 68 20 6d 61 79 20 tring which may
7c20: 62 65 20 67 65 6e 65 72 61 74 65 64 20 65 69 74 be generated eit
7c30: 68 65 72 20 62 79 0a 5c 66 42 53 53 4c 5f 73 74 her by.\fBSSL_st
7c40: 61 74 65 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 ate_string_long(
7c50: 29 5c 66 52 20 6f 72 20 5c 66 42 53 53 4c 5f 61 )\fR or \fBSSL_a
7c60: 6c 65 72 74 5f 64 65 73 63 5f 73 74 72 69 6e 67 lert_desc_string
7c70: 5f 6c 6f 6e 67 28 29 5c 66 52 2c 0a 64 65 70 65 _long()\fR,.depe
7c80: 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20 63 6f 6e nding on the con
7c90: 74 65 78 74 5c 26 2e 0a 2e 54 50 0a 5c 66 49 74 text\&...TP.\fIt
7ca0: 79 70 65 5c 66 52 0a 46 6f 72 20 61 6c 65 72 74 ype\fR.For alert
7cb0: 73 2c 20 74 68 65 20 70 6f 73 73 69 62 6c 65 20 s, the possible
7cc0: 76 61 6c 75 65 73 20 61 72 65 3a 20 5c 66 42 77 values are: \fBw
7cd0: 61 72 6e 69 6e 67 5c 66 52 2c 0a 5c 66 42 66 61 arning\fR,.\fBfa
7ce0: 74 61 6c 5c 66 52 2c 20 61 6e 64 20 5c 66 42 75 tal\fR, and \fBu
7cf0: 6e 6b 6e 6f 77 6e 5c 66 52 5c 26 2e 20 46 6f 72 nknown\fR\&. For
7d00: 20 6f 74 68 65 72 73 2c 20 5c 66 42 69 6e 66 6f others, \fBinfo
7d10: 5c 66 52 20 69 73 20 75 73 65 64 5c 26 2e 0a 54 \fR is used\&..T
7d20: 68 69 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 his argument is
7d30: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
7d40: 5c 26 2e 38 5c 26 2e 0a 2e 52 45 0a 2e 54 50 0a \&.8\&...RE..TP.
7d50: 5c 66 42 6d 65 73 73 61 67 65 5c 66 52 20 5c 66 \fBmessage\fR \f
7d60: 49 63 68 61 6e 6e 65 6c 49 64 20 64 69 72 65 63 IchannelId direc
7d70: 74 69 6f 6e 20 76 65 72 73 69 6f 6e 20 63 6f 6e tion version con
7d80: 74 65 6e 74 5f 74 79 70 65 20 6d 65 73 73 61 67 tent_type messag
7d90: 65 5c 66 52 0a 54 68 69 73 20 66 6f 72 6d 20 6f e\fR.This form o
7da0: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e f callback is in
7db0: 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 voked by the Ope
7dc0: 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 5c 66 nSSL function.\f
7dd0: 42 53 53 4c 5f 73 65 74 5f 6d 73 67 5f 63 61 6c BSSL_set_msg_cal
7de0: 6c 62 61 63 6b 28 29 5c 66 52 20 77 68 65 6e 65 lback()\fR whene
7df0: 76 65 72 20 61 20 6d 65 73 73 61 67 65 20 69 73 ver a message is
7e00: 20 73 65 6e 74 20 6f 72 20 72 65 63 65 69 76 65 sent or receive
7e10: 64 20 64 75 72 69 6e 67 20 74 68 65 0a 69 6e 69 d during the.ini
7e20: 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c tial connection,
7e30: 20 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49 handshake, or I
7e40: 2f 4f 20 6f 70 65 72 61 74 69 6f 6e 73 5c 26 2e /O operations\&.
7e50: 20 49 74 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 It is only avai
7e60: 6c 61 62 6c 65 20 77 68 65 6e 0a 4f 70 65 6e 53 lable when.OpenS
7e70: 53 4c 20 69 73 20 63 6f 6d 70 6c 69 65 64 20 77 SL is complied w
7e80: 69 74 68 20 74 68 65 20 5c 66 42 65 6e 61 62 6c ith the \fBenabl
7e90: 65 2d 73 73 6c 2d 74 72 61 63 65 5c 66 52 20 6f e-ssl-trace\fR o
7ea0: 70 74 69 6f 6e 5c 26 2e 20 54 68 69 73 20 63 61 ption\&. This ca
7eb0: 6c 6c 62 61 63 6b 20 69 73 0a 6e 65 77 20 66 6f llback is.new fo
7ec0: 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 r TclTLS 1\&.8\&
7ed0: 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20 . The arguments
7ee0: 61 72 65 3a 0a 2e 52 53 0a 2e 54 50 0a 5c 66 49 are:..RS..TP.\fI
7ef0: 64 69 72 65 63 74 69 6f 6e 5c 66 52 0a 44 69 72 direction\fR.Dir
7f00: 65 63 74 69 6f 6e 20 69 73 20 65 69 74 68 65 72 ection is either
7f10: 20 5c 66 42 53 65 6e 74 5c 66 52 20 6f 72 20 5c \fBSent\fR or \
7f20: 66 42 52 65 63 65 69 76 65 64 5c 66 52 5c 26 2e fBReceived\fR\&.
7f30: 0a 2e 54 50 0a 5c 66 49 76 65 72 73 69 6f 6e 5c ..TP.\fIversion\
7f40: 66 52 0a 56 65 72 73 69 6f 6e 20 69 73 20 74 68 fR.Version is th
7f50: 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 e protocol versi
7f60: 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 49 63 6f 6e on\&...TP.\fIcon
7f70: 74 65 6e 74 5f 74 79 70 65 5c 66 52 0a 43 6f 6e tent_type\fR.Con
7f80: 74 65 6e 74 20 74 79 70 65 20 69 73 20 74 68 65 tent type is the
7f90: 20 6d 65 73 73 61 67 65 20 63 6f 6e 74 65 6e 74 message content
7fa0: 20 74 79 70 65 5c 26 2e 0a 2e 54 50 0a 5c 66 49 type\&...TP.\fI
7fb0: 6d 65 73 73 61 67 65 5c 66 52 0a 4d 65 73 73 61 message\fR.Messa
7fc0: 67 65 20 69 73 20 6d 6f 72 65 20 69 6e 66 6f 20 ge is more info
7fd0: 66 72 6f 6d 20 74 68 65 20 5c 66 42 53 53 4c 5f from the \fBSSL_
7fe0: 74 72 61 63 65 5c 66 52 20 41 50 49 5c 26 2e 0a trace\fR API\&..
7ff0: 2e 52 45 0a 2e 54 50 0a 5c 66 42 73 65 73 73 69 .RE..TP.\fBsessi
8000: 6f 6e 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c on\fR \fIchannel
8010: 49 64 20 73 65 73 73 69 6f 6e 5f 69 64 20 73 65 Id session_id se
8020: 73 73 69 6f 6e 5f 74 69 63 6b 65 74 20 6c 69 66 ssion_ticket lif
8030: 65 74 69 6d 65 5c 66 52 0a 54 68 69 73 20 66 6f etime\fR.This fo
8040: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 rm of callback i
8050: 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 s invoked by the
8060: 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f OpenSSL functio
8070: 6e 0a 5c 66 42 53 53 4c 5f 43 54 58 5f 73 65 73 n.\fBSSL_CTX_ses
8080: 73 5f 73 65 74 5f 6e 65 77 5f 63 62 28 29 5c 66 s_set_new_cb()\f
8090: 52 20 77 68 65 6e 65 76 65 72 20 61 20 6e 65 77 R whenever a new
80a0: 20 73 65 73 73 69 6f 6e 20 69 64 20 69 73 20 73 session id is s
80b0: 65 6e 74 20 62 79 20 74 68 65 0a 73 65 72 76 65 ent by the.serve
80c0: 72 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e 69 r during the ini
80d0: 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 tial connection
80e0: 61 6e 64 20 68 61 6e 64 73 68 61 6b 65 20 61 6e and handshake an
80f0: 64 20 61 6c 73 6f 20 64 75 72 69 6e 67 20 74 68 d also during th
8100: 65 20 73 65 73 73 69 6f 6e 0a 69 66 20 74 68 65 e session.if the
8110: 20 5c 66 42 2d 70 6f 73 74 5f 68 61 6e 64 73 68 \fB-post_handsh
8120: 61 6b 65 5c 66 52 20 6f 70 74 69 6f 6e 20 69 73 ake\fR option is
8130: 20 73 65 74 20 74 6f 20 74 72 75 65 5c 26 2e 20 set to true\&.
8140: 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 This callback is
8150: 20 6e 65 77 20 66 6f 72 0a 54 63 6c 54 4c 53 20 new for.TclTLS
8160: 31 5c 26 2e 38 5c 26 2e 20 54 68 65 20 61 72 67 1\&.8\&. The arg
8170: 75 6d 65 6e 74 73 20 61 72 65 3a 0a 2e 52 53 0a uments are:..RS.
8180: 2e 54 50 0a 5c 66 49 73 65 73 73 69 6f 6e 5f 69 .TP.\fIsession_i
8190: 64 5c 66 52 0a 53 65 73 73 69 6f 6e 20 49 64 20 d\fR.Session Id
81a0: 69 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 73 is the current s
81b0: 65 73 73 69 6f 6e 20 69 64 65 6e 74 69 66 69 65 ession identifie
81c0: 72 0a 2e 54 50 0a 5c 66 49 73 65 73 73 69 6f 6e r..TP.\fIsession
81d0: 5f 74 69 63 6b 65 74 5c 66 52 0a 54 69 63 6b 65 _ticket\fR.Ticke
81e0: 74 20 69 73 20 74 68 65 20 73 65 73 73 69 6f 6e t is the session
81f0: 20 74 69 63 6b 65 74 20 69 6e 66 6f 0a 2e 54 50 ticket info..TP
8200: 0a 5c 66 49 6c 69 66 65 74 69 6d 65 5c 66 52 0a .\fIlifetime\fR.
8210: 4c 69 66 65 74 69 6d 65 20 69 73 20 74 68 65 20 Lifetime is the
8220: 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 ticket lifetime
8230: 69 6e 20 73 65 63 6f 6e 64 73 5c 26 2e 0a 2e 52 in seconds\&...R
8240: 45 0a 2e 54 50 0a 5c 66 42 76 65 72 69 66 79 5c E..TP.\fBverify\
8250: 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 fR \fIchannelId
8260: 64 65 70 74 68 20 63 65 72 74 20 73 74 61 74 75 depth cert statu
8270: 73 20 65 72 72 6f 72 5c 66 52 0a 54 68 69 73 20 s error\fR.This
8280: 63 61 6c 6c 62 61 63 6b 20 77 61 73 20 6d 6f 76 callback was mov
8290: 65 64 20 74 6f 20 5c 66 42 2d 76 61 6c 69 64 61 ed to \fB-valida
82a0: 74 65 63 6f 6d 6d 61 6e 64 5c 66 52 20 69 6e 20 tecommand\fR in
82b0: 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a TclTLS 1\&.8\&..
82c0: 2e 50 50 0a 2e 53 53 20 22 56 41 4c 55 45 53 20 .PP..SS "VALUES
82d0: 46 4f 52 20 50 41 53 53 57 4f 52 44 20 43 41 4c FOR PASSWORD CAL
82e0: 4c 42 41 43 4b 22 0a 54 68 65 20 63 61 6c 6c 62 LBACK".The callb
82f0: 61 63 6b 20 66 6f 72 20 74 68 65 20 5c 66 42 2d ack for the \fB-
8300: 70 61 73 73 77 6f 72 64 5c 66 52 20 6f 70 74 69 password\fR opti
8310: 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 on is invoked by
8320: 20 54 63 6c 54 4c 53 20 77 68 65 6e 65 76 65 72 TclTLS whenever
8330: 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73 0a 74 OpenSSL needs.t
8340: 6f 20 6f 62 74 61 69 6e 20 61 20 70 61 73 73 77 o obtain a passw
8350: 6f 72 64 5c 26 2e 20 53 65 65 20 62 65 6c 6f 77 ord\&. See below
8360: 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c for the possibl
8370: 65 20 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 e arguments pass
8380: 65 64 20 74 6f 20 74 68 65 0a 63 61 6c 6c 62 61 ed to the.callba
8390: 63 6b 20 73 63 72 69 70 74 5c 26 2e 20 54 68 65 ck script\&. The
83a0: 20 75 73 65 72 20 70 72 6f 76 69 64 65 64 20 70 user provided p
83b0: 61 73 73 77 6f 72 64 20 69 73 20 65 78 70 65 63 assword is expec
83c0: 74 65 64 20 74 6f 20 62 65 20 72 65 74 75 72 6e ted to be return
83d0: 65 64 20 62 79 20 74 68 65 0a 63 61 6c 6c 62 61 ed by the.callba
83e0: 63 6b 5c 26 2e 0a 2e 54 50 0a 5c 66 42 70 61 73 ck\&...TP.\fBpas
83f0: 73 77 6f 72 64 5c 66 52 20 5c 66 49 72 77 66 6c sword\fR \fIrwfl
8400: 61 67 20 73 69 7a 65 5c 66 52 0a 49 6e 76 6f 6b ag size\fR.Invok
8410: 65 64 20 77 68 65 6e 20 6c 6f 61 64 69 6e 67 20 ed when loading
8420: 6f 72 20 73 74 6f 72 69 6e 67 20 61 6e 20 65 6e or storing an en
8430: 63 72 79 70 74 65 64 20 50 45 4d 20 63 65 72 74 crypted PEM cert
8440: 69 66 69 63 61 74 65 5c 26 2e 20 54 68 65 20 61 ificate\&. The a
8450: 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 0a 2e 52 rguments are:..R
8460: 53 0a 2e 54 50 0a 5c 66 49 72 77 66 6c 61 67 5c S..TP.\fIrwflag\
8470: 66 52 0a 54 68 65 20 72 65 61 64 2f 77 72 69 74 fR.The read/writ
8480: 65 20 66 6c 61 67 20 69 73 20 30 20 66 6f 72 20 e flag is 0 for
8490: 72 65 61 64 69 6e 67 2f 64 65 63 72 79 70 74 69 reading/decrypti
84a0: 6f 6e 20 6f 72 20 31 20 66 6f 72 20 77 72 69 74 on or 1 for writ
84b0: 69 6e 67 2f 65 6e 63 72 79 70 74 69 6f 6e 5c 26 ing/encryption\&
84c0: 2e 0a 54 68 65 20 6c 61 74 74 65 72 20 63 61 6e ..The latter can
84d0: 20 62 65 20 75 73 65 64 20 74 6f 20 64 65 74 65 be used to dete
84e0: 72 6d 69 6e 65 20 77 68 65 6e 20 74 6f 20 70 72 rmine when to pr
84f0: 6f 6d 70 74 20 74 68 65 20 75 73 65 72 20 74 6f ompt the user to
8500: 20 63 6f 6e 66 69 72 6d 5c 26 2e 0a 54 68 69 73 confirm\&..This
8510: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 77 argument is new
8520: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e for TclTLS 1\&.
8530: 38 5c 26 2e 0a 2e 54 50 0a 5c 66 49 73 69 7a 65 8\&...TP.\fIsize
8540: 5c 66 52 0a 54 68 65 20 73 69 7a 65 20 69 73 20 \fR.The size is
8550: 74 68 65 20 6d 61 78 69 6d 75 6d 20 6c 65 6e 67 the maximum leng
8560: 74 68 20 6f 66 20 74 68 65 20 70 61 73 73 77 6f th of the passwo
8570: 72 64 20 69 6e 20 62 79 74 65 73 5c 26 2e 0a 54 rd in bytes\&..T
8580: 68 69 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 his argument is
8590: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
85a0: 5c 26 2e 38 5c 26 2e 0a 2e 52 45 0a 2e 50 50 0a \&.8\&...RE..PP.
85b0: 2e 53 53 20 22 56 41 4c 55 45 53 20 46 4f 52 20 .SS "VALUES FOR
85c0: 56 41 4c 49 44 41 54 45 20 43 4f 4d 4d 41 4e 44 VALIDATE COMMAND
85d0: 20 43 41 4c 4c 42 41 43 4b 22 0a 54 68 65 20 63 CALLBACK".The c
85e0: 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20 allback for the
85f0: 5c 66 42 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d \fB-validatecomm
8600: 61 6e 64 5c 66 52 20 6f 70 74 69 6f 6e 20 69 73 and\fR option is
8610: 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 invoked during
8620: 74 68 65 20 68 61 6e 64 73 68 61 6b 65 0a 70 72 the handshake.pr
8630: 6f 63 65 73 73 20 69 6e 20 6f 72 64 65 72 20 66 ocess in order f
8640: 6f 72 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 or the applicati
8650: 6f 6e 20 74 6f 20 76 61 6c 69 64 61 74 65 20 74 on to validate t
8660: 68 65 20 70 72 6f 76 69 64 65 64 20 76 61 6c 75 he provided valu
8670: 65 28 73 29 5c 26 2e 20 53 65 65 0a 62 65 6c 6f e(s)\&. See.belo
8680: 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62 w for the possib
8690: 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70 61 73 le arguments pas
86a0: 73 65 64 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 sed to the callb
86b0: 61 63 6b 20 73 63 72 69 70 74 5c 26 2e 20 49 66 ack script\&. If
86c0: 20 6e 6f 74 0a 73 70 65 63 69 66 69 65 64 2c 20 not.specified,
86d0: 4f 70 65 6e 53 53 4c 20 77 69 6c 6c 20 61 63 63 OpenSSL will acc
86e0: 65 70 74 20 61 6c 6c 20 76 61 6c 69 64 20 63 65 ept all valid ce
86f0: 72 74 69 66 69 63 61 74 65 73 20 61 6e 64 20 65 rtificates and e
8700: 78 74 65 6e 73 69 6f 6e 73 5c 26 2e 20 54 6f 20 xtensions\&. To
8710: 72 65 6a 65 63 74 0a 74 68 65 20 76 61 6c 75 65 reject.the value
8720: 20 61 6e 64 20 61 62 6f 72 74 20 74 68 65 20 63 and abort the c
8730: 6f 6e 6e 65 63 74 69 6f 6e 2c 20 74 68 65 20 63 onnection, the c
8740: 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 allback should r
8750: 65 74 75 72 6e 20 30 5c 26 2e 20 54 6f 20 61 63 eturn 0\&. To ac
8760: 63 65 70 74 20 74 68 65 0a 76 61 6c 75 65 20 61 cept the.value a
8770: 6e 64 20 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 nd continue the
8780: 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73 connection, it s
8790: 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 31 5c 26 hould return 1\&
87a0: 2e 20 54 6f 20 72 65 6a 65 63 74 20 74 68 65 20 . To reject the
87b0: 76 61 6c 75 65 2c 20 62 75 74 0a 63 6f 6e 74 69 value, but.conti
87c0: 6e 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 nue the connecti
87d0: 6f 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 72 65 on, it should re
87e0: 74 75 72 6e 20 32 5c 26 2e 20 54 68 69 73 20 63 turn 2\&. This c
87f0: 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 66 allback is new f
8800: 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c or TclTLS 1\&.8\
8810: 26 2e 0a 2e 54 50 0a 5c 66 42 61 6c 70 6e 5c 66 &...TP.\fBalpn\f
8820: 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 70 R \fIchannelId p
8830: 72 6f 74 6f 63 6f 6c 20 6d 61 74 63 68 5c 66 52 rotocol match\fR
8840: 0a 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 .For servers, th
8850: 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 is form of callb
8860: 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 ack is invoked w
8870: 68 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 20 41 hen the client A
8880: 4c 50 4e 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 LPN extension is
8890: 0a 72 65 63 65 69 76 65 64 5c 26 2e 20 49 66 20 .received\&. If
88a0: 5c 66 49 6d 61 74 63 68 5c 66 52 20 69 73 20 74 \fImatch\fR is t
88b0: 72 75 65 2c 20 74 68 65 6e 20 5c 66 49 70 72 6f rue, then \fIpro
88c0: 74 6f 63 6f 6c 5c 66 52 20 69 73 20 74 68 65 20 tocol\fR is the
88d0: 66 69 72 73 74 0a 5c 66 42 2d 61 6c 70 6e 5c 66 first.\fB-alpn\f
88e0: 52 20 70 72 6f 74 6f 63 6f 6c 20 6f 70 74 69 6f R protocol optio
88f0: 6e 20 69 6e 20 63 6f 6d 6d 6f 6e 20 74 6f 20 62 n in common to b
8900: 6f 74 68 20 74 68 65 20 63 6c 69 65 6e 74 20 61 oth the client a
8910: 6e 64 20 73 65 72 76 65 72 5c 26 2e 0a 49 66 20 nd server\&..If
8920: 6e 6f 74 2c 20 74 68 65 20 66 69 72 73 74 20 63 not, the first c
8930: 6c 69 65 6e 74 20 73 70 65 63 69 66 69 65 64 20 lient specified
8940: 70 72 6f 74 6f 63 6f 6c 20 69 73 20 75 73 65 64 protocol is used
8950: 5c 26 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 \&. This callbac
8960: 6b 20 69 73 20 63 61 6c 6c 65 64 0a 61 66 74 65 k is called.afte
8970: 72 20 74 68 65 20 48 65 6c 6c 6f 20 61 6e 64 20 r the Hello and
8980: 41 4c 50 4e 20 63 61 6c 6c 62 61 63 6b 73 5c 26 ALPN callbacks\&
8990: 2e 0a 2e 54 50 0a 5c 66 42 68 65 6c 6c 6f 5c 66 ...TP.\fBhello\f
89a0: 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 73 R \fIchannelId s
89b0: 65 72 76 65 72 6e 61 6d 65 5c 66 52 0a 46 6f 72 ervername\fR.For
89c0: 20 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 servers, this f
89d0: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 orm of callback
89e0: 69 73 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e is invoked durin
89f0: 67 20 63 6c 69 65 6e 74 20 68 65 6c 6c 6f 20 6d g client hello m
8a00: 65 73 73 61 67 65 0a 70 72 6f 63 65 73 73 69 6e essage.processin
8a10: 67 5c 26 2e 20 54 68 65 20 70 75 72 70 6f 73 65 g\&. The purpose
8a20: 20 69 73 20 73 6f 20 74 68 65 20 73 65 72 76 65 is so the serve
8a30: 72 20 63 61 6e 20 73 65 6c 65 63 74 20 74 68 65 r can select the
8a40: 20 61 70 70 72 6f 70 72 69 61 74 65 20 63 65 72 appropriate cer
8a50: 74 69 66 69 63 61 74 65 0a 74 6f 20 70 72 65 73 tificate.to pres
8a60: 65 6e 74 20 74 6f 20 74 68 65 20 63 6c 69 65 6e ent to the clien
8a70: 74 2c 20 61 6e 64 20 74 6f 20 6d 61 6b 65 20 6f t, and to make o
8a80: 74 68 65 72 20 63 6f 6e 66 69 67 75 72 61 74 69 ther configurati
8a90: 6f 6e 20 61 64 6a 75 73 74 6d 65 6e 74 73 20 72 on adjustments r
8aa0: 65 6c 65 76 61 6e 74 0a 74 6f 20 74 68 61 74 20 elevant.to that
8ab0: 73 65 72 76 65 72 20 6e 61 6d 65 20 61 6e 64 20 server name and
8ac0: 69 74 73 20 63 6f 6e 66 69 67 75 72 61 74 69 6f its configuratio
8ad0: 6e 5c 26 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 n\&. It is calle
8ae0: 64 20 62 65 66 6f 72 65 20 74 68 65 20 53 4e 49 d before the SNI
8af0: 20 61 6e 64 20 41 4c 50 4e 0a 63 61 6c 6c 62 61 and ALPN.callba
8b00: 63 6b 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 6e cks\&...TP.\fBsn
8b10: 69 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 i\fR \fIchannelI
8b20: 64 20 73 65 72 76 65 72 6e 61 6d 65 5c 66 52 0a d servername\fR.
8b30: 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 For servers, thi
8b40: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 s form of callba
8b50: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 ck is invoked wh
8b60: 65 6e 20 74 68 65 20 53 65 72 76 65 72 20 4e 61 en the Server Na
8b70: 6d 65 20 49 6e 64 69 63 61 74 69 6f 6e 0a 28 53 me Indication.(S
8b80: 4e 49 29 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 NI) extension is
8b90: 20 72 65 63 65 69 76 65 64 5c 26 2e 20 54 68 65 received\&. The
8ba0: 20 5c 66 49 73 65 72 76 65 72 6e 61 6d 65 5c 66 \fIservername\f
8bb0: 52 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74 68 R argument is th
8bc0: 65 20 63 6c 69 65 6e 74 0a 70 72 6f 76 69 64 65 e client.provide
8bd0: 64 20 73 65 72 76 65 72 20 6e 61 6d 65 20 73 70 d server name sp
8be0: 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 20 5c ecified in the \
8bf0: 66 42 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62 fB-servername</b
8c00: 3e 5c 66 52 20 6f 70 74 69 6f 6e 5c 26 2e 20 54 >\fR option\&. T
8c10: 68 65 0a 70 75 72 70 6f 73 65 20 69 73 20 73 6f he.purpose is so
8c20: 20 77 68 65 6e 20 61 20 73 65 72 76 65 72 20 73 when a server s
8c30: 75 70 70 6f 72 74 73 20 6d 75 6c 74 69 70 6c 65 upports multiple
8c40: 20 6e 61 6d 65 73 2c 20 74 68 65 20 72 69 67 68 names, the righ
8c50: 74 20 63 65 72 74 69 66 69 63 61 74 65 0a 63 61 t certificate.ca
8c60: 6e 20 62 65 20 75 73 65 64 5c 26 2e 20 49 74 20 n be used\&. It
8c70: 69 73 20 63 61 6c 6c 65 64 20 61 66 74 65 72 20 is called after
8c80: 74 68 65 20 68 65 6c 6c 6f 20 63 61 6c 6c 62 61 the hello callba
8c90: 63 6b 20 62 75 74 20 62 65 66 6f 72 65 20 74 68 ck but before th
8ca0: 65 20 41 4c 50 4e 0a 63 61 6c 6c 62 61 63 6b 5c e ALPN.callback\
8cb0: 26 2e 0a 2e 54 50 0a 5c 66 42 76 65 72 69 66 79 &...TP.\fBverify
8cc0: 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 \fR \fIchannelId
8cd0: 20 64 65 70 74 68 20 63 65 72 74 20 73 74 61 74 depth cert stat
8ce0: 75 73 20 65 72 72 6f 72 5c 66 52 0a 54 68 69 73 us error\fR.This
8cf0: 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 form of callbac
8d00: 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 k is invoked by
8d10: 4f 70 65 6e 53 53 4c 20 77 68 65 6e 20 61 20 6e OpenSSL when a n
8d20: 65 77 20 63 65 72 74 69 66 69 63 61 74 65 20 69 ew certificate i
8d30: 73 20 72 65 63 65 69 76 65 64 0a 66 72 6f 6d 20 s received.from
8d40: 74 68 65 20 70 65 65 72 5c 26 2e 20 49 74 20 61 the peer\&. It a
8d50: 6c 6c 6f 77 73 20 74 68 65 20 63 6c 69 65 6e 74 llows the client
8d60: 20 74 6f 20 63 68 65 63 6b 20 74 68 65 20 63 65 to check the ce
8d70: 72 74 69 66 69 63 61 74 65 20 76 65 72 69 66 69 rtificate verifi
8d80: 63 61 74 69 6f 6e 0a 72 65 73 75 6c 74 73 20 61 cation.results a
8d90: 6e 64 20 63 68 6f 6f 73 65 20 77 68 65 74 68 65 nd choose whethe
8da0: 72 20 74 6f 20 63 6f 6e 74 69 6e 75 65 20 6f 72 r to continue or
8db0: 20 6e 6f 74 5c 26 2e 20 49 74 20 69 73 20 63 61 not\&. It is ca
8dc0: 6c 6c 65 64 20 66 6f 72 20 65 61 63 68 0a 63 65 lled for each.ce
8dd0: 72 74 69 66 69 63 61 74 65 20 69 6e 20 74 68 65 rtificate in the
8de0: 20 63 65 72 74 69 66 69 63 61 74 65 20 63 68 61 certificate cha
8df0: 69 6e 5c 26 2e 20 54 68 69 73 20 63 61 6c 6c 62 in\&. This callb
8e00: 61 63 6b 20 77 61 73 20 6d 6f 76 65 64 20 66 72 ack was moved fr
8e10: 6f 6d 0a 5c 66 42 2d 63 6f 6d 6d 61 6e 64 5c 66 om.\fB-command\f
8e20: 52 20 69 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e R in TclTLS 1\&.
8e30: 38 5c 26 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 8\&. The argumen
8e40: 74 73 20 61 72 65 3a 0a 2e 52 53 0a 2e 54 50 0a ts are:..RS..TP.
8e50: 5c 66 49 64 65 70 74 68 5c 66 52 0a 54 68 65 20 \fIdepth\fR.The
8e60: 64 65 70 74 68 20 69 73 20 74 68 65 20 69 6e 74 depth is the int
8e70: 65 67 65 72 20 64 65 70 74 68 20 6f 66 20 74 68 eger depth of th
8e80: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 69 6e e certificate in
8e90: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
8ea0: 20 63 68 61 69 6e 2c 0a 77 68 65 72 65 20 30 20 chain,.where 0
8eb0: 69 73 20 74 68 65 20 70 65 65 72 20 63 65 72 74 is the peer cert
8ec0: 69 66 69 63 61 74 65 20 61 6e 64 20 68 69 67 68 ificate and high
8ed0: 65 72 20 76 61 6c 75 65 73 20 67 6f 69 6e 67 20 er values going
8ee0: 75 70 20 74 6f 20 74 68 65 20 43 65 72 74 69 66 up to the Certif
8ef0: 69 63 61 74 65 0a 41 75 74 68 6f 72 69 74 79 20 icate.Authority
8f00: 28 43 41 29 5c 26 2e 0a 2e 54 50 0a 5c 66 49 63 (CA)\&...TP.\fIc
8f10: 65 72 74 5c 66 52 0a 54 68 65 20 63 65 72 74 20 ert\fR.The cert
8f20: 61 72 67 75 6d 65 6e 74 20 69 73 20 61 20 6c 69 argument is a li
8f30: 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 st of key-value
8f40: 70 61 69 72 73 20 73 69 6d 69 6c 61 72 20 74 6f pairs similar to
8f50: 20 74 68 6f 73 65 20 72 65 74 75 72 6e 65 64 20 those returned
8f60: 62 79 0a 5c 66 42 74 6c 73 3a 3a 73 74 61 74 75 by.\fBtls::statu
8f70: 73 5c 66 52 5c 26 2e 0a 2e 54 50 0a 5c 66 49 73 s\fR\&...TP.\fIs
8f80: 74 61 74 75 73 5c 66 52 0a 54 68 65 20 73 74 61 tatus\fR.The sta
8f90: 74 75 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 tus argument is
8fa0: 74 68 65 20 62 6f 6f 6c 65 61 6e 20 76 61 6c 69 the boolean vali
8fb0: 64 69 74 79 20 6f 66 20 74 68 65 20 63 75 72 72 dity of the curr
8fc0: 65 6e 74 20 63 65 72 74 69 66 69 63 61 74 65 20 ent certificate
8fd0: 77 68 65 72 65 20 30 0a 69 73 20 69 6e 76 61 6c where 0.is inval
8fe0: 69 64 20 61 6e 64 20 31 20 69 73 20 76 61 6c 69 id and 1 is vali
8ff0: 64 5c 26 2e 0a 2e 54 50 0a 5c 66 49 65 72 72 6f d\&...TP.\fIerro
9000: 72 5c 66 52 0a 54 68 65 20 65 72 72 6f 72 20 61 r\fR.The error a
9010: 72 67 75 6d 65 6e 74 20 69 73 20 74 68 65 20 65 rgument is the e
9020: 72 72 6f 72 20 6d 65 73 73 61 67 65 2c 20 69 66 rror message, if
9030: 20 61 6e 79 2c 20 67 65 6e 65 72 61 74 65 64 20 any, generated
9040: 62 79 0a 5c 66 42 58 35 30 39 5f 53 54 4f 52 45 by.\fBX509_STORE
9050: 5f 43 54 58 5f 67 65 74 5f 65 72 72 6f 72 28 29 _CTX_get_error()
9060: 5c 66 52 5c 26 2e 0a 2e 52 45 0a 2e 50 50 0a 52 \fR\&...RE..PP.R
9070: 65 66 65 72 65 6e 63 65 20 69 6d 70 6c 65 6d 65 eference impleme
9080: 6e 74 61 74 69 6f 6e 73 20 6f 66 20 74 68 65 73 ntations of thes
9090: 65 20 63 61 6c 6c 62 61 63 6b 73 20 61 72 65 20 e callbacks are
90a0: 70 72 6f 76 69 64 65 64 20 69 6e 20 22 5c 66 49 provided in "\fI
90b0: 74 6c 73 5c 26 2e 74 63 6c 5c 66 52 22 0a 61 73 tls\&.tcl\fR".as
90c0: 20 5c 66 42 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 \fBtls::callbac
90d0: 6b 5c 66 52 2c 20 5c 66 42 74 6c 73 3a 3a 70 61 k\fR, \fBtls::pa
90e0: 73 73 77 6f 72 64 5c 66 52 2c 20 61 6e 64 20 5c ssword\fR, and \
90f0: 66 42 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f fBtls::validate_
9100: 63 6f 6d 6d 61 6e 64 5c 66 52 0a 72 65 73 70 65 command\fR.respe
9110: 63 74 69 76 65 6c 79 5c 26 2e 20 4e 6f 74 65 20 ctively\&. Note
9120: 74 68 61 74 20 74 68 65 73 65 20 61 72 65 20 6f that these are o
9130: 6e 6c 79 20 5c 66 49 73 61 6d 70 6c 65 5c 66 52 nly \fIsample\fR
9140: 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 implementations
9150: 5c 26 2e 20 49 6e 20 61 20 6d 6f 72 65 0a 72 65 \&. In a more.re
9160: 61 6c 69 73 74 69 63 20 64 65 70 6c 6f 79 6d 65 alistic deployme
9170: 6e 74 20 79 6f 75 20 77 6f 75 6c 64 20 73 70 65 nt you would spe
9180: 63 69 66 79 20 79 6f 75 72 20 6f 77 6e 20 63 61 cify your own ca
9190: 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 73 20 6f llback scripts o
91a0: 6e 20 65 61 63 68 20 54 4c 53 0a 63 68 61 6e 6e n each TLS.chann
91b0: 65 6c 20 75 73 69 6e 67 20 74 68 65 20 5c 66 42 el using the \fB
91c0: 2d 63 6f 6d 6d 61 6e 64 5c 66 52 2c 20 5c 66 42 -command\fR, \fB
91d0: 2d 70 61 73 73 77 6f 72 64 5c 66 52 2c 20 61 6e -password\fR, an
91e0: 64 0a 5c 66 42 2d 76 61 6c 69 64 61 74 65 5f 63 d.\fB-validate_c
91f0: 6f 6d 6d 61 6e 64 5c 66 52 20 6f 70 74 69 6f 6e ommand\fR option
9200: 73 5c 26 2e 0a 2e 50 50 0a 54 68 65 20 64 65 66 s\&...PP.The def
9210: 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 ault behavior wh
9220: 65 6e 20 74 68 65 20 5c 66 42 2d 63 6f 6d 6d 61 en the \fB-comma
9230: 6e 64 5c 66 52 20 61 6e 64 20 5c 66 42 2d 76 61 nd\fR and \fB-va
9240: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 lidate_command\f
9250: 52 0a 6f 70 74 69 6f 6e 73 20 61 72 65 20 6e 6f R.options are no
9260: 74 20 73 70 65 63 69 66 69 65 64 2c 20 69 73 20 t specified, is
9270: 66 6f 72 20 54 63 6c 54 4c 53 20 74 6f 20 70 72 for TclTLS to pr
9280: 6f 63 65 73 73 20 74 68 65 20 61 73 73 6f 63 69 ocess the associ
9290: 61 74 65 64 20 6c 69 62 72 61 72 79 0a 63 61 6c ated library.cal
92a0: 6c 62 61 63 6b 73 20 69 6e 74 65 72 6e 61 6c 6c lbacks internall
92b0: 79 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 y\&. The default
92c0: 20 62 65 68 61 76 69 6f 72 20 77 68 65 6e 20 74 behavior when t
92d0: 68 65 20 5c 66 42 2d 70 61 73 73 77 6f 72 64 5c he \fB-password\
92e0: 66 52 20 6f 70 74 69 6f 6e 0a 69 73 20 6e 6f 74 fR option.is not
92f0: 20 73 70 65 63 69 66 69 65 64 20 69 73 20 66 6f specified is fo
9300: 72 20 54 63 6c 54 4c 53 20 74 6f 20 70 72 6f 63 r TclTLS to proc
9310: 65 73 73 20 74 68 65 20 61 73 73 6f 63 69 61 74 ess the associat
9320: 65 64 20 6c 69 62 72 61 72 79 20 63 61 6c 6c 62 ed library callb
9330: 61 63 6b 73 20 62 79 0a 61 74 74 65 6d 70 74 69 acks by.attempti
9340: 6e 67 20 74 6f 20 63 61 6c 6c 20 5c 66 42 74 6c ng to call \fBtl
9350: 73 3a 3a 70 61 73 73 77 6f 72 64 5c 66 52 5c 26 s::password\fR\&
9360: 2e 20 54 68 65 20 64 69 66 66 65 72 65 6e 63 65 . The difference
9370: 20 62 65 74 77 65 65 6e 20 74 68 65 73 65 20 74 between these t
9380: 77 6f 0a 62 65 68 61 76 69 6f 72 73 20 69 73 20 wo.behaviors is
9390: 61 20 63 6f 6e 73 65 71 75 65 6e 63 65 20 6f 66 a consequence of
93a0: 20 6d 61 69 6e 74 61 69 6e 69 6e 67 20 63 6f 6d maintaining com
93b0: 70 61 74 69 62 69 6c 69 74 79 20 77 69 74 68 20 patibility with
93c0: 65 61 72 6c 69 65 72 0a 69 6d 70 6c 65 6d 65 6e earlier.implemen
93d0: 74 61 74 69 6f 6e 73 5c 26 2e 0a 2e 50 50 0a 5c tations\&...PP.\
93e0: 66 49 54 68 65 20 75 73 65 20 6f 66 20 74 68 65 fIThe use of the
93f0: 20 72 65 66 65 72 65 6e 63 65 20 63 61 6c 6c 62 reference callb
9400: 61 63 6b 73 20 5c 66 42 74 6c 73 3a 3a 63 61 6c acks \fBtls::cal
9410: 6c 62 61 63 6b 5c 66 52 2c 20 5c 66 42 74 6c 73 lback\fR, \fBtls
9420: 3a 3a 70 61 73 73 77 6f 72 64 5c 66 52 2c 0a 61 ::password\fR,.a
9430: 6e 64 20 5c 66 42 74 6c 73 3a 3a 76 61 6c 69 64 nd \fBtls::valid
9440: 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 52 20 69 ate_command\fR i
9450: 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 s not recommende
9460: 64 5c 26 2e 20 54 68 65 79 20 6d 61 79 20 62 65 d\&. They may be
9470: 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d 20 66 75 removed from fu
9480: 74 75 72 65 20 72 65 6c 65 61 73 65 73 5c 26 2e ture releases\&.
9490: 5c 66 52 0a 2e 53 48 20 44 45 42 55 47 0a 46 6f \fR..SH DEBUG.Fo
94a0: 72 20 6d 6f 73 74 20 64 65 62 75 67 67 69 6e 67 r most debugging
94b0: 20 6e 65 65 64 73 2c 20 74 68 65 20 5c 66 42 2d needs, the \fB-
94c0: 63 61 6c 6c 62 61 63 6b 5c 66 52 20 6f 70 74 69 callback\fR opti
94d0: 6f 6e 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 on can be used t
94e0: 6f 20 70 72 6f 76 69 64 65 0a 73 75 66 66 69 63 o provide.suffic
94f0: 69 65 6e 74 20 69 6e 73 69 67 68 74 20 61 6e 64 ient insight and
9500: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 information on
9510: 74 68 65 20 54 4c 53 20 68 61 6e 64 73 68 61 6b the TLS handshak
9520: 65 20 61 6e 64 20 70 72 6f 67 72 65 73 73 5c 26 e and progress\&
9530: 2e 20 49 66 0a 66 75 72 74 68 65 72 20 74 72 6f . If.further tro
9540: 75 62 6c 65 73 68 6f 6f 74 69 6e 67 20 69 6e 73 ubleshooting ins
9550: 69 67 68 74 20 69 73 20 6e 65 65 64 65 64 2c 20 ight is needed,
9560: 74 68 65 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 the compile time
9570: 20 6f 70 74 69 6f 6e 0a 5c 66 42 2d 2d 65 6e 61 option.\fB--ena
9580: 62 6c 65 2d 64 65 62 75 67 5c 66 52 20 63 61 6e ble-debug\fR can
9590: 20 62 65 20 75 73 65 64 20 74 6f 20 67 65 74 20 be used to get
95a0: 64 65 74 61 69 6c 65 64 20 65 78 65 63 75 74 69 detailed executi
95b0: 6f 6e 20 66 6c 6f 77 20 73 74 61 74 75 73 5c 26 on flow status\&
95c0: 2e 0a 2e 50 50 0a 54 4c 53 20 6b 65 79 20 6c 6f ...PP.TLS key lo
95d0: 67 67 69 6e 67 20 63 61 6e 20 62 65 20 65 6e 61 gging can be ena
95e0: 62 6c 65 64 20 62 79 20 73 65 74 74 69 6e 67 20 bled by setting
95f0: 74 68 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 the environment
9600: 76 61 72 69 61 62 6c 65 0a 5c 66 42 53 53 4c 4b variable.\fBSSLK
9610: 45 59 4c 4f 47 46 49 4c 45 5c 66 52 20 74 6f 20 EYLOGFILE\fR to
9620: 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 the name of the
9630: 66 69 6c 65 20 74 6f 20 6c 6f 67 20 74 6f 5c 26 file to log to\&
9640: 2e 20 54 68 65 6e 20 77 68 65 6e 65 76 65 72 20 . Then whenever
9650: 54 4c 53 20 6b 65 79 0a 6d 61 74 65 72 69 61 6c TLS key.material
9660: 20 69 73 20 67 65 6e 65 72 61 74 65 64 20 6f 72 is generated or
9670: 20 72 65 63 65 69 76 65 64 20 69 74 20 77 69 6c received it wil
9680: 6c 20 62 65 20 6c 6f 67 67 65 64 20 74 6f 20 74 l be logged to t
9690: 68 65 20 66 69 6c 65 5c 26 2e 20 54 68 69 73 20 he file\&. This
96a0: 69 73 20 75 73 65 66 75 6c 0a 66 6f 72 20 6c 6f is useful.for lo
96b0: 67 67 69 6e 67 20 6b 65 79 20 64 61 74 61 20 66 gging key data f
96c0: 6f 72 20 6e 65 74 77 6f 72 6b 20 6c 6f 67 67 69 or network loggi
96d0: 6e 67 20 74 6f 6f 6c 73 20 74 6f 20 75 73 65 20 ng tools to use
96e0: 74 6f 20 64 65 63 72 79 70 74 20 74 68 65 20 64 to decrypt the d
96f0: 61 74 61 5c 26 2e 0a 2e 50 50 0a 54 68 65 20 5c ata\&...PP.The \
9700: 66 42 74 6c 73 3a 3a 64 65 62 75 67 5c 66 52 20 fBtls::debug\fR
9710: 76 61 72 69 61 62 6c 65 20 70 72 6f 76 69 64 65 variable provide
9720: 73 20 73 6f 6d 65 20 61 64 64 69 74 69 6f 6e 61 s some additiona
9730: 6c 20 63 6f 6e 74 72 6f 6c 20 6f 76 65 72 20 74 l control over t
9740: 68 65 73 65 0a 72 65 66 65 72 65 6e 63 65 20 63 hese.reference c
9750: 61 6c 6c 62 61 63 6b 73 5c 26 2e 20 49 74 73 20 allbacks\&. Its
9760: 76 61 6c 75 65 20 69 73 20 7a 65 72 6f 20 62 79 value is zero by
9770: 20 64 65 66 61 75 6c 74 5c 26 2e 20 48 69 67 68 default\&. High
9780: 65 72 20 76 61 6c 75 65 73 20 70 72 6f 64 75 63 er values produc
9790: 65 20 6d 6f 72 65 0a 64 69 61 67 6e 6f 73 74 69 e more.diagnosti
97a0: 63 20 6f 75 74 70 75 74 2c 20 61 6e 64 20 77 69 c output, and wi
97b0: 6c 6c 20 61 6c 73 6f 20 66 6f 72 63 65 20 74 68 ll also force th
97c0: 65 20 76 65 72 69 66 79 20 6d 65 74 68 6f 64 20 e verify method
97d0: 69 6e 20 5c 66 42 74 6c 73 3a 3a 63 61 6c 6c 62 in \fBtls::callb
97e0: 61 63 6b 5c 66 52 0a 74 6f 20 61 63 63 65 70 74 ack\fR.to accept
97f0: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
9800: 2c 20 65 76 65 6e 20 77 68 65 6e 20 69 74 20 69 , even when it i
9810: 73 20 69 6e 76 61 6c 69 64 20 69 66 20 74 68 65 s invalid if the
9820: 0a 5c 66 42 2d 76 61 6c 69 64 61 74 65 63 6f 6d .\fB-validatecom
9830: 6d 61 6e 64 5c 66 52 20 6f 70 74 69 6f 6e 20 69 mand\fR option i
9840: 73 20 73 65 74 20 74 6f 20 5c 66 42 74 6c 73 3a s set to \fBtls:
9850: 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e :validate_comman
9860: 64 5c 66 52 5c 26 2e 0a 2e 50 50 0a 5c 66 49 54 d\fR\&...PP.\fIT
9870: 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 76 61 he use of the va
9880: 72 69 61 62 6c 65 20 5c 66 42 74 6c 73 3a 3a 64 riable \fBtls::d
9890: 65 62 75 67 5c 66 52 20 69 73 20 6e 6f 74 20 72 ebug\fR is not r
98a0: 65 63 6f 6d 6d 65 6e 64 65 64 5c 26 2e 0a 49 74 ecommended\&..It
98b0: 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 20 may be removed
98c0: 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65 from future rele
98d0: 61 73 65 73 5c 26 2e 5c 66 52 0a 2e 53 48 20 22 ases\&.\fR..SH "
98e0: 44 45 42 55 47 20 45 58 41 4d 50 4c 45 53 22 0a DEBUG EXAMPLES".
98f0: 54 68 65 73 65 20 65 78 61 6d 70 6c 65 73 20 75 These examples u
9900: 73 65 20 74 68 65 20 64 65 66 61 75 6c 74 20 55 se the default U
9910: 6e 69 78 20 70 6c 61 74 66 6f 72 6d 20 53 53 4c nix platform SSL
9920: 20 63 65 72 74 69 66 69 63 61 74 65 73 5c 26 2e certificates\&.
9930: 20 46 6f 72 20 73 74 61 6e 64 61 72 64 0a 69 6e For standard.in
9940: 73 74 61 6c 6c 61 74 69 6f 6e 73 2c 20 2d 63 61 stallations, -ca
9950: 64 69 72 20 61 6e 64 20 2d 63 61 66 69 6c 65 20 dir and -cafile
9960: 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 20 6e 65 should not be ne
9970: 65 64 65 64 5c 26 2e 20 49 66 20 79 6f 75 72 20 eded\&. If your
9980: 63 65 72 74 69 66 69 63 61 74 65 73 0a 61 72 65 certificates.are
9990: 20 69 6e 20 6e 6f 6e 2d 73 74 61 6e 64 61 72 64 in non-standard
99a0: 20 6c 6f 63 61 74 69 6f 6e 73 2c 20 73 70 65 63 locations, spec
99b0: 69 66 79 20 2d 63 61 64 69 72 20 6f 72 20 2d 63 ify -cadir or -c
99c0: 61 66 69 6c 65 20 61 73 20 6e 65 65 64 65 64 5c afile as needed\
99d0: 26 2e 0a 2e 50 50 0a 45 78 61 6d 70 6c 65 20 23 &...PP.Example #
99e0: 31 3a 20 55 73 65 20 48 54 54 50 20 70 61 63 6b 1: Use HTTP pack
99f0: 61 67 65 0a 2e 43 53 0a 0a 0a 0a 70 61 63 6b 61 age..CS....packa
9a00: 67 65 20 72 65 71 75 69 72 65 20 68 74 74 70 0a ge require http.
9a10: 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 package require
9a20: 74 6c 73 0a 73 65 74 20 75 72 6c 20 22 68 74 74 tls.set url "htt
9a30: 70 73 3a 2f 2f 77 77 77 5c 26 2e 74 63 6c 5c 26 ps://www\&.tcl\&
9a40: 2e 74 6b 2f 22 0a 0a 68 74 74 70 3a 3a 72 65 67 .tk/"..http::reg
9a50: 69 73 74 65 72 20 68 74 74 70 73 20 34 34 33 20 ister https 443
9a60: 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 [list ::tls::soc
9a70: 6b 65 74 20 2d 61 75 74 6f 73 65 72 76 65 72 6e ket -autoservern
9a80: 61 6d 65 20 31 20 2d 72 65 71 75 69 72 65 20 31 ame 1 -require 1
9a90: 20 20 2d 63 6f 6d 6d 61 6e 64 20 3a 3a 74 6c 73 -command ::tls
9aa0: 3a 3a 63 61 6c 6c 62 61 63 6b 20 2d 70 61 73 73 ::callback -pass
9ab0: 77 6f 72 64 20 3a 3a 74 6c 73 3a 3a 70 61 73 73 word ::tls::pass
9ac0: 77 6f 72 64 20 20 2d 76 61 6c 69 64 61 74 65 63 word -validatec
9ad0: 6f 6d 6d 61 6e 64 20 3a 3a 74 6c 73 3a 3a 76 61 ommand ::tls::va
9ae0: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5d 0a lidate_command].
9af0: 0a 23 20 43 68 65 63 6b 20 66 6f 72 20 65 72 72 .# Check for err
9b00: 6f 72 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 68 74 or.set token [ht
9b10: 74 70 3a 3a 67 65 74 75 72 6c 20 24 75 72 6c 5d tp::geturl $url]
9b20: 0a 69 66 20 7b 5b 68 74 74 70 3a 3a 73 74 61 74 .if {[http::stat
9b30: 75 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 20 22 6f us $token] ne "o
9b40: 6b 22 7d 20 7b 0a 20 20 20 20 70 75 74 73 20 5b k"} {. puts [
9b50: 66 6f 72 6d 61 74 20 22 45 72 72 6f 72 20 25 73 format "Error %s
9b60: 22 20 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 20 " [http::status
9b70: 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 0a 23 20 47 65 $token]].}..# Ge
9b80: 74 20 77 65 62 20 70 61 67 65 0a 73 65 74 20 64 t web page.set d
9b90: 61 74 61 20 5b 68 74 74 70 3a 3a 64 61 74 61 20 ata [http::data
9ba0: 24 74 6f 6b 65 6e 5d 0a 70 75 74 73 20 5b 73 74 $token].puts [st
9bb0: 72 69 6e 67 20 6c 65 6e 67 74 68 20 24 64 61 74 ring length $dat
9bc0: 61 5d 0a 0a 23 20 43 6c 65 61 6e 75 70 0a 3a 3a a]..# Cleanup.::
9bd0: 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 24 74 http::cleanup $t
9be0: 6f 6b 65 6e 0a 0a 2e 43 45 0a 45 78 61 6d 70 6c oken...CE.Exampl
9bf0: 65 20 23 32 3a 20 55 73 65 20 72 61 77 20 73 6f e #2: Use raw so
9c00: 63 6b 65 74 0a 2e 43 53 0a 0a 0a 0a 70 61 63 6b cket..CS....pack
9c10: 61 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a age require tls.
9c20: 0a 73 65 74 20 75 72 6c 20 22 77 77 77 5c 26 2e .set url "www\&.
9c30: 74 63 6c 2d 6c 61 6e 67 5c 26 2e 6f 72 67 22 0a tcl-lang\&.org".
9c40: 73 65 74 20 70 6f 72 74 20 34 34 33 0a 0a 73 65 set port 443..se
9c50: 74 20 63 68 20 5b 74 6c 73 3a 3a 73 6f 63 6b 65 t ch [tls::socke
9c60: 74 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d t -autoservernam
9c70: 65 20 31 20 2d 73 65 72 76 65 72 6e 61 6d 65 20 e 1 -servername
9c80: 24 75 72 6c 20 2d 72 65 71 75 69 72 65 20 31 20 $url -require 1
9c90: 20 2d 61 6c 70 6e 20 7b 68 74 74 70 2f 31 5c 26 -alpn {http/1\&
9ca0: 2e 31 7d 20 2d 63 6f 6d 6d 61 6e 64 20 3a 3a 74 .1} -command ::t
9cb0: 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 20 2d 70 61 ls::callback -pa
9cc0: 73 73 77 6f 72 64 20 3a 3a 74 6c 73 3a 3a 70 61 ssword ::tls::pa
9cd0: 73 73 77 6f 72 64 20 20 2d 76 61 6c 69 64 61 74 ssword -validat
9ce0: 65 63 6f 6d 6d 61 6e 64 20 3a 3a 74 6c 73 3a 3a ecommand ::tls::
9cf0: 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 validate_command
9d00: 20 24 75 72 6c 20 24 70 6f 72 74 5d 0a 63 68 61 $url $port].cha
9d10: 6e 20 63 6f 6e 66 69 67 75 72 65 20 24 63 68 20 n configure $ch
9d20: 2d 62 75 66 66 65 72 73 69 7a 65 20 36 35 35 33 -buffersize 6553
9d30: 36 0a 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 6.tls::handshake
9d40: 20 24 63 68 0a 0a 70 75 74 73 20 24 63 68 20 22 $ch..puts $ch "
9d50: 47 45 54 20 2f 20 48 54 54 50 2f 31 5c 26 2e 31 GET / HTTP/1\&.1
9d60: 22 0a 66 6c 75 73 68 20 24 63 68 0a 61 66 74 65 ".flush $ch.afte
9d70: 72 20 35 30 30 0a 73 65 74 20 64 61 74 61 20 5b r 500.set data [
9d80: 72 65 61 64 20 24 63 68 5d 0a 0a 61 72 72 61 79 read $ch]..array
9d90: 20 73 65 74 20 73 74 61 74 75 73 20 5b 74 6c 73 set status [tls
9da0: 3a 3a 73 74 61 74 75 73 20 24 63 68 5d 0a 61 72 ::status $ch].ar
9db0: 72 61 79 20 73 65 74 20 63 6f 6e 6e 20 5b 74 6c ray set conn [tl
9dc0: 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 20 24 63 s::connection $c
9dd0: 68 5d 0a 61 72 72 61 79 20 73 65 74 20 63 68 61 h].array set cha
9de0: 6e 20 5b 63 68 61 6e 20 63 6f 6e 66 69 67 75 72 n [chan configur
9df0: 65 20 24 63 68 5d 0a 63 6c 6f 73 65 20 24 63 68 e $ch].close $ch
9e00: 0a 70 61 72 72 61 79 20 73 74 61 74 75 73 0a 70 .parray status.p
9e10: 61 72 72 61 79 20 63 6f 6e 6e 0a 70 61 72 72 61 array conn.parra
9e20: 79 20 63 68 61 6e 0a 0a 2e 43 45 0a 2e 53 48 20 y chan...CE..SH
9e30: 22 48 54 54 50 20 50 41 43 4b 41 47 45 20 45 58 "HTTP PACKAGE EX
9e40: 41 4d 50 4c 45 53 22 0a 54 68 65 73 65 20 65 78 AMPLES".These ex
9e50: 61 6d 70 6c 65 73 20 75 73 65 20 74 68 65 20 64 amples use the d
9e60: 65 66 61 75 6c 74 20 55 6e 69 78 20 70 6c 61 74 efault Unix plat
9e70: 66 6f 72 6d 20 53 53 4c 20 63 65 72 74 69 66 69 form SSL certifi
9e80: 63 61 74 65 73 5c 26 2e 20 46 6f 72 20 73 74 61 cates\&. For sta
9e90: 6e 64 61 72 64 0a 69 6e 73 74 61 6c 6c 61 74 69 ndard.installati
9ea0: 6f 6e 73 2c 20 2d 63 61 64 69 72 20 61 6e 64 20 ons, -cadir and
9eb0: 2d 63 61 66 69 6c 65 20 73 68 6f 75 6c 64 20 6e -cafile should n
9ec0: 6f 74 20 62 65 20 6e 65 65 64 65 64 5c 26 2e 20 ot be needed\&.
9ed0: 49 66 20 79 6f 75 72 20 63 65 72 74 69 66 69 63 If your certific
9ee0: 61 74 65 73 0a 61 72 65 20 69 6e 20 6e 6f 6e 2d ates.are in non-
9ef0: 73 74 61 6e 64 61 72 64 20 6c 6f 63 61 74 69 6f standard locatio
9f00: 6e 73 2c 20 73 65 74 20 2d 63 61 64 69 72 20 6f ns, set -cadir o
9f10: 72 20 75 73 65 20 2d 63 61 66 69 6c 65 20 61 73 r use -cafile as
9f20: 20 6e 65 65 64 65 64 5c 26 2e 0a 2e 50 50 0a 45 needed\&...PP.E
9f30: 78 61 6d 70 6c 65 20 23 33 3a 20 47 65 74 20 77 xample #3: Get w
9f40: 65 62 20 70 61 67 65 0a 2e 43 53 0a 0a 0a 0a 70 eb page..CS....p
9f50: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 ackage require h
9f60: 74 74 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 ttp.package requ
9f70: 69 72 65 20 74 6c 73 0a 73 65 74 20 75 72 6c 20 ire tls.set url
9f80: 22 68 74 74 70 73 3a 2f 2f 77 77 77 5c 26 2e 74 "https://www\&.t
9f90: 63 6c 5c 26 2e 74 6b 2f 22 0a 0a 68 74 74 70 3a cl\&.tk/"..http:
9fa0: 3a 72 65 67 69 73 74 65 72 20 68 74 74 70 73 20 :register https
9fb0: 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a 443 [list ::tls:
9fc0: 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73 65 72 :socket -autoser
9fd0: 76 65 72 6e 61 6d 65 20 31 20 2d 72 65 71 75 69 vername 1 -requi
9fe0: 72 65 20 31 5d 0a 0a 23 20 43 68 65 63 6b 20 66 re 1]..# Check f
9ff0: 6f 72 20 65 72 72 6f 72 0a 73 65 74 20 74 6f 6b or error.set tok
a000: 65 6e 20 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c en [http::geturl
a010: 20 24 75 72 6c 5d 0a 69 66 20 7b 5b 68 74 74 70 $url].if {[http
a020: 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d ::status $token]
a030: 20 6e 65 20 22 6f 6b 22 7d 20 7b 0a 20 20 20 20 ne "ok"} {.
a040: 70 75 74 73 20 5b 66 6f 72 6d 61 74 20 22 45 72 puts [format "Er
a050: 72 6f 72 20 25 73 22 20 5b 68 74 74 70 3a 3a 73 ror %s" [http::s
a060: 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d 5d 0a 7d tatus $token]].}
a070: 0a 0a 23 20 47 65 74 20 77 65 62 20 70 61 67 65 ..# Get web page
a080: 0a 73 65 74 20 64 61 74 61 20 5b 68 74 74 70 3a .set data [http:
a090: 3a 64 61 74 61 20 24 74 6f 6b 65 6e 5d 0a 70 75 :data $token].pu
a0a0: 74 73 20 24 64 61 74 61 0a 0a 23 20 43 6c 65 61 ts $data..# Clea
a0b0: 6e 75 70 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 nup.::http::clea
a0c0: 6e 75 70 20 24 74 6f 6b 65 6e 0a 0a 2e 43 45 0a nup $token...CE.
a0d0: 45 78 61 6d 70 6c 65 20 23 34 3a 20 44 6f 77 6e Example #4: Down
a0e0: 6c 6f 61 64 20 66 69 6c 65 0a 2e 43 53 0a 0a 0a load file..CS...
a0f0: 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 .package require
a100: 20 68 74 74 70 0a 70 61 63 6b 61 67 65 20 72 65 http.package re
a110: 71 75 69 72 65 20 74 6c 73 0a 0a 73 65 74 20 75 quire tls..set u
a120: 72 6c 20 22 68 74 74 70 73 3a 2f 2f 77 69 6b 69 rl "https://wiki
a130: 5c 26 2e 74 63 6c 2d 6c 61 6e 67 5c 26 2e 6f 72 \&.tcl-lang\&.or
a140: 67 2f 73 69 74 65 6d 61 70 5c 26 2e 78 6d 6c 22 g/sitemap\&.xml"
a150: 0a 73 65 74 20 66 69 6c 65 6e 61 6d 65 20 5b 66 .set filename [f
a160: 69 6c 65 20 74 61 69 6c 20 24 75 72 6c 5d 0a 0a ile tail $url]..
a170: 68 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68 http::register h
a180: 74 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a ttps 443 [list :
a190: 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 :tls::socket -au
a1a0: 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 31 20 2d toservername 1 -
a1b0: 72 65 71 75 69 72 65 20 31 5d 0a 0a 23 20 47 65 require 1]..# Ge
a1c0: 74 20 66 69 6c 65 0a 73 65 74 20 63 68 20 5b 6f t file.set ch [o
a1d0: 70 65 6e 20 24 66 69 6c 65 6e 61 6d 65 20 77 62 pen $filename wb
a1e0: 5d 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 3a 3a 68 ].set token [::h
a1f0: 74 74 70 3a 3a 67 65 74 75 72 6c 20 24 75 72 6c ttp::geturl $url
a200: 20 2d 62 6c 6f 63 6b 73 69 7a 65 20 36 35 35 33 -blocksize 6553
a210: 36 20 2d 63 68 61 6e 6e 65 6c 20 24 63 68 5d 0a 6 -channel $ch].
a220: 0a 23 20 43 6c 65 61 6e 75 70 0a 63 6c 6f 73 65 .# Cleanup.close
a230: 20 24 63 68 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 $ch.::http::cle
a240: 61 6e 75 70 20 24 74 6f 6b 65 6e 0a 0a 2e 43 45 anup $token...CE
a250: 0a 2e 53 48 20 22 53 50 45 43 49 41 4c 20 43 4f ..SH "SPECIAL CO
a260: 4e 53 49 44 45 52 41 54 49 4f 4e 53 22 0a 54 68 NSIDERATIONS".Th
a270: 65 20 63 61 70 61 62 69 6c 69 74 69 65 73 20 6f e capabilities o
a280: 66 20 74 68 69 73 20 70 61 63 6b 61 67 65 20 63 f this package c
a290: 61 6e 20 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 an vary enormous
a2a0: 6c 79 20 62 61 73 65 64 20 75 70 6f 6e 20 68 6f ly based upon ho
a2b0: 77 20 74 68 65 0a 6c 69 6e 6b 65 64 20 74 6f 20 w the.linked to
a2c0: 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 20 OpenSSL library
a2d0: 77 61 73 20 63 6f 6e 66 69 67 75 72 65 64 20 61 was configured a
a2e0: 6e 64 20 62 75 69 6c 74 5c 26 2e 20 4e 65 77 20 nd built\&. New
a2f0: 76 65 72 73 69 6f 6e 73 20 6d 61 79 20 6f 62 73 versions may obs
a300: 6f 6c 65 74 65 0a 6f 6c 64 65 72 20 70 72 6f 74 olete.older prot
a310: 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73 2c 20 61 ocol versions, a
a320: 64 64 20 6f 72 20 72 65 6d 6f 76 65 20 63 69 70 dd or remove cip
a330: 68 65 72 73 2c 20 63 68 61 6e 67 65 20 64 65 66 hers, change def
a340: 61 75 6c 74 20 76 61 6c 75 65 73 2c 20 65 74 63 ault values, etc
a350: 5c 26 2e 0a 55 73 65 20 74 68 65 20 5c 66 42 74 \&..Use the \fBt
a360: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 5c 66 52 ls::protocols\fR
a370: 20 63 6f 6d 6d 61 6e 64 73 20 74 6f 20 6f 62 74 commands to obt
a380: 61 69 6e 20 74 68 65 20 73 75 70 70 6f 72 74 65 ain the supporte
a390: 64 0a 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 d.protocol versi
a3a0: 6f 6e 73 5c 26 2e 0a 2e 53 48 20 22 53 45 45 20 ons\&...SH "SEE
a3b0: 41 4c 53 4f 22 0a 5c 66 49 4f 70 65 6e 53 53 4c ALSO".\fIOpenSSL
a3c0: 5c 66 52 20 5b 68 74 74 70 73 3a 2f 2f 77 77 77 \fR [https://www
a3d0: 5c 26 2e 6f 70 65 6e 73 73 6c 5c 26 2e 6f 72 67 \&.openssl\&.org
a3e0: 2f 5d 2c 20 68 74 74 70 2c 20 73 6f 63 6b 65 74 /], http, socket
a3f0: 0a 2e 53 48 20 4b 45 59 57 4f 52 44 53 0a 49 2f ..SH KEYWORDS.I/
a400: 4f 2c 20 49 50 20 41 64 64 72 65 73 73 2c 20 4f O, IP Address, O
a410: 70 65 6e 53 53 4c 2c 20 53 53 4c 2c 20 54 43 50 penSSL, SSL, TCP
a420: 2c 20 54 4c 53 2c 20 54 63 6c 54 4c 53 2c 20 61 , TLS, TclTLS, a
a430: 73 79 6e 63 68 72 6f 6e 6f 75 73 20 49 2f 4f 2c synchronous I/O,
a440: 20 62 69 6e 64 2c 20 63 65 72 74 69 66 69 63 61 bind, certifica
a450: 74 65 2c 20 63 68 61 6e 6e 65 6c 2c 20 63 6f 6e te, channel, con
a460: 6e 65 63 74 69 6f 6e 2c 20 64 6f 6d 61 69 6e 20 nection, domain
a470: 6e 61 6d 65 2c 20 68 6f 73 74 2c 20 68 74 74 70 name, host, http
a480: 73 2c 20 6e 65 74 77 6f 72 6b 2c 20 6e 65 74 77 s, network, netw
a490: 6f 72 6b 20 61 64 64 72 65 73 73 2c 20 73 6f 63 ork address, soc
a4a0: 6b 65 74 2c 20 74 6c 73 0a 2e 53 48 20 43 41 54 ket, tls..SH CAT
a4b0: 45 47 4f 52 59 0a 74 6c 73 0a 2e 53 48 20 43 4f EGORY.tls..SH CO
a4c0: 50 59 52 49 47 48 54 0a 2e 6e 66 0a 43 6f 70 79 PYRIGHT..nf.Copy
a4d0: 72 69 67 68 74 20 28 63 29 20 31 39 39 39 20 4d right (c) 1999 M
a4e0: 61 74 74 20 4e 65 77 6d 61 6e 0a 43 6f 70 79 72 att Newman.Copyr
a4f0: 69 67 68 74 20 28 63 29 20 32 30 30 34 20 53 74 ight (c) 2004 St
a500: 61 72 66 69 73 68 20 53 79 73 74 65 6d 73 0a 43 arfish Systems.C
a510: 6f 70 79 72 69 67 68 74 20 28 63 29 20 32 30 32 opyright (c) 202
a520: 34 20 42 72 69 61 6e 20 4f 27 48 61 67 61 6e 0a 4 Brian O'Hagan.
a530: 0a 2e 66 69 0a ..fi.