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 32 \"..TH "tls" n 2
00d0: 5c 26 2e 30 62 32 20 74 6c 73 20 22 54 63 6c 20 \&.0b2 tls "Tcl
00e0: 54 4c 53 20 65 78 74 65 6e 73 69 6f 6e 22 0a 2e TLS extension"..
00f0: 5c 22 20 54 68 65 20 2d 2a 2d 20 6e 72 6f 66 66 \" The -*- nroff
0100: 20 2d 2a 2d 20 64 65 66 69 6e 69 74 69 6f 6e 73 -*- definitions
0110: 20 62 65 6c 6f 77 20 61 72 65 20 66 6f 72 20 73 below are for s
0120: 75 70 70 6c 65 6d 65 6e 74 61 6c 20 6d 61 63 72 upplemental macr
0130: 6f 73 20 75 73 65 64 0a 2e 5c 22 20 69 6e 20 54 os used..\" in T
0140: 63 6c 2f 54 6b 20 6d 61 6e 75 61 6c 20 65 6e 74 cl/Tk manual ent
0150: 72 69 65 73 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 41 ries...\"..\" .A
0160: 50 20 74 79 70 65 20 6e 61 6d 65 20 69 6e 2f 6f P type name in/o
0170: 75 74 20 3f 69 6e 64 65 6e 74 3f 0a 2e 5c 22 09 ut ?indent?..\".
0180: 53 74 61 72 74 20 70 61 72 61 67 72 61 70 68 20 Start paragraph
0190: 64 65 73 63 72 69 62 69 6e 67 20 61 6e 20 61 72 describing an ar
01a0: 67 75 6d 65 6e 74 20 74 6f 20 61 20 6c 69 62 72 gument to a libr
01b0: 61 72 79 20 70 72 6f 63 65 64 75 72 65 2e 0a 2e ary procedure...
01c0: 5c 22 09 74 79 70 65 20 69 73 20 74 79 70 65 20 \".type is type
01d0: 6f 66 20 61 72 67 75 6d 65 6e 74 20 28 69 6e 74 of argument (int
01e0: 2c 20 65 74 63 2e 29 2c 20 69 6e 2f 6f 75 74 20 , etc.), in/out
01f0: 69 73 20 65 69 74 68 65 72 20 22 69 6e 22 2c 20 is either "in",
0200: 22 6f 75 74 22 2c 0a 2e 5c 22 09 6f 72 20 22 69 "out",..\".or "i
0210: 6e 2f 6f 75 74 22 20 74 6f 20 64 65 73 63 72 69 n/out" to descri
0220: 62 65 20 77 68 65 74 68 65 72 20 70 72 6f 63 65 be whether proce
0230: 64 75 72 65 20 72 65 61 64 73 20 6f 72 20 6d 6f dure reads or mo
0240: 64 69 66 69 65 73 20 61 72 67 2c 0a 2e 5c 22 09 difies arg,..\".
0250: 61 6e 64 20 69 6e 64 65 6e 74 20 69 73 20 65 71 and indent is eq
0260: 75 69 76 61 6c 65 6e 74 20 74 6f 20 73 65 63 6f uivalent to seco
0270: 6e 64 20 61 72 67 20 6f 66 20 2e 49 50 20 28 73 nd arg of .IP (s
0280: 68 6f 75 6c 64 6e 27 74 20 65 76 65 72 20 62 65 houldn't ever be
0290: 0a 2e 5c 22 09 6e 65 65 64 65 64 3b 20 20 75 73 ..\".needed; us
02a0: 65 20 2e 41 53 20 62 65 6c 6f 77 20 69 6e 73 74 e .AS below inst
02b0: 65 61 64 29 0a 2e 5c 22 0a 2e 5c 22 20 2e 41 53 ead)..\"..\" .AS
02c0: 20 3f 74 79 70 65 3f 20 3f 6e 61 6d 65 3f 0a 2e ?type? ?name?..
02d0: 5c 22 09 47 69 76 65 20 6d 61 78 69 6d 75 6d 20 \".Give maximum
02e0: 73 69 7a 65 73 20 6f 66 20 61 72 67 75 6d 65 6e sizes of argumen
02f0: 74 73 20 66 6f 72 20 73 65 74 74 69 6e 67 20 74 ts for setting t
0300: 61 62 20 73 74 6f 70 73 2e 20 20 54 79 70 65 20 ab stops. Type
0310: 61 6e 64 0a 2e 5c 22 09 6e 61 6d 65 20 61 72 65 and..\".name are
0320: 20 65 78 61 6d 70 6c 65 73 20 6f 66 20 6c 61 72 examples of lar
0330: 67 65 73 74 20 70 6f 73 73 69 62 6c 65 20 61 72 gest possible ar
0340: 67 75 6d 65 6e 74 73 20 74 68 61 74 20 77 69 6c guments that wil
0350: 6c 20 62 65 20 70 61 73 73 65 64 0a 2e 5c 22 09 l be passed..\".
0360: 74 6f 20 2e 41 50 20 6c 61 74 65 72 2e 20 20 49 to .AP later. I
0370: 66 20 61 72 67 73 20 61 72 65 20 6f 6d 69 74 74 f args are omitt
0380: 65 64 2c 20 64 65 66 61 75 6c 74 20 74 61 62 20 ed, default tab
0390: 73 74 6f 70 73 20 61 72 65 20 75 73 65 64 2e 0a stops are used..
03a0: 2e 5c 22 0a 2e 5c 22 20 2e 42 53 0a 2e 5c 22 09 .\"..\" .BS..\".
03b0: 53 74 61 72 74 20 62 6f 78 20 65 6e 63 6c 6f 73 Start box enclos
03c0: 75 72 65 2e 20 20 46 72 6f 6d 20 68 65 72 65 20 ure. From here
03d0: 75 6e 74 69 6c 20 6e 65 78 74 20 2e 42 45 2c 20 until next .BE,
03e0: 65 76 65 72 79 74 68 69 6e 67 20 77 69 6c 6c 20 everything will
03f0: 62 65 0a 2e 5c 22 09 65 6e 63 6c 6f 73 65 64 20 be..\".enclosed
0400: 69 6e 20 6f 6e 65 20 6c 61 72 67 65 20 62 6f 78 in one large box
0410: 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 42 45 0a 2e 5c ...\"..\" .BE..\
0420: 22 09 45 6e 64 20 6f 66 20 62 6f 78 20 65 6e 63 ".End of box enc
0430: 6c 6f 73 75 72 65 2e 0a 2e 5c 22 0a 2e 5c 22 20 losure...\"..\"
0440: 2e 43 53 0a 2e 5c 22 09 42 65 67 69 6e 20 63 6f .CS..\".Begin co
0450: 64 65 20 65 78 63 65 72 70 74 2e 0a 2e 5c 22 0a de excerpt...\".
0460: 2e 5c 22 20 2e 43 45 0a 2e 5c 22 09 45 6e 64 20 .\" .CE..\".End
0470: 63 6f 64 65 20 65 78 63 65 72 70 74 2e 0a 2e 5c code excerpt...\
0480: 22 0a 2e 5c 22 20 2e 56 53 20 3f 76 65 72 73 69 "..\" .VS ?versi
0490: 6f 6e 3f 20 3f 62 72 3f 0a 2e 5c 22 09 42 65 67 on? ?br?..\".Beg
04a0: 69 6e 20 76 65 72 74 69 63 61 6c 20 73 69 64 65 in vertical side
04b0: 62 61 72 2c 20 66 6f 72 20 75 73 65 20 69 6e 20 bar, for use in
04c0: 6d 61 72 6b 69 6e 67 20 6e 65 77 6c 79 2d 63 68 marking newly-ch
04d0: 61 6e 67 65 64 20 70 61 72 74 73 0a 2e 5c 22 09 anged parts..\".
04e0: 6f 66 20 6d 61 6e 20 70 61 67 65 73 2e 20 20 54 of man pages. T
04f0: 68 65 20 66 69 72 73 74 20 61 72 67 75 6d 65 6e he first argumen
0500: 74 20 69 73 20 69 67 6e 6f 72 65 64 20 61 6e 64 t is ignored and
0510: 20 75 73 65 64 20 66 6f 72 20 72 65 63 6f 72 64 used for record
0520: 69 6e 67 0a 2e 5c 22 09 74 68 65 20 76 65 72 73 ing..\".the vers
0530: 69 6f 6e 20 77 68 65 6e 20 74 68 65 20 2e 56 53 ion when the .VS
0540: 20 77 61 73 20 61 64 64 65 64 2c 20 73 6f 20 74 was added, so t
0550: 68 61 74 20 74 68 65 20 73 69 64 65 62 61 72 73 hat the sidebars
0560: 20 63 61 6e 20 62 65 0a 2e 5c 22 09 66 6f 75 6e can be..\".foun
0570: 64 20 61 6e 64 20 72 65 6d 6f 76 65 64 20 77 68 d and removed wh
0580: 65 6e 20 74 68 65 79 20 72 65 61 63 68 20 61 20 en they reach a
0590: 63 65 72 74 61 69 6e 20 61 67 65 2e 20 20 49 66 certain age. If
05a0: 20 61 6e 6f 74 68 65 72 20 61 72 67 75 6d 65 6e another argumen
05b0: 74 0a 2e 5c 22 09 69 73 20 70 72 65 73 65 6e 74 t..\".is present
05c0: 2c 20 74 68 65 6e 20 61 20 6c 69 6e 65 20 62 72 , then a line br
05d0: 65 61 6b 20 69 73 20 66 6f 72 63 65 64 20 62 65 eak is forced be
05e0: 66 6f 72 65 20 73 74 61 72 74 69 6e 67 20 74 68 fore starting th
05f0: 65 20 73 69 64 65 62 61 72 2e 0a 2e 5c 22 0a 2e e sidebar...\"..
0600: 5c 22 20 2e 56 45 0a 2e 5c 22 09 45 6e 64 20 6f \" .VE..\".End o
0610: 66 20 76 65 72 74 69 63 61 6c 20 73 69 64 65 62 f vertical sideb
0620: 61 72 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 44 53 0a ar...\"..\" .DS.
0630: 2e 5c 22 09 42 65 67 69 6e 20 61 6e 20 69 6e 64 .\".Begin an ind
0640: 65 6e 74 65 64 20 75 6e 66 69 6c 6c 65 64 20 64 ented unfilled d
0650: 69 73 70 6c 61 79 2e 0a 2e 5c 22 0a 2e 5c 22 20 isplay...\"..\"
0660: 2e 44 45 0a 2e 5c 22 09 45 6e 64 20 6f 66 20 69 .DE..\".End of i
0670: 6e 64 65 6e 74 65 64 20 75 6e 66 69 6c 6c 65 64 ndented unfilled
0680: 20 64 69 73 70 6c 61 79 2e 0a 2e 5c 22 0a 2e 5c display...\"..\
0690: 22 20 2e 53 4f 20 3f 6d 61 6e 70 61 67 65 3f 0a " .SO ?manpage?.
06a0: 2e 5c 22 09 53 74 61 72 74 20 6f 66 20 6c 69 73 .\".Start of lis
06b0: 74 20 6f 66 20 73 74 61 6e 64 61 72 64 20 6f 70 t of standard op
06c0: 74 69 6f 6e 73 20 66 6f 72 20 61 20 54 6b 20 77 tions for a Tk w
06d0: 69 64 67 65 74 2e 20 54 68 65 20 6d 61 6e 70 61 idget. The manpa
06e0: 67 65 0a 2e 5c 22 09 61 72 67 75 6d 65 6e 74 20 ge..\".argument
06f0: 64 65 66 69 6e 65 73 20 77 68 65 72 65 20 74 6f defines where to
0700: 20 6c 6f 6f 6b 20 75 70 20 74 68 65 20 73 74 61 look up the sta
0710: 6e 64 61 72 64 20 6f 70 74 69 6f 6e 73 3b 20 69 ndard options; i
0720: 66 0a 2e 5c 22 09 6f 6d 69 74 74 65 64 2c 20 64 f..\".omitted, d
0730: 65 66 61 75 6c 74 73 20 74 6f 20 22 6f 70 74 69 efaults to "opti
0740: 6f 6e 73 22 2e 20 54 68 65 20 6f 70 74 69 6f 6e ons". The option
0750: 73 20 66 6f 6c 6c 6f 77 20 6f 6e 20 73 75 63 63 s follow on succ
0760: 65 73 73 69 76 65 0a 2e 5c 22 09 6c 69 6e 65 73 essive..\".lines
0770: 2c 20 69 6e 20 74 68 72 65 65 20 63 6f 6c 75 6d , in three colum
0780: 6e 73 20 73 65 70 61 72 61 74 65 64 20 62 79 20 ns separated by
0790: 74 61 62 73 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 53 tabs...\"..\" .S
07a0: 45 0a 2e 5c 22 09 45 6e 64 20 6f 66 20 6c 69 73 E..\".End of lis
07b0: 74 20 6f 66 20 73 74 61 6e 64 61 72 64 20 6f 70 t of standard op
07c0: 74 69 6f 6e 73 20 66 6f 72 20 61 20 54 6b 20 77 tions for a Tk w
07d0: 69 64 67 65 74 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e idget...\"..\" .
07e0: 4f 50 20 63 6d 64 4e 61 6d 65 20 64 62 4e 61 6d OP cmdName dbNam
07f0: 65 20 64 62 43 6c 61 73 73 0a 2e 5c 22 09 53 74 e dbClass..\".St
0800: 61 72 74 20 6f 66 20 64 65 73 63 72 69 70 74 69 art of descripti
0810: 6f 6e 20 6f 66 20 61 20 73 70 65 63 69 66 69 63 on of a specific
0820: 20 6f 70 74 69 6f 6e 2e 20 20 63 6d 64 4e 61 6d option. cmdNam
0830: 65 20 67 69 76 65 73 20 74 68 65 0a 2e 5c 22 09 e gives the..\".
0840: 6f 70 74 69 6f 6e 27 73 20 6e 61 6d 65 20 61 73 option's name as
0850: 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 specified in th
0860: 65 20 63 6c 61 73 73 20 63 6f 6d 6d 61 6e 64 2c e class command,
0870: 20 64 62 4e 61 6d 65 20 67 69 76 65 73 0a 2e 5c dbName gives..\
0880: 22 09 74 68 65 20 6f 70 74 69 6f 6e 27 73 20 6e ".the option's n
0890: 61 6d 65 20 69 6e 20 74 68 65 20 6f 70 74 69 6f ame in the optio
08a0: 6e 20 64 61 74 61 62 61 73 65 2c 20 61 6e 64 20 n database, and
08b0: 64 62 43 6c 61 73 73 20 67 69 76 65 73 0a 2e 5c dbClass gives..\
08c0: 22 09 74 68 65 20 6f 70 74 69 6f 6e 27 73 20 63 ".the option's c
08d0: 6c 61 73 73 20 69 6e 20 74 68 65 20 6f 70 74 69 lass in the opti
08e0: 6f 6e 20 64 61 74 61 62 61 73 65 2e 0a 2e 5c 22 on database...\"
08f0: 0a 2e 5c 22 20 2e 55 4c 20 61 72 67 31 20 61 72 ..\" .UL arg1 ar
0900: 67 32 0a 2e 5c 22 09 50 72 69 6e 74 20 61 72 67 g2..\".Print arg
0910: 31 20 75 6e 64 65 72 6c 69 6e 65 64 2c 20 74 68 1 underlined, th
0920: 65 6e 20 70 72 69 6e 74 20 61 72 67 32 20 6e 6f en print arg2 no
0930: 72 6d 61 6c 6c 79 2e 0a 2e 5c 22 0a 2e 5c 22 20 rmally...\"..\"
0940: 2e 51 57 20 61 72 67 31 20 3f 61 72 67 32 3f 0a .QW arg1 ?arg2?.
0950: 2e 5c 22 09 50 72 69 6e 74 20 61 72 67 31 20 69 .\".Print arg1 i
0960: 6e 20 71 75 6f 74 65 73 2c 20 74 68 65 6e 20 61 n quotes, then a
0970: 72 67 32 20 6e 6f 72 6d 61 6c 6c 79 20 28 66 6f rg2 normally (fo
0980: 72 20 74 72 61 69 6c 69 6e 67 20 70 75 6e 63 74 r trailing punct
0990: 75 61 74 69 6f 6e 29 2e 0a 2e 5c 22 0a 2e 5c 22 uation)...\"..\"
09a0: 20 2e 50 51 20 61 72 67 31 20 3f 61 72 67 32 3f .PQ arg1 ?arg2?
09b0: 0a 2e 5c 22 09 50 72 69 6e 74 20 61 6e 20 6f 70 ..\".Print an op
09c0: 65 6e 20 70 61 72 65 6e 74 68 65 73 69 73 2c 20 en parenthesis,
09d0: 61 72 67 31 20 69 6e 20 71 75 6f 74 65 73 2c 20 arg1 in quotes,
09e0: 74 68 65 6e 20 61 72 67 32 20 6e 6f 72 6d 61 6c then arg2 normal
09f0: 6c 79 0a 2e 5c 22 09 28 66 6f 72 20 74 72 61 69 ly..\".(for trai
0a00: 6c 69 6e 67 20 70 75 6e 63 74 75 61 74 69 6f 6e ling punctuation
0a10: 29 20 61 6e 64 20 74 68 65 6e 20 61 20 63 6c 6f ) and then a clo
0a20: 73 69 6e 67 20 70 61 72 65 6e 74 68 65 73 69 73 sing parenthesis
0a30: 2e 0a 2e 5c 22 0a 2e 5c 22 09 23 20 53 65 74 20 ...\"..\".# Set
0a40: 75 70 20 74 72 61 70 73 20 61 6e 64 20 6f 74 68 up traps and oth
0a50: 65 72 20 6d 69 73 63 65 6c 6c 61 6e 65 6f 75 73 er miscellaneous
0a60: 20 73 74 75 66 66 20 66 6f 72 20 54 63 6c 2f 54 stuff for Tcl/T
0a70: 6b 20 6d 61 6e 20 70 61 67 65 73 2e 0a 2e 69 66 k man pages...if
0a80: 20 74 20 2e 77 68 20 2d 31 2e 33 69 20 5e 42 0a t .wh -1.3i ^B.
0a90: 2e 6e 72 20 5e 6c 20 5c 6e 28 2e 6c 0a 2e 61 64 .nr ^l \n(.l..ad
0aa0: 20 62 0a 2e 5c 22 09 23 20 53 74 61 72 74 20 61 b..\".# Start a
0ab0: 6e 20 61 72 67 75 6d 65 6e 74 20 64 65 73 63 72 n argument descr
0ac0: 69 70 74 69 6f 6e 0a 2e 64 65 20 41 50 0a 2e 69 iption..de AP..i
0ad0: 65 20 21 22 5c 5c 24 34 22 22 20 2e 54 50 20 5c e !"\\$4"" .TP \
0ae0: 5c 24 34 0a 2e 65 6c 20 5c 7b 5c 0a 2e 20 20 20 \$4..el \{\..
0af0: 69 65 20 21 22 5c 5c 24 32 22 22 20 2e 54 50 20 ie !"\\$2"" .TP
0b00: 5c 5c 6e 28 29 43 75 0a 2e 20 20 20 65 6c 20 20 \\n()Cu.. el
0b10: 20 20 20 20 20 20 20 20 2e 54 50 20 31 35 0a 2e .TP 15..
0b20: 5c 7d 0a 2e 74 61 20 5c 5c 6e 28 29 41 75 20 5c \}..ta \\n()Au \
0b30: 5c 6e 28 29 42 75 0a 2e 69 65 20 21 22 5c 5c 24 \n()Bu..ie !"\\$
0b40: 33 22 22 20 5c 7b 5c 0a 5c 26 5c 5c 24 31 20 5c 3"" \{\.\&\\$1 \
0b50: 5c 66 49 5c 5c 24 32 5c 5c 66 50 20 28 5c 5c 24 \fI\\$2\\fP (\\$
0b60: 33 29 0a 2e 5c 22 2e 62 0a 2e 5c 7d 0a 2e 65 6c 3)..\".b..\}..el
0b70: 20 5c 7b 5c 0a 2e 62 72 0a 2e 69 65 20 21 22 5c \{\..br..ie !"\
0b80: 5c 24 32 22 22 20 5c 7b 5c 0a 5c 26 5c 5c 24 31 \$2"" \{\.\&\\$1
0b90: 09 5c 5c 66 49 5c 5c 24 32 5c 5c 66 50 0a 2e 5c .\\fI\\$2\\fP..\
0ba0: 7d 0a 2e 65 6c 20 5c 7b 5c 0a 5c 26 5c 5c 66 49 }..el \{\.\&\\fI
0bb0: 5c 5c 24 31 5c 5c 66 50 0a 2e 5c 7d 0a 2e 5c 7d \\$1\\fP..\}..\}
0bc0: 0a 2e 2e 0a 2e 5c 22 09 23 20 64 65 66 69 6e 65 .....\".# define
0bd0: 20 74 61 62 62 69 6e 67 20 76 61 6c 75 65 73 20 tabbing values
0be0: 66 6f 72 20 2e 41 50 0a 2e 64 65 20 41 53 0a 2e for .AP..de AS..
0bf0: 6e 72 20 29 41 20 31 30 6e 0a 2e 69 66 20 21 22 nr )A 10n..if !"
0c00: 5c 5c 24 31 22 22 20 2e 6e 72 20 29 41 20 5c 5c \\$1"" .nr )A \\
0c10: 77 27 5c 5c 24 31 27 75 2b 33 6e 0a 2e 6e 72 20 w'\\$1'u+3n..nr
0c20: 29 42 20 5c 5c 6e 28 29 41 75 2b 31 35 6e 0a 2e )B \\n()Au+15n..
0c30: 5c 22 0a 2e 69 66 20 21 22 5c 5c 24 32 22 22 20 \"..if !"\\$2""
0c40: 2e 6e 72 20 29 42 20 5c 5c 77 27 5c 5c 24 32 27 .nr )B \\w'\\$2'
0c50: 75 2b 5c 5c 6e 28 29 41 75 2b 33 6e 0a 2e 6e 72 u+\\n()Au+3n..nr
0c60: 20 29 43 20 5c 5c 6e 28 29 42 75 2b 5c 5c 77 27 )C \\n()Bu+\\w'
0c70: 28 69 6e 2f 6f 75 74 29 27 75 2b 32 6e 0a 2e 2e (in/out)'u+2n...
0c80: 0a 2e 41 53 20 54 63 6c 5f 49 6e 74 65 72 70 20 ..AS Tcl_Interp
0c90: 54 63 6c 5f 43 72 65 61 74 65 49 6e 74 65 72 70 Tcl_CreateInterp
0ca0: 20 69 6e 2f 6f 75 74 0a 2e 5c 22 09 23 20 42 53 in/out..\".# BS
0cb0: 20 2d 20 73 74 61 72 74 20 62 6f 78 65 64 20 74 - start boxed t
0cc0: 65 78 74 0a 2e 5c 22 09 23 20 5e 79 20 3d 20 73 ext..\".# ^y = s
0cd0: 74 61 72 74 69 6e 67 20 79 20 6c 6f 63 61 74 69 tarting y locati
0ce0: 6f 6e 0a 2e 5c 22 09 23 20 5e 62 20 3d 20 31 0a on..\".# ^b = 1.
0cf0: 2e 64 65 20 42 53 0a 2e 62 72 0a 2e 6d 6b 20 5e .de BS..br..mk ^
0d00: 79 0a 2e 6e 72 20 5e 62 20 31 75 0a 2e 69 66 20 y..nr ^b 1u..if
0d10: 6e 20 2e 6e 66 0a 2e 69 66 20 6e 20 2e 74 69 20 n .nf..if n .ti
0d20: 30 0a 2e 69 66 20 6e 20 5c 6c 27 5c 5c 6e 28 2e 0..if n \l'\\n(.
0d30: 6c 75 5c 28 75 6c 27 0a 2e 69 66 20 6e 20 2e 66 lu\(ul'..if n .f
0d40: 69 0a 2e 2e 0a 2e 5c 22 09 23 20 42 45 20 2d 20 i.....\".# BE -
0d50: 65 6e 64 20 62 6f 78 65 64 20 74 65 78 74 20 28 end boxed text (
0d60: 64 72 61 77 20 62 6f 78 20 6e 6f 77 29 0a 2e 64 draw box now)..d
0d70: 65 20 42 45 0a 2e 6e 66 0a 2e 74 69 20 30 0a 2e e BE..nf..ti 0..
0d80: 6d 6b 20 5e 74 0a 2e 69 65 20 6e 20 5c 6c 27 5c mk ^t..ie n \l'\
0d90: 5c 6e 28 5e 6c 75 5c 28 75 6c 27 0a 2e 65 6c 20 \n(^lu\(ul'..el
0da0: 5c 7b 5c 0a 2e 5c 22 09 44 72 61 77 20 66 6f 75 \{\..\".Draw fou
0db0: 72 2d 73 69 64 65 64 20 62 6f 78 20 6e 6f 72 6d r-sided box norm
0dc0: 61 6c 6c 79 2c 20 62 75 74 20 64 6f 6e 27 74 20 ally, but don't
0dd0: 64 72 61 77 20 74 6f 70 20 6f 66 0a 2e 5c 22 09 draw top of..\".
0de0: 62 6f 78 20 69 66 20 74 68 65 20 62 6f 78 20 73 box if the box s
0df0: 74 61 72 74 65 64 20 6f 6e 20 61 6e 20 65 61 72 tarted on an ear
0e00: 6c 69 65 72 20 70 61 67 65 2e 0a 2e 69 65 20 21 lier page...ie !
0e10: 5c 5c 6e 28 5e 62 2d 31 20 5c 7b 5c 0a 5c 68 27 \\n(^b-1 \{\.\h'
0e20: 2d 31 2e 35 6e 27 5c 4c 27 7c 5c 5c 6e 28 5e 79 -1.5n'\L'|\\n(^y
0e30: 75 2d 31 76 27 5c 6c 27 5c 5c 6e 28 5e 6c 75 2b u-1v'\l'\\n(^lu+
0e40: 33 6e 5c 28 75 6c 27 5c 4c 27 5c 5c 6e 28 5e 74 3n\(ul'\L'\\n(^t
0e50: 75 2b 31 76 2d 5c 5c 6e 28 5e 79 75 27 5c 6c 27 u+1v-\\n(^yu'\l'
0e60: 7c 30 75 2d 31 2e 35 6e 5c 28 75 6c 27 0a 2e 5c |0u-1.5n\(ul'..\
0e70: 7d 0a 2e 65 6c 20 5c 7d 5c 0a 5c 68 27 2d 31 2e }..el \}\.\h'-1.
0e80: 35 6e 27 5c 4c 27 7c 5c 5c 6e 28 5e 79 75 2d 31 5n'\L'|\\n(^yu-1
0e90: 76 27 5c 68 27 5c 5c 6e 28 5e 6c 75 2b 33 6e 27 v'\h'\\n(^lu+3n'
0ea0: 5c 4c 27 5c 5c 6e 28 5e 74 75 2b 31 76 2d 5c 5c \L'\\n(^tu+1v-\\
0eb0: 6e 28 5e 79 75 27 5c 6c 27 7c 30 75 2d 31 2e 35 n(^yu'\l'|0u-1.5
0ec0: 6e 5c 28 75 6c 27 0a 2e 5c 7d 0a 2e 5c 7d 0a 2e n\(ul'..\}..\}..
0ed0: 66 69 0a 2e 62 72 0a 2e 6e 72 20 5e 62 20 30 0a fi..br..nr ^b 0.
0ee0: 2e 2e 0a 2e 5c 22 09 23 20 56 53 20 2d 20 73 74 ....\".# VS - st
0ef0: 61 72 74 20 76 65 72 74 69 63 61 6c 20 73 69 64 art vertical sid
0f00: 65 62 61 72 0a 2e 5c 22 09 23 20 5e 59 20 3d 20 ebar..\".# ^Y =
0f10: 73 74 61 72 74 69 6e 67 20 79 20 6c 6f 63 61 74 starting y locat
0f20: 69 6f 6e 0a 2e 5c 22 09 23 20 5e 76 20 3d 20 31 ion..\".# ^v = 1
0f30: 20 28 66 6f 72 20 74 72 6f 66 66 3b 20 20 66 6f (for troff; fo
0f40: 72 20 6e 72 6f 66 66 20 74 68 69 73 20 64 6f 65 r nroff this doe
0f50: 73 6e 27 74 20 6d 61 74 74 65 72 29 0a 2e 64 65 sn't matter)..de
0f60: 20 56 53 0a 2e 69 66 20 21 22 5c 5c 24 32 22 22 VS..if !"\\$2""
0f70: 20 2e 62 72 0a 2e 6d 6b 20 5e 59 0a 2e 69 65 20 .br..mk ^Y..ie
0f80: 6e 20 27 6d 63 20 5c 73 31 32 5c 28 62 72 5c 73 n 'mc \s12\(br\s
0f90: 30 0a 2e 65 6c 20 2e 6e 72 20 5e 76 20 31 75 0a 0..el .nr ^v 1u.
0fa0: 2e 2e 0a 2e 5c 22 09 23 20 56 45 20 2d 20 65 6e ....\".# VE - en
0fb0: 64 20 6f 66 20 76 65 72 74 69 63 61 6c 20 73 69 d of vertical si
0fc0: 64 65 62 61 72 0a 2e 64 65 20 56 45 0a 2e 69 65 debar..de VE..ie
0fd0: 20 6e 20 27 6d 63 0a 2e 65 6c 20 5c 7b 5c 0a 2e n 'mc..el \{\..
0fe0: 65 76 20 32 0a 2e 6e 66 0a 2e 74 69 20 30 0a 2e ev 2..nf..ti 0..
0ff0: 6d 6b 20 5e 74 0a 5c 68 27 7c 5c 5c 6e 28 5e 6c mk ^t.\h'|\\n(^l
1000: 75 2b 33 6e 27 5c 4c 27 7c 5c 5c 6e 28 5e 59 75 u+3n'\L'|\\n(^Yu
1010: 2d 31 76 5c 28 62 76 27 5c 76 27 5c 5c 6e 28 5e -1v\(bv'\v'\\n(^
1020: 74 75 2b 31 76 2d 5c 5c 6e 28 5e 59 75 27 5c 68 tu+1v-\\n(^Yu'\h
1030: 27 2d 7c 5c 5c 6e 28 5e 6c 75 2b 33 6e 27 0a 2e '-|\\n(^lu+3n'..
1040: 73 70 20 2d 31 0a 2e 66 69 0a 2e 65 76 0a 2e 5c sp -1..fi..ev..\
1050: 7d 0a 2e 6e 72 20 5e 76 20 30 0a 2e 2e 0a 2e 5c }..nr ^v 0.....\
1060: 22 09 23 20 53 70 65 63 69 61 6c 20 6d 61 63 72 ".# Special macr
1070: 6f 20 74 6f 20 68 61 6e 64 6c 65 20 70 61 67 65 o to handle page
1080: 20 62 6f 74 74 6f 6d 3a 20 20 66 69 6e 69 73 68 bottom: finish
1090: 20 6f 66 66 20 63 75 72 72 65 6e 74 0a 2e 5c 22 off current..\"
10a0: 09 23 20 62 6f 78 2f 73 69 64 65 62 61 72 20 69 .# box/sidebar i
10b0: 66 20 69 6e 20 62 6f 78 2f 73 69 64 65 62 61 72 f in box/sidebar
10c0: 20 6d 6f 64 65 2c 20 74 68 65 6e 20 69 6e 76 6f mode, then invo
10d0: 6b 65 64 20 73 74 61 6e 64 61 72 64 0a 2e 5c 22 ked standard..\"
10e0: 09 23 20 70 61 67 65 20 62 6f 74 74 6f 6d 20 6d .# page bottom m
10f0: 61 63 72 6f 2e 0a 2e 64 65 20 5e 42 0a 2e 65 76 acro...de ^B..ev
1100: 20 32 0a 27 74 69 20 30 0a 27 6e 66 0a 2e 6d 6b 2.'ti 0.'nf..mk
1110: 20 5e 74 0a 2e 69 66 20 5c 5c 6e 28 5e 62 20 5c ^t..if \\n(^b \
1120: 7b 5c 0a 2e 5c 22 09 44 72 61 77 20 74 68 72 65 {\..\".Draw thre
1130: 65 2d 73 69 64 65 64 20 62 6f 78 20 69 66 20 74 e-sided box if t
1140: 68 69 73 20 69 73 20 74 68 65 20 62 6f 78 27 73 his is the box's
1150: 20 66 69 72 73 74 20 70 61 67 65 2c 0a 2e 5c 22 first page,..\"
1160: 09 64 72 61 77 20 74 77 6f 20 73 69 64 65 73 20 .draw two sides
1170: 62 75 74 20 6e 6f 20 74 6f 70 20 6f 74 68 65 72 but no top other
1180: 77 69 73 65 2e 0a 2e 69 65 20 21 5c 5c 6e 28 5e wise...ie !\\n(^
1190: 62 2d 31 20 5c 68 27 2d 31 2e 35 6e 27 5c 4c 27 b-1 \h'-1.5n'\L'
11a0: 7c 5c 5c 6e 28 5e 79 75 2d 31 76 27 5c 6c 27 5c |\\n(^yu-1v'\l'\
11b0: 5c 6e 28 5e 6c 75 2b 33 6e 5c 28 75 6c 27 5c 4c \n(^lu+3n\(ul'\L
11c0: 27 5c 5c 6e 28 5e 74 75 2b 31 76 2d 5c 5c 6e 28 '\\n(^tu+1v-\\n(
11d0: 5e 79 75 27 5c 68 27 7c 30 75 27 5c 63 0a 2e 65 ^yu'\h'|0u'\c..e
11e0: 6c 20 5c 68 27 2d 31 2e 35 6e 27 5c 4c 27 7c 5c l \h'-1.5n'\L'|\
11f0: 5c 6e 28 5e 79 75 2d 31 76 27 5c 68 27 5c 5c 6e \n(^yu-1v'\h'\\n
1200: 28 5e 6c 75 2b 33 6e 27 5c 4c 27 5c 5c 6e 28 5e (^lu+3n'\L'\\n(^
1210: 74 75 2b 31 76 2d 5c 5c 6e 28 5e 79 75 27 5c 68 tu+1v-\\n(^yu'\h
1220: 27 7c 30 75 27 5c 63 0a 2e 5c 7d 0a 2e 69 66 20 '|0u'\c..\}..if
1230: 5c 5c 6e 28 5e 76 20 5c 7b 5c 0a 2e 6e 72 20 5e \\n(^v \{\..nr ^
1240: 78 20 5c 5c 6e 28 5e 74 75 2b 31 76 2d 5c 5c 6e x \\n(^tu+1v-\\n
1250: 28 5e 59 75 0a 5c 6b 78 5c 68 27 2d 5c 5c 6e 78 (^Yu.\kx\h'-\\nx
1260: 75 27 5c 68 27 7c 5c 5c 6e 28 5e 6c 75 2b 33 6e u'\h'|\\n(^lu+3n
1270: 27 5c 6b 79 5c 4c 27 2d 5c 5c 6e 28 5e 78 75 27 '\ky\L'-\\n(^xu'
1280: 5c 76 27 5c 5c 6e 28 5e 78 75 27 5c 68 27 7c 30 \v'\\n(^xu'\h'|0
1290: 75 27 5c 63 0a 2e 5c 7d 0a 2e 62 70 0a 27 66 69 u'\c..\}..bp.'fi
12a0: 0a 2e 65 76 0a 2e 69 66 20 5c 5c 6e 28 5e 62 20 ..ev..if \\n(^b
12b0: 5c 7b 5c 0a 2e 6d 6b 20 5e 79 0a 2e 6e 72 20 5e \{\..mk ^y..nr ^
12c0: 62 20 32 0a 2e 5c 7d 0a 2e 69 66 20 5c 5c 6e 28 b 2..\}..if \\n(
12d0: 5e 76 20 5c 7b 5c 0a 2e 6d 6b 20 5e 59 0a 2e 5c ^v \{\..mk ^Y..\
12e0: 7d 0a 2e 2e 0a 2e 5c 22 09 23 20 44 53 20 2d 20 }.....\".# DS -
12f0: 62 65 67 69 6e 20 64 69 73 70 6c 61 79 0a 2e 64 begin display..d
1300: 65 20 44 53 0a 2e 52 53 0a 2e 6e 66 0a 2e 73 70 e DS..RS..nf..sp
1310: 0a 2e 2e 0a 2e 5c 22 09 23 20 44 45 20 2d 20 65 .....\".# DE - e
1320: 6e 64 20 64 69 73 70 6c 61 79 0a 2e 64 65 20 44 nd display..de D
1330: 45 0a 2e 66 69 0a 2e 52 45 0a 2e 73 70 0a 2e 2e E..fi..RE..sp...
1340: 0a 2e 5c 22 09 23 20 53 4f 20 2d 20 73 74 61 72 ..\".# SO - star
1350: 74 20 6f 66 20 6c 69 73 74 20 6f 66 20 73 74 61 t of list of sta
1360: 6e 64 61 72 64 20 6f 70 74 69 6f 6e 73 0a 2e 64 ndard options..d
1370: 65 20 53 4f 0a 27 69 65 20 27 5c 5c 24 31 27 27 e SO.'ie '\\$1''
1380: 20 2e 64 73 20 53 6f 20 5c 5c 66 42 6f 70 74 69 .ds So \\fBopti
1390: 6f 6e 73 5c 5c 66 52 0a 27 65 6c 20 2e 64 73 20 ons\\fR.'el .ds
13a0: 53 6f 20 5c 5c 66 42 5c 5c 24 31 5c 5c 66 52 0a So \\fB\\$1\\fR.
13b0: 2e 53 48 20 22 53 54 41 4e 44 41 52 44 20 4f 50 .SH "STANDARD OP
13c0: 54 49 4f 4e 53 22 0a 2e 4c 50 0a 2e 6e 66 0a 2e TIONS"..LP..nf..
13d0: 74 61 20 35 2e 35 63 20 31 31 63 0a 2e 66 74 20 ta 5.5c 11c..ft
13e0: 42 0a 2e 2e 0a 2e 5c 22 09 23 20 53 45 20 2d 20 B.....\".# SE -
13f0: 65 6e 64 20 6f 66 20 6c 69 73 74 20 6f 66 20 73 end of list of s
1400: 74 61 6e 64 61 72 64 20 6f 70 74 69 6f 6e 73 0a tandard options.
1410: 2e 64 65 20 53 45 0a 2e 66 69 0a 2e 66 74 20 52 .de SE..fi..ft R
1420: 0a 2e 4c 50 0a 53 65 65 20 74 68 65 20 5c 5c 2a ..LP.See the \\*
1430: 28 53 6f 20 6d 61 6e 75 61 6c 20 65 6e 74 72 79 (So manual entry
1440: 20 66 6f 72 20 64 65 74 61 69 6c 73 20 6f 6e 20 for details on
1450: 74 68 65 20 73 74 61 6e 64 61 72 64 20 6f 70 74 the standard opt
1460: 69 6f 6e 73 2e 0a 2e 2e 0a 2e 5c 22 09 23 20 4f ions......\".# O
1470: 50 20 2d 20 73 74 61 72 74 20 6f 66 20 66 75 6c P - start of ful
1480: 6c 20 64 65 73 63 72 69 70 74 69 6f 6e 20 66 6f l description fo
1490: 72 20 61 20 73 69 6e 67 6c 65 20 6f 70 74 69 6f r a single optio
14a0: 6e 0a 2e 64 65 20 4f 50 0a 2e 4c 50 0a 2e 6e 66 n..de OP..LP..nf
14b0: 0a 2e 74 61 20 34 63 0a 43 6f 6d 6d 61 6e 64 2d ..ta 4c.Command-
14c0: 4c 69 6e 65 20 4e 61 6d 65 3a 09 5c 5c 66 42 5c Line Name:.\\fB\
14d0: 5c 24 31 5c 5c 66 52 0a 44 61 74 61 62 61 73 65 \$1\\fR.Database
14e0: 20 4e 61 6d 65 3a 09 5c 5c 66 42 5c 5c 24 32 5c Name:.\\fB\\$2\
14f0: 5c 66 52 0a 44 61 74 61 62 61 73 65 20 43 6c 61 \fR.Database Cla
1500: 73 73 3a 09 5c 5c 66 42 5c 5c 24 33 5c 5c 66 52 ss:.\\fB\\$3\\fR
1510: 0a 2e 66 69 0a 2e 49 50 0a 2e 2e 0a 2e 5c 22 09 ..fi..IP.....\".
1520: 23 20 43 53 20 2d 20 62 65 67 69 6e 20 63 6f 64 # CS - begin cod
1530: 65 20 65 78 63 65 72 70 74 0a 2e 64 65 20 43 53 e excerpt..de CS
1540: 0a 2e 52 53 0a 2e 6e 66 0a 2e 74 61 20 2e 32 35 ..RS..nf..ta .25
1550: 69 20 2e 35 69 20 2e 37 35 69 20 31 69 0a 2e 2e i .5i .75i 1i...
1560: 0a 2e 5c 22 09 23 20 43 45 20 2d 20 65 6e 64 20 ..\".# CE - end
1570: 63 6f 64 65 20 65 78 63 65 72 70 74 0a 2e 64 65 code excerpt..de
1580: 20 43 45 0a 2e 66 69 0a 2e 52 45 0a 2e 2e 0a 2e CE..fi..RE.....
1590: 5c 22 09 23 20 55 4c 20 2d 20 75 6e 64 65 72 6c \".# UL - underl
15a0: 69 6e 65 20 77 6f 72 64 0a 2e 64 65 20 55 4c 0a ine word..de UL.
15b0: 5c 5c 24 31 5c 6c 27 7c 30 5c 28 75 6c 27 5c 5c \\$1\l'|0\(ul'\\
15c0: 24 32 0a 2e 2e 0a 2e 5c 22 09 23 20 51 57 20 2d $2.....\".# QW -
15d0: 20 61 70 70 6c 79 20 71 75 6f 74 61 74 69 6f 6e apply quotation
15e0: 20 6d 61 72 6b 73 20 74 6f 20 77 6f 72 64 0a 2e marks to word..
15f0: 64 65 20 51 57 0a 2e 69 65 20 27 5c 5c 2a 28 6c de QW..ie '\\*(l
1600: 71 27 22 27 20 60 60 5c 5c 24 31 27 27 5c 5c 24 q'"' ``\\$1''\\$
1610: 32 0a 2e 5c 22 22 20 66 69 78 20 65 6d 61 63 73 2..\"" fix emacs
1620: 20 68 69 67 68 6c 69 67 68 74 69 6e 67 0a 2e 65 highlighting..e
1630: 6c 20 5c 5c 2a 28 6c 71 5c 5c 24 31 5c 5c 2a 28 l \\*(lq\\$1\\*(
1640: 72 71 5c 5c 24 32 0a 2e 2e 0a 2e 5c 22 09 23 20 rq\\$2.....\".#
1650: 50 51 20 2d 20 61 70 70 6c 79 20 70 61 72 65 6e PQ - apply paren
1660: 73 20 61 6e 64 20 71 75 6f 74 61 74 69 6f 6e 20 s and quotation
1670: 6d 61 72 6b 73 20 74 6f 20 77 6f 72 64 0a 2e 64 marks to word..d
1680: 65 20 50 51 0a 2e 69 65 20 27 5c 5c 2a 28 6c 71 e PQ..ie '\\*(lq
1690: 27 22 27 20 28 60 60 5c 5c 24 31 27 27 5c 5c 24 '"' (``\\$1''\\$
16a0: 32 29 5c 5c 24 33 0a 2e 5c 22 22 20 66 69 78 20 2)\\$3..\"" fix
16b0: 65 6d 61 63 73 20 68 69 67 68 6c 69 67 68 74 69 emacs highlighti
16c0: 6e 67 0a 2e 65 6c 20 28 5c 5c 2a 28 6c 71 5c 5c ng..el (\\*(lq\\
16d0: 24 31 5c 5c 2a 28 72 71 5c 5c 24 32 29 5c 5c 24 $1\\*(rq\\$2)\\$
16e0: 33 0a 2e 2e 0a 2e 5c 22 09 23 20 51 52 20 2d 20 3.....\".# QR -
16f0: 71 75 6f 74 65 64 20 72 61 6e 67 65 0a 2e 64 65 quoted range..de
1700: 20 51 52 0a 2e 69 65 20 27 5c 5c 2a 28 6c 71 27 QR..ie '\\*(lq'
1710: 22 27 20 60 60 5c 5c 24 31 27 27 5c 5c 2d 60 60 "' ``\\$1''\\-``
1720: 5c 5c 24 32 27 27 5c 5c 24 33 0a 2e 5c 22 22 20 \\$2''\\$3..\""
1730: 66 69 78 20 65 6d 61 63 73 20 68 69 67 68 6c 69 fix emacs highli
1740: 67 68 74 69 6e 67 0a 2e 65 6c 20 5c 5c 2a 28 6c ghting..el \\*(l
1750: 71 5c 5c 24 31 5c 5c 2a 28 72 71 5c 5c 2d 5c 5c q\\$1\\*(rq\\-\\
1760: 2a 28 6c 71 5c 5c 24 32 5c 5c 2a 28 72 71 5c 5c *(lq\\$2\\*(rq\\
1770: 24 33 0a 2e 2e 0a 2e 5c 22 09 23 20 4d 54 20 2d $3.....\".# MT -
1780: 20 22 65 6d 70 74 79 22 20 73 74 72 69 6e 67 0a "empty" string.
1790: 2e 64 65 20 4d 54 0a 2e 51 57 20 22 22 0a 2e 2e .de MT..QW ""...
17a0: 0a 2e 42 53 0a 2e 53 48 20 4e 41 4d 45 0a 74 6c ..BS..SH NAME.tl
17b0: 73 20 5c 2d 20 62 69 6e 64 69 6e 67 20 74 6f 20 s \- binding to
17c0: 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 the OpenSSL libr
17d0: 61 72 79 20 66 6f 72 20 65 6e 63 72 79 70 74 65 ary for encrypte
17e0: 64 20 73 6f 63 6b 65 74 20 61 6e 64 20 49 2f 4f d socket and I/O
17f0: 20 63 68 61 6e 6e 65 6c 20 63 6f 6d 6d 75 6e 69 channel communi
1800: 63 61 74 69 6f 6e 73 0a 2e 53 48 20 53 59 4e 4f cations..SH SYNO
1810: 50 53 49 53 0a 70 61 63 6b 61 67 65 20 72 65 71 PSIS.package req
1820: 75 69 72 65 20 5c 66 42 54 63 6c 20 38 5c 26 2e uire \fBTcl 8\&.
1830: 35 2d 5c 66 52 0a 2e 73 70 0a 70 61 63 6b 61 67 5-\fR..sp.packag
1840: 65 20 72 65 71 75 69 72 65 20 5c 66 42 74 6c 73 e require \fBtls
1850: 20 32 5c 26 2e 30 62 32 5c 66 52 0a 2e 73 70 0a 2\&.0b2\fR..sp.
1860: 5c 66 42 74 6c 73 3a 3a 69 6e 69 74 5c 66 52 20 \fBtls::init\fR
1870: 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 3f 20 ?\fI-option\fR?
1880: 3f 5c 66 49 76 61 6c 75 65 5c 66 52 3f 20 3f 5c ?\fIvalue\fR? ?\
1890: 66 49 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 fI-option value
18a0: 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 0a 2e 73 \&.\&.\&.\fR?..s
18b0: 70 0a 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 p.\fBtls::socket
18c0: 5c 66 52 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c \fR ?\fI-option\
18d0: 66 52 3f 20 3f 5c 66 49 76 61 6c 75 65 5c 66 52 fR? ?\fIvalue\fR
18e0: 3f 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 20 76 61 ? ?\fI-option va
18f0: 6c 75 65 20 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 lue \&.\&.\&.\fR
1900: 3f 20 5c 66 49 68 6f 73 74 5c 66 52 20 5c 66 49 ? \fIhost\fR \fI
1910: 70 6f 72 74 5c 66 52 0a 2e 73 70 0a 5c 66 42 74 port\fR..sp.\fBt
1920: 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 20 5c 66 ls::socket\fR \f
1930: 42 2d 73 65 72 76 65 72 5c 66 52 20 5c 66 49 63 B-server\fR \fIc
1940: 6f 6d 6d 61 6e 64 5c 66 52 20 3f 5c 66 49 2d 6f ommand\fR ?\fI-o
1950: 70 74 69 6f 6e 5c 66 52 3f 20 3f 5c 66 49 76 61 ption\fR? ?\fIva
1960: 6c 75 65 5c 66 52 3f 20 3f 5c 66 49 2d 6f 70 74 lue\fR? ?\fI-opt
1970: 69 6f 6e 20 76 61 6c 75 65 20 5c 26 2e 5c 26 2e ion value \&.\&.
1980: 5c 26 2e 5c 66 52 3f 20 5c 66 49 70 6f 72 74 5c \&.\fR? \fIport\
1990: 66 52 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a 3a 69 fR..sp.\fBtls::i
19a0: 6d 70 6f 72 74 5c 66 52 20 5c 66 49 63 68 61 6e mport\fR \fIchan
19b0: 6e 65 6c 5c 66 52 20 3f 5c 66 49 2d 6f 70 74 69 nel\fR ?\fI-opti
19c0: 6f 6e 5c 66 52 3f 20 3f 5c 66 49 76 61 6c 75 65 on\fR? ?\fIvalue
19d0: 5c 66 52 3f 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e \fR? ?\fI-option
19e0: 20 76 61 6c 75 65 20 5c 26 2e 5c 26 2e 5c 26 2e value \&.\&.\&.
19f0: 5c 66 52 3f 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a \fR?..sp.\fBtls:
1a00: 3a 73 74 61 72 74 74 6c 73 5c 66 52 20 5c 66 49 :starttls\fR \fI
1a10: 63 68 61 6e 6e 65 6c 5c 66 52 20 3f 5c 66 49 2d channel\fR ?\fI-
1a20: 6f 70 74 69 6f 6e 5c 66 52 3f 20 3f 5c 66 49 76 option\fR? ?\fIv
1a30: 61 6c 75 65 5c 66 52 3f 20 3f 5c 66 49 2d 6f 70 alue\fR? ?\fI-op
1a40: 74 69 6f 6e 20 76 61 6c 75 65 20 5c 26 2e 5c 26 tion value \&.\&
1a50: 2e 5c 26 2e 5c 66 52 3f 0a 2e 73 70 0a 5c 66 42 .\&.\fR?..sp.\fB
1a60: 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 5c 66 tls::handshake\f
1a70: 52 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 0a R \fIchannel\fR.
1a80: 2e 73 70 0a 5c 66 42 74 6c 73 3a 3a 73 68 75 74 .sp.\fBtls::shut
1a90: 64 6f 77 6e 5c 66 52 20 5c 66 49 63 68 61 6e 6e down\fR \fIchann
1aa0: 65 6c 5c 66 52 0a 2e 73 70 0a 5c 66 42 74 6c 73 el\fR..sp.\fBtls
1ab0: 3a 3a 75 6e 69 6d 70 6f 72 74 5c 66 52 20 5c 66 ::unimport\fR \f
1ac0: 49 63 68 61 6e 6e 65 6c 5c 66 52 0a 2e 73 70 0a Ichannel\fR..sp.
1ad0: 5c 66 42 74 6c 73 3a 3a 75 6e 73 74 61 63 6b 5c \fBtls::unstack\
1ae0: 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 fR \fIchannel\fR
1af0: 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a 3a 73 74 61 ..sp.\fBtls::sta
1b00: 74 75 73 5c 66 52 20 3f 5c 66 42 2d 6c 6f 63 61 tus\fR ?\fB-loca
1b10: 6c 5c 66 52 3f 20 5c 66 49 63 68 61 6e 6e 65 6c l\fR? \fIchannel
1b20: 5c 66 52 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a 3a \fR..sp.\fBtls::
1b30: 63 6f 6e 6e 65 63 74 69 6f 6e 5c 66 52 20 5c 66 connection\fR \f
1b40: 49 63 68 61 6e 6e 65 6c 5c 66 52 0a 2e 73 70 0a Ichannel\fR..sp.
1b50: 5c 66 42 74 6c 73 3a 3a 63 69 70 68 65 72 73 5c \fBtls::ciphers\
1b60: 66 52 20 3f 5c 66 49 70 72 6f 74 6f 63 6f 6c 5c fR ?\fIprotocol\
1b70: 66 52 3f 20 3f 5c 66 49 76 65 72 62 6f 73 65 5c fR? ?\fIverbose\
1b80: 66 52 3f 20 3f 5c 66 49 73 75 70 70 6f 72 74 65 fR? ?\fIsupporte
1b90: 64 5c 66 52 3f 0a 2e 73 70 0a 5c 66 42 74 6c 73 d\fR?..sp.\fBtls
1ba0: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 5c 66 52 0a 2e ::protocols\fR..
1bb0: 73 70 0a 5c 66 42 74 6c 73 3a 3a 76 65 72 73 69 sp.\fBtls::versi
1bc0: 6f 6e 5c 66 52 0a 2e 73 70 0a 2e 42 45 0a 2e 53 on\fR..sp..BE..S
1bd0: 48 20 44 45 53 43 52 49 50 54 49 4f 4e 0a 54 68 H DESCRIPTION.Th
1be0: 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 6f is extension pro
1bf0: 76 69 64 65 73 20 54 43 4c 20 73 63 72 69 70 74 vides TCL script
1c00: 20 61 63 63 65 73 73 20 74 6f 20 53 65 63 75 72 access to Secur
1c10: 65 20 53 6f 63 6b 65 74 20 4c 61 79 65 72 20 28 e Socket Layer (
1c20: 53 53 4c 29 0a 63 6f 6d 6d 75 6e 69 63 61 74 69 SSL).communicati
1c30: 6f 6e 73 20 75 73 69 6e 67 20 74 68 65 20 54 72 ons using the Tr
1c40: 61 6e 73 70 6f 72 74 20 4c 61 79 65 72 20 53 65 ansport Layer Se
1c50: 63 75 72 69 74 79 20 28 54 4c 53 29 20 70 72 6f curity (TLS) pro
1c60: 74 6f 63 6f 6c 5c 26 2e 20 49 74 20 70 72 6f 76 tocol\&. It prov
1c70: 69 64 65 73 20 61 0a 67 65 6e 65 72 69 63 20 62 ides a.generic b
1c80: 69 6e 64 69 6e 67 20 74 6f 20 5c 66 49 4f 70 65 inding to \fIOpe
1c90: 6e 53 53 4c 5c 66 52 20 5b 68 74 74 70 73 3a 2f nSSL\fR [https:/
1ca0: 2f 77 77 77 5c 26 2e 6f 70 65 6e 73 73 6c 5c 26 /www\&.openssl\&
1cb0: 2e 6f 72 67 2f 5d 2c 20 75 74 69 6c 69 7a 69 6e .org/], utilizin
1cc0: 67 20 74 68 65 0a 5c 66 42 54 63 6c 5f 53 74 61 g the.\fBTcl_Sta
1cd0: 63 6b 43 68 61 6e 6e 65 6c 5c 66 52 20 41 50 49 ckChannel\fR API
1ce0: 20 69 6e 20 54 43 4c 20 38 5c 26 2e 34 20 6f 72 in TCL 8\&.4 or
1cf0: 20 6c 61 74 65 72 5c 26 2e 20 54 68 65 73 65 20 later\&. These
1d00: 73 6f 63 6b 65 74 73 20 62 65 68 61 76 65 20 65 sockets behave e
1d10: 78 61 63 74 6c 79 0a 74 68 65 20 73 61 6d 65 20 xactly.the same
1d20: 61 73 20 63 68 61 6e 6e 65 6c 73 20 63 72 65 61 as channels crea
1d30: 74 65 64 20 75 73 69 6e 67 20 74 68 65 20 62 75 ted using the bu
1d40: 69 6c 74 2d 69 6e 20 5c 66 42 73 6f 63 6b 65 74 ilt-in \fBsocket
1d50: 5c 66 52 20 63 6f 6d 6d 61 6e 64 2c 20 62 75 74 \fR command, but
1d60: 0a 70 72 6f 76 69 64 65 20 61 64 64 69 74 69 6f .provide additio
1d70: 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 nal options for
1d80: 63 6f 6e 74 72 6f 6c 6c 69 6e 67 20 74 68 65 20 controlling the
1d90: 53 53 4c 2f 54 4c 53 20 73 65 73 73 69 6f 6e 5c SSL/TLS session\
1da0: 26 2e 0a 2e 53 48 20 43 4f 4d 50 41 54 49 42 49 &...SH COMPATIBI
1db0: 4c 49 54 59 0a 54 68 69 73 20 65 78 74 65 6e 73 LITY.This extens
1dc0: 69 6f 6e 20 69 73 20 63 6f 6d 70 61 74 69 62 6c ion is compatibl
1dd0: 65 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 31 e with OpenSSL 1
1de0: 5c 26 2e 31 5c 26 2e 31 20 6f 72 20 6c 61 74 65 \&.1\&.1 or late
1df0: 72 5c 26 2e 20 49 74 20 72 65 71 75 69 72 65 73 r\&. It requires
1e00: 20 54 63 6c 0a 76 65 72 73 69 6f 6e 20 38 5c 26 Tcl.version 8\&
1e10: 2e 35 20 6f 72 20 6c 61 74 65 72 20 61 6e 64 20 .5 or later and
1e20: 77 69 6c 6c 20 77 6f 72 6b 20 77 69 74 68 20 54 will work with T
1e30: 63 6c 20 39 5c 26 2e 30 5c 26 2e 0a 2e 53 48 20 cl 9\&.0\&...SH
1e40: 43 4f 4d 4d 41 4e 44 53 0a 54 68 65 20 66 6f 6c COMMANDS.The fol
1e50: 6c 6f 77 69 6e 67 20 61 72 65 20 74 68 65 20 63 lowing are the c
1e60: 6f 6d 6d 61 6e 64 73 20 70 72 6f 76 69 64 65 64 ommands provided
1e70: 20 62 79 20 74 68 65 20 54 63 4c 54 4c 53 20 70 by the TcLTLS p
1e80: 61 63 6b 61 67 65 5c 26 2e 20 53 65 65 0a 5c 66 ackage\&. See.\f
1e90: 42 45 78 61 6d 70 6c 65 73 5c 66 52 20 66 6f 72 BExamples\fR for
1ea0: 20 65 78 61 6d 70 6c 65 20 75 73 61 67 65 20 61 example usage a
1eb0: 6e 64 20 74 68 65 20 22 5c 66 49 64 65 6d 6f 73 nd the "\fIdemos
1ec0: 5c 66 52 22 20 64 69 72 65 63 74 6f 72 79 20 66 \fR" directory f
1ed0: 6f 72 0a 6d 6f 72 65 20 65 78 61 6d 70 6c 65 20 or.more example
1ee0: 75 73 61 67 65 5c 26 2e 0a 2e 54 50 0a 5c 66 42 usage\&...TP.\fB
1ef0: 74 6c 73 3a 3a 69 6e 69 74 5c 66 52 20 3f 5c 66 tls::init\fR ?\f
1f00: 49 2d 6f 70 74 69 6f 6e 5c 66 52 3f 20 3f 5c 66 I-option\fR? ?\f
1f10: 49 76 61 6c 75 65 5c 66 52 3f 20 3f 5c 66 49 2d Ivalue\fR? ?\fI-
1f20: 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 5c 26 2e option value \&.
1f30: 5c 26 2e 5c 26 2e 5c 66 52 3f 0a 4f 70 74 69 6f \&.\&.\fR?.Optio
1f40: 6e 61 6c 20 66 75 6e 63 74 69 6f 6e 20 74 6f 20 nal function to
1f50: 73 65 74 20 74 68 65 20 64 65 66 61 75 6c 74 20 set the default
1f60: 6f 70 74 69 6f 6e 73 20 75 73 65 64 20 62 79 20 options used by
1f70: 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 \fBtls::socket\f
1f80: 52 5c 26 2e 20 49 66 20 79 6f 75 0a 63 61 6c 6c R\&. If you.call
1f90: 20 5c 66 42 74 6c 73 3a 3a 69 6d 70 6f 72 74 5c \fBtls::import\
1fa0: 66 52 20 64 69 72 65 63 74 6c 79 2c 20 74 68 65 fR directly, the
1fb0: 20 76 61 6c 75 65 73 20 73 65 74 20 62 79 20 74 values set by t
1fc0: 68 69 73 20 63 6f 6d 6d 61 6e 64 20 68 61 76 65 his command have
1fd0: 20 6e 6f 20 65 66 66 65 63 74 5c 26 2e 0a 54 68 no effect\&..Th
1fe0: 69 73 20 63 6f 6d 6d 61 6e 64 20 73 75 70 70 6f is command suppo
1ff0: 72 74 73 20 61 6c 6c 20 6f 66 20 74 68 65 20 73 rts all of the s
2000: 61 6d 65 20 6f 70 74 69 6f 6e 73 20 61 73 20 74 ame options as t
2010: 68 65 20 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 he \fBtls::socke
2020: 74 5c 66 52 20 63 6f 6d 6d 61 6e 64 2c 0a 74 68 t\fR command,.th
2030: 6f 75 67 68 20 79 6f 75 20 73 68 6f 75 6c 64 20 ough you should
2040: 6c 69 6d 69 74 20 79 6f 75 72 20 6f 70 74 69 6f limit your optio
2050: 6e 73 20 74 6f 20 6f 6e 6c 79 20 74 68 65 20 54 ns to only the T
2060: 4c 53 20 72 65 6c 61 74 65 64 20 6f 6e 65 73 5c LS related ones\
2070: 26 2e 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 73 &...TP.\fBtls::s
2080: 6f 63 6b 65 74 5c 66 52 20 3f 5c 66 49 2d 6f 70 ocket\fR ?\fI-op
2090: 74 69 6f 6e 5c 66 52 3f 20 3f 5c 66 49 76 61 6c tion\fR? ?\fIval
20a0: 75 65 5c 66 52 3f 20 3f 5c 66 49 2d 6f 70 74 69 ue\fR? ?\fI-opti
20b0: 6f 6e 20 76 61 6c 75 65 20 5c 26 2e 5c 26 2e 5c on value \&.\&.\
20c0: 26 2e 5c 66 52 3f 20 5c 66 49 68 6f 73 74 5c 66 &.\fR? \fIhost\f
20d0: 52 20 5c 66 49 70 6f 72 74 5c 66 52 0a 54 68 69 R \fIport\fR.Thi
20e0: 73 20 69 73 20 61 20 68 65 6c 70 65 72 20 66 75 s is a helper fu
20f0: 6e 63 74 69 6f 6e 20 74 68 61 74 20 75 74 69 6c nction that util
2100: 69 7a 65 73 20 74 68 65 20 75 6e 64 65 72 6c 79 izes the underly
2110: 69 6e 67 20 63 6f 6d 6d 61 6e 64 73 20 5c 66 42 ing commands \fB
2120: 73 6f 63 6b 65 74 5c 66 52 0a 61 6e 64 20 5c 66 socket\fR.and \f
2130: 42 74 6c 73 3a 3a 69 6d 70 6f 72 74 5c 66 52 20 Btls::import\fR
2140: 74 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 6f to create the co
2150: 6e 6e 65 63 74 69 6f 6e 5c 26 2e 20 49 74 20 62 nnection\&. It b
2160: 65 68 61 76 65 73 20 74 68 65 20 73 61 6d 65 20 ehaves the same
2170: 61 73 20 74 68 65 0a 6e 61 74 69 76 65 20 54 43 as the.native TC
2180: 4c 20 5c 66 42 73 6f 63 6b 65 74 5c 66 52 20 63 L \fBsocket\fR c
2190: 6f 6d 6d 61 6e 64 2c 20 62 75 74 20 61 6c 73 6f ommand, but also
21a0: 20 73 75 70 70 6f 72 74 73 20 74 68 65 20 5c 66 supports the \f
21b0: 42 74 6c 73 3a 3a 69 6d 70 6f 72 74 5c 66 52 0a Btls::import\fR.
21c0: 63 6f 6d 6d 61 6e 64 20 6f 70 74 69 6f 6e 73 20 command options
21d0: 77 69 74 68 20 6f 6e 65 20 61 64 64 69 74 69 6f with one additio
21e0: 6e 61 6c 20 6f 70 74 69 6f 6e 5c 26 2e 20 49 74 nal option\&. It
21f0: 20 72 65 74 75 72 6e 73 20 74 68 65 20 63 68 61 returns the cha
2200: 6e 6e 65 6c 20 68 61 6e 64 6c 65 20 69 64 0a 66 nnel handle id.f
2210: 6f 72 20 74 68 65 20 6e 65 77 20 73 6f 63 6b 65 or the new socke
2220: 74 5c 26 2e 20 41 64 64 69 74 69 6f 6e 61 6c 20 t\&. Additional
2230: 6f 70 74 69 6f 6e 73 20 61 72 65 3a 0a 2e 52 53 options are:..RS
2240: 0a 2e 54 50 0a 5c 66 42 2d 61 75 74 6f 73 65 72 ..TP.\fB-autoser
2250: 76 65 72 6e 61 6d 65 5c 66 52 20 5c 66 49 62 6f vername\fR \fIbo
2260: 6f 6c 5c 66 52 0a 49 66 20 5c 66 42 74 72 75 65 ol\fR.If \fBtrue
2270: 5c 66 52 2c 20 61 75 74 6f 6d 61 74 69 63 61 6c \fR, automatical
2280: 6c 79 20 73 65 74 20 74 68 65 20 5c 66 42 2d 73 ly set the \fB-s
2290: 65 72 76 65 72 6e 61 6d 65 5c 66 52 20 61 72 67 ervername\fR arg
22a0: 75 6d 65 6e 74 20 74 6f 20 74 68 65 0a 5c 66 49 ument to the.\fI
22b0: 68 6f 73 74 5c 66 52 20 61 72 67 75 6d 65 6e 74 host\fR argument
22c0: 5c 26 2e 20 50 72 69 6f 72 20 74 6f 20 54 63 6c \&. Prior to Tcl
22d0: 54 4c 53 20 32 5c 26 2e 30 2c 20 74 68 65 20 64 TLS 2\&.0, the d
22e0: 65 66 61 75 6c 74 20 69 73 20 5c 66 42 66 61 6c efault is \fBfal
22f0: 73 65 5c 66 52 5c 26 2e 0a 53 74 61 72 74 69 6e se\fR\&..Startin
2300: 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 2e g in TclTLS 2\&.
2310: 30 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20 69 0, the default i
2320: 73 20 5c 66 42 74 72 75 65 5c 66 52 20 75 6e 6c s \fBtrue\fR unl
2330: 65 73 73 20 5c 66 42 2d 73 65 72 76 65 72 6e 61 ess \fB-serverna
2340: 6d 65 5c 66 52 0a 69 73 20 61 6c 73 6f 20 73 70 me\fR.is also sp
2350: 65 63 69 66 69 65 64 5c 26 2e 0a 2e 52 45 0a 2e ecified\&...RE..
2360: 54 50 0a 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 TP.\fBtls::socke
2370: 74 5c 66 52 20 5c 66 42 2d 73 65 72 76 65 72 5c t\fR \fB-server\
2380: 66 52 20 5c 66 49 63 6f 6d 6d 61 6e 64 5c 66 52 fR \fIcommand\fR
2390: 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 3f ?\fI-option\fR?
23a0: 20 3f 5c 66 49 76 61 6c 75 65 5c 66 52 3f 20 3f ?\fIvalue\fR? ?
23b0: 5c 66 49 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 \fI-option value
23c0: 20 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 20 5c \&.\&.\&.\fR? \
23d0: 66 49 70 6f 72 74 5c 66 52 0a 53 61 6d 65 20 61 fIport\fR.Same a
23e0: 73 20 70 72 65 76 69 6f 75 73 20 63 6f 6d 6d 61 s previous comma
23f0: 6e 64 2c 20 62 75 74 20 69 6e 73 74 65 61 64 20 nd, but instead
2400: 63 72 65 61 74 65 73 20 61 20 73 65 72 76 65 72 creates a server
2410: 20 73 6f 63 6b 65 74 20 66 6f 72 20 63 6c 69 65 socket for clie
2420: 6e 74 73 20 74 6f 0a 63 6f 6e 6e 65 63 74 20 74 nts to.connect t
2430: 6f 20 6a 75 73 74 20 6c 69 6b 65 20 74 68 65 20 o just like the
2440: 54 63 6c 20 5c 66 42 73 6f 63 6b 65 74 20 2d 73 Tcl \fBsocket -s
2450: 65 72 76 65 72 5c 66 52 20 63 6f 6d 6d 61 6e 64 erver\fR command
2460: 5c 26 2e 20 49 74 20 72 65 74 75 72 6e 73 20 74 \&. It returns t
2470: 68 65 0a 63 68 61 6e 6e 65 6c 20 68 61 6e 64 6c he.channel handl
2480: 65 20 69 64 20 66 6f 72 20 74 68 65 20 6e 65 77 e id for the new
2490: 20 73 6f 63 6b 65 74 5c 26 2e 0a 2e 54 50 0a 5c socket\&...TP.\
24a0: 66 42 74 6c 73 3a 3a 69 6d 70 6f 72 74 5c 66 52 fBtls::import\fR
24b0: 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 20 3f \fIchannel\fR ?
24c0: 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 3f 20 3f \fI-option\fR? ?
24d0: 5c 66 49 76 61 6c 75 65 5c 66 52 3f 20 3f 5c 66 \fIvalue\fR? ?\f
24e0: 49 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 5c I-option value \
24f0: 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 0a 2e 54 50 &.\&.\&.\fR?..TP
2500: 0a 5c 66 42 74 6c 73 3a 3a 73 74 61 72 74 74 6c .\fBtls::starttl
2510: 73 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 5c s\fR \fIchannel\
2520: 66 52 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 fR ?\fI-option\f
2530: 52 3f 20 3f 5c 66 49 76 61 6c 75 65 5c 66 52 3f R? ?\fIvalue\fR?
2540: 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 20 76 61 6c ?\fI-option val
2550: 75 65 20 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f ue \&.\&.\&.\fR?
2560: 0a 53 74 61 72 74 20 54 4c 53 20 65 6e 63 72 79 .Start TLS encry
2570: 70 74 69 6f 6e 20 6f 6e 20 54 43 4c 20 63 68 61 ption on TCL cha
2580: 6e 6e 65 6c 20 5c 66 49 63 68 61 6e 6e 65 6c 5c nnel \fIchannel\
2590: 66 52 20 76 69 61 20 61 20 73 74 61 63 6b 65 64 fR via a stacked
25a0: 20 63 68 61 6e 6e 65 6c 5c 26 2e 20 49 74 0a 6e channel\&. It.n
25b0: 65 65 64 20 6e 6f 74 20 62 65 20 61 20 73 6f 63 eed not be a soc
25c0: 6b 65 74 2c 20 62 75 74 20 6d 75 73 74 20 70 72 ket, but must pr
25d0: 6f 76 69 64 65 20 62 69 2d 64 69 72 65 63 74 69 ovide bi-directi
25e0: 6f 6e 61 6c 20 66 6c 6f 77 5c 26 2e 20 41 6c 73 onal flow\&. Als
25f0: 6f 20 73 65 74 73 20 73 65 73 73 69 6f 6e 0a 70 o sets session.p
2600: 61 72 61 6d 65 74 65 72 73 20 66 6f 72 20 53 53 arameters for SS
2610: 4c 20 68 61 6e 64 73 68 61 6b 65 5c 26 2e 20 56 L handshake\&. V
2620: 61 6c 69 64 20 6f 70 74 69 6f 6e 73 20 61 72 65 alid options are
2630: 3a 0a 2e 52 53 0a 2e 54 50 0a 5c 66 42 2d 61 6c :..RS..TP.\fB-al
2640: 70 6e 5c 66 52 20 5c 66 49 6c 69 73 74 5c 66 52 pn\fR \fIlist\fR
2650: 0a 4c 69 73 74 20 6f 66 20 70 72 6f 74 6f 63 6f .List of protoco
2660: 6c 73 20 74 6f 20 6f 66 66 65 72 20 64 75 72 69 ls to offer duri
2670: 6e 67 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c ng Application-L
2680: 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 ayer Protocol Ne
2690: 67 6f 74 69 61 74 69 6f 6e 0a 28 41 4c 50 4e 29 gotiation.(ALPN)
26a0: 5c 26 2e 20 46 6f 72 20 65 78 61 6d 70 6c 65 3a \&. For example:
26b0: 20 5c 66 42 68 32 5c 66 52 20 61 6e 64 20 5c 66 \fBh2\fR and \f
26c0: 42 68 74 74 70 2f 31 5c 26 2e 31 5c 66 52 2c 20 Bhttp/1\&.1\fR,
26d0: 62 75 74 20 6e 6f 74 20 5c 66 42 68 33 5c 66 52 but not \fBh3\fR
26e0: 20 6f 72 0a 5c 66 42 71 75 69 63 5c 66 52 5c 26 or.\fBquic\fR\&
26f0: 2e 20 54 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 . This option is
2700: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
2710: 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 1\&.8\&...TP.\fB
2720: 2d 63 61 64 69 72 5c 66 52 20 5c 66 49 64 69 72 -cadir\fR \fIdir
2730: 65 63 74 6f 72 79 5c 66 52 0a 53 70 65 63 69 66 ectory\fR.Specif
2740: 69 65 73 20 74 68 65 20 64 69 72 65 63 74 6f 72 ies the director
2750: 79 20 77 68 65 72 65 20 74 68 65 20 43 65 72 74 y where the Cert
2760: 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 ificate Authorit
2770: 79 20 28 43 41 29 20 63 65 72 74 69 66 69 63 61 y (CA) certifica
2780: 74 65 73 20 61 72 65 0a 73 74 6f 72 65 64 5c 26 tes are.stored\&
2790: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 . The default is
27a0: 20 70 6c 61 74 66 6f 72 6d 20 73 70 65 63 69 66 platform specif
27b0: 69 63 20 61 6e 64 20 63 61 6e 20 62 65 20 73 65 ic and can be se
27c0: 74 20 61 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d t at compile tim
27d0: 65 5c 26 2e 20 54 68 65 0a 64 65 66 61 75 6c 74 e\&. The.default
27e0: 20 6c 6f 63 61 74 69 6f 6e 20 63 61 6e 20 62 65 location can be
27f0: 20 6f 76 65 72 72 69 64 64 65 6e 20 62 79 20 74 overridden by t
2800: 68 65 20 5c 66 42 53 53 4c 5f 43 45 52 54 5f 44 he \fBSSL_CERT_D
2810: 49 52 5c 66 52 20 65 6e 76 69 72 6f 6e 6d 65 6e IR\fR environmen
2820: 74 0a 76 61 72 69 61 62 6c 65 5c 26 2e 20 53 65 t.variable\&. Se
2830: 65 20 5c 66 42 43 65 72 74 69 66 69 63 61 74 65 e \fBCertificate
2840: 20 56 61 6c 69 64 61 74 69 6f 6e 5c 66 52 20 66 Validation\fR f
2850: 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 5c or more details\
2860: 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 61 66 69 6c &...TP.\fB-cafil
2870: 65 5c 66 52 20 5c 66 49 66 69 6c 65 6e 61 6d 65 e\fR \fIfilename
2880: 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 \fR.Specifies th
2890: 65 20 66 69 6c 65 20 77 69 74 68 20 74 68 65 20 e file with the
28a0: 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 Certificate Auth
28b0: 6f 72 69 74 79 20 28 43 41 29 20 63 65 72 74 69 ority (CA) certi
28c0: 66 69 63 61 74 65 73 20 74 6f 20 75 73 65 20 69 ficates to use i
28d0: 6e 0a 5c 66 42 50 45 4d 5c 66 52 20 66 69 6c 65 n.\fBPEM\fR file
28e0: 20 66 6f 72 6d 61 74 5c 26 2e 20 54 68 65 20 64 format\&. The d
28f0: 65 66 61 75 6c 74 20 69 73 20 22 5c 66 49 63 65 efault is "\fIce
2900: 72 74 5c 26 2e 70 65 6d 5c 66 52 22 2c 20 69 6e rt\&.pem\fR", in
2910: 20 74 68 65 20 4f 70 65 6e 53 53 4c 0a 64 69 72 the OpenSSL.dir
2920: 65 63 74 6f 72 79 5c 26 2e 20 54 68 65 20 64 65 ectory\&. The de
2930: 66 61 75 6c 74 20 66 69 6c 65 20 63 61 6e 20 62 fault file can b
2940: 65 20 6f 76 65 72 72 69 64 64 65 6e 20 62 79 20 e overridden by
2950: 74 68 65 20 5c 66 42 53 53 4c 5f 43 45 52 54 5f the \fBSSL_CERT_
2960: 46 49 4c 45 5c 66 52 20 65 6e 76 69 72 6f 6e 6d FILE\fR environm
2970: 65 6e 74 0a 76 61 72 69 61 62 6c 65 5c 26 2e 20 ent.variable\&.
2980: 53 65 65 20 5c 66 42 43 65 72 74 69 66 69 63 61 See \fBCertifica
2990: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 5c 66 52 te Validation\fR
29a0: 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c for more detail
29b0: 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 61 73 s\&...TP.\fB-cas
29c0: 74 6f 72 65 5c 66 52 20 5c 66 49 55 52 49 5c 66 tore\fR \fIURI\f
29d0: 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 20 R.Specifies the
29e0: 55 6e 69 66 6f 72 6d 20 52 65 73 6f 75 72 63 65 Uniform Resource
29f0: 20 49 64 65 6e 74 69 66 69 65 72 20 28 55 52 49 Identifier (URI
2a00: 29 20 66 6f 72 20 74 68 65 20 43 65 72 74 69 66 ) for the Certif
2a10: 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 0a icate Authority.
2a20: 28 43 41 29 20 73 74 6f 72 65 2c 20 77 68 69 63 (CA) store, whic
2a30: 68 20 6d 61 79 20 62 65 20 61 20 73 69 6e 67 6c h may be a singl
2a40: 65 20 63 6f 6e 74 61 69 6e 65 72 20 6f 72 20 61 e container or a
2a50: 20 63 61 74 61 6c 6f 67 20 6f 66 20 63 6f 6e 74 catalog of cont
2a60: 61 69 6e 65 72 73 5c 26 2e 0a 53 74 61 72 74 69 ainers\&..Starti
2a70: 6e 67 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 ng with OpenSSL
2a80: 33 5c 26 2e 32 20 6f 6e 20 4d 53 20 57 69 6e 64 3\&.2 on MS Wind
2a90: 6f 77 73 2c 20 73 65 74 20 74 6f 20 22 5c 66 42 ows, set to "\fB
2aa0: 6f 72 67 5c 26 2e 6f 70 65 6e 73 73 6c 5c 26 2e org\&.openssl\&.
2ab0: 77 69 6e 73 74 6f 72 65 3a 2f 2f 5c 66 52 22 0a winstore://\fR".
2ac0: 74 6f 20 75 73 65 20 74 68 65 20 62 75 69 6c 74 to use the built
2ad0: 2d 69 6e 20 4d 53 20 57 69 6e 64 6f 77 73 20 43 -in MS Windows C
2ae0: 65 72 74 69 66 69 63 61 74 65 20 53 74 6f 72 65 ertificate Store
2af0: 5c 26 2e 0a 53 65 65 20 5c 66 42 43 65 72 74 69 \&..See \fBCerti
2b00: 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f ficate Validatio
2b10: 6e 5c 66 52 20 66 6f 72 20 6d 6f 72 65 20 64 65 n\fR for more de
2b20: 74 61 69 6c 73 5c 26 2e 0a 54 68 69 73 20 6f 70 tails\&..This op
2b30: 74 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 tion is new for
2b40: 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a TclTLS 1\&.8\&..
2b50: 2e 54 50 0a 5c 66 42 2d 63 65 72 74 66 69 6c 65 .TP.\fB-certfile
2b60: 5c 66 52 20 5c 66 49 66 69 6c 65 6e 61 6d 65 5c \fR \fIfilename\
2b70: 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 fR.Specifies the
2b80: 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 66 69 6c name of the fil
2b90: 65 20 77 69 74 68 20 74 68 65 20 63 65 72 74 69 e with the certi
2ba0: 66 69 63 61 74 65 20 74 6f 20 75 73 65 20 69 6e ficate to use in
2bb0: 20 50 45 4d 20 66 6f 72 6d 61 74 0a 61 73 20 74 PEM format.as t
2bc0: 68 65 20 6c 6f 63 61 6c 20 28 63 6c 69 65 6e 74 he local (client
2bd0: 20 6f 72 20 73 65 72 76 65 72 29 20 63 65 72 74 or server) cert
2be0: 69 66 69 63 61 74 65 5c 26 2e 20 49 74 20 61 6c ificate\&. It al
2bf0: 73 6f 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 so contains the
2c00: 70 75 62 6c 69 63 20 6b 65 79 5c 26 2e 0a 2e 54 public key\&...T
2c10: 50 0a 5c 66 42 2d 63 65 72 74 5c 66 52 20 5c 66 P.\fB-cert\fR \f
2c20: 49 73 74 72 69 6e 67 5c 66 52 0a 53 70 65 63 69 Istring\fR.Speci
2c30: 66 69 65 73 20 74 68 65 20 63 65 72 74 69 66 69 fies the certifi
2c40: 63 61 74 65 20 74 6f 20 75 73 65 20 61 73 20 61 cate to use as a
2c50: 20 44 45 52 20 65 6e 63 6f 64 65 64 20 73 74 72 DER encoded str
2c60: 69 6e 67 20 28 58 5c 26 2e 35 30 39 20 44 45 52 ing (X\&.509 DER
2c70: 29 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 69 70 )\&...TP.\fB-cip
2c80: 68 65 72 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 her\fR \fIstring
2c90: 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 \fR.Specifies th
2ca0: 65 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72 e list of cipher
2cb0: 73 20 74 6f 20 75 73 65 20 66 6f 72 20 54 4c 53 s to use for TLS
2cc0: 20 31 5c 26 2e 32 20 61 6e 64 20 65 61 72 6c 69 1\&.2 and earli
2cd0: 65 72 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 5c 26 er connections\&
2ce0: 2e 0a 53 74 72 69 6e 67 20 69 73 20 61 20 63 6f ..String is a co
2cf0: 6c 6f 6e 20 22 5c 66 42 3a 5c 66 52 22 20 73 65 lon "\fB:\fR" se
2d00: 70 61 72 61 74 65 64 20 6c 69 73 74 20 6f 66 20 parated list of
2d10: 63 69 70 68 65 72 73 5c 26 2e 0a 43 69 70 68 65 ciphers\&..Ciphe
2d20: 72 73 20 63 61 6e 20 62 65 20 63 6f 6d 62 69 6e rs can be combin
2d30: 65 64 20 75 73 69 6e 67 20 74 68 65 20 22 5c 66 ed using the "\f
2d40: 42 2b 5c 66 52 22 20 63 68 61 72 61 63 74 65 72 B+\fR" character
2d50: 5c 26 2e 0a 50 72 65 66 69 78 65 73 20 63 61 6e \&..Prefixes can
2d60: 20 62 65 20 75 73 65 64 20 74 6f 20 70 65 72 6d be used to perm
2d70: 61 6e 65 6e 74 6c 79 20 72 65 6d 6f 76 65 20 22 anently remove "
2d80: 5c 66 42 21 5c 66 52 22 2c 20 64 65 6c 65 74 65 \fB!\fR", delete
2d90: 20 22 5c 66 42 2d 5c 66 52 22 2c 20 6f 72 0a 6d "\fB-\fR", or.m
2da0: 6f 76 65 20 74 6f 20 74 68 65 20 65 6e 64 20 22 ove to the end "
2db0: 5c 66 42 2b 5c 66 52 22 20 61 20 73 70 65 63 69 \fB+\fR" a speci
2dc0: 66 69 65 64 20 63 69 70 68 65 72 5c 26 2e 0a 4b fied cipher\&..K
2dd0: 65 79 77 6f 72 64 73 20 5c 66 42 40 53 54 52 45 eywords \fB@STRE
2de0: 4e 47 54 48 5c 66 52 20 28 73 6f 72 74 20 62 79 NGTH\fR (sort by
2df0: 20 61 6c 67 6f 72 69 74 68 6d 20 6b 65 79 20 6c algorithm key l
2e00: 65 6e 67 74 68 29 2c 0a 5c 66 42 40 53 45 43 4c ength),.\fB@SECL
2e10: 45 56 45 4c 3d 5c 66 52 5c 66 49 6e 5c 66 52 20 EVEL=\fR\fIn\fR
2e20: 28 73 65 74 20 73 65 63 75 72 69 74 79 20 6c 65 (set security le
2e30: 76 65 6c 20 74 6f 20 6e 29 2c 20 61 6e 64 0a 5c vel to n), and.\
2e40: 66 42 44 45 46 41 55 4c 54 5c 66 52 20 28 75 73 fBDEFAULT\fR (us
2e50: 65 20 64 65 66 61 75 6c 74 20 63 69 70 68 65 72 e default cipher
2e60: 20 6c 69 73 74 2c 20 61 74 20 73 74 61 72 74 20 list, at start
2e70: 6f 6e 6c 79 29 20 63 61 6e 20 61 6c 73 6f 20 62 only) can also b
2e80: 65 20 73 70 65 63 69 66 69 65 64 5c 26 2e 0a 53 e specified\&..S
2e90: 65 65 20 74 68 65 20 5c 66 49 4f 70 65 6e 53 53 ee the \fIOpenSS
2ea0: 4c 5c 66 52 20 5b 68 74 74 70 73 3a 2f 2f 64 6f L\fR [https://do
2eb0: 63 73 5c 26 2e 6f 70 65 6e 73 73 6c 5c 26 2e 6f cs\&.openssl\&.o
2ec0: 72 67 2f 6d 61 73 74 65 72 2f 6d 61 6e 31 2f 6f rg/master/man1/o
2ed0: 70 65 6e 73 73 6c 2d 63 69 70 68 65 72 73 2f 23 penssl-ciphers/#
2ee0: 6f 70 74 69 6f 6e 73 5d 0a 64 6f 63 75 6d 65 6e options].documen
2ef0: 74 61 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 66 tation for the f
2f00: 75 6c 6c 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 ull list of vali
2f10: 64 20 76 61 6c 75 65 73 5c 26 2e 0a 2e 54 50 0a d values\&...TP.
2f20: 5c 66 42 2d 63 69 70 68 65 72 73 75 69 74 65 73 \fB-ciphersuites
2f30: 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 \fR \fIstring\fR
2f40: 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 20 6c .Specifies the l
2f50: 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 75 ist of cipher su
2f60: 69 74 65 73 20 74 6f 20 75 73 65 20 66 6f 72 20 ites to use for
2f70: 54 4c 53 20 31 5c 26 2e 33 20 61 73 20 61 20 63 TLS 1\&.3 as a c
2f80: 6f 6c 6f 6e 0a 22 5c 66 42 3a 5c 66 52 22 20 73 olon."\fB:\fR" s
2f90: 65 70 61 72 61 74 65 64 20 6c 69 73 74 20 6f 66 eparated list of
2fa0: 20 63 69 70 68 65 72 20 73 75 69 74 65 20 6e 61 cipher suite na
2fb0: 6d 65 73 5c 26 2e 20 53 65 65 20 74 68 65 0a 5c mes\&. See the.\
2fc0: 66 49 4f 70 65 6e 53 53 4c 5c 66 52 20 5b 68 74 fIOpenSSL\fR [ht
2fd0: 74 70 73 3a 2f 2f 64 6f 63 73 5c 26 2e 6f 70 65 tps://docs\&.ope
2fe0: 6e 73 73 6c 5c 26 2e 6f 72 67 2f 6d 61 73 74 65 nssl\&.org/maste
2ff0: 72 2f 6d 61 6e 31 2f 6f 70 65 6e 73 73 6c 2d 63 r/man1/openssl-c
3000: 69 70 68 65 72 73 2f 23 6f 70 74 69 6f 6e 73 5d iphers/#options]
3010: 0a 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 .documentation f
3020: 6f 72 20 74 68 65 20 66 75 6c 6c 20 6c 69 73 74 or the full list
3030: 20 6f 66 20 76 61 6c 69 64 20 76 61 6c 75 65 73 of valid values
3040: 5c 26 2e 0a 54 68 69 73 20 6f 70 74 69 6f 6e 20 \&..This option
3050: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c is new for TclTL
3060: 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c S 1\&.8\&...TP.\
3070: 66 42 2d 63 6f 6d 6d 61 6e 64 5c 66 52 20 5c 66 fB-command\fR \f
3080: 49 63 61 6c 6c 62 61 63 6b 5c 66 52 0a 53 70 65 Icallback\fR.Spe
3090: 63 69 66 69 65 73 20 74 68 65 20 63 61 6c 6c 62 cifies the callb
30a0: 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 62 ack command to b
30b0: 65 20 69 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 e invoked at sev
30c0: 65 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 69 eral points duri
30d0: 6e 67 20 74 68 65 0a 68 61 6e 64 73 68 61 6b 65 ng the.handshake
30e0: 20 74 6f 20 70 61 73 73 20 65 72 72 6f 72 73 2c to pass errors,
30f0: 20 74 72 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61 tracing informa
3100: 74 69 6f 6e 2c 20 61 6e 64 20 70 72 6f 74 6f 63 tion, and protoc
3110: 6f 6c 20 6d 65 73 73 61 67 65 73 5c 26 2e 0a 53 ol messages\&..S
3120: 65 65 20 5c 66 42 43 61 6c 6c 62 61 63 6b 20 4f ee \fBCallback O
3130: 70 74 69 6f 6e 73 5c 66 52 20 66 6f 72 20 6d 6f ptions\fR for mo
3140: 72 65 20 69 6e 66 6f 5c 26 2e 0a 2e 54 50 0a 5c re info\&...TP.\
3150: 66 42 2d 64 68 70 61 72 61 6d 73 5c 66 52 20 5c fB-dhparams\fR \
3160: 66 49 66 69 6c 65 6e 61 6d 65 5c 66 52 0a 53 70 fIfilename\fR.Sp
3170: 65 63 69 66 69 65 73 20 74 68 65 20 44 69 66 66 ecifies the Diff
3180: 69 65 2d 48 65 6c 6c 6d 61 6e 20 28 44 48 29 20 ie-Hellman (DH)
3190: 70 61 72 61 6d 65 74 65 72 73 20 66 69 6c 65 5c parameters file\
31a0: 26 2e 0a 2e 54 50 0a 5c 66 42 2d 6b 65 79 66 69 &...TP.\fB-keyfi
31b0: 6c 65 5c 66 52 20 5c 66 49 66 69 6c 65 6e 61 6d le\fR \fIfilenam
31c0: 65 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 e\fR.Specifies t
31d0: 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 20 66 he private key f
31e0: 69 6c 65 5c 26 2e 20 54 68 65 20 64 65 66 61 75 ile\&. The defau
31f0: 6c 74 20 69 73 20 74 6f 20 75 73 65 20 74 68 65 lt is to use the
3200: 20 66 69 6c 65 0a 73 70 65 63 69 66 69 65 64 20 file.specified
3210: 62 79 20 74 68 65 20 5c 66 42 2d 63 65 72 74 66 by the \fB-certf
3220: 69 6c 65 5c 66 52 20 6f 70 74 69 6f 6e 5c 26 2e ile\fR option\&.
3230: 0a 2e 54 50 0a 5c 66 42 2d 6b 65 79 5c 66 52 20 ..TP.\fB-key\fR
3240: 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 53 70 65 \fIstring\fR.Spe
3250: 63 69 66 69 65 73 20 74 68 65 20 70 72 69 76 61 cifies the priva
3260: 74 65 20 6b 65 79 20 74 6f 20 75 73 65 20 61 73 te key to use as
3270: 20 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20 73 a DER encoded s
3280: 74 72 69 6e 67 20 28 50 4b 43 53 23 31 20 44 45 tring (PKCS#1 DE
3290: 52 29 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 6d 6f R)\&...TP.\fB-mo
32a0: 64 65 6c 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 del\fR \fIchanne
32b0: 6c 5c 66 52 0a 46 6f 72 63 65 20 74 68 69 73 20 l\fR.Force this
32c0: 63 68 61 6e 6e 65 6c 20 74 6f 20 73 68 61 72 65 channel to share
32d0: 20 74 68 65 20 73 61 6d 65 20 5c 66 49 53 53 4c the same \fISSL
32e0: 5f 43 54 58 5c 66 52 20 73 74 72 75 63 74 75 72 _CTX\fR structur
32f0: 65 20 61 73 20 74 68 65 0a 73 70 65 63 69 66 69 e as the.specifi
3300: 65 64 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 ed \fIchannel\fR
3310: 2c 20 61 6e 64 20 74 68 65 72 65 66 6f 72 65 20 , and therefore
3320: 73 68 61 72 65 20 63 6f 6e 66 69 67 2c 20 63 61 share config, ca
3330: 6c 6c 62 61 63 6b 73 2c 20 65 74 63 5c 26 2e 0a llbacks, etc\&..
3340: 2e 54 50 0a 5c 66 42 2d 70 61 73 73 77 6f 72 64 .TP.\fB-password
3350: 5c 66 52 20 5c 66 49 63 61 6c 6c 62 61 63 6b 5c \fR \fIcallback\
3360: 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 fR.Specifies the
3370: 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e callback comman
3380: 64 20 74 6f 20 69 6e 76 6f 6b 65 20 77 68 65 6e d to invoke when
3390: 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73 20 74 OpenSSL needs t
33a0: 6f 20 6f 62 74 61 69 6e 20 61 0a 70 61 73 73 77 o obtain a.passw
33b0: 6f 72 64 5c 26 2e 20 54 68 69 73 20 69 73 20 74 ord\&. This is t
33c0: 79 70 69 63 61 6c 6c 79 20 75 73 65 64 20 74 6f ypically used to
33d0: 20 75 6e 6c 6f 63 6b 20 74 68 65 20 70 72 69 76 unlock the priv
33e0: 61 74 65 20 6b 65 79 20 6f 66 20 61 20 63 65 72 ate key of a cer
33f0: 74 69 66 69 63 61 74 65 5c 26 2e 0a 54 68 65 20 tificate\&..The
3400: 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 callback should
3410: 72 65 74 75 72 6e 20 61 20 70 61 73 73 77 6f 72 return a passwor
3420: 64 20 73 74 72 69 6e 67 5c 26 2e 20 54 68 69 73 d string\&. This
3430: 20 6f 70 74 69 6f 6e 20 68 61 73 20 63 68 61 6e option has chan
3440: 67 65 64 20 66 6f 72 0a 54 63 6c 54 4c 53 20 31 ged for.TclTLS 1
3450: 5c 26 2e 38 5c 26 2e 20 53 65 65 20 5c 66 42 43 \&.8\&. See \fBC
3460: 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73 5c allback Options\
3470: 66 52 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f fR for more info
3480: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 70 6f 73 74 \&...TP.\fB-post
3490: 5f 68 61 6e 64 73 68 61 6b 65 5c 66 52 20 5c 66 _handshake\fR \f
34a0: 49 62 6f 6f 6c 5c 66 52 0a 41 6c 6c 6f 77 20 70 Ibool\fR.Allow p
34b0: 6f 73 74 2d 68 61 6e 64 73 68 61 6b 65 20 73 65 ost-handshake se
34c0: 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 75 70 64 ssion ticket upd
34d0: 61 74 65 73 5c 26 2e 20 54 68 69 73 20 6f 70 74 ates\&. This opt
34e0: 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 ion is new for T
34f0: 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e clTLS 1\&.8\&...
3500: 54 50 0a 5c 66 42 2d 72 65 71 75 65 73 74 5c 66 TP.\fB-request\f
3510: 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 52 65 71 R \fIbool\fR.Req
3520: 75 65 73 74 20 61 20 63 65 72 74 69 66 69 63 61 uest a certifica
3530: 74 65 20 66 72 6f 6d 20 74 68 65 20 70 65 65 72 te from the peer
3540: 20 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c 20 during the SSL
3550: 68 61 6e 64 73 68 61 6b 65 5c 26 2e 20 54 68 69 handshake\&. Thi
3560: 73 20 69 73 20 6e 65 65 64 65 64 0a 74 6f 20 64 s is needed.to d
3570: 6f 20 43 65 72 74 69 66 69 63 61 74 65 20 56 61 o Certificate Va
3580: 6c 69 64 61 74 69 6f 6e 5c 26 2e 20 53 74 61 72 lidation\&. Star
3590: 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 31 ting in TclTLS 1
35a0: 5c 26 2e 38 2c 20 74 68 65 20 64 65 66 61 75 6c \&.8, the defaul
35b0: 74 20 69 73 0a 5c 66 42 74 72 75 65 5c 66 52 20 t is.\fBtrue\fR
35c0: 66 6f 72 20 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 for client conne
35d0: 63 74 69 6f 6e 73 5c 26 2e 20 53 74 61 72 74 69 ctions\&. Starti
35e0: 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 ng in TclTLS 2\&
35f0: 2e 30 2c 20 69 66 20 73 65 74 20 74 6f 0a 5c 66 .0, if set to.\f
3600: 42 66 61 6c 73 65 5c 66 52 20 61 6e 64 20 5c 66 Bfalse\fR and \f
3610: 42 2d 72 65 71 75 69 72 65 5c 66 52 20 69 73 20 B-require\fR is
3620: 5c 66 42 74 72 75 65 5c 66 52 2c 20 74 68 65 6e \fBtrue\fR, then
3630: 20 74 68 69 73 20 77 69 6c 6c 20 62 65 0a 6f 76 this will be.ov
3640: 65 72 72 69 64 64 65 6e 20 74 6f 20 5c 66 42 74 erridden to \fBt
3650: 72 75 65 5c 66 52 5c 26 2e 0a 53 65 65 20 5c 66 rue\fR\&..See \f
3660: 42 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c BCertificate Val
3670: 69 64 61 74 69 6f 6e 5c 66 52 20 66 6f 72 20 6d idation\fR for m
3680: 6f 72 65 20 64 65 74 61 69 6c 73 5c 26 2e 0a 2e ore details\&...
3690: 54 50 0a 5c 66 42 2d 72 65 71 75 69 72 65 5c 66 TP.\fB-require\f
36a0: 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 52 65 71 R \fIbool\fR.Req
36b0: 75 69 72 65 20 61 20 76 61 6c 69 64 20 63 65 72 uire a valid cer
36c0: 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20 74 68 tificate from th
36d0: 65 20 70 65 65 72 20 64 75 72 69 6e 67 20 74 68 e peer during th
36e0: 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 5c e SSL handshake\
36f0: 26 2e 20 49 66 20 74 68 69 73 20 69 73 0a 73 65 &. If this is.se
3700: 74 20 74 6f 20 74 72 75 65 2c 20 74 68 65 6e 20 t to true, then
3710: 5c 66 42 2d 72 65 71 75 65 73 74 5c 66 52 20 6d \fB-request\fR m
3720: 75 73 74 20 61 6c 73 6f 20 62 65 20 73 65 74 20 ust also be set
3730: 74 6f 20 74 72 75 65 20 61 6e 64 20 61 20 65 69 to true and a ei
3740: 74 68 65 72 0a 5c 66 42 2d 63 61 64 69 72 5c 66 ther.\fB-cadir\f
3750: 52 2c 20 5c 66 42 2d 63 61 66 69 6c 65 5c 66 52 R, \fB-cafile\fR
3760: 2c 20 5c 66 42 2d 63 61 73 74 6f 72 65 5c 66 52 , \fB-castore\fR
3770: 2c 20 6f 72 20 61 20 70 6c 61 74 66 6f 72 6d 20 , or a platform
3780: 64 65 66 61 75 6c 74 0a 6d 75 73 74 20 62 65 20 default.must be
3790: 70 72 6f 76 69 64 65 64 20 69 6e 20 6f 72 64 65 provided in orde
37a0: 72 20 74 6f 20 76 61 6c 69 64 61 74 65 20 61 67 r to validate ag
37b0: 61 69 6e 73 74 5c 26 2e 20 54 68 65 20 64 65 66 ainst\&. The def
37c0: 61 75 6c 74 20 69 6e 20 54 63 6c 54 4c 53 20 31 ault in TclTLS 1
37d0: 5c 26 2e 38 20 61 6e 64 0a 65 61 72 6c 69 65 72 \&.8 and.earlier
37e0: 20 76 65 72 73 69 6f 6e 73 20 69 73 20 5c 66 42 versions is \fB
37f0: 66 61 6c 73 65 5c 66 52 20 73 69 6e 63 65 20 6e false\fR since n
3800: 6f 74 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d 73 ot all platforms
3810: 20 68 61 76 65 20 63 65 72 74 69 66 69 63 61 74 have certificat
3820: 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 es to.validate a
3830: 67 61 69 6e 73 74 20 69 6e 20 61 20 66 6f 72 6d gainst in a form
3840: 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 compatible with
3850: 20 4f 70 65 6e 53 53 4c 5c 26 2e 20 53 74 61 72 OpenSSL\&. Star
3860: 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 ting in TclTLS 2
3870: 5c 26 2e 30 2c 0a 74 68 65 20 64 65 66 61 75 6c \&.0,.the defaul
3880: 74 20 69 73 20 5c 66 42 74 72 75 65 5c 66 52 20 t is \fBtrue\fR
3890: 66 6f 72 20 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 for client conne
38a0: 63 74 69 6f 6e 73 5c 26 2e 0a 53 65 65 20 5c 66 ctions\&..See \f
38b0: 42 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c BCertificate Val
38c0: 69 64 61 74 69 6f 6e 5c 66 52 20 66 6f 72 20 6d idation\fR for m
38d0: 6f 72 65 20 64 65 74 61 69 6c 73 5c 26 2e 0a 2e ore details\&...
38e0: 54 50 0a 5c 66 42 2d 73 65 63 75 72 69 74 79 5f TP.\fB-security_
38f0: 6c 65 76 65 6c 5c 66 52 20 5c 66 49 69 6e 74 65 level\fR \fIinte
3900: 67 65 72 5c 66 52 0a 53 70 65 63 69 66 69 65 73 ger\fR.Specifies
3910: 20 74 68 65 20 73 65 63 75 72 69 74 79 20 6c 65 the security le
3920: 76 65 6c 20 28 76 61 6c 75 65 20 66 72 6f 6d 20 vel (value from
3930: 30 20 74 6f 20 35 29 5c 26 2e 20 54 68 65 20 73 0 to 5)\&. The s
3940: 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20 61 66 ecurity level af
3950: 66 65 63 74 73 0a 74 68 65 20 61 6c 6c 6f 77 65 fects.the allowe
3960: 64 20 63 69 70 68 65 72 20 73 75 69 74 65 20 65 d cipher suite e
3970: 6e 63 72 79 70 74 69 6f 6e 20 61 6c 67 6f 72 69 ncryption algori
3980: 74 68 6d 73 2c 20 73 75 70 70 6f 72 74 65 64 20 thms, supported
3990: 45 43 43 20 63 75 72 76 65 73 2c 0a 73 75 70 70 ECC curves,.supp
39a0: 6f 72 74 65 64 20 73 69 67 6e 61 74 75 72 65 20 orted signature
39b0: 61 6c 67 6f 72 69 74 68 6d 73 2c 20 44 48 20 70 algorithms, DH p
39c0: 61 72 61 6d 65 74 65 72 20 73 69 7a 65 73 2c 20 arameter sizes,
39d0: 63 65 72 74 69 66 69 63 61 74 65 20 6b 65 79 20 certificate key
39e0: 73 69 7a 65 73 0a 61 6e 64 20 73 69 67 6e 61 74 sizes.and signat
39f0: 75 72 65 20 61 6c 67 6f 72 69 74 68 6d 73 5c 26 ure algorithms\&
3a00: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 . The default is
3a10: 20 31 20 70 72 69 6f 72 20 74 6f 20 4f 70 65 6e 1 prior to Open
3a20: 53 53 4c 20 33 5c 26 2e 32 20 61 6e 64 20 32 0a SSL 3\&.2 and 2.
3a30: 74 68 65 72 65 61 66 74 65 72 5c 26 2e 20 4c 65 thereafter\&. Le
3a40: 76 65 6c 20 33 20 61 6e 64 20 68 69 67 68 65 72 vel 3 and higher
3a50: 20 64 69 73 61 62 6c 65 20 73 75 70 70 6f 72 74 disable support
3a60: 20 66 6f 72 20 73 65 73 73 69 6f 6e 20 74 69 63 for session tic
3a70: 6b 65 74 73 20 61 6e 64 0a 6f 6e 6c 79 20 61 63 kets and.only ac
3a80: 63 65 70 74 20 63 69 70 68 65 72 20 73 75 69 74 cept cipher suit
3a90: 65 73 20 74 68 61 74 20 70 72 6f 76 69 64 65 20 es that provide
3aa0: 66 6f 72 77 61 72 64 20 73 65 63 72 65 63 79 5c forward secrecy\
3ab0: 26 2e 0a 54 68 69 73 20 6f 70 74 69 6f 6e 20 69 &..This option i
3ac0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
3ad0: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 1\&.8\&...TP.\f
3ae0: 42 2d 73 65 72 76 65 72 5c 66 52 20 5c 66 49 62 B-server\fR \fIb
3af0: 6f 6f 6c 5c 66 52 0a 53 70 65 63 69 66 69 65 73 ool\fR.Specifies
3b00: 20 77 68 65 74 68 65 72 20 74 6f 20 61 63 74 20 whether to act
3b10: 61 73 20 61 20 73 65 72 76 65 72 20 61 6e 64 20 as a server and
3b20: 72 65 73 70 6f 6e 64 20 77 69 74 68 20 61 20 73 respond with a s
3b30: 65 72 76 65 72 20 68 61 6e 64 73 68 61 6b 65 20 erver handshake
3b40: 77 68 65 6e 20 61 0a 63 6c 69 65 6e 74 20 63 6f when a.client co
3b50: 6e 6e 65 63 74 73 20 61 6e 64 20 70 72 6f 76 69 nnects and provi
3b60: 64 65 73 20 61 20 63 6c 69 65 6e 74 20 68 61 6e des a client han
3b70: 64 73 68 61 6b 65 5c 26 2e 20 54 68 65 20 64 65 dshake\&. The de
3b80: 66 61 75 6c 74 20 69 73 20 5c 66 42 66 61 6c 73 fault is \fBfals
3b90: 65 5c 66 52 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d e\fR\&...TP.\fB-
3ba0: 73 65 72 76 65 72 6e 61 6d 65 5c 66 52 20 5c 66 servername\fR \f
3bb0: 49 68 6f 73 74 6e 61 6d 65 5c 66 52 0a 53 70 65 Ihostname\fR.Spe
3bc0: 63 69 66 79 20 74 68 65 20 70 65 65 72 27 73 20 cify the peer's
3bd0: 68 6f 73 74 6e 61 6d 65 5c 26 2e 20 54 68 69 73 hostname\&. This
3be0: 20 69 73 20 75 73 65 64 20 74 6f 20 73 65 74 20 is used to set
3bf0: 74 68 65 20 54 4c 53 20 53 65 72 76 65 72 20 4e the TLS Server N
3c00: 61 6d 65 20 49 6e 64 69 63 61 74 69 6f 6e 0a 28 ame Indication.(
3c10: 53 4e 49 29 20 65 78 74 65 6e 73 69 6f 6e 5c 26 SNI) extension\&
3c20: 2e 20 53 65 74 20 74 68 69 73 20 74 6f 20 74 68 . Set this to th
3c30: 65 20 65 78 70 65 63 74 65 64 20 73 65 72 76 65 e expected serve
3c40: 72 6e 61 6d 65 20 69 6e 20 74 68 65 20 73 65 72 rname in the ser
3c50: 76 65 72 27 73 20 63 65 72 74 69 66 69 63 61 74 ver's certificat
3c60: 65 0a 6f 72 20 6f 6e 65 20 6f 66 20 74 68 65 20 e.or one of the
3c70: 53 75 62 6a 65 63 74 20 41 6c 74 65 72 6e 61 74 Subject Alternat
3c80: 65 20 4e 61 6d 65 73 20 28 53 41 4e 29 5c 26 2e e Names (SAN)\&.
3c90: 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c Starting in Tcl
3ca0: 54 4c 53 20 32 5c 26 2e 30 2c 20 74 68 69 73 20 TLS 2\&.0, this
3cb0: 77 69 6c 6c 0a 64 65 66 61 75 6c 74 20 74 6f 20 will.default to
3cc0: 74 68 65 20 68 6f 73 74 20 66 72 6f 6d 20 74 68 the host from th
3cd0: 65 20 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 e \fBtls::socket
3ce0: 5c 66 52 20 63 6f 6d 6d 61 6e 64 5c 26 2e 0a 2e \fR command\&...
3cf0: 54 50 0a 5c 66 42 2d 73 65 73 73 69 6f 6e 5f 69 TP.\fB-session_i
3d00: 64 5c 66 52 20 5c 66 49 62 69 6e 61 72 79 5f 73 d\fR \fIbinary_s
3d10: 74 72 69 6e 67 5c 66 52 0a 53 70 65 63 69 66 69 tring\fR.Specifi
3d20: 65 73 20 74 68 65 20 73 65 73 73 69 6f 6e 20 69 es the session i
3d30: 64 20 74 6f 20 72 65 73 75 6d 65 20 61 20 73 65 d to resume a se
3d40: 73 73 69 6f 6e 5c 26 2e 20 4e 6f 74 20 73 75 70 ssion\&. Not sup
3d50: 70 6f 72 74 65 64 20 79 65 74 5c 26 2e 0a 54 68 ported yet\&..Th
3d60: 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 is option is new
3d70: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e for TclTLS 1\&.
3d80: 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 73 73 6c 8\&...TP.\fB-ssl
3d90: 32 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 2\fR \fIbool\fR.
3da0: 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 53 53 Enable use of SS
3db0: 4c 20 76 32 5c 26 2e 54 68 65 20 64 65 66 61 75 L v2\&.The defau
3dc0: 6c 74 20 69 73 20 5c 66 42 66 61 6c 73 65 5c 66 lt is \fBfalse\f
3dd0: 52 5c 26 2e 0a 4f 70 65 6e 53 53 4c 20 31 5c 26 R\&..OpenSSL 1\&
3de0: 2e 31 2b 20 6e 6f 20 6c 6f 6e 67 65 72 20 73 75 .1+ no longer su
3df0: 70 70 6f 72 74 73 20 53 53 4c 20 76 32 2c 20 73 pports SSL v2, s
3e00: 6f 20 74 68 69 73 20 6d 61 79 20 6e 6f 74 20 68 o this may not h
3e10: 61 76 65 20 61 6e 79 20 65 66 66 65 63 74 5c 26 ave any effect\&
3e20: 2e 0a 53 65 65 20 74 68 65 20 5c 66 42 74 6c 73 ..See the \fBtls
3e30: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 5c 66 52 20 63 ::protocols\fR c
3e40: 6f 6d 6d 61 6e 64 20 66 6f 72 20 73 75 70 70 6f ommand for suppo
3e50: 72 74 65 64 20 70 72 6f 74 6f 63 6f 6c 73 5c 26 rted protocols\&
3e60: 2e 0a 2e 54 50 0a 5c 66 42 2d 73 73 6c 33 5c 66 ...TP.\fB-ssl3\f
3e70: 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 45 6e 61 R \fIbool\fR.Ena
3e80: 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c 20 76 ble use of SSL v
3e90: 33 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 3\&. The default
3ea0: 20 69 73 20 5c 66 42 66 61 6c 73 65 5c 66 52 5c is \fBfalse\fR\
3eb0: 26 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 &. Starting in T
3ec0: 63 6c 54 4c 53 20 31 5c 26 2e 38 2c 0a 75 73 65 clTLS 1\&.8,.use
3ed0: 20 6f 66 20 53 53 4c 20 76 33 20 69 66 20 6f 6e of SSL v3 if on
3ee0: 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 76 69 61 ly available via
3ef0: 20 61 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 a compile time
3f00: 6f 70 74 69 6f 6e 5c 26 2e 0a 53 65 65 20 74 68 option\&..See th
3f10: 65 20 5c 66 42 74 6c 73 3a 3a 70 72 6f 74 6f 63 e \fBtls::protoc
3f20: 6f 6c 73 5c 66 52 20 63 6f 6d 6d 61 6e 64 20 66 ols\fR command f
3f30: 6f 72 20 73 75 70 70 6f 72 74 65 64 20 70 72 6f or supported pro
3f40: 74 6f 63 6f 6c 73 5c 26 2e 0a 2e 54 50 0a 5c 66 tocols\&...TP.\f
3f50: 42 2d 74 6c 73 31 5c 66 52 20 5c 66 49 62 6f 6f B-tls1\fR \fIboo
3f60: 6c 5c 66 52 0a 45 6e 61 62 6c 65 20 75 73 65 20 l\fR.Enable use
3f70: 6f 66 20 54 4c 53 20 76 31 5c 26 2e 20 53 74 61 of TLS v1\&. Sta
3f80: 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 rting in TclTLS
3f90: 32 5c 26 2e 30 2c 20 74 68 65 20 64 65 66 61 75 2\&.0, the defau
3fa0: 6c 74 20 69 73 20 5c 66 42 66 61 6c 73 65 5c 66 lt is \fBfalse\f
3fb0: 52 5c 26 2e 0a 4e 6f 74 65 3a 20 54 4c 53 20 31 R\&..Note: TLS 1
3fc0: 5c 26 2e 30 20 6e 65 65 64 73 20 53 48 41 31 20 \&.0 needs SHA1
3fd0: 74 6f 20 6f 70 65 72 61 74 65 2c 20 77 68 69 63 to operate, whic
3fe0: 68 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 h is only availa
3ff0: 62 6c 65 20 69 6e 20 73 65 63 75 72 69 74 79 20 ble in security
4000: 6c 65 76 65 6c 0a 30 20 66 6f 72 20 4f 70 65 6e level.0 for Open
4010: 20 53 53 4c 20 33 5c 26 2e 30 2b 5c 26 2e 20 53 SSL 3\&.0+\&. S
4020: 65 65 20 74 68 65 20 5c 66 42 2d 73 65 63 75 72 ee the \fB-secur
4030: 69 74 79 5f 6c 65 76 65 6c 5c 66 52 20 6f 70 74 ity_level\fR opt
4040: 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 74 ion\&...TP.\fB-t
4050: 6c 73 31 5c 26 2e 31 5c 66 52 20 5c 66 49 62 6f ls1\&.1\fR \fIbo
4060: 6f 6c 5c 66 52 0a 45 6e 61 62 6c 65 20 75 73 65 ol\fR.Enable use
4070: 20 6f 66 20 54 4c 53 20 76 31 5c 26 2e 31 5c 26 of TLS v1\&.1\&
4080: 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 . Starting in Tc
4090: 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 74 68 65 20 lTLS 2\&.0, the
40a0: 64 65 66 61 75 6c 74 20 69 73 20 5c 66 42 66 61 default is \fBfa
40b0: 6c 73 65 5c 66 52 5c 26 2e 0a 4e 6f 74 65 3a 20 lse\fR\&..Note:
40c0: 54 4c 53 20 31 5c 26 2e 31 20 6e 65 65 64 73 20 TLS 1\&.1 needs
40d0: 53 48 41 31 20 74 6f 20 6f 70 65 72 61 74 65 2c SHA1 to operate,
40e0: 20 77 68 69 63 68 20 69 73 20 6f 6e 6c 79 20 61 which is only a
40f0: 76 61 69 6c 61 62 6c 65 20 69 6e 20 73 65 63 75 vailable in secu
4100: 72 69 74 79 20 6c 65 76 65 6c 0a 30 20 66 6f 72 rity level.0 for
4110: 20 4f 70 65 6e 20 53 53 4c 20 33 5c 26 2e 30 2b Open SSL 3\&.0+
4120: 5c 26 2e 20 53 65 65 20 74 68 65 20 5c 66 42 2d \&. See the \fB-
4130: 73 65 63 75 72 69 74 79 5f 6c 65 76 65 6c 5c 66 security_level\f
4140: 52 20 6f 70 74 69 6f 6e 5c 26 2e 0a 2e 54 50 0a R option\&...TP.
4150: 5c 66 42 2d 74 6c 73 31 5c 26 2e 32 5c 66 52 20 \fB-tls1\&.2\fR
4160: 5c 66 49 62 6f 6f 6c 5c 66 52 0a 45 6e 61 62 6c \fIbool\fR.Enabl
4170: 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 5c e use of TLS v1\
4180: 26 2e 32 5c 26 2e 20 54 68 65 20 64 65 66 61 75 &.2\&. The defau
4190: 6c 74 20 69 73 20 5c 66 42 74 72 75 65 5c 66 52 lt is \fBtrue\fR
41a0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 74 6c 73 31 \&...TP.\fB-tls1
41b0: 5c 26 2e 33 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c \&.3\fR \fIbool\
41c0: 66 52 0a 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 fR.Enable use of
41d0: 20 54 4c 53 20 76 31 5c 26 2e 33 5c 26 2e 20 54 TLS v1\&.3\&. T
41e0: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 5c 66 he default is \f
41f0: 42 74 72 75 65 5c 66 52 5c 26 2e 20 54 68 69 73 Btrue\fR\&. This
4200: 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 is only availab
4210: 6c 65 0a 73 74 61 72 74 69 6e 67 20 77 69 74 68 le.starting with
4220: 20 4f 70 65 6e 53 53 4c 20 31 5c 26 2e 31 5c 26 OpenSSL 1\&.1\&
4230: 2e 31 20 61 6e 64 20 54 63 6c 54 4c 53 20 31 5c .1 and TclTLS 1\
4240: 26 2e 37 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 76 &.7\&...TP.\fB-v
4250: 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 5c 66 alidatecommand\f
4260: 52 20 5c 66 49 63 61 6c 6c 62 61 63 6b 5c 66 52 R \fIcallback\fR
4270: 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 20 63 .Specifies the c
4280: 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 allback command
4290: 74 6f 20 69 6e 76 6f 6b 65 20 74 6f 20 76 61 6c to invoke to val
42a0: 69 64 61 74 65 20 74 68 65 20 70 65 65 72 20 63 idate the peer c
42b0: 65 72 74 69 66 69 63 61 74 65 73 0a 61 6e 64 20 ertificates.and
42c0: 6f 74 68 65 72 20 63 6f 6e 66 69 67 20 69 6e 66 other config inf
42d0: 6f 20 64 75 72 69 6e 67 20 74 68 65 20 70 72 6f o during the pro
42e0: 74 6f 63 6f 6c 20 6e 65 67 6f 74 69 61 74 69 6f tocol negotiatio
42f0: 6e 20 70 68 61 73 65 5c 26 2e 20 54 68 69 73 20 n phase\&. This
4300: 63 61 6e 20 62 65 20 75 73 65 64 0a 62 79 20 54 can be used.by T
4310: 43 4c 20 73 63 72 69 70 74 73 20 74 6f 20 70 65 CL scripts to pe
4320: 72 66 6f 72 6d 20 74 68 65 69 72 20 6f 77 6e 20 rform their own
4330: 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 Certificate Vali
4340: 64 61 74 69 6f 6e 20 74 6f 20 73 75 70 70 6c 65 dation to supple
4350: 6d 65 6e 74 20 74 68 65 0a 64 65 66 61 75 6c 74 ment the.default
4360: 20 76 61 6c 69 64 61 74 69 6f 6e 20 70 72 6f 76 validation prov
4370: 69 64 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 5c ided by OpenSSL\
4380: 26 2e 20 54 68 65 20 73 63 72 69 70 74 20 6d 75 &. The script mu
4390: 73 74 20 72 65 74 75 72 6e 20 61 20 62 6f 6f 6c st return a bool
43a0: 65 61 6e 20 74 72 75 65 0a 74 6f 20 63 6f 6e 74 ean true.to cont
43b0: 69 6e 75 65 20 74 68 65 20 6e 65 67 6f 74 69 61 inue the negotia
43c0: 74 69 6f 6e 5c 26 2e 20 53 65 65 20 5c 66 42 43 tion\&. See \fBC
43d0: 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73 5c allback Options\
43e0: 66 52 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f fR for more info
43f0: 5c 26 2e 0a 54 68 69 73 20 6f 70 74 69 6f 6e 20 \&..This option
4400: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c is new for TclTL
4410: 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 52 45 0a 2e S 1\&.8\&...RE..
4420: 54 50 0a 5c 66 42 74 6c 73 3a 3a 68 61 6e 64 73 TP.\fBtls::hands
4430: 68 61 6b 65 5c 66 52 20 5c 66 49 63 68 61 6e 6e hake\fR \fIchann
4440: 65 6c 5c 66 52 0a 46 6f 72 63 65 73 20 74 68 65 el\fR.Forces the
4450: 20 54 4c 53 20 6e 65 67 6f 74 69 61 74 69 6f 6e TLS negotiation
4460: 20 68 61 6e 64 73 68 61 6b 65 20 74 6f 20 74 61 handshake to ta
4470: 6b 65 20 70 6c 61 63 65 20 69 6d 6d 65 64 69 61 ke place immedia
4480: 74 65 6c 79 2c 20 61 6e 64 20 72 65 74 75 72 6e tely, and return
4490: 73 20 30 0a 69 66 20 68 61 6e 64 73 68 61 6b 65 s 0.if handshake
44a0: 20 69 73 20 73 74 69 6c 6c 20 69 6e 20 70 72 6f is still in pro
44b0: 67 72 65 73 73 20 28 6e 6f 6e 2d 62 6c 6f 63 6b gress (non-block
44c0: 69 6e 67 29 2c 20 6f 72 20 31 20 69 66 20 74 68 ing), or 1 if th
44d0: 65 20 68 61 6e 64 73 68 61 6b 65 20 77 61 73 0a e handshake was.
44e0: 73 75 63 63 65 73 73 66 75 6c 5c 26 2e 20 49 66 successful\&. If
44f0: 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 66 the handshake f
4500: 61 69 6c 65 64 2c 20 61 6e 20 65 72 72 6f 72 20 ailed, an error
4510: 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 will be returned
4520: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a \&...TP.\fBtls::
4530: 73 68 75 74 64 6f 77 6e 5c 66 52 20 5c 66 49 63 shutdown\fR \fIc
4540: 68 61 6e 6e 65 6c 5c 66 52 0a 2e 54 50 0a 5c 66 hannel\fR..TP.\f
4550: 42 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 5c 66 Btls::unimport\f
4560: 52 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 0a R \fIchannel\fR.
4570: 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 75 6e 73 74 .TP.\fBtls::unst
4580: 61 63 6b 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 ack\fR \fIchanne
4590: 6c 5c 66 52 0a 54 68 69 73 20 74 65 72 6d 69 6e l\fR.This termin
45a0: 61 74 65 73 20 74 68 65 20 53 53 4c 2f 54 4c 53 ates the SSL/TLS
45b0: 20 73 65 73 73 69 6f 6e 20 62 79 20 73 65 6e 64 session by send
45c0: 69 6e 67 20 74 68 65 20 22 63 6c 6f 73 65 5f 6e ing the "close_n
45d0: 6f 74 69 66 79 22 20 6d 65 73 73 61 67 65 20 61 otify" message a
45e0: 6e 64 0a 72 65 6d 6f 76 65 73 20 74 68 65 20 74 nd.removes the t
45f0: 6f 70 20 6c 65 76 65 6c 20 73 74 61 63 6b 65 64 op level stacked
4600: 20 63 68 61 6e 6e 65 6c 20 66 72 6f 6d 20 5c 66 channel from \f
4610: 49 63 68 61 6e 6e 65 6c 5c 66 52 2c 20 62 75 74 Ichannel\fR, but
4620: 20 69 74 20 64 6f 65 73 20 6e 6f 74 20 63 6c 6f it does not clo
4630: 73 65 0a 74 68 65 20 73 6f 63 6b 65 74 5c 26 2e se.the socket\&.
4640: 20 49 74 20 69 73 20 74 68 65 20 63 6f 6d 70 6c It is the compl
4650: 69 6d 65 6e 74 20 74 6f 20 5c 66 42 74 6c 73 3a iment to \fBtls:
4660: 3a 69 6d 70 6f 72 74 5c 66 52 20 62 79 20 65 6e :import\fR by en
4670: 64 69 6e 67 20 65 6e 63 72 79 70 74 69 6f 6e 20 ding encryption
4680: 6f 66 0a 61 20 54 43 4c 20 63 68 61 6e 6e 65 6c of.a TCL channel
4690: 5c 26 2e 20 41 6e 20 65 72 72 6f 72 20 69 73 20 \&. An error is
46a0: 74 68 72 6f 77 6e 20 69 66 20 54 4c 53 20 69 73 thrown if TLS is
46b0: 20 6e 6f 74 20 74 68 65 20 74 6f 70 20 73 74 61 not the top sta
46c0: 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20 74 79 70 cked channel typ
46d0: 65 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a e\&...TP.\fBtls:
46e0: 3a 73 74 61 74 75 73 5c 66 52 20 3f 5c 66 42 2d :status\fR ?\fB-
46f0: 6c 6f 63 61 6c 5c 66 52 3f 20 5c 66 49 63 68 61 local\fR? \fIcha
4700: 6e 6e 65 6c 5c 66 52 0a 52 65 74 75 72 6e 73 20 nnel\fR.Returns
4710: 74 68 65 20 63 75 72 72 65 6e 74 20 73 74 61 74 the current stat
4720: 75 73 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 us of an SSL cha
4730: 6e 6e 65 6c 5c 26 2e 20 54 68 65 20 72 65 73 75 nnel\&. The resu
4740: 6c 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 lt is a list of
4750: 6b 65 79 2d 76 61 6c 75 65 0a 70 61 69 72 73 20 key-value.pairs
4760: 64 65 73 63 72 69 62 69 6e 67 20 74 68 65 20 53 describing the S
4770: 53 4c 2c 20 63 65 72 74 69 66 69 63 61 74 65 2c SL, certificate,
4780: 20 61 6e 64 20 63 65 72 74 69 66 69 63 61 74 65 and certificate
4790: 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 73 74 verification st
47a0: 61 74 75 73 5c 26 2e 20 49 66 0a 74 68 65 20 53 atus\&. If.the S
47b0: 53 4c 20 68 61 6e 64 73 68 61 6b 65 20 68 61 73 SL handshake has
47c0: 20 6e 6f 74 20 79 65 74 20 63 6f 6d 70 6c 65 74 not yet complet
47d0: 65 64 2c 20 61 6e 20 65 6d 70 74 79 20 6c 69 73 ed, an empty lis
47e0: 74 20 69 73 20 72 65 74 75 72 6e 65 64 5c 26 2e t is returned\&.
47f0: 20 49 66 20 74 68 65 0a 5c 66 42 2d 6c 6f 63 61 If the.\fB-loca
4800: 6c 5c 66 52 20 6f 70 74 69 6f 6e 20 69 73 20 73 l\fR option is s
4810: 70 65 63 69 66 69 65 64 2c 20 74 68 65 6e 20 74 pecified, then t
4820: 68 65 20 6c 6f 63 61 6c 20 63 65 72 74 69 66 69 he local certifi
4830: 63 61 74 65 20 69 73 20 75 73 65 64 5c 26 2e 0a cate is used\&..
4840: 52 65 74 75 72 6e 65 64 20 76 61 6c 75 65 73 20 Returned values
4850: 69 6e 63 6c 75 64 65 3a 0a 2e 73 70 0a 53 53 4c include:..sp.SSL
4860: 20 53 74 61 74 75 73 0a 2e 52 53 0a 2e 54 50 0a Status..RS..TP.
4870: 5c 66 42 61 6c 70 6e 5c 66 52 20 5c 66 49 70 72 \fBalpn\fR \fIpr
4880: 6f 74 6f 63 6f 6c 5c 66 52 0a 54 68 65 20 70 72 otocol\fR.The pr
4890: 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 otocol selected
48a0: 61 66 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f after Applicatio
48b0: 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c n-Layer Protocol
48c0: 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c Negotiation (AL
48d0: 50 4e 29 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 PN)\&..This valu
48e0: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
48f0: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 TLS 1\&.8\&...TP
4900: 0a 5c 66 42 63 69 70 68 65 72 5c 66 52 20 5c 66 .\fBcipher\fR \f
4910: 49 63 69 70 68 65 72 5c 66 52 0a 54 68 65 20 63 Icipher\fR.The c
4920: 75 72 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e urrent cipher in
4930: 20 75 73 65 20 66 6f 72 20 74 68 65 20 73 65 73 use for the ses
4940: 73 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 70 sion\&...TP.\fBp
4950: 65 65 72 6e 61 6d 65 5c 66 52 20 5c 66 49 6e 61 eername\fR \fIna
4960: 6d 65 5c 66 52 0a 54 68 65 20 70 65 65 72 6e 61 me\fR.The peerna
4970: 6d 65 20 66 72 6f 6d 20 74 68 65 20 63 65 72 74 me from the cert
4980: 69 66 69 63 61 74 65 5c 26 2e 0a 54 68 69 73 20 ificate\&..This
4990: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
49a0: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
49b0: 0a 2e 54 50 0a 5c 66 42 70 72 6f 74 6f 63 6f 6c ..TP.\fBprotocol
49c0: 5c 66 52 20 5c 66 49 76 65 72 73 69 6f 6e 5c 66 \fR \fIversion\f
49d0: 52 0a 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76 R.The protocol v
49e0: 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f 72 20 ersion used for
49f0: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a 20 the connection:
4a00: 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 SSL2, SSL3, TLS1
4a10: 2c 20 54 4c 53 31 5c 26 2e 31 2c 20 54 4c 53 31 , TLS1\&.1, TLS1
4a20: 5c 26 2e 32 2c 0a 54 4c 53 31 5c 26 2e 33 2c 20 \&.2,.TLS1\&.3,
4a30: 6f 72 20 75 6e 6b 6e 6f 77 6e 5c 26 2e 20 54 68 or unknown\&. Th
4a40: 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 is value is new
4a50: 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 for TclTLS 1\&.8
4a60: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 62 69 74 73 \&...TP.\fBsbits
4a70: 5c 66 52 20 5c 66 49 6e 5c 66 52 0a 54 68 65 20 \fR \fIn\fR.The
4a80: 6e 75 6d 62 65 72 20 6f 66 20 62 69 74 73 20 75 number of bits u
4a90: 73 65 64 20 66 6f 72 20 74 68 65 20 73 65 73 73 sed for the sess
4aa0: 69 6f 6e 20 6b 65 79 5c 26 2e 0a 2e 54 50 0a 5c ion key\&...TP.\
4ab0: 66 42 73 69 67 6e 61 74 75 72 65 48 61 73 68 41 fBsignatureHashA
4ac0: 6c 67 6f 72 69 74 68 6d 5c 66 52 20 5c 66 49 61 lgorithm\fR \fIa
4ad0: 6c 67 6f 72 69 74 68 6d 5c 66 52 0a 54 68 65 20 lgorithm\fR.The
4ae0: 73 69 67 6e 61 74 75 72 65 20 68 61 73 68 20 61 signature hash a
4af0: 6c 67 6f 72 69 74 68 6d 5c 26 2e 0a 54 68 69 73 lgorithm\&..This
4b00: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f value is new fo
4b10: 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 r TclTLS 1\&.8\&
4b20: 2e 0a 2e 54 50 0a 5c 66 42 73 69 67 6e 61 74 75 ...TP.\fBsignatu
4b30: 72 65 54 79 70 65 5c 66 52 20 5c 66 49 74 79 70 reType\fR \fItyp
4b40: 65 5c 66 52 0a 54 68 65 20 73 69 67 6e 61 74 75 e\fR.The signatu
4b50: 72 65 20 74 79 70 65 20 76 61 6c 75 65 5c 26 2e re type value\&.
4b60: 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e .This value is n
4b70: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c ew for TclTLS 1\
4b80: 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 76 65 &.8\&...TP.\fBve
4b90: 72 69 66 79 44 65 70 74 68 5c 66 52 20 5c 66 49 rifyDepth\fR \fI
4ba0: 6e 5c 66 52 0a 4d 61 78 69 6d 75 6d 20 64 65 70 n\fR.Maximum dep
4bb0: 74 68 20 66 6f 72 20 74 68 65 20 63 65 72 74 69 th for the certi
4bc0: 66 69 63 61 74 65 20 63 68 61 69 6e 20 76 65 72 ficate chain ver
4bd0: 69 66 69 63 61 74 69 6f 6e 5c 26 2e 20 44 65 66 ification\&. Def
4be0: 61 75 6c 74 20 69 73 20 2d 31 2c 20 74 6f 20 63 ault is -1, to c
4bf0: 68 65 63 6b 20 61 6c 6c 5c 26 2e 0a 54 68 69 73 heck all\&..This
4c00: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f value is new fo
4c10: 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 r TclTLS 1\&.8\&
4c20: 2e 0a 2e 54 50 0a 5c 66 42 76 65 72 69 66 79 4d ...TP.\fBverifyM
4c30: 6f 64 65 5c 66 52 20 5c 66 49 6c 69 73 74 5c 66 ode\fR \fIlist\f
4c40: 52 0a 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 R.List of certif
4c50: 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69 icate verificati
4c60: 6f 6e 20 6d 6f 64 65 73 5c 26 2e 0a 54 68 69 73 on modes\&..This
4c70: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f value is new fo
4c80: 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 r TclTLS 1\&.8\&
4c90: 2e 0a 2e 54 50 0a 5c 66 42 76 65 72 69 66 79 52 ...TP.\fBverifyR
4ca0: 65 73 75 6c 74 5c 66 52 20 5c 66 49 72 65 73 75 esult\fR \fIresu
4cb0: 6c 74 5c 66 52 0a 43 65 72 74 69 66 69 63 61 74 lt\fR.Certificat
4cc0: 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 72 e verification r
4cd0: 65 73 75 6c 74 5c 26 2e 0a 54 68 69 73 20 76 61 esult\&..This va
4ce0: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 lue is new for T
4cf0: 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e clTLS 1\&.8\&...
4d00: 54 50 0a 5c 66 42 63 61 5f 6e 61 6d 65 73 5c 66 TP.\fBca_names\f
4d10: 52 20 5c 66 49 6c 69 73 74 5c 66 52 0a 4c 69 73 R \fIlist\fR.Lis
4d20: 74 20 6f 66 20 74 68 65 20 43 65 72 74 69 66 69 t of the Certifi
4d30: 63 61 74 65 20 41 75 74 68 6f 72 69 74 69 65 73 cate Authorities
4d40: 20 75 73 65 64 20 74 6f 20 63 72 65 61 74 65 20 used to create
4d50: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 5c the certificate\
4d60: 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 &..This value is
4d70: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
4d80: 31 5c 26 2e 38 5c 26 2e 0a 2e 52 45 0a 2e 49 50 1\&.8\&...RE..IP
4d90: 0a 43 65 72 74 69 66 69 63 61 74 65 20 53 74 61 .Certificate Sta
4da0: 74 75 73 0a 2e 52 53 0a 2e 54 50 0a 5c 66 42 61 tus..RS..TP.\fBa
4db0: 6c 6c 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c ll\fR \fIstring\
4dc0: 66 52 0a 44 75 6d 70 20 6f 66 20 61 6c 6c 20 63 fR.Dump of all c
4dd0: 65 72 74 69 66 69 63 61 74 65 20 69 6e 66 6f 5c ertificate info\
4de0: 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 &..This value is
4df0: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
4e00: 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 1\&.8\&...TP.\fB
4e10: 76 65 72 73 69 6f 6e 5c 66 52 20 5c 66 49 76 61 version\fR \fIva
4e20: 6c 75 65 5c 66 52 0a 54 68 65 20 63 65 72 74 69 lue\fR.The certi
4e30: 66 69 63 61 74 65 20 76 65 72 73 69 6f 6e 5c 26 ficate version\&
4e40: 2e 0a 2e 54 50 0a 5c 66 42 73 65 72 69 61 6c 4e ...TP.\fBserialN
4e50: 75 6d 62 65 72 5c 66 52 20 5c 66 49 73 74 72 69 umber\fR \fIstri
4e60: 6e 67 5c 66 52 0a 54 68 65 20 73 65 72 69 61 6c ng\fR.The serial
4e70: 20 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 63 number of the c
4e80: 65 72 74 69 66 69 63 61 74 65 20 61 73 20 61 20 ertificate as a
4e90: 68 65 78 20 73 74 72 69 6e 67 5c 26 2e 0a 54 68 hex string\&..Th
4ea0: 69 73 20 76 61 6c 75 65 20 77 61 73 20 63 68 61 is value was cha
4eb0: 6e 67 65 64 20 66 72 6f 6d 20 73 65 72 69 61 6c nged from serial
4ec0: 20 69 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 in TclTLS 1\&.8
4ed0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 69 67 6e 61 \&...TP.\fBsigna
4ee0: 74 75 72 65 5c 66 52 20 5c 66 49 61 6c 67 6f 72 ture\fR \fIalgor
4ef0: 69 74 68 6d 5c 66 52 0a 43 69 70 68 65 72 20 61 ithm\fR.Cipher a
4f00: 6c 67 6f 72 69 74 68 6d 20 75 73 65 64 20 66 6f lgorithm used fo
4f10: 72 20 63 65 72 74 69 66 69 63 61 74 65 20 73 69 r certificate si
4f20: 67 6e 61 74 75 72 65 5c 26 2e 0a 54 68 69 73 20 gnature\&..This
4f30: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
4f40: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
4f50: 0a 2e 54 50 0a 5c 66 42 69 73 73 75 65 72 5c 66 ..TP.\fBissuer\f
4f60: 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 54 R \fIstring\fR.T
4f70: 68 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 he distinguished
4f80: 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 name (DN) of th
4f90: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 e certificate is
4fa0: 73 75 65 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 6e suer\&...TP.\fBn
4fb0: 6f 74 42 65 66 6f 72 65 5c 66 52 20 5c 66 49 64 otBefore\fR \fId
4fc0: 61 74 65 5c 66 52 0a 54 68 65 20 62 65 67 69 6e ate\fR.The begin
4fd0: 6e 69 6e 67 20 64 61 74 65 20 6f 66 20 74 68 65 ning date of the
4fe0: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61 6c certificate val
4ff0: 69 64 69 74 79 5c 26 2e 0a 2e 54 50 0a 5c 66 42 idity\&...TP.\fB
5000: 6e 6f 74 41 66 74 65 72 5c 66 52 20 5c 66 49 64 notAfter\fR \fId
5010: 61 74 65 5c 66 52 0a 54 68 65 20 65 78 70 69 72 ate\fR.The expir
5020: 61 74 69 6f 6e 20 64 61 74 65 20 6f 66 20 74 68 ation date of th
5030: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61 e certificate va
5040: 6c 69 64 69 74 79 5c 26 2e 0a 2e 54 50 0a 5c 66 lidity\&...TP.\f
5050: 42 73 75 62 6a 65 63 74 5c 66 52 20 5c 66 49 73 Bsubject\fR \fIs
5060: 74 72 69 6e 67 5c 66 52 0a 54 68 65 20 64 69 73 tring\fR.The dis
5070: 74 69 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 20 tinguished name
5080: 28 44 4e 29 20 6f 66 20 74 68 65 20 63 65 72 74 (DN) of the cert
5090: 69 66 69 63 61 74 65 20 73 75 62 6a 65 63 74 5c ificate subject\
50a0: 26 2e 20 46 69 65 6c 64 73 20 69 6e 63 6c 75 64 &. Fields includ
50b0: 65 3a 20 43 6f 6d 6d 6f 6e 0a 4e 61 6d 65 20 28 e: Common.Name (
50c0: 43 4e 29 2c 20 4f 72 67 61 6e 69 7a 61 74 69 6f CN), Organizatio
50d0: 6e 20 28 4f 29 2c 20 4c 6f 63 61 6c 69 74 79 20 n (O), Locality
50e0: 6f 72 20 43 69 74 79 20 28 4c 29 2c 20 53 74 61 or City (L), Sta
50f0: 74 65 20 6f 72 20 50 72 6f 76 69 6e 63 65 20 28 te or Province (
5100: 53 29 2c 20 61 6e 64 0a 43 6f 75 6e 74 72 79 20 S), and.Country
5110: 4e 61 6d 65 20 28 43 29 5c 26 2e 0a 2e 54 50 0a Name (C)\&...TP.
5120: 5c 66 42 69 73 73 75 65 72 55 6e 69 71 75 65 49 \fBissuerUniqueI
5130: 44 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 D\fR \fIstring\f
5140: 52 0a 54 68 65 20 69 73 73 75 65 72 20 75 6e 69 R.The issuer uni
5150: 71 75 65 20 69 64 5c 26 2e 0a 54 68 69 73 20 76 que id\&..This v
5160: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 alue is new for
5170: 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a TclTLS 1\&.8\&..
5180: 2e 54 50 0a 5c 66 42 73 75 62 6a 65 63 74 55 6e .TP.\fBsubjectUn
5190: 69 71 75 65 49 44 5c 66 52 20 5c 66 49 73 74 72 iqueID\fR \fIstr
51a0: 69 6e 67 5c 66 52 0a 54 68 65 20 73 75 62 6a 65 ing\fR.The subje
51b0: 63 74 20 75 6e 69 71 75 65 20 69 64 5c 26 2e 0a ct unique id\&..
51c0: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 This value is ne
51d0: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 w for TclTLS 1\&
51e0: 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 6e 75 6d .8\&...TP.\fBnum
51f0: 5f 65 78 74 65 6e 73 69 6f 6e 73 5c 66 52 20 5c _extensions\fR \
5200: 66 49 6e 5c 66 52 0a 4e 75 6d 62 65 72 20 6f 66 fIn\fR.Number of
5210: 20 63 65 72 74 69 66 69 63 61 74 65 20 65 78 74 certificate ext
5220: 65 6e 73 69 6f 6e 73 5c 26 2e 0a 54 68 69 73 20 ensions\&..This
5230: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
5240: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
5250: 0a 2e 54 50 0a 5c 66 42 65 78 74 65 6e 73 69 6f ..TP.\fBextensio
5260: 6e 73 5c 66 52 20 5c 66 49 6c 69 73 74 5c 66 52 ns\fR \fIlist\fR
5270: 0a 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 69 .List of certifi
5280: 63 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 20 6e cate extension n
5290: 61 6d 65 73 5c 26 2e 0a 54 68 69 73 20 76 61 6c ames\&..This val
52a0: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 ue is new for Tc
52b0: 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 lTLS 1\&.8\&...T
52c0: 50 0a 5c 66 42 61 75 74 68 6f 72 69 74 79 4b 65 P.\fBauthorityKe
52d0: 79 49 64 65 6e 74 69 66 69 65 72 5c 66 52 20 5c yIdentifier\fR \
52e0: 66 49 73 74 72 69 6e 67 5c 66 52 0a 41 75 74 68 fIstring\fR.Auth
52f0: 6f 72 69 74 79 20 4b 65 79 20 49 64 65 6e 74 69 ority Key Identi
5300: 66 69 65 72 20 28 41 4b 49 29 20 6f 66 20 74 68 fier (AKI) of th
5310: 65 20 49 73 73 75 69 6e 67 20 43 41 20 63 65 72 e Issuing CA cer
5320: 74 69 66 69 63 61 74 65 20 74 68 61 74 20 73 69 tificate that si
5330: 67 6e 65 64 20 74 68 65 0a 53 53 4c 20 63 65 72 gned the.SSL cer
5340: 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68 65 tificate as a he
5350: 78 20 73 74 72 69 6e 67 5c 26 2e 20 54 68 69 73 x string\&. This
5360: 20 76 61 6c 75 65 20 6d 61 74 63 68 65 73 20 74 value matches t
5370: 68 65 20 53 4b 49 20 76 61 6c 75 65 20 6f 66 20 he SKI value of
5380: 74 68 65 0a 49 6e 74 65 72 6d 65 64 69 61 74 65 the.Intermediate
5390: 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 5c CA certificate\
53a0: 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 &..This value is
53b0: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
53c0: 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 1\&.8\&...TP.\fB
53d0: 73 75 62 6a 65 63 74 4b 65 79 49 64 65 6e 74 69 subjectKeyIdenti
53e0: 66 69 65 72 5c 66 52 20 5c 66 49 73 74 72 69 6e fier\fR \fIstrin
53f0: 67 5c 66 52 0a 53 75 62 6a 65 63 74 20 4b 65 79 g\fR.Subject Key
5400: 20 49 64 65 6e 74 69 66 69 65 72 20 28 53 4b 49 Identifier (SKI
5410: 29 20 68 61 73 68 20 6f 66 20 74 68 65 20 70 75 ) hash of the pu
5420: 62 6c 69 63 20 6b 65 79 20 69 6e 73 69 64 65 20 blic key inside
5430: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
5440: 61 73 20 61 0a 68 65 78 20 73 74 72 69 6e 67 5c as a.hex string\
5450: 26 2e 20 55 73 65 64 20 74 6f 20 69 64 65 6e 74 &. Used to ident
5460: 69 66 79 20 63 65 72 74 69 66 69 63 61 74 65 73 ify certificates
5470: 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 20 61 20 that contain a
5480: 70 61 72 74 69 63 75 6c 61 72 20 70 75 62 6c 69 particular publi
5490: 63 20 6b 65 79 5c 26 2e 0a 54 68 69 73 20 76 61 c key\&..This va
54a0: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 lue is new for T
54b0: 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e clTLS 1\&.8\&...
54c0: 54 50 0a 5c 66 42 73 75 62 6a 65 63 74 41 6c 74 TP.\fBsubjectAlt
54d0: 4e 61 6d 65 5c 66 52 20 5c 66 49 6c 69 73 74 5c Name\fR \fIlist\
54e0: 66 52 0a 4c 69 73 74 20 6f 66 20 61 6c 6c 20 6f fR.List of all o
54f0: 66 20 74 68 65 20 53 75 62 6a 65 63 74 20 41 6c f the Subject Al
5500: 74 65 72 6e 61 74 69 76 65 20 4e 61 6d 65 73 20 ternative Names
5510: 28 53 41 4e 29 20 69 6e 63 6c 75 64 69 6e 67 20 (SAN) including
5520: 64 6f 6d 61 69 6e 20 6e 61 6d 65 73 2c 20 73 75 domain names, su
5530: 62 0a 64 6f 6d 61 69 6e 73 2c 20 61 6e 64 20 49 b.domains, and I
5540: 50 20 61 64 64 72 65 73 73 65 73 20 74 68 61 74 P addresses that
5550: 20 61 72 65 20 73 65 63 75 72 65 64 20 62 79 20 are secured by
5560: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 5c the certificate\
5570: 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 &..This value is
5580: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
5590: 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 1\&.8\&...TP.\fB
55a0: 6f 63 73 70 5c 66 52 20 5c 66 49 6c 69 73 74 5c ocsp\fR \fIlist\
55b0: 66 52 0a 4c 69 73 74 20 6f 66 20 61 6c 6c 20 4f fR.List of all O
55c0: 6e 6c 69 6e 65 20 43 65 72 74 69 66 69 63 61 74 nline Certificat
55d0: 65 20 53 74 61 74 75 73 20 50 72 6f 74 6f 63 6f e Status Protoco
55e0: 6c 20 28 4f 43 53 50 29 20 55 52 4c 73 20 74 68 l (OCSP) URLs th
55f0: 61 74 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 at can be used t
5600: 6f 0a 63 68 65 63 6b 20 74 68 65 20 76 61 6c 69 o.check the vali
5610: 64 69 74 79 20 6f 66 20 74 68 69 73 20 63 65 72 dity of this cer
5620: 74 69 66 69 63 61 74 65 5c 26 2e 0a 54 68 69 73 tificate\&..This
5630: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f value is new fo
5640: 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 r TclTLS 1\&.8\&
5650: 2e 0a 2e 54 50 0a 5c 66 42 63 65 72 74 69 66 69 ...TP.\fBcertifi
5660: 63 61 74 65 5c 66 52 20 5c 66 49 63 65 72 74 5c cate\fR \fIcert\
5670: 66 52 0a 54 68 65 20 50 45 4d 20 65 6e 63 6f 64 fR.The PEM encod
5680: 65 64 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 ed certificate\&
5690: 2e 0a 2e 54 50 0a 5c 66 42 73 69 67 6e 61 74 75 ...TP.\fBsignatu
56a0: 72 65 41 6c 67 6f 72 69 74 68 6d 5c 66 52 20 5c reAlgorithm\fR \
56b0: 66 49 61 6c 67 6f 72 69 74 68 6d 5c 66 52 0a 43 fIalgorithm\fR.C
56c0: 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d 20 ipher algorithm
56d0: 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 65 72 used for the cer
56e0: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 tificate signatu
56f0: 72 65 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 re\&..This value
5700: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
5710: 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a LS 1\&.8\&...TP.
5720: 5c 66 42 73 69 67 6e 61 74 75 72 65 56 61 6c 75 \fBsignatureValu
5730: 65 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 e\fR \fIstring\f
5740: 52 0a 43 65 72 74 69 66 69 63 61 74 65 20 73 69 R.Certificate si
5750: 67 6e 61 74 75 72 65 20 61 73 20 61 20 68 65 78 gnature as a hex
5760: 20 73 74 72 69 6e 67 5c 26 2e 0a 54 68 69 73 20 string\&..This
5770: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
5780: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
5790: 0a 2e 54 50 0a 5c 66 42 73 69 67 6e 61 74 75 72 ..TP.\fBsignatur
57a0: 65 44 69 67 65 73 74 5c 66 52 20 5c 66 49 76 65 eDigest\fR \fIve
57b0: 72 73 69 6f 6e 5c 66 52 0a 43 65 72 74 69 66 69 rsion\fR.Certifi
57c0: 63 61 74 65 20 73 69 67 6e 69 6e 67 20 64 69 67 cate signing dig
57d0: 65 73 74 20 61 73 20 61 20 68 65 78 20 73 74 72 est as a hex str
57e0: 69 6e 67 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 ing\&..This valu
57f0: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
5800: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 TLS 1\&.8\&...TP
5810: 0a 5c 66 42 70 75 62 6c 69 63 4b 65 79 41 6c 67 .\fBpublicKeyAlg
5820: 6f 72 69 74 68 6d 5c 66 52 20 5c 66 49 61 6c 67 orithm\fR \fIalg
5830: 6f 72 69 74 68 6d 5c 66 52 0a 43 65 72 74 69 66 orithm\fR.Certif
5840: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 icate signature
5850: 70 75 62 6c 69 63 20 6b 65 79 20 61 6c 67 6f 72 public key algor
5860: 69 74 68 6d 5c 26 2e 0a 54 68 69 73 20 76 61 6c ithm\&..This val
5870: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 ue is new for Tc
5880: 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 lTLS 1\&.8\&...T
5890: 50 0a 5c 66 42 70 75 62 6c 69 63 4b 65 79 5c 66 P.\fBpublicKey\f
58a0: 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 43 R \fIstring\fR.C
58b0: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 ertificate signa
58c0: 74 75 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20 ture public key
58d0: 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 5c as a hex string\
58e0: 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 &..This value is
58f0: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
5900: 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 1\&.8\&...TP.\fB
5910: 62 69 74 73 5c 66 52 20 5c 66 49 6e 5c 66 52 0a bits\fR \fIn\fR.
5920: 4e 75 6d 62 65 72 20 6f 66 20 62 69 74 73 20 75 Number of bits u
5930: 73 65 64 20 66 6f 72 20 63 65 72 74 69 66 69 63 sed for certific
5940: 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 6b 65 ate signature ke
5950: 79 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 y\&..This value
5960: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c is new for TclTL
5970: 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c S 1\&.8\&...TP.\
5980: 66 42 73 65 6c 66 5f 73 69 67 6e 65 64 5c 66 52 fBself_signed\fR
5990: 20 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a 57 \fIboolean\fR.W
59a0: 68 65 74 68 65 72 20 74 68 65 20 63 65 72 74 69 hether the certi
59b0: 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 ficate signature
59c0: 20 69 73 20 73 65 6c 66 20 73 69 67 6e 65 64 5c is self signed\
59d0: 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 &..This value is
59e0: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
59f0: 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 1\&.8\&...TP.\fB
5a00: 73 68 61 31 5f 68 61 73 68 5c 66 52 20 5c 66 49 sha1_hash\fR \fI
5a10: 68 61 73 68 5c 66 52 0a 54 68 65 20 53 48 41 31 hash\fR.The SHA1
5a20: 20 68 61 73 68 20 6f 66 20 74 68 65 20 63 65 72 hash of the cer
5a30: 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68 65 tificate as a he
5a40: 78 20 73 74 72 69 6e 67 5c 26 2e 0a 54 68 69 73 x string\&..This
5a50: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f value is new fo
5a60: 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 r TclTLS 1\&.8\&
5a70: 2e 0a 2e 54 50 0a 5c 66 42 73 68 61 32 35 36 5f ...TP.\fBsha256_
5a80: 68 61 73 68 5c 66 52 20 5c 66 49 68 61 73 68 5c hash\fR \fIhash\
5a90: 66 52 0a 54 68 65 20 53 48 41 32 35 36 20 68 61 fR.The SHA256 ha
5aa0: 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 sh of the certif
5ab0: 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73 icate as a hex s
5ac0: 74 72 69 6e 67 5c 26 2e 0a 54 68 69 73 20 76 61 tring\&..This va
5ad0: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 lue is new for T
5ae0: 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e clTLS 1\&.8\&...
5af0: 52 45 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 63 RE..TP.\fBtls::c
5b00: 6f 6e 6e 65 63 74 69 6f 6e 5c 66 52 20 5c 66 49 onnection\fR \fI
5b10: 63 68 61 6e 6e 65 6c 5c 66 52 0a 52 65 74 75 72 channel\fR.Retur
5b20: 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 63 ns the current c
5b30: 6f 6e 6e 65 63 74 69 6f 6e 20 73 74 61 74 75 73 onnection status
5b40: 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e of an SSL chann
5b50: 65 6c 5c 26 2e 20 54 68 65 20 72 65 73 75 6c 74 el\&. The result
5b60: 20 69 73 20 61 20 6c 69 73 74 0a 6f 66 20 6b 65 is a list.of ke
5b70: 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 65 y-value pairs de
5b80: 73 63 72 69 62 69 6e 67 20 74 68 65 20 63 6f 6e scribing the con
5b90: 6e 65 63 74 69 6f 6e 5c 26 2e 0a 54 68 69 73 20 nection\&..This
5ba0: 63 6f 6d 6d 61 6e 64 20 69 73 20 6e 65 77 20 66 command is new f
5bb0: 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c or TclTLS 1\&.8\
5bc0: 26 2e 20 52 65 74 75 72 6e 65 64 20 76 61 6c 75 &. Returned valu
5bd0: 65 73 20 69 6e 63 6c 75 64 65 3a 0a 2e 73 70 0a es include:..sp.
5be0: 53 53 4c 20 53 74 61 74 75 73 0a 2e 52 53 0a 2e SSL Status..RS..
5bf0: 54 50 0a 5c 66 42 73 74 61 74 65 5c 66 52 20 5c TP.\fBstate\fR \
5c00: 66 49 73 74 61 74 65 5c 66 52 0a 53 74 61 74 65 fIstate\fR.State
5c10: 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 of the connecti
5c20: 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 72 on\&...TP.\fBser
5c30: 76 65 72 6e 61 6d 65 5c 66 52 20 5c 66 49 6e 61 vername\fR \fIna
5c40: 6d 65 5c 66 52 0a 54 68 65 20 6e 61 6d 65 20 6f me\fR.The name o
5c50: 66 20 74 68 65 20 63 6f 6e 6e 65 63 74 65 64 20 f the connected
5c60: 74 6f 20 73 65 72 76 65 72 5c 26 2e 0a 2e 54 50 to server\&...TP
5c70: 0a 5c 66 42 70 72 6f 74 6f 63 6f 6c 5c 66 52 20 .\fBprotocol\fR
5c80: 5c 66 49 76 65 72 73 69 6f 6e 5c 66 52 0a 54 68 \fIversion\fR.Th
5c90: 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 e protocol versi
5ca0: 6f 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 on used for the
5cb0: 63 6f 6e 6e 65 63 74 69 6f 6e 3a 20 53 53 4c 32 connection: SSL2
5cc0: 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c , SSL3, TLS1, TL
5cd0: 53 31 5c 26 2e 31 2c 20 54 4c 53 31 5c 26 2e 32 S1\&.1, TLS1\&.2
5ce0: 2c 20 54 4c 53 31 5c 26 2e 33 2c 20 6f 72 20 75 , TLS1\&.3, or u
5cf0: 6e 6b 6e 6f 77 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 nknown\&...TP.\f
5d00: 42 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 5f 61 Brenegotiation_a
5d10: 6c 6c 6f 77 65 64 5c 66 52 20 5c 66 49 62 6f 6f llowed\fR \fIboo
5d20: 6c 65 61 6e 5c 66 52 0a 57 68 65 74 68 65 72 20 lean\fR.Whether
5d30: 70 72 6f 74 6f 63 6f 6c 20 72 65 6e 65 67 6f 74 protocol renegot
5d40: 69 61 74 69 6f 6e 20 69 73 20 73 75 70 70 6f 72 iation is suppor
5d50: 74 65 64 20 6f 72 20 6e 6f 74 5c 26 2e 0a 2e 54 ted or not\&...T
5d60: 50 0a 5c 66 42 73 65 63 75 72 69 74 79 5f 6c 65 P.\fBsecurity_le
5d70: 76 65 6c 5c 66 52 20 5c 66 49 6c 65 76 65 6c 5c vel\fR \fIlevel\
5d80: 66 52 0a 54 68 65 20 73 65 63 75 72 69 74 79 20 fR.The security
5d90: 6c 65 76 65 6c 20 75 73 65 64 20 66 6f 72 20 73 level used for s
5da0: 65 6c 65 63 74 69 6f 6e 20 6f 66 20 63 69 70 68 election of ciph
5db0: 65 72 73 2c 20 6b 65 79 20 73 69 7a 65 2c 20 65 ers, key size, e
5dc0: 74 63 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 73 tc\&...TP.\fBses
5dd0: 73 69 6f 6e 5f 72 65 75 73 65 64 5c 66 52 20 5c sion_reused\fR \
5de0: 66 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a 57 68 65 fIboolean\fR.Whe
5df0: 74 68 65 72 20 74 68 65 20 73 65 73 73 69 6f 6e ther the session
5e00: 20 68 61 73 20 62 65 65 6e 20 72 65 75 73 65 64 has been reused
5e10: 20 6f 72 20 6e 6f 74 5c 26 2e 0a 2e 54 50 0a 5c or not\&...TP.\
5e20: 66 42 69 73 5f 73 65 72 76 65 72 5c 66 52 20 5c fBis_server\fR \
5e30: 66 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a 57 68 65 fIboolean\fR.Whe
5e40: 74 68 65 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 ther the connect
5e50: 69 6f 6e 20 69 73 20 63 6f 6e 66 69 67 75 72 65 ion is configure
5e60: 64 20 61 73 20 61 20 73 65 72 76 65 72 20 28 31 d as a server (1
5e70: 29 20 6f 72 20 63 6c 69 65 6e 74 20 28 30 29 5c ) or client (0)\
5e80: 26 2e 0a 2e 54 50 0a 5c 66 42 63 6f 6d 70 72 65 &...TP.\fBcompre
5e90: 73 73 69 6f 6e 5c 66 52 20 5c 66 49 6d 6f 64 65 ssion\fR \fImode
5ea0: 5c 66 52 0a 43 6f 6d 70 72 65 73 73 69 6f 6e 20 \fR.Compression
5eb0: 6d 65 74 68 6f 64 5c 26 2e 0a 2e 54 50 0a 5c 66 method\&...TP.\f
5ec0: 42 65 78 70 61 6e 73 69 6f 6e 5c 66 52 20 5c 66 Bexpansion\fR \f
5ed0: 49 6d 6f 64 65 5c 66 52 0a 45 78 70 61 6e 73 69 Imode\fR.Expansi
5ee0: 6f 6e 20 6d 65 74 68 6f 64 5c 26 2e 0a 2e 54 50 on method\&...TP
5ef0: 0a 5c 66 42 63 61 4c 69 73 74 5c 66 52 20 5c 66 .\fBcaList\fR \f
5f00: 49 6c 69 73 74 5c 66 52 0a 4c 69 73 74 20 6f 66 Ilist\fR.List of
5f10: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 Certificate Aut
5f20: 68 6f 72 69 74 69 65 73 20 28 43 41 29 20 66 6f horities (CA) fo
5f30: 72 20 58 5c 26 2e 35 30 39 20 63 65 72 74 69 66 r X\&.509 certif
5f40: 69 63 61 74 65 5c 26 2e 0a 2e 52 45 0a 2e 49 50 icate\&...RE..IP
5f50: 0a 43 69 70 68 65 72 20 49 6e 66 6f 0a 2e 52 53 .Cipher Info..RS
5f60: 0a 2e 54 50 0a 5c 66 42 63 69 70 68 65 72 5c 66 ..TP.\fBcipher\f
5f70: 52 20 5c 66 49 63 69 70 68 65 72 5c 66 52 0a 54 R \fIcipher\fR.T
5f80: 68 65 20 63 75 72 72 65 6e 74 20 63 69 70 68 65 he current ciphe
5f90: 72 20 69 6e 20 75 73 65 20 66 6f 72 20 74 68 65 r in use for the
5fa0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 5c 26 2e 0a 2e connection\&...
5fb0: 54 50 0a 5c 66 42 73 74 61 6e 64 61 72 64 5f 6e TP.\fBstandard_n
5fc0: 61 6d 65 5c 66 52 20 5c 66 49 6e 61 6d 65 5c 66 ame\fR \fIname\f
5fd0: 52 0a 54 68 65 20 73 74 61 6e 64 61 72 64 20 52 R.The standard R
5fe0: 46 43 20 6e 61 6d 65 20 6f 66 20 63 69 70 68 65 FC name of ciphe
5ff0: 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 61 6c 67 6f r\&...TP.\fBalgo
6000: 72 69 74 68 6d 5f 62 69 74 73 5c 66 52 20 5c 66 rithm_bits\fR \f
6010: 49 6e 5c 66 52 0a 54 68 65 20 6e 75 6d 62 65 72 In\fR.The number
6020: 20 6f 66 20 70 72 6f 63 65 73 73 65 64 20 62 69 of processed bi
6030: 74 73 20 75 73 65 64 20 66 6f 72 20 63 69 70 68 ts used for ciph
6040: 65 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 63 er\&...TP.\fBsec
6050: 72 65 74 5f 62 69 74 73 5c 66 52 20 5c 66 49 6e ret_bits\fR \fIn
6060: 5c 66 52 0a 54 68 65 20 6e 75 6d 62 65 72 20 6f \fR.The number o
6070: 66 20 73 65 63 72 65 74 20 62 69 74 73 20 75 73 f secret bits us
6080: 65 64 20 66 6f 72 20 63 69 70 68 65 72 5c 26 2e ed for cipher\&.
6090: 0a 2e 54 50 0a 5c 66 42 6d 69 6e 5f 76 65 72 73 ..TP.\fBmin_vers
60a0: 69 6f 6e 5c 66 52 20 5c 66 49 76 65 72 73 69 6f ion\fR \fIversio
60b0: 6e 5c 66 52 0a 54 68 65 20 6d 69 6e 69 6d 75 6d n\fR.The minimum
60c0: 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f protocol versio
60d0: 6e 20 66 6f 72 20 63 69 70 68 65 72 5c 26 2e 0a n for cipher\&..
60e0: 2e 54 50 0a 5c 66 42 63 69 70 68 65 72 5f 69 73 .TP.\fBcipher_is
60f0: 5f 61 65 61 64 5c 66 52 20 5c 66 49 62 6f 6f 6c _aead\fR \fIbool
6100: 65 61 6e 5c 66 52 0a 57 68 65 74 68 65 72 20 74 ean\fR.Whether t
6110: 68 65 20 63 69 70 68 65 72 20 69 73 20 41 75 74 he cipher is Aut
6120: 68 65 6e 74 69 63 61 74 65 64 20 45 6e 63 72 79 henticated Encry
6130: 70 74 69 6f 6e 20 77 69 74 68 20 41 73 73 6f 63 ption with Assoc
6140: 69 61 74 65 64 20 44 61 74 61 20 28 41 45 41 44 iated Data (AEAD
6150: 29 5c 26 2e 0a 2e 54 50 0a 5c 66 42 63 69 70 68 )\&...TP.\fBciph
6160: 65 72 5f 69 64 5c 66 52 20 5c 66 49 69 64 5c 66 er_id\fR \fIid\f
6170: 52 0a 54 68 65 20 4f 70 65 6e 53 53 4c 20 63 69 R.The OpenSSL ci
6180: 70 68 65 72 20 69 64 5c 26 2e 0a 2e 54 50 0a 5c pher id\&...TP.\
6190: 66 42 64 65 73 63 72 69 70 74 69 6f 6e 5c 66 52 fBdescription\fR
61a0: 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 41 20 \fIstring\fR.A
61b0: 74 65 78 74 20 64 65 73 63 72 69 70 74 69 6f 6e text description
61c0: 20 6f 66 20 74 68 65 20 63 69 70 68 65 72 5c 26 of the cipher\&
61d0: 2e 0a 2e 54 50 0a 5c 66 42 68 61 6e 64 73 68 61 ...TP.\fBhandsha
61e0: 6b 65 5f 64 69 67 65 73 74 5c 66 52 20 5c 66 49 ke_digest\fR \fI
61f0: 62 6f 6f 6c 65 61 6e 5c 66 52 0a 44 69 67 65 73 boolean\fR.Diges
6200: 74 20 75 73 65 64 20 64 75 72 69 6e 67 20 68 61 t used during ha
6210: 6e 64 73 68 61 6b 65 5c 26 2e 0a 2e 52 45 0a 2e ndshake\&...RE..
6220: 49 50 0a 53 65 73 73 69 6f 6e 20 49 6e 66 6f 0a IP.Session Info.
6230: 2e 52 53 0a 2e 54 50 0a 5c 66 42 61 6c 70 6e 5c .RS..TP.\fBalpn\
6240: 66 52 20 5c 66 49 70 72 6f 74 6f 63 6f 6c 5c 66 fR \fIprotocol\f
6250: 52 0a 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 73 R.The protocol s
6260: 65 6c 65 63 74 65 64 20 61 66 74 65 72 20 41 70 elected after Ap
6270: 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 20 plication-Layer
6280: 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 Protocol Negotia
6290: 74 69 6f 6e 20 28 41 4c 50 4e 29 5c 26 2e 0a 2e tion (ALPN)\&...
62a0: 54 50 0a 5c 66 42 72 65 73 75 6d 61 62 6c 65 5c TP.\fBresumable\
62b0: 66 52 20 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 52 fR \fIboolean\fR
62c0: 0a 57 68 65 74 68 65 72 20 74 68 65 20 73 65 73 .Whether the ses
62d0: 73 69 6f 6e 20 63 61 6e 20 62 65 20 72 65 73 75 sion can be resu
62e0: 6d 65 64 20 6f 72 20 6e 6f 74 5c 26 2e 0a 2e 54 med or not\&...T
62f0: 50 0a 5c 66 42 73 74 61 72 74 5f 74 69 6d 65 5c P.\fBstart_time\
6300: 66 52 20 5c 66 49 73 65 63 6f 6e 64 73 5c 66 52 fR \fIseconds\fR
6310: 0a 54 69 6d 65 20 73 69 6e 63 65 20 73 65 73 73 .Time since sess
6320: 69 6f 6e 20 73 74 61 72 74 65 64 20 69 6e 20 73 ion started in s
6330: 65 63 6f 6e 64 73 20 73 69 6e 63 65 20 65 70 6f econds since epo
6340: 63 68 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 69 6d ch\&...TP.\fBtim
6350: 65 6f 75 74 5c 66 52 20 5c 66 49 73 65 63 6f 6e eout\fR \fIsecon
6360: 64 73 5c 66 52 0a 4d 61 78 20 64 75 72 61 74 69 ds\fR.Max durati
6370: 6f 6e 20 6f 66 20 73 65 73 73 69 6f 6e 20 69 6e on of session in
6380: 20 73 65 63 6f 6e 64 73 20 62 65 66 6f 72 65 20 seconds before
6390: 74 69 6d 65 2d 6f 75 74 5c 26 2e 0a 2e 54 50 0a time-out\&...TP.
63a0: 5c 66 42 6c 69 66 65 74 69 6d 65 5c 66 52 20 5c \fBlifetime\fR \
63b0: 66 49 73 65 63 6f 6e 64 73 5c 66 52 0a 53 65 73 fIseconds\fR.Ses
63c0: 73 69 6f 6e 20 74 69 63 6b 65 74 20 6c 69 66 65 sion ticket life
63d0: 74 69 6d 65 20 68 69 6e 74 20 69 6e 20 73 65 63 time hint in sec
63e0: 6f 6e 64 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 onds\&...TP.\fBs
63f0: 65 73 73 69 6f 6e 5f 69 64 5c 66 52 20 5c 66 49 ession_id\fR \fI
6400: 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 5c 66 52 binary_string\fR
6410: 0a 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 .Unique session
6420: 69 64 20 66 6f 72 20 75 73 65 20 69 6e 20 72 65 id for use in re
6430: 73 75 6d 69 6e 67 20 74 68 65 20 73 65 73 73 69 suming the sessi
6440: 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 73 on\&...TP.\fBses
6450: 73 69 6f 6e 5f 74 69 63 6b 65 74 5c 66 52 20 5c sion_ticket\fR \
6460: 66 49 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 5c fIbinary_string\
6470: 66 52 0a 55 6e 69 71 75 65 20 73 65 73 73 69 6f fR.Unique sessio
6480: 6e 20 74 69 63 6b 65 74 20 66 6f 72 20 75 73 65 n ticket for use
6490: 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65 in resuming the
64a0: 20 73 65 73 73 69 6f 6e 5c 26 2e 0a 2e 54 50 0a session\&...TP.
64b0: 5c 66 42 74 69 63 6b 65 74 5f 61 70 70 5f 64 61 \fBticket_app_da
64c0: 74 61 5c 66 52 20 5c 66 49 62 69 6e 61 72 79 5f ta\fR \fIbinary_
64d0: 73 74 72 69 6e 67 5c 66 52 0a 55 6e 69 71 75 65 string\fR.Unique
64e0: 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 session ticket
64f0: 61 70 70 6c 69 63 61 74 69 6f 6e 20 64 61 74 61 application data
6500: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 6d 61 73 74 65 \&...TP.\fBmaste
6510: 72 5f 6b 65 79 5c 66 52 20 5c 66 49 62 69 6e 61 r_key\fR \fIbina
6520: 72 79 5f 73 74 72 69 6e 67 5c 66 52 0a 55 6e 69 ry_string\fR.Uni
6530: 71 75 65 20 73 65 73 73 69 6f 6e 20 6d 61 73 74 que session mast
6540: 65 72 20 6b 65 79 5c 26 2e 0a 2e 54 50 0a 5c 66 er key\&...TP.\f
6550: 42 73 65 73 73 69 6f 6e 5f 63 61 63 68 65 5f 6d Bsession_cache_m
6560: 6f 64 65 5c 66 52 20 5c 66 49 6d 6f 64 65 5c 66 ode\fR \fImode\f
6570: 52 0a 53 65 72 76 65 72 20 63 61 63 68 65 20 6d R.Server cache m
6580: 6f 64 65 20 28 63 6c 69 65 6e 74 2c 20 73 65 72 ode (client, ser
6590: 76 65 72 2c 20 6f 72 20 62 6f 74 68 29 5c 26 2e ver, or both)\&.
65a0: 0a 2e 52 45 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a ..RE..TP.\fBtls:
65b0: 3a 63 69 70 68 65 72 73 5c 66 52 20 3f 5c 66 49 :ciphers\fR ?\fI
65c0: 70 72 6f 74 6f 63 6f 6c 5c 66 52 3f 20 3f 5c 66 protocol\fR? ?\f
65d0: 49 76 65 72 62 6f 73 65 5c 66 52 3f 20 3f 5c 66 Iverbose\fR? ?\f
65e0: 49 73 75 70 70 6f 72 74 65 64 5c 66 52 3f 0a 57 Isupported\fR?.W
65f0: 69 74 68 6f 75 74 20 61 6e 79 20 6f 70 74 69 6f ithout any optio
6600: 6e 73 2c 20 69 74 20 72 65 74 75 72 6e 73 20 61 ns, it returns a
6610: 20 6c 69 73 74 20 6f 66 20 61 6c 6c 20 73 79 6d list of all sym
6620: 6d 65 74 72 69 63 20 63 69 70 68 65 72 73 20 66 metric ciphers f
6630: 6f 72 20 75 73 65 20 77 69 74 68 20 74 68 65 0a or use with the.
6640: 5c 66 49 2d 63 69 70 68 65 72 5c 66 52 20 6f 70 \fI-cipher\fR op
6650: 74 69 6f 6e 5c 26 2e 20 57 69 74 68 20 5c 66 49 tion\&. With \fI
6660: 70 72 6f 74 6f 63 6f 6c 5c 66 52 2c 20 6f 6e 6c protocol\fR, onl
6670: 79 20 74 68 65 20 63 69 70 68 65 72 73 20 73 75 y the ciphers su
6680: 70 70 6f 72 74 65 64 20 66 6f 72 20 74 68 61 74 pported for that
6690: 0a 70 72 6f 74 6f 63 6f 6c 20 61 72 65 20 72 65 .protocol are re
66a0: 74 75 72 6e 65 64 5c 26 2e 20 53 65 65 20 74 68 turned\&. See th
66b0: 65 20 5c 66 42 74 6c 73 3a 3a 70 72 6f 74 6f 63 e \fBtls::protoc
66c0: 6f 6c 73 5c 66 52 20 63 6f 6d 6d 61 6e 64 20 66 ols\fR command f
66d0: 6f 72 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 or the supported
66e0: 0a 70 72 6f 74 6f 63 6f 6c 73 5c 26 2e 20 49 66 .protocols\&. If
66f0: 20 5c 66 49 76 65 72 62 6f 73 65 5c 66 52 20 69 \fIverbose\fR i
6700: 73 20 73 70 65 63 69 66 69 65 64 20 61 73 20 74 s specified as t
6710: 72 75 65 20 74 68 65 6e 20 61 20 76 65 72 62 6f rue then a verbo
6720: 73 65 2c 20 68 75 6d 61 6e 20 72 65 61 64 61 62 se, human readab
6730: 6c 65 0a 6c 69 73 74 20 69 73 20 72 65 74 75 72 le.list is retur
6740: 6e 65 64 20 77 69 74 68 20 61 64 64 69 74 69 6f ned with additio
6750: 6e 61 6c 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 nal information
6760: 6f 6e 20 74 68 65 20 63 69 70 68 65 72 5c 26 2e on the cipher\&.
6770: 20 49 66 20 5c 66 49 73 75 70 70 6f 72 74 65 64 If \fIsupported
6780: 5c 66 52 0a 69 73 20 73 70 65 63 69 66 69 65 64 \fR.is specified
6790: 20 61 73 20 74 72 75 65 2c 20 74 68 65 6e 20 6f as true, then o
67a0: 6e 6c 79 20 74 68 65 20 63 69 70 68 65 72 73 20 nly the ciphers
67b0: 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20 70 72 supported for pr
67c0: 6f 74 6f 63 6f 6c 20 77 69 6c 6c 20 62 65 20 6c otocol will be l
67d0: 69 73 74 65 64 5c 26 2e 0a 54 68 65 20 5c 66 49 isted\&..The \fI
67e0: 73 75 70 70 6f 72 74 65 64 5c 66 52 20 61 72 67 supported\fR arg
67f0: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
6800: 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a LS 1\&.8\&...TP.
6810: 5c 66 42 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c \fBtls::protocol
6820: 73 5c 66 52 0a 52 65 74 75 72 6e 73 20 61 20 6c s\fR.Returns a l
6830: 69 73 74 20 6f 66 20 74 68 65 20 73 75 70 70 6f ist of the suppo
6840: 72 74 65 64 20 53 53 4c 2f 54 4c 53 20 70 72 6f rted SSL/TLS pro
6850: 74 6f 63 6f 6c 73 5c 26 2e 20 56 61 6c 69 64 20 tocols\&. Valid
6860: 76 61 6c 75 65 73 20 61 72 65 3a 0a 5c 66 42 73 values are:.\fBs
6870: 73 6c 32 5c 66 52 2c 20 5c 66 42 73 73 6c 33 5c sl2\fR, \fBssl3\
6880: 66 52 2c 20 5c 66 42 74 6c 73 31 5c 66 52 2c 20 fR, \fBtls1\fR,
6890: 5c 66 42 74 6c 73 31 5c 26 2e 31 5c 66 52 2c 20 \fBtls1\&.1\fR,
68a0: 5c 66 42 74 6c 73 31 5c 26 2e 32 5c 66 52 2c 20 \fBtls1\&.2\fR,
68b0: 61 6e 64 0a 5c 66 42 74 6c 73 31 5c 26 2e 33 5c and.\fBtls1\&.3\
68c0: 66 52 5c 26 2e 20 45 78 61 63 74 20 6c 69 73 74 fR\&. Exact list
68d0: 20 64 65 70 65 6e 64 73 20 6f 6e 20 4f 70 65 6e depends on Open
68e0: 53 53 4c 20 76 65 72 73 69 6f 6e 20 61 6e 64 20 SSL version and
68f0: 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 66 6c 61 compile time fla
6900: 67 73 5c 26 2e 0a 54 68 69 73 20 63 6f 6d 6d 61 gs\&..This comma
6910: 6e 64 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 nd is new for Tc
6920: 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 lTLS 1\&.8\&...T
6930: 50 0a 5c 66 42 74 6c 73 3a 3a 76 65 72 73 69 6f P.\fBtls::versio
6940: 6e 5c 66 52 0a 52 65 74 75 72 6e 73 20 74 68 65 n\fR.Returns the
6950: 20 4f 70 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e OpenSSL version
6960: 20 73 74 72 69 6e 67 5c 26 2e 0a 2e 50 50 0a 2e string\&...PP..
6970: 53 48 20 22 43 45 52 54 49 46 49 43 41 54 45 20 SH "CERTIFICATE
6980: 56 41 4c 49 44 41 54 49 4f 4e 22 0a 2e 53 53 20 VALIDATION"..SS
6990: 22 50 4b 49 20 41 4e 44 20 43 45 52 54 49 46 49 "PKI AND CERTIFI
69a0: 43 41 54 45 53 22 0a 55 73 69 6e 67 20 74 68 65 CATES".Using the
69b0: 20 50 75 62 6c 69 63 20 4b 65 79 20 49 6e 66 72 Public Key Infr
69c0: 61 73 74 72 75 63 74 75 72 65 20 28 50 4b 49 29 astructure (PKI)
69d0: 2c 20 65 61 63 68 20 75 73 65 72 20 63 72 65 61 , each user crea
69e0: 74 65 73 20 61 20 70 72 69 76 61 74 65 20 6b 65 tes a private ke
69f0: 79 20 74 68 61 74 0a 6f 6e 6c 79 20 74 68 65 79 y that.only they
6a00: 20 6b 6e 6f 77 20 61 62 6f 75 74 20 61 6e 64 20 know about and
6a10: 61 20 70 75 62 6c 69 63 20 6b 65 79 20 74 68 65 a public key the
6a20: 79 20 63 61 6e 20 65 78 63 68 61 6e 67 65 20 77 y can exchange w
6a30: 69 74 68 20 6f 74 68 65 72 73 20 66 6f 72 20 75 ith others for u
6a40: 73 65 20 69 6e 0a 65 6e 63 72 79 70 74 69 6e 67 se in.encrypting
6a50: 20 61 6e 64 20 64 65 63 72 79 70 74 69 6e 67 20 and decrypting
6a60: 64 61 74 61 5c 26 2e 20 54 68 65 20 70 72 6f 63 data\&. The proc
6a70: 65 73 73 20 69 73 20 74 68 65 20 73 65 6e 64 65 ess is the sende
6a80: 72 20 65 6e 63 72 79 70 74 73 20 74 68 65 69 72 r encrypts their
6a90: 20 64 61 74 61 0a 75 73 69 6e 67 20 74 68 65 69 data.using thei
6aa0: 72 20 70 72 69 76 61 74 65 20 6b 65 79 20 61 6e r private key an
6ab0: 64 20 74 68 65 20 72 65 63 65 69 76 65 72 27 73 d the receiver's
6ac0: 20 70 75 62 6c 69 63 20 6b 65 79 5c 26 2e 20 54 public key\&. T
6ad0: 68 65 20 64 61 74 61 20 69 73 20 74 68 65 6e 20 he data is then
6ae0: 73 65 6e 74 0a 74 6f 20 74 68 65 20 72 65 63 65 sent.to the rece
6af0: 69 76 65 72 5c 26 2e 20 49 6e 20 61 20 73 69 6d iver\&. In a sim
6b00: 69 6c 61 72 20 6d 61 6e 6e 65 72 2c 20 74 68 65 ilar manner, the
6b10: 20 72 65 63 65 69 76 65 72 20 75 73 65 73 20 74 receiver uses t
6b20: 68 65 69 72 20 70 72 69 76 61 74 65 20 6b 65 79 heir private key
6b30: 20 61 6e 64 0a 74 68 65 20 73 65 6e 64 65 72 27 and.the sender'
6b40: 73 20 70 75 62 6c 69 63 20 6b 65 79 20 74 6f 20 s public key to
6b50: 64 65 63 72 79 70 74 20 74 68 65 20 64 61 74 61 decrypt the data
6b60: 5c 26 2e 20 54 68 69 73 20 70 72 6f 76 69 64 65 \&. This provide
6b70: 73 20 64 61 74 61 20 69 6e 74 65 67 72 69 74 79 s data integrity
6b80: 2c 20 74 6f 0a 65 6e 73 75 72 65 20 74 68 65 20 , to.ensure the
6b90: 64 61 74 61 20 63 61 6e 27 74 20 62 65 20 76 69 data can't be vi
6ba0: 65 77 65 64 20 6f 72 20 61 6c 74 65 72 65 64 20 ewed or altered
6bb0: 64 75 72 69 6e 67 20 74 72 61 6e 73 70 6f 72 74 during transport
6bc0: 5c 26 2e 20 53 65 65 20 74 68 65 0a 5c 66 42 2d \&. See the.\fB-
6bd0: 6b 65 79 5c 66 52 20 61 6e 64 20 5c 66 42 2d 6b key\fR and \fB-k
6be0: 65 79 66 69 6c 65 5c 66 52 20 6f 70 74 69 6f 6e eyfile\fR option
6bf0: 73 20 66 6f 72 20 68 6f 77 20 74 6f 20 73 70 65 s for how to spe
6c00: 63 69 66 79 20 74 68 65 20 70 72 69 76 61 74 65 cify the private
6c10: 20 6b 65 79 5c 26 2e 0a 41 6c 73 6f 20 73 65 65 key\&..Also see
6c20: 20 74 68 65 20 5c 66 42 2d 70 61 73 73 77 6f 72 the \fB-passwor
6c30: 64 5c 66 52 20 6f 70 74 69 6f 6e 20 66 6f 72 20 d\fR option for
6c40: 68 6f 77 20 74 6f 20 70 72 6f 76 69 64 65 20 74 how to provide t
6c50: 68 65 20 70 61 73 73 77 6f 72 64 5c 26 2e 0a 2e he password\&...
6c60: 50 50 0a 49 6e 20 6f 72 64 65 72 20 74 6f 20 70 PP.In order to p
6c70: 72 6f 76 69 64 65 20 61 75 74 68 65 6e 74 69 63 rovide authentic
6c80: 61 74 69 6f 6e 2c 20 69 5c 26 2e 65 5c 26 2e 20 ation, i\&.e\&.
6c90: 65 6e 73 75 72 69 6e 67 20 73 6f 6d 65 6f 6e 65 ensuring someone
6ca0: 20 69 73 20 77 68 6f 20 74 68 65 79 20 73 61 79 is who they say
6cb0: 20 74 68 65 79 0a 61 72 65 2c 20 74 68 65 20 70 they.are, the p
6cc0: 75 62 6c 69 63 20 6b 65 79 20 61 6e 64 20 75 73 ublic key and us
6cd0: 65 72 20 69 64 65 6e 74 69 66 69 63 61 74 69 6f er identificatio
6ce0: 6e 20 69 6e 66 6f 20 69 73 20 73 74 6f 72 65 64 n info is stored
6cf0: 20 69 6e 20 61 20 58 5c 26 2e 35 30 39 0a 63 65 in a X\&.509.ce
6d00: 72 74 69 66 69 63 61 74 65 20 61 6e 64 20 74 68 rtificate and th
6d10: 61 74 20 63 65 72 74 69 66 69 63 61 74 65 20 69 at certificate i
6d20: 73 20 61 75 74 68 65 6e 74 69 63 61 74 65 64 20 s authenticated
6d30: 28 69 5c 26 2e 65 5c 26 2e 20 73 69 67 6e 65 64 (i\&.e\&. signed
6d40: 29 20 62 79 20 61 20 43 65 72 74 69 66 69 63 61 ) by a Certifica
6d50: 74 65 0a 41 75 74 68 6f 72 69 74 79 20 28 43 41 te.Authority (CA
6d60: 29 5c 26 2e 20 55 73 65 72 73 20 63 61 6e 20 74 )\&. Users can t
6d70: 68 65 6e 20 65 78 63 68 61 6e 67 65 20 74 68 65 hen exchange the
6d80: 73 65 20 63 65 72 74 69 66 69 63 61 74 65 73 20 se certificates
6d90: 64 75 72 69 6e 67 20 74 68 65 20 54 4c 53 0a 69 during the TLS.i
6da0: 6e 69 74 69 61 6c 69 7a 61 74 69 6f 6e 20 70 72 nitialization pr
6db0: 6f 63 65 73 73 20 61 6e 64 20 63 68 65 63 6b 20 ocess and check
6dc0: 74 68 65 6d 20 61 67 61 69 6e 73 74 20 74 68 65 them against the
6dd0: 20 72 6f 6f 74 20 43 41 20 63 65 72 74 69 66 69 root CA certifi
6de0: 63 61 74 65 73 20 74 6f 20 65 6e 73 75 72 65 0a cates to ensure.
6df0: 74 68 65 79 20 61 72 65 20 76 61 6c 69 64 5c 26 they are valid\&
6e00: 2e 20 54 68 69 73 20 69 73 20 68 61 6e 64 6c 65 . This is handle
6e10: 64 20 62 79 20 4f 70 65 6e 53 53 4c 20 76 69 61 d by OpenSSL via
6e20: 20 74 68 65 20 5c 66 42 2d 72 65 71 75 65 73 74 the \fB-request
6e30: 5c 66 52 20 61 6e 64 0a 5c 66 42 2d 72 65 71 75 \fR and.\fB-requ
6e40: 69 72 65 5c 66 52 20 6f 70 74 69 6f 6e 73 5c 26 ire\fR options\&
6e50: 2e 20 53 65 65 20 74 68 65 20 5c 66 42 2d 63 61 . See the \fB-ca
6e60: 64 69 72 5c 66 52 2c 20 5c 66 42 2d 63 61 64 69 dir\fR, \fB-cadi
6e70: 72 5c 66 52 2c 20 61 6e 64 0a 5c 66 42 2d 63 61 r\fR, and.\fB-ca
6e80: 73 74 6f 72 65 5c 66 52 20 6f 70 74 69 6f 6e 73 store\fR options
6e90: 20 66 6f 72 20 68 6f 77 20 74 6f 20 73 70 65 63 for how to spec
6ea0: 69 66 79 20 77 68 65 72 65 20 74 6f 20 66 69 6e ify where to fin
6eb0: 64 20 74 68 65 20 43 41 20 63 65 72 74 69 66 69 d the CA certifi
6ec0: 63 61 74 65 73 5c 26 2e 0a 4f 70 74 69 6f 6e 61 cates\&..Optiona
6ed0: 6c 6c 79 2c 20 69 6e 20 61 20 66 75 74 75 72 65 lly, in a future
6ee0: 20 72 65 6c 65 61 73 65 2c 20 74 68 65 79 20 63 release, they c
6ef0: 61 6e 20 61 6c 73 6f 20 62 65 20 63 68 65 63 6b an also be check
6f00: 65 64 20 61 67 61 69 6e 73 74 20 74 68 65 20 43 ed against the C
6f10: 65 72 74 69 66 69 63 61 74 65 0a 52 65 76 6f 63 ertificate.Revoc
6f20: 61 74 69 6f 6e 20 4c 69 73 74 20 28 43 52 4c 29 ation List (CRL)
6f30: 20 6f 66 20 72 65 76 6f 6b 65 64 20 63 65 72 74 of revoked cert
6f40: 69 66 69 63 61 74 65 73 5c 26 2e 20 43 65 72 74 ificates\&. Cert
6f50: 69 66 69 63 61 74 65 73 20 63 61 6e 20 61 6c 73 ificates can als
6f60: 6f 20 62 65 0a 73 65 6c 66 2d 73 69 67 6e 65 64 o be.self-signed
6f70: 2c 20 62 75 74 20 74 68 65 79 20 61 72 65 20 62 , but they are b
6f80: 79 20 64 65 66 61 75 6c 74 20 6e 6f 74 20 74 72 y default not tr
6f90: 75 73 74 65 64 20 75 6e 6c 65 73 73 20 79 6f 75 usted unless you
6fa0: 20 61 64 64 20 74 68 65 6d 20 74 6f 20 79 6f 75 add them to you
6fb0: 72 0a 63 65 72 74 69 66 69 63 61 74 65 20 73 74 r.certificate st
6fc0: 6f 72 65 5c 26 2e 0a 2e 50 50 0a 54 79 70 69 63 ore\&...PP.Typic
6fd0: 61 6c 6c 79 20 77 68 65 6e 20 76 69 73 69 74 69 ally when visiti
6fe0: 6e 67 20 77 65 62 20 73 69 74 65 73 2c 20 6f 6e ng web sites, on
6ff0: 6c 79 20 74 68 65 20 63 6c 69 65 6e 74 20 6e 65 ly the client ne
7000: 65 64 73 20 74 6f 20 63 68 65 63 6b 20 74 68 65 eds to check the
7010: 20 73 65 72 76 65 72 27 73 0a 63 65 72 74 69 66 server's.certif
7020: 69 63 61 74 65 20 74 6f 20 65 6e 73 75 72 65 20 icate to ensure
7030: 69 74 20 69 73 20 76 61 6c 69 64 5c 26 2e 20 54 it is valid\&. T
7040: 68 65 20 73 65 72 76 65 72 20 64 6f 65 73 6e 27 he server doesn'
7050: 74 20 6e 65 65 64 20 74 6f 20 63 68 65 63 6b 20 t need to check
7060: 74 68 65 20 63 6c 69 65 6e 74 0a 63 65 72 74 69 the client.certi
7070: 66 69 63 61 74 65 20 75 6e 6c 65 73 73 20 79 6f ficate unless yo
7080: 75 20 6e 65 65 64 20 74 6f 20 61 75 74 68 65 6e u need to authen
7090: 74 69 63 61 74 65 20 77 69 74 68 20 74 68 65 6d ticate with them
70a0: 20 74 6f 20 6c 6f 67 69 6e 2c 20 65 74 63 5c 26 to login, etc\&
70b0: 2e 20 53 65 65 20 74 68 65 0a 5c 66 42 2d 63 65 . See the.\fB-ce
70c0: 72 74 5c 66 52 20 61 6e 64 20 5c 66 42 2d 63 65 rt\fR and \fB-ce
70d0: 72 74 66 69 6c 65 5c 66 52 20 6f 70 74 69 6f 6e rtfile\fR option
70e0: 73 20 69 66 20 79 6f 75 20 6e 65 65 64 20 74 6f s if you need to
70f0: 20 70 72 6f 76 69 64 65 20 61 20 63 65 72 74 69 provide a certi
7100: 66 69 63 61 74 65 5c 26 2e 0a 2e 53 53 20 22 53 ficate\&...SS "S
7110: 55 4d 4d 41 52 59 20 4f 46 20 43 4f 4d 4d 41 4e UMMARY OF COMMAN
7120: 44 20 4c 49 4e 45 20 4f 50 54 49 4f 4e 53 22 0a D LINE OPTIONS".
7130: 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6f 70 The following op
7140: 74 69 6f 6e 73 20 61 72 65 20 75 73 65 64 20 66 tions are used f
7150: 6f 72 20 70 65 65 72 20 63 65 72 74 69 66 69 63 or peer certific
7160: 61 74 65 20 76 61 6c 69 64 61 74 69 6f 6e 3a 0a ate validation:.
7170: 2e 54 50 0a 5c 66 42 2d 63 61 64 69 72 5c 66 52 .TP.\fB-cadir\fR
7180: 20 5c 66 49 64 69 72 65 63 74 6f 72 79 5c 66 52 \fIdirectory\fR
7190: 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 20 64 .Specifies the d
71a0: 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 20 74 irectory where t
71b0: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41 he Certificate A
71c0: 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63 65 uthority (CA) ce
71d0: 72 74 69 66 69 63 61 74 65 73 20 61 72 65 0a 73 rtificates are.s
71e0: 74 6f 72 65 64 5c 26 2e 20 54 68 65 20 64 65 66 tored\&. The def
71f0: 61 75 6c 74 20 69 73 20 70 6c 61 74 66 6f 72 6d ault is platform
7200: 20 73 70 65 63 69 66 69 63 2c 20 62 75 74 20 69 specific, but i
7210: 73 20 75 73 75 61 6c 6c 79 20 22 5c 66 49 2f 65 s usually "\fI/e
7220: 74 63 2f 73 73 6c 2f 63 65 72 74 73 5c 66 52 22 tc/ssl/certs\fR"
7230: 20 6f 6e 0a 4c 69 6e 75 78 2f 55 6e 69 78 20 73 on.Linux/Unix s
7240: 79 73 74 65 6d 73 5c 26 2e 20 54 68 65 20 64 65 ystems\&. The de
7250: 66 61 75 6c 74 20 6c 6f 63 61 74 69 6f 6e 20 63 fault location c
7260: 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e an be overridden
7270: 20 62 79 20 74 68 65 0a 5c 66 42 53 53 4c 5f 43 by the.\fBSSL_C
7280: 45 52 54 5f 44 49 52 5c 66 52 20 65 6e 76 69 72 ERT_DIR\fR envir
7290: 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 5c onment variable\
72a0: 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 61 66 69 6c &...TP.\fB-cafil
72b0: 65 5c 66 52 20 5c 66 49 66 69 6c 65 6e 61 6d 65 e\fR \fIfilename
72c0: 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 \fR.Specifies th
72d0: 65 20 66 69 6c 65 20 77 69 74 68 20 74 68 65 20 e file with the
72e0: 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 Certificate Auth
72f0: 6f 72 69 74 79 20 28 43 41 29 20 63 65 72 74 69 ority (CA) certi
7300: 66 69 63 61 74 65 73 20 74 6f 20 75 73 65 20 69 ficates to use i
7310: 6e 0a 5c 66 42 50 45 4d 5c 66 52 20 66 69 6c 65 n.\fBPEM\fR file
7320: 20 66 6f 72 6d 61 74 5c 26 2e 20 54 68 65 20 64 format\&. The d
7330: 65 66 61 75 6c 74 20 69 73 20 22 5c 66 49 63 65 efault is "\fIce
7340: 72 74 5c 26 2e 70 65 6d 5c 66 52 22 2c 20 69 6e rt\&.pem\fR", in
7350: 20 74 68 65 20 4f 70 65 6e 53 53 4c 0a 64 69 72 the OpenSSL.dir
7360: 65 63 74 6f 72 79 5c 26 2e 20 4f 6e 20 4c 69 6e ectory\&. On Lin
7370: 75 78 2f 55 6e 69 78 20 73 79 73 74 65 6d 73 2c ux/Unix systems,
7380: 20 74 68 69 73 20 69 73 20 75 73 75 61 6c 6c 79 this is usually
7390: 20 22 5c 66 49 2f 65 74 63 2f 73 73 6c 2f 63 61 "\fI/etc/ssl/ca
73a0: 2d 62 75 6e 64 6c 65 5c 26 2e 70 65 6d 5c 66 52 -bundle\&.pem\fR
73b0: 22 5c 26 2e 0a 54 68 65 20 64 65 66 61 75 6c 74 "\&..The default
73c0: 20 66 69 6c 65 20 63 61 6e 20 62 65 20 6f 76 65 file can be ove
73d0: 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 5c rridden by the \
73e0: 66 42 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 5c fBSSL_CERT_FILE\
73f0: 66 52 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 fR environment.v
7400: 61 72 69 61 62 6c 65 5c 26 2e 0a 2e 54 50 0a 5c ariable\&...TP.\
7410: 66 42 2d 63 61 73 74 6f 72 65 5c 66 52 20 5c 66 fB-castore\fR \f
7420: 49 55 52 49 5c 66 52 0a 53 70 65 63 69 66 69 65 IURI\fR.Specifie
7430: 73 20 74 68 65 20 55 6e 69 66 6f 72 6d 20 52 65 s the Uniform Re
7440: 73 6f 75 72 63 65 20 49 64 65 6e 74 69 66 69 65 source Identifie
7450: 72 20 28 55 52 49 29 20 66 6f 72 20 74 68 65 20 r (URI) for the
7460: 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 Certificate Auth
7470: 6f 72 69 74 79 0a 28 43 41 29 20 73 74 6f 72 65 ority.(CA) store
7480: 2c 20 77 68 69 63 68 20 6d 61 79 20 62 65 20 61 , which may be a
7490: 20 73 69 6e 67 6c 65 20 63 6f 6e 74 61 69 6e 65 single containe
74a0: 72 20 6f 72 20 61 20 63 61 74 61 6c 6f 67 20 6f r or a catalog o
74b0: 66 20 63 6f 6e 74 61 69 6e 65 72 73 5c 26 2e 0a f containers\&..
74c0: 53 74 61 72 74 69 6e 67 20 77 69 74 68 20 4f 70 Starting with Op
74d0: 65 6e 53 53 4c 20 33 5c 26 2e 32 20 6f 6e 20 4d enSSL 3\&.2 on M
74e0: 53 20 57 69 6e 64 6f 77 73 2c 20 73 65 74 20 74 S Windows, set t
74f0: 6f 20 22 5c 66 42 6f 72 67 5c 26 2e 6f 70 65 6e o "\fBorg\&.open
7500: 73 73 6c 5c 26 2e 77 69 6e 73 74 6f 72 65 3a 2f ssl\&.winstore:/
7510: 2f 5c 66 52 22 0a 74 6f 20 75 73 65 20 74 68 65 /\fR".to use the
7520: 20 62 75 69 6c 74 2d 69 6e 20 4d 53 20 57 69 6e built-in MS Win
7530: 64 6f 77 73 20 43 65 72 74 69 66 69 63 61 74 65 dows Certificate
7540: 20 53 74 6f 72 65 5c 26 2e 20 53 74 61 72 74 69 Store\&. Starti
7550: 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 ng in TclTLS 2\&
7560: 2e 30 2c 20 74 68 69 73 0a 69 73 20 74 68 65 20 .0, this.is the
7570: 64 65 66 61 75 6c 74 20 69 66 20 5c 66 42 2d 63 default if \fB-c
7580: 61 64 69 72 5c 66 52 2c 20 5c 66 42 2d 63 61 64 adir\fR, \fB-cad
7590: 69 72 5c 66 52 2c 20 61 6e 64 20 5c 66 42 2d 63 ir\fR, and \fB-c
75a0: 61 73 74 6f 72 65 5c 66 52 20 61 72 65 0a 6e 6f astore\fR are.no
75b0: 74 20 73 70 65 63 69 66 69 65 64 5c 26 2e 20 54 t specified\&. T
75c0: 68 69 73 20 73 74 6f 72 65 20 6f 6e 6c 79 20 73 his store only s
75d0: 75 70 70 6f 72 74 73 20 72 6f 6f 74 20 63 65 72 upports root cer
75e0: 74 69 66 69 63 61 74 65 20 73 74 6f 72 65 73 5c tificate stores\
75f0: 26 2e 0a 2e 54 50 0a 5c 66 42 2d 72 65 71 75 65 &...TP.\fB-reque
7600: 73 74 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 st\fR \fIbool\fR
7610: 0a 52 65 71 75 65 73 74 20 61 20 63 65 72 74 69 .Request a certi
7620: 66 69 63 61 74 65 20 66 72 6f 6d 20 74 68 65 20 ficate from the
7630: 70 65 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 peer during the
7640: 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 5c 26 2e SSL handshake\&.
7650: 20 54 68 69 73 20 69 73 20 6e 65 65 64 65 64 0a This is needed.
7660: 74 6f 20 64 6f 20 43 65 72 74 69 66 69 63 61 74 to do Certificat
7670: 65 20 56 61 6c 69 64 61 74 69 6f 6e 5c 26 2e 20 e Validation\&.
7680: 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 Starting in TclT
7690: 4c 53 20 31 5c 26 2e 38 2c 20 74 68 65 20 64 65 LS 1\&.8, the de
76a0: 66 61 75 6c 74 20 69 73 0a 5c 66 42 74 72 75 65 fault is.\fBtrue
76b0: 5c 66 52 20 66 6f 72 20 63 6c 69 65 6e 74 20 63 \fR for client c
76c0: 6f 6e 6e 65 63 74 69 6f 6e 73 5c 26 2e 20 53 74 onnections\&. St
76d0: 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 arting in TclTLS
76e0: 20 32 5c 26 2e 30 2c 20 69 66 20 73 65 74 20 74 2\&.0, if set t
76f0: 6f 0a 5c 66 42 66 61 6c 73 65 5c 66 52 20 61 6e o.\fBfalse\fR an
7700: 64 20 5c 66 42 2d 72 65 71 75 69 72 65 5c 66 52 d \fB-require\fR
7710: 20 69 73 20 5c 66 42 74 72 75 65 5c 66 52 2c 20 is \fBtrue\fR,
7720: 74 68 65 6e 20 74 68 69 73 20 77 69 6c 6c 20 62 then this will b
7730: 65 0a 6f 76 65 72 72 69 64 64 65 6e 20 74 6f 20 e.overridden to
7740: 5c 66 42 74 72 75 65 5c 66 52 5c 26 2e 20 49 6e \fBtrue\fR\&. In
7750: 20 61 64 64 69 74 69 6f 6e 2c 20 74 68 65 20 63 addition, the c
7760: 6c 69 65 6e 74 20 63 61 6e 20 6d 61 6e 75 61 6c lient can manual
7770: 6c 79 20 69 6e 73 70 65 63 74 20 61 6e 64 0a 61 ly inspect and.a
7780: 63 63 65 70 74 20 6f 72 20 72 65 6a 65 63 74 20 ccept or reject
7790: 65 61 63 68 20 63 65 72 74 69 66 69 63 61 74 65 each certificate
77a0: 20 75 73 69 6e 67 20 74 68 65 20 5c 66 42 2d 76 using the \fB-v
77b0: 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 5c 66 alidatecommand\f
77c0: 52 20 6f 70 74 69 6f 6e 5c 26 2e 0a 2e 54 50 0a R option\&...TP.
77d0: 5c 66 42 2d 72 65 71 75 69 72 65 5c 66 52 20 5c \fB-require\fR \
77e0: 66 49 62 6f 6f 6c 5c 66 52 0a 52 65 71 75 69 72 fIbool\fR.Requir
77f0: 65 20 61 20 76 61 6c 69 64 20 63 65 72 74 69 66 e a valid certif
7800: 69 63 61 74 65 20 66 72 6f 6d 20 74 68 65 20 70 icate from the p
7810: 65 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 53 eer during the S
7820: 53 4c 20 68 61 6e 64 73 68 61 6b 65 5c 26 2e 20 SL handshake\&.
7830: 49 66 20 74 68 69 73 20 69 73 0a 73 65 74 20 74 If this is.set t
7840: 6f 20 74 72 75 65 2c 20 74 68 65 6e 20 5c 66 42 o true, then \fB
7850: 2d 72 65 71 75 65 73 74 5c 66 52 20 6d 75 73 74 -request\fR must
7860: 20 61 6c 73 6f 20 62 65 20 73 65 74 20 74 6f 20 also be set to
7870: 74 72 75 65 20 61 6e 64 20 61 20 65 69 74 68 65 true and a eithe
7880: 72 0a 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c 20 r.\fB-cadir\fR,
7890: 5c 66 42 2d 63 61 66 69 6c 65 5c 66 52 2c 20 5c \fB-cafile\fR, \
78a0: 66 42 2d 63 61 73 74 6f 72 65 5c 66 52 2c 20 6f fB-castore\fR, o
78b0: 72 20 61 20 70 6c 61 74 66 6f 72 6d 20 64 65 66 r a platform def
78c0: 61 75 6c 74 0a 6d 75 73 74 20 62 65 20 70 72 6f ault.must be pro
78d0: 76 69 64 65 64 20 69 6e 20 6f 72 64 65 72 20 74 vided in order t
78e0: 6f 20 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e o validate again
78f0: 73 74 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c st\&. The defaul
7900: 74 20 69 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e t in TclTLS 1\&.
7910: 38 20 61 6e 64 0a 65 61 72 6c 69 65 72 20 76 65 8 and.earlier ve
7920: 72 73 69 6f 6e 73 20 69 73 20 5c 66 42 66 61 6c rsions is \fBfal
7930: 73 65 5c 66 52 20 73 69 6e 63 65 20 6e 6f 74 20 se\fR since not
7940: 61 6c 6c 20 70 6c 61 74 66 6f 72 6d 73 20 68 61 all platforms ha
7950: 76 65 20 63 65 72 74 69 66 69 63 61 74 65 73 20 ve certificates
7960: 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 67 61 69 to.validate agai
7970: 6e 73 74 20 69 6e 20 61 20 66 6f 72 6d 20 63 6f nst in a form co
7980: 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 4f 70 mpatible with Op
7990: 65 6e 53 53 4c 5c 26 2e 20 53 74 61 72 74 69 6e enSSL\&. Startin
79a0: 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 2e g in TclTLS 2\&.
79b0: 30 2c 0a 74 68 65 20 64 65 66 61 75 6c 74 20 69 0,.the default i
79c0: 73 20 5c 66 42 74 72 75 65 5c 66 52 20 66 6f 72 s \fBtrue\fR for
79d0: 20 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74 69 client connecti
79e0: 6f 6e 73 5c 26 2e 0a 2e 50 50 0a 2e 53 53 20 22 ons\&...PP..SS "
79f0: 57 48 45 4e 20 41 52 45 20 43 4f 4d 4d 41 4e 44 WHEN ARE COMMAND
7a00: 20 4c 49 4e 45 20 4f 50 54 49 4f 4e 53 20 4e 45 LINE OPTIONS NE
7a10: 45 44 45 44 3f 22 0a 49 6e 20 54 63 6c 54 4c 53 EDED?".In TclTLS
7a20: 20 31 5c 26 2e 38 20 61 6e 64 20 65 61 72 6c 69 1\&.8 and earli
7a30: 65 72 20 76 65 72 73 69 6f 6e 73 2c 20 63 65 72 er versions, cer
7a40: 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 74 tificate validat
7a50: 69 6f 6e 20 69 73 0a 5c 66 49 4e 4f 54 5c 66 52 ion is.\fINOT\fR
7a60: 20 65 6e 61 62 6c 65 64 20 62 79 20 64 65 66 61 enabled by defa
7a70: 75 6c 74 5c 26 2e 20 54 68 69 73 20 6c 69 6d 69 ult\&. This limi
7a80: 74 61 74 69 6f 6e 20 69 73 20 64 75 65 20 74 6f tation is due to
7a90: 20 74 68 65 20 6c 61 63 6b 20 6f 66 20 61 20 63 the lack of a c
7aa0: 6f 6d 6d 6f 6e 0a 63 72 6f 73 73 20 70 6c 61 74 ommon.cross plat
7ab0: 66 6f 72 6d 20 64 61 74 61 62 61 73 65 20 6f 66 form database of
7ac0: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 Certificate Aut
7ad0: 68 6f 72 69 74 79 20 28 43 41 29 20 70 72 6f 76 hority (CA) prov
7ae0: 69 64 65 64 20 63 65 72 74 69 66 69 63 61 74 65 ided certificate
7af0: 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 67 s to.validate ag
7b00: 61 69 6e 73 74 5c 26 2e 20 4d 61 6e 79 20 4c 69 ainst\&. Many Li
7b10: 6e 75 78 20 73 79 73 74 65 6d 73 20 6e 61 74 69 nux systems nati
7b20: 76 65 6c 79 20 73 75 70 70 6f 72 74 20 4f 70 65 vely support Ope
7b30: 6e 53 53 4c 20 61 6e 64 20 74 68 75 73 20 68 61 nSSL and thus ha
7b40: 76 65 0a 74 68 65 73 65 20 63 65 72 74 69 66 69 ve.these certifi
7b50: 63 61 74 65 73 20 69 6e 73 74 61 6c 6c 65 64 20 cates installed
7b60: 61 73 20 70 61 72 74 20 6f 66 20 74 68 65 20 4f as part of the O
7b70: 53 2c 20 62 75 74 20 4d 61 63 4f 53 20 61 6e 64 S, but MacOS and
7b80: 20 4d 53 20 57 69 6e 64 6f 77 73 20 64 6f 20 6e MS Windows do n
7b90: 6f 74 5c 26 2e 0a 53 74 61 72 69 6e 67 20 69 6e ot\&..Staring in
7ba0: 20 54 63 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 74 TclTLS 2\&.0, t
7bb0: 68 65 20 64 65 66 61 75 6c 74 20 66 6f 72 20 63 he default for c
7bc0: 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e lient connection
7bd0: 73 20 68 61 73 20 62 65 65 6e 20 63 68 61 6e 67 s has been chang
7be0: 65 64 20 74 6f 0a 72 65 71 75 69 72 65 20 63 65 ed to.require ce
7bf0: 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 rtificate valida
7c00: 74 69 6f 6e 20 62 79 20 64 65 66 61 75 6c 74 5c tion by default\
7c10: 26 2e 20 49 6e 20 6f 72 64 65 72 20 74 6f 20 75 &. In order to u
7c20: 73 65 20 74 68 65 20 5c 66 42 2d 72 65 71 75 69 se the \fB-requi
7c30: 72 65 5c 66 52 0a 6f 70 74 69 6f 6e 2c 20 6f 6e re\fR.option, on
7c40: 65 20 6f 66 20 74 68 65 20 66 6f 6c 6c 6f 77 69 e of the followi
7c50: 6e 67 20 6d 75 73 74 20 62 65 20 74 72 75 65 3a ng must be true:
7c60: 0a 2e 49 50 20 5c 28 62 75 0a 4f 6e 20 4c 69 6e ..IP \(bu.On Lin
7c70: 75 78 20 61 6e 64 20 55 6e 69 78 20 73 79 73 74 ux and Unix syst
7c80: 65 6d 73 20 77 69 74 68 20 4f 70 65 6e 53 53 4c ems with OpenSSL
7c90: 20 61 6c 72 65 61 64 79 20 69 6e 73 74 61 6c 6c already install
7ca0: 65 64 20 6f 72 20 69 66 20 74 68 65 20 43 41 0a ed or if the CA.
7cb0: 63 65 72 74 69 66 69 63 61 74 65 73 20 61 72 65 certificates are
7cc0: 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 50 45 available in PE
7cd0: 4d 20 66 6f 72 6d 61 74 2c 20 61 6e 64 20 69 66 M format, and if
7ce0: 20 74 68 65 79 20 61 72 65 20 73 74 6f 72 65 64 they are stored
7cf0: 20 69 6e 20 74 68 65 0a 73 74 61 6e 64 61 72 64 in the.standard
7d00: 20 6c 6f 63 61 74 69 6f 6e 73 2c 20 6f 72 20 69 locations, or i
7d10: 66 20 74 68 65 20 5c 66 42 53 53 4c 5f 43 45 52 f the \fBSSL_CER
7d20: 54 5f 44 49 52 5c 66 52 20 6f 72 20 5c 66 42 53 T_DIR\fR or \fBS
7d30: 53 4c 5f 43 45 52 54 5f 46 49 4c 45 5c 66 52 0a SL_CERT_FILE\fR.
7d40: 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 environment vari
7d50: 61 62 6c 65 73 20 61 72 65 20 73 65 74 2c 20 74 ables are set, t
7d60: 68 65 6e 20 5c 66 42 2d 63 61 64 69 72 5c 66 52 hen \fB-cadir\fR
7d70: 2c 20 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c 0a , \fB-cadir\fR,.
7d80: 61 6e 64 20 5c 66 42 2d 63 61 73 74 6f 72 65 5c and \fB-castore\
7d90: 66 52 20 61 72 65 6e 27 74 20 6e 65 65 64 65 64 fR aren't needed
7da0: 5c 26 2e 0a 2e 49 50 20 5c 28 62 75 0a 49 66 20 \&...IP \(bu.If
7db0: 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f 74 20 69 OpenSSL is not i
7dc0: 6e 73 74 61 6c 6c 65 64 20 69 6e 20 74 68 65 20 nstalled in the
7dd0: 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 69 6f 6e default location
7de0: 2c 20 6f 72 20 77 68 65 6e 20 75 73 69 6e 67 20 , or when using
7df0: 4d 61 63 20 4f 53 0a 6f 72 20 4d 53 20 57 69 6e Mac OS.or MS Win
7e00: 64 6f 77 73 20 61 6e 64 20 4f 70 65 6e 53 53 4c dows and OpenSSL
7e10: 20 69 73 20 69 6e 73 74 61 6c 6c 65 64 2c 20 74 is installed, t
7e20: 68 65 20 5c 66 42 53 53 4c 5f 43 45 52 54 5f 44 he \fBSSL_CERT_D
7e30: 49 52 5c 66 52 20 61 6e 64 2f 6f 72 0a 5c 66 42 IR\fR and/or.\fB
7e40: 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 5c 66 52 SSL_CERT_FILE\fR
7e50: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 environment var
7e60: 69 61 62 6c 65 73 20 6f 72 20 74 68 65 20 6f 6e iables or the on
7e70: 65 20 6f 66 20 74 68 65 20 5c 66 42 2d 63 61 64 e of the \fB-cad
7e80: 69 72 5c 66 52 2c 0a 5c 66 42 2d 63 61 64 69 72 ir\fR,.\fB-cadir
7e90: 5c 66 52 2c 20 6f 72 20 5c 66 42 2d 63 61 73 74 \fR, or \fB-cast
7ea0: 6f 72 65 5c 66 52 20 6f 70 74 69 6f 6e 73 20 6d ore\fR options m
7eb0: 75 73 74 20 62 65 20 64 65 66 69 6e 65 64 5c 26 ust be defined\&
7ec0: 2e 0a 2e 49 50 20 5c 28 62 75 0a 4f 6e 20 4d 53 ...IP \(bu.On MS
7ed0: 20 57 69 6e 64 6f 77 73 2c 20 73 74 61 72 74 69 Windows, starti
7ee0: 6e 67 20 69 6e 20 4f 70 65 6e 53 53 4c 20 33 5c ng in OpenSSL 3\
7ef0: 26 2e 32 2c 20 69 74 20 69 73 20 6e 6f 77 20 70 &.2, it is now p
7f00: 6f 73 73 69 62 6c 65 20 74 6f 20 61 63 63 65 73 ossible to acces
7f10: 73 20 74 68 65 0a 62 75 69 6c 74 2d 69 6e 20 57 s the.built-in W
7f20: 69 6e 64 6f 77 73 20 43 65 72 74 69 66 69 63 61 indows Certifica
7f30: 74 65 20 53 74 6f 72 65 20 66 72 6f 6d 20 4f 70 te Store from Op
7f40: 65 6e 53 53 4c 5c 26 2e 20 54 68 69 73 20 63 61 enSSL\&. This ca
7f50: 6e 20 62 65 20 75 74 69 6c 69 7a 65 64 20 62 79 n be utilized by
7f60: 0a 73 65 74 74 69 6e 67 20 74 68 65 20 5c 66 42 .setting the \fB
7f70: 2d 63 61 73 74 6f 72 65 5c 66 52 20 6f 70 74 69 -castore\fR opti
7f80: 6f 6e 20 74 6f 20 22 5c 66 42 6f 72 67 5c 26 2e on to "\fBorg\&.
7f90: 6f 70 65 6e 73 73 6c 5c 26 2e 77 69 6e 73 74 6f openssl\&.winsto
7fa0: 72 65 3a 2f 2f 5c 66 52 22 5c 26 2e 0a 49 6e 20 re://\fR"\&..In
7fb0: 54 63 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 74 68 TclTLS 2\&.0, th
7fc0: 69 73 20 69 73 20 74 68 65 20 64 65 66 61 75 6c is is the defaul
7fd0: 74 20 76 61 6c 75 65 20 69 66 20 5c 66 42 2d 63 t value if \fB-c
7fe0: 61 64 69 72 5c 66 52 2c 0a 5c 66 42 2d 63 61 64 adir\fR,.\fB-cad
7ff0: 69 72 5c 66 52 2c 20 61 6e 64 20 5c 66 42 2d 63 ir\fR, and \fB-c
8000: 61 73 74 6f 72 65 5c 66 52 20 61 72 65 20 6e 6f astore\fR are no
8010: 74 20 73 70 65 63 69 66 69 65 64 5c 26 2e 0a 2e t specified\&...
8020: 49 50 20 5c 28 62 75 0a 49 66 20 4f 70 65 6e 53 IP \(bu.If OpenS
8030: 53 4c 20 69 73 20 6e 6f 74 20 69 6e 73 74 61 6c SL is not instal
8040: 6c 65 64 20 6f 72 20 74 68 65 20 43 41 20 63 65 led or the CA ce
8050: 72 74 69 66 69 63 61 74 65 73 20 61 72 65 20 6e rtificates are n
8060: 6f 74 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 ot available in
8070: 50 45 4d 0a 66 6f 72 6d 61 74 2c 20 74 68 65 20 PEM.format, the
8080: 43 41 20 63 65 72 74 69 66 69 63 61 74 65 73 20 CA certificates
8090: 6d 75 73 74 20 62 65 20 64 6f 77 6e 6c 6f 61 64 must be download
80a0: 65 64 20 61 6e 64 20 69 6e 73 74 61 6c 6c 65 64 ed and installed
80b0: 20 77 69 74 68 20 74 68 65 20 75 73 65 72 0a 73 with the user.s
80c0: 6f 66 74 77 61 72 65 5c 26 2e 20 54 68 65 20 43 oftware\&. The C
80d0: 55 52 4c 20 74 65 61 6d 20 6d 61 6b 65 73 20 74 URL team makes t
80e0: 68 65 6d 20 61 76 61 69 6c 61 62 6c 65 20 61 74 hem available at
80f0: 0a 5c 66 49 43 41 20 63 65 72 74 69 66 69 63 61 .\fICA certifica
8100: 74 65 73 20 65 78 74 72 61 63 74 65 64 0a 66 72 tes extracted.fr
8110: 6f 6d 20 4d 6f 7a 69 6c 6c 61 5c 66 52 20 5b 68 om Mozilla\fR [h
8120: 74 74 70 73 3a 2f 2f 63 75 72 6c 5c 26 2e 73 65 ttps://curl\&.se
8130: 2f 64 6f 63 73 2f 63 61 65 78 74 72 61 63 74 5c /docs/caextract\
8140: 26 2e 68 74 6d 6c 5d 20 69 6e 20 74 68 65 20 22 &.html] in the "
8150: 5c 66 49 63 61 63 65 72 74 5c 26 2e 70 65 6d 5c \fIcacert\&.pem\
8160: 66 52 22 20 66 69 6c 65 5c 26 2e 20 59 6f 75 20 fR" file\&. You
8170: 6d 75 73 74 20 74 68 65 6e 20 65 69 74 68 65 72 must then either
8180: 20 73 65 74 20 74 68 65 0a 5c 66 42 53 53 4c 5f set the.\fBSSL_
8190: 43 45 52 54 5f 44 49 52 5c 66 52 20 61 6e 64 2f CERT_DIR\fR and/
81a0: 6f 72 20 5c 66 42 53 53 4c 5f 43 45 52 54 5f 46 or \fBSSL_CERT_F
81b0: 49 4c 45 5c 66 52 20 65 6e 76 69 72 6f 6e 6d 65 ILE\fR environme
81c0: 6e 74 20 76 61 72 69 61 62 6c 65 73 20 6f 72 20 nt variables or
81d0: 74 68 65 0a 5c 66 42 2d 63 61 64 69 72 5c 66 52 the.\fB-cadir\fR
81e0: 20 6f 72 20 5c 66 42 2d 63 61 66 69 6c 65 5c 66 or \fB-cafile\f
81f0: 52 20 6f 70 74 69 6f 6e 73 20 74 6f 20 74 68 65 R options to the
8200: 20 43 41 20 63 65 72 74 20 66 69 6c 65 27 73 20 CA cert file's
8210: 69 6e 73 74 61 6c 6c 0a 6c 6f 63 61 74 69 6f 6e install.location
8220: 5c 26 2e 20 49 74 20 69 73 20 79 6f 75 72 20 72 \&. It is your r
8230: 65 73 70 6f 6e 73 69 62 69 6c 69 74 79 20 74 6f esponsibility to
8240: 20 6b 65 65 70 20 74 68 69 73 20 66 69 6c 65 20 keep this file
8250: 75 70 20 74 6f 20 64 61 74 65 5c 26 2e 0a 2e 50 up to date\&...P
8260: 50 0a 2e 53 48 20 22 43 41 4c 4c 42 41 43 4b 20 P..SH "CALLBACK
8270: 4f 50 54 49 4f 4e 53 22 0a 41 73 20 70 72 65 76 OPTIONS".As prev
8280: 69 6f 75 73 6c 79 20 64 65 73 63 72 69 62 65 64 iously described
8290: 2c 20 65 61 63 68 20 63 68 61 6e 6e 65 6c 20 63 , each channel c
82a0: 61 6e 20 62 65 20 67 69 76 65 6e 20 74 68 65 69 an be given thei
82b0: 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 73 0a r own callbacks.
82c0: 74 6f 20 68 61 6e 64 6c 65 20 69 6e 74 65 72 6d to handle interm
82d0: 65 64 69 61 74 65 20 70 72 6f 63 65 73 73 69 6e ediate processin
82e0: 67 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c g by the OpenSSL
82f0: 20 6c 69 62 72 61 72 79 2c 20 75 73 69 6e 67 20 library, using
8300: 74 68 65 0a 5c 66 42 2d 63 6f 6d 6d 61 6e 64 5c the.\fB-command\
8310: 66 52 2c 20 5c 66 42 2d 70 61 73 73 77 6f 72 64 fR, \fB-password
8320: 5c 66 52 2c 20 61 6e 64 20 5c 66 42 2d 76 61 6c \fR, and \fB-val
8330: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 52 idate_command\fR
8340: 20 6f 70 74 69 6f 6e 73 0a 70 61 73 73 65 64 20 options.passed
8350: 74 6f 20 65 69 74 68 65 72 20 6f 66 20 5c 66 42 to either of \fB
8360: 74 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 20 6f tls::socket\fR o
8370: 72 20 5c 66 42 74 6c 73 3a 3a 69 6d 70 6f 72 74 r \fBtls::import
8380: 5c 66 52 5c 26 2e 0a 55 6e 6c 69 6b 65 20 70 72 \fR\&..Unlike pr
8390: 65 76 69 6f 75 73 20 76 65 72 73 69 6f 6e 73 20 evious versions
83a0: 6f 66 20 54 63 6c 54 4c 53 2c 20 6f 6e 6c 79 20 of TclTLS, only
83b0: 69 66 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 if the callback
83c0: 67 65 6e 65 72 61 74 65 73 20 61 6e 20 65 72 72 generates an err
83d0: 6f 72 2c 0a 77 69 6c 6c 20 74 68 65 20 5c 66 42 or,.will the \fB
83e0: 62 67 65 72 72 6f 72 5c 66 52 20 63 6f 6d 6d 61 bgerror\fR comma
83f0: 6e 64 20 62 65 20 69 6e 76 6f 6b 65 64 20 77 69 nd be invoked wi
8400: 74 68 20 74 68 65 20 65 72 72 6f 72 20 69 6e 66 th the error inf
8410: 6f 72 6d 61 74 69 6f 6e 5c 26 2e 0a 2e 53 53 20 ormation\&...SS
8420: 22 56 41 4c 55 45 53 20 46 4f 52 20 43 4f 4d 4d "VALUES FOR COMM
8430: 41 4e 44 20 43 41 4c 4c 42 41 43 4b 22 0a 54 68 AND CALLBACK".Th
8440: 65 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 e callback for t
8450: 68 65 20 5c 66 42 2d 63 6f 6d 6d 61 6e 64 5c 66 he \fB-command\f
8460: 52 20 6f 70 74 69 6f 6e 20 69 73 20 69 6e 76 6f R option is invo
8470: 6b 65 64 20 61 74 20 73 65 76 65 72 61 6c 20 70 ked at several p
8480: 6f 69 6e 74 73 20 64 75 72 69 6e 67 20 74 68 65 oints during the
8490: 0a 4f 70 65 6e 53 53 4c 20 68 61 6e 64 73 68 61 .OpenSSL handsha
84a0: 6b 65 20 61 6e 64 20 64 75 72 69 6e 67 20 72 6f ke and during ro
84b0: 75 74 69 6e 65 20 6f 70 65 72 61 74 69 6f 6e 73 utine operations
84c0: 5c 26 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f \&. See below fo
84d0: 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 0a 61 r the possible.a
84e0: 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20 rguments passed
84f0: 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 to the callback
8500: 73 63 72 69 70 74 5c 26 2e 20 56 61 6c 75 65 73 script\&. Values
8510: 20 72 65 74 75 72 6e 65 64 20 66 72 6f 6d 20 74 returned from t
8520: 68 65 20 63 61 6c 6c 62 61 63 6b 20 61 72 65 0a he callback are.
8530: 69 67 6e 6f 72 65 64 5c 26 2e 0a 2e 54 50 0a 5c ignored\&...TP.\
8540: 66 42 65 72 72 6f 72 5c 66 52 20 5c 66 49 63 68 fBerror\fR \fIch
8550: 61 6e 6e 65 6c 49 64 20 6d 65 73 73 61 67 65 5c annelId message\
8560: 66 52 0a 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 fR.This form of
8570: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f callback is invo
8580: 6b 65 64 20 77 68 65 6e 65 76 65 72 20 61 6e 20 ked whenever an
8590: 65 72 72 6f 72 20 6f 63 63 75 72 73 20 64 75 72 error occurs dur
85a0: 69 6e 67 20 74 68 65 20 69 6e 69 74 69 61 6c 0a ing the initial.
85b0: 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 61 6e 64 connection, hand
85c0: 73 68 61 6b 65 2c 20 6f 72 20 49 2f 4f 20 6f 70 shake, or I/O op
85d0: 65 72 61 74 69 6f 6e 73 5c 26 2e 20 54 68 65 20 erations\&. The
85e0: 5c 66 49 6d 65 73 73 61 67 65 5c 66 52 20 61 72 \fImessage\fR ar
85f0: 67 75 6d 65 6e 74 20 63 61 6e 20 62 65 0a 66 72 gument can be.fr
8600: 6f 6d 20 74 68 65 20 54 63 6c 5f 45 72 72 6e 6f om the Tcl_Errno
8610: 4d 73 67 2c 20 4f 70 65 6e 53 53 4c 20 66 75 6e Msg, OpenSSL fun
8620: 63 74 69 6f 6e 20 5c 66 42 45 52 52 5f 72 65 61 ction \fBERR_rea
8630: 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e 67 son_error_string
8640: 28 29 5c 66 52 2c 0a 6f 72 20 61 20 63 75 73 74 ()\fR,.or a cust
8650: 6f 6d 20 6d 65 73 73 61 67 65 5c 26 2e 20 54 68 om message\&. Th
8660: 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e is callback is n
8670: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c ew for TclTLS 1\
8680: 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 69 6e &.8\&...TP.\fBin
8690: 66 6f 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c fo\fR \fIchannel
86a0: 49 64 20 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20 6d Id major minor m
86b0: 65 73 73 61 67 65 20 74 79 70 65 5c 66 52 0a 54 essage type\fR.T
86c0: 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c his form of call
86d0: 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 back is invoked
86e0: 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 by the OpenSSL f
86f0: 75 6e 63 74 69 6f 6e 0a 5c 66 42 53 53 4c 5f 73 unction.\fBSSL_s
8700: 65 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b et_info_callback
8710: 28 29 5c 66 52 20 64 75 72 69 6e 67 20 74 68 65 ()\fR during the
8720: 20 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 initial connect
8730: 69 6f 6e 20 61 6e 64 20 68 61 6e 64 73 68 61 6b ion and handshak
8740: 65 0a 6f 70 65 72 61 74 69 6f 6e 73 5c 26 2e 20 e.operations\&.
8750: 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61 72 The arguments ar
8760: 65 3a 0a 2e 52 53 0a 2e 54 50 0a 5c 66 49 6d 61 e:..RS..TP.\fIma
8770: 6a 6f 72 5c 66 52 0a 4d 61 6a 6f 72 20 63 61 74 jor\fR.Major cat
8780: 65 67 6f 72 79 20 66 6f 72 20 65 72 72 6f 72 5c egory for error\
8790: 26 2e 20 56 61 6c 69 64 20 65 6e 75 6d 73 20 61 &. Valid enums a
87a0: 72 65 3a 20 5c 66 42 68 61 6e 64 73 68 61 6b 65 re: \fBhandshake
87b0: 5c 66 52 2c 20 5c 66 42 61 6c 65 72 74 5c 66 52 \fR, \fBalert\fR
87c0: 2c 0a 5c 66 42 63 6f 6e 6e 65 63 74 5c 66 52 2c ,.\fBconnect\fR,
87d0: 20 5c 66 42 61 63 63 65 70 74 5c 66 52 5c 26 2e \fBaccept\fR\&.
87e0: 0a 2e 54 50 0a 5c 66 49 6d 69 6e 6f 72 5c 66 52 ..TP.\fIminor\fR
87f0: 0a 4d 69 6e 6f 72 20 63 61 74 65 67 6f 72 79 20 .Minor category
8800: 66 6f 72 20 65 72 72 6f 72 5c 26 2e 20 56 61 6c for error\&. Val
8810: 69 64 20 65 6e 75 6d 73 20 61 72 65 3a 20 5c 66 id enums are: \f
8820: 42 73 74 61 72 74 5c 66 52 2c 20 5c 66 42 64 6f Bstart\fR, \fBdo
8830: 6e 65 5c 66 52 2c 20 5c 66 42 72 65 61 64 5c 66 ne\fR, \fBread\f
8840: 52 2c 0a 5c 66 42 77 72 69 74 65 5c 66 52 2c 20 R,.\fBwrite\fR,
8850: 5c 66 42 6c 6f 6f 70 5c 66 52 2c 20 5c 66 42 65 \fBloop\fR, \fBe
8860: 78 69 74 5c 66 52 5c 26 2e 0a 2e 54 50 0a 5c 66 xit\fR\&...TP.\f
8870: 49 6d 65 73 73 61 67 65 5c 66 52 0a 44 65 73 63 Imessage\fR.Desc
8880: 72 69 70 74 69 76 65 20 6d 65 73 73 61 67 65 20 riptive message
8890: 73 74 72 69 6e 67 20 77 68 69 63 68 20 6d 61 79 string which may
88a0: 20 62 65 20 67 65 6e 65 72 61 74 65 64 20 65 69 be generated ei
88b0: 74 68 65 72 20 62 79 0a 5c 66 42 53 53 4c 5f 73 ther by.\fBSSL_s
88c0: 74 61 74 65 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 tate_string_long
88d0: 28 29 5c 66 52 20 6f 72 20 5c 66 42 53 53 4c 5f ()\fR or \fBSSL_
88e0: 61 6c 65 72 74 5f 64 65 73 63 5f 73 74 72 69 6e alert_desc_strin
88f0: 67 5f 6c 6f 6e 67 28 29 5c 66 52 2c 0a 64 65 70 g_long()\fR,.dep
8900: 65 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20 63 6f ending on the co
8910: 6e 74 65 78 74 5c 26 2e 0a 2e 54 50 0a 5c 66 49 ntext\&...TP.\fI
8920: 74 79 70 65 5c 66 52 0a 46 6f 72 20 61 6c 65 72 type\fR.For aler
8930: 74 73 2c 20 74 68 65 20 70 6f 73 73 69 62 6c 65 ts, the possible
8940: 20 76 61 6c 75 65 73 20 61 72 65 3a 20 5c 66 42 values are: \fB
8950: 77 61 72 6e 69 6e 67 5c 66 52 2c 0a 5c 66 42 66 warning\fR,.\fBf
8960: 61 74 61 6c 5c 66 52 2c 20 61 6e 64 20 5c 66 42 atal\fR, and \fB
8970: 75 6e 6b 6e 6f 77 6e 5c 66 52 5c 26 2e 20 46 6f unknown\fR\&. Fo
8980: 72 20 6f 74 68 65 72 73 2c 20 5c 66 42 69 6e 66 r others, \fBinf
8990: 6f 5c 66 52 20 69 73 20 75 73 65 64 5c 26 2e 0a o\fR is used\&..
89a0: 54 68 69 73 20 61 72 67 75 6d 65 6e 74 20 69 73 This argument is
89b0: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
89c0: 31 5c 26 2e 38 5c 26 2e 0a 2e 52 45 0a 2e 54 50 1\&.8\&...RE..TP
89d0: 0a 5c 66 42 6d 65 73 73 61 67 65 5c 66 52 20 5c .\fBmessage\fR \
89e0: 66 49 63 68 61 6e 6e 65 6c 49 64 20 64 69 72 65 fIchannelId dire
89f0: 63 74 69 6f 6e 20 76 65 72 73 69 6f 6e 20 63 6f ction version co
8a00: 6e 74 65 6e 74 5f 74 79 70 65 20 6d 65 73 73 61 ntent_type messa
8a10: 67 65 5c 66 52 0a 54 68 69 73 20 66 6f 72 6d 20 ge\fR.This form
8a20: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 of callback is i
8a30: 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 nvoked by the Op
8a40: 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 5c enSSL function.\
8a50: 66 42 53 53 4c 5f 73 65 74 5f 6d 73 67 5f 63 61 fBSSL_set_msg_ca
8a60: 6c 6c 62 61 63 6b 28 29 5c 66 52 20 77 68 65 6e llback()\fR when
8a70: 65 76 65 72 20 61 20 6d 65 73 73 61 67 65 20 69 ever a message i
8a80: 73 20 73 65 6e 74 20 6f 72 20 72 65 63 65 69 76 s sent or receiv
8a90: 65 64 20 64 75 72 69 6e 67 20 74 68 65 0a 69 6e ed during the.in
8aa0: 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e itial connection
8ab0: 2c 20 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 , handshake, or
8ac0: 49 2f 4f 20 6f 70 65 72 61 74 69 6f 6e 73 5c 26 I/O operations\&
8ad0: 2e 20 49 74 20 69 73 20 6f 6e 6c 79 20 61 76 61 . It is only ava
8ae0: 69 6c 61 62 6c 65 20 77 68 65 6e 0a 4f 70 65 6e ilable when.Open
8af0: 53 53 4c 20 69 73 20 63 6f 6d 70 6c 69 65 64 20 SSL is complied
8b00: 77 69 74 68 20 74 68 65 20 5c 66 42 65 6e 61 62 with the \fBenab
8b10: 6c 65 2d 73 73 6c 2d 74 72 61 63 65 5c 66 52 20 le-ssl-trace\fR
8b20: 6f 70 74 69 6f 6e 5c 26 2e 20 54 68 69 73 20 63 option\&. This c
8b30: 61 6c 6c 62 61 63 6b 20 69 73 0a 6e 65 77 20 66 allback is.new f
8b40: 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c or TclTLS 1\&.8\
8b50: 26 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 &. The arguments
8b60: 20 61 72 65 3a 0a 2e 52 53 0a 2e 54 50 0a 5c 66 are:..RS..TP.\f
8b70: 49 64 69 72 65 63 74 69 6f 6e 5c 66 52 0a 44 69 Idirection\fR.Di
8b80: 72 65 63 74 69 6f 6e 20 69 73 20 65 69 74 68 65 rection is eithe
8b90: 72 20 5c 66 42 53 65 6e 74 5c 66 52 20 6f 72 20 r \fBSent\fR or
8ba0: 5c 66 42 52 65 63 65 69 76 65 64 5c 66 52 5c 26 \fBReceived\fR\&
8bb0: 2e 0a 2e 54 50 0a 5c 66 49 76 65 72 73 69 6f 6e ...TP.\fIversion
8bc0: 5c 66 52 0a 56 65 72 73 69 6f 6e 20 69 73 20 74 \fR.Version is t
8bd0: 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 he protocol vers
8be0: 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 49 63 6f ion\&...TP.\fIco
8bf0: 6e 74 65 6e 74 5f 74 79 70 65 5c 66 52 0a 43 6f ntent_type\fR.Co
8c00: 6e 74 65 6e 74 20 74 79 70 65 20 69 73 20 74 68 ntent type is th
8c10: 65 20 6d 65 73 73 61 67 65 20 63 6f 6e 74 65 6e e message conten
8c20: 74 20 74 79 70 65 5c 26 2e 0a 2e 54 50 0a 5c 66 t type\&...TP.\f
8c30: 49 6d 65 73 73 61 67 65 5c 66 52 0a 4d 65 73 73 Imessage\fR.Mess
8c40: 61 67 65 20 69 73 20 6d 6f 72 65 20 69 6e 66 6f age is more info
8c50: 20 66 72 6f 6d 20 74 68 65 20 5c 66 42 53 53 4c from the \fBSSL
8c60: 5f 74 72 61 63 65 5c 66 52 20 41 50 49 5c 26 2e _trace\fR API\&.
8c70: 0a 2e 52 45 0a 2e 54 50 0a 5c 66 42 73 65 73 73 ..RE..TP.\fBsess
8c80: 69 6f 6e 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 ion\fR \fIchanne
8c90: 6c 49 64 20 73 65 73 73 69 6f 6e 5f 69 64 20 73 lId session_id s
8ca0: 65 73 73 69 6f 6e 5f 74 69 63 6b 65 74 20 6c 69 ession_ticket li
8cb0: 66 65 74 69 6d 65 5c 66 52 0a 54 68 69 73 20 66 fetime\fR.This f
8cc0: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 orm of callback
8cd0: 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 is invoked by th
8ce0: 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 e OpenSSL functi
8cf0: 6f 6e 0a 5c 66 42 53 53 4c 5f 43 54 58 5f 73 65 on.\fBSSL_CTX_se
8d00: 73 73 5f 73 65 74 5f 6e 65 77 5f 63 62 28 29 5c ss_set_new_cb()\
8d10: 66 52 20 77 68 65 6e 65 76 65 72 20 61 20 6e 65 fR whenever a ne
8d20: 77 20 73 65 73 73 69 6f 6e 20 69 64 20 69 73 20 w session id is
8d30: 73 65 6e 74 20 62 79 20 74 68 65 0a 73 65 72 76 sent by the.serv
8d40: 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e er during the in
8d50: 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e itial connection
8d60: 20 61 6e 64 20 68 61 6e 64 73 68 61 6b 65 20 61 and handshake a
8d70: 6e 64 20 61 6c 73 6f 20 64 75 72 69 6e 67 20 74 nd also during t
8d80: 68 65 20 73 65 73 73 69 6f 6e 0a 69 66 20 74 68 he session.if th
8d90: 65 20 5c 66 42 2d 70 6f 73 74 5f 68 61 6e 64 73 e \fB-post_hands
8da0: 68 61 6b 65 5c 66 52 20 6f 70 74 69 6f 6e 20 69 hake\fR option i
8db0: 73 20 73 65 74 20 74 6f 20 74 72 75 65 5c 26 2e s set to true\&.
8dc0: 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 This callback i
8dd0: 73 20 6e 65 77 20 66 6f 72 0a 54 63 6c 54 4c 53 s new for.TclTLS
8de0: 20 31 5c 26 2e 38 5c 26 2e 20 54 68 65 20 61 72 1\&.8\&. The ar
8df0: 67 75 6d 65 6e 74 73 20 61 72 65 3a 0a 2e 52 53 guments are:..RS
8e00: 0a 2e 54 50 0a 5c 66 49 73 65 73 73 69 6f 6e 5f ..TP.\fIsession_
8e10: 69 64 5c 66 52 0a 53 65 73 73 69 6f 6e 20 49 64 id\fR.Session Id
8e20: 20 69 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 is the current
8e30: 73 65 73 73 69 6f 6e 20 69 64 65 6e 74 69 66 69 session identifi
8e40: 65 72 0a 2e 54 50 0a 5c 66 49 73 65 73 73 69 6f er..TP.\fIsessio
8e50: 6e 5f 74 69 63 6b 65 74 5c 66 52 0a 54 69 63 6b n_ticket\fR.Tick
8e60: 65 74 20 69 73 20 74 68 65 20 73 65 73 73 69 6f et is the sessio
8e70: 6e 20 74 69 63 6b 65 74 20 69 6e 66 6f 0a 2e 54 n ticket info..T
8e80: 50 0a 5c 66 49 6c 69 66 65 74 69 6d 65 5c 66 52 P.\fIlifetime\fR
8e90: 0a 4c 69 66 65 74 69 6d 65 20 69 73 20 74 68 65 .Lifetime is the
8ea0: 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 ticket lifetime
8eb0: 20 69 6e 20 73 65 63 6f 6e 64 73 5c 26 2e 0a 2e in seconds\&...
8ec0: 52 45 0a 2e 54 50 0a 5c 66 42 76 65 72 69 66 79 RE..TP.\fBverify
8ed0: 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 \fR \fIchannelId
8ee0: 20 64 65 70 74 68 20 63 65 72 74 20 73 74 61 74 depth cert stat
8ef0: 75 73 20 65 72 72 6f 72 5c 66 52 0a 54 68 69 73 us error\fR.This
8f00: 20 63 61 6c 6c 62 61 63 6b 20 77 61 73 20 6d 6f callback was mo
8f10: 76 65 64 20 74 6f 20 5c 66 42 2d 76 61 6c 69 64 ved to \fB-valid
8f20: 61 74 65 63 6f 6d 6d 61 6e 64 5c 66 52 20 69 6e atecommand\fR in
8f30: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
8f40: 0a 2e 50 50 0a 2e 53 53 20 22 56 41 4c 55 45 53 ..PP..SS "VALUES
8f50: 20 46 4f 52 20 50 41 53 53 57 4f 52 44 20 43 41 FOR PASSWORD CA
8f60: 4c 4c 42 41 43 4b 22 0a 54 68 65 20 63 61 6c 6c LLBACK".The call
8f70: 62 61 63 6b 20 66 6f 72 20 74 68 65 20 5c 66 42 back for the \fB
8f80: 2d 70 61 73 73 77 6f 72 64 5c 66 52 20 6f 70 74 -password\fR opt
8f90: 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 ion is invoked b
8fa0: 79 20 54 63 6c 54 4c 53 20 77 68 65 6e 65 76 65 y TclTLS wheneve
8fb0: 72 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73 0a r OpenSSL needs.
8fc0: 74 6f 20 6f 62 74 61 69 6e 20 61 20 70 61 73 73 to obtain a pass
8fd0: 77 6f 72 64 5c 26 2e 20 53 65 65 20 62 65 6c 6f word\&. See belo
8fe0: 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62 w for the possib
8ff0: 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70 61 73 le arguments pas
9000: 73 65 64 20 74 6f 20 74 68 65 0a 63 61 6c 6c 62 sed to the.callb
9010: 61 63 6b 20 73 63 72 69 70 74 5c 26 2e 20 54 68 ack script\&. Th
9020: 65 20 75 73 65 72 20 70 72 6f 76 69 64 65 64 20 e user provided
9030: 70 61 73 73 77 6f 72 64 20 69 73 20 65 78 70 65 password is expe
9040: 63 74 65 64 20 74 6f 20 62 65 20 72 65 74 75 72 cted to be retur
9050: 6e 65 64 20 62 79 20 74 68 65 0a 63 61 6c 6c 62 ned by the.callb
9060: 61 63 6b 5c 26 2e 0a 2e 54 50 0a 5c 66 42 70 61 ack\&...TP.\fBpa
9070: 73 73 77 6f 72 64 5c 66 52 20 5c 66 49 72 77 66 ssword\fR \fIrwf
9080: 6c 61 67 20 73 69 7a 65 5c 66 52 0a 49 6e 76 6f lag size\fR.Invo
9090: 6b 65 64 20 77 68 65 6e 20 6c 6f 61 64 69 6e 67 ked when loading
90a0: 20 6f 72 20 73 74 6f 72 69 6e 67 20 61 6e 20 65 or storing an e
90b0: 6e 63 72 79 70 74 65 64 20 50 45 4d 20 63 65 72 ncrypted PEM cer
90c0: 74 69 66 69 63 61 74 65 5c 26 2e 20 54 68 65 20 tificate\&. The
90d0: 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 0a 2e arguments are:..
90e0: 52 53 0a 2e 54 50 0a 5c 66 49 72 77 66 6c 61 67 RS..TP.\fIrwflag
90f0: 5c 66 52 0a 54 68 65 20 72 65 61 64 2f 77 72 69 \fR.The read/wri
9100: 74 65 20 66 6c 61 67 20 69 73 20 30 20 66 6f 72 te flag is 0 for
9110: 20 72 65 61 64 69 6e 67 2f 64 65 63 72 79 70 74 reading/decrypt
9120: 69 6f 6e 20 6f 72 20 31 20 66 6f 72 20 77 72 69 ion or 1 for wri
9130: 74 69 6e 67 2f 65 6e 63 72 79 70 74 69 6f 6e 5c ting/encryption\
9140: 26 2e 0a 54 68 65 20 6c 61 74 74 65 72 20 63 61 &..The latter ca
9150: 6e 20 62 65 20 75 73 65 64 20 74 6f 20 64 65 74 n be used to det
9160: 65 72 6d 69 6e 65 20 77 68 65 6e 20 74 6f 20 70 ermine when to p
9170: 72 6f 6d 70 74 20 74 68 65 20 75 73 65 72 20 74 rompt the user t
9180: 6f 20 63 6f 6e 66 69 72 6d 5c 26 2e 0a 54 68 69 o confirm\&..Thi
9190: 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 s argument is ne
91a0: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 w for TclTLS 1\&
91b0: 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 49 73 69 7a .8\&...TP.\fIsiz
91c0: 65 5c 66 52 0a 54 68 65 20 73 69 7a 65 20 69 73 e\fR.The size is
91d0: 20 74 68 65 20 6d 61 78 69 6d 75 6d 20 6c 65 6e the maximum len
91e0: 67 74 68 20 6f 66 20 74 68 65 20 70 61 73 73 77 gth of the passw
91f0: 6f 72 64 20 69 6e 20 62 79 74 65 73 5c 26 2e 0a ord in bytes\&..
9200: 54 68 69 73 20 61 72 67 75 6d 65 6e 74 20 69 73 This argument is
9210: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
9220: 31 5c 26 2e 38 5c 26 2e 0a 2e 52 45 0a 2e 50 50 1\&.8\&...RE..PP
9230: 0a 2e 53 53 20 22 56 41 4c 55 45 53 20 46 4f 52 ..SS "VALUES FOR
9240: 20 56 41 4c 49 44 41 54 45 20 43 4f 4d 4d 41 4e VALIDATE COMMAN
9250: 44 20 43 41 4c 4c 42 41 43 4b 22 0a 54 68 65 20 D CALLBACK".The
9260: 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 callback for the
9270: 20 5c 66 42 2d 76 61 6c 69 64 61 74 65 63 6f 6d \fB-validatecom
9280: 6d 61 6e 64 5c 66 52 20 6f 70 74 69 6f 6e 20 69 mand\fR option i
9290: 73 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 s invoked during
92a0: 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 0a 70 the handshake.p
92b0: 72 6f 63 65 73 73 20 69 6e 20 6f 72 64 65 72 20 rocess in order
92c0: 66 6f 72 20 74 68 65 20 61 70 70 6c 69 63 61 74 for the applicat
92d0: 69 6f 6e 20 74 6f 20 76 61 6c 69 64 61 74 65 20 ion to validate
92e0: 74 68 65 20 70 72 6f 76 69 64 65 64 20 76 61 6c the provided val
92f0: 75 65 28 73 29 5c 26 2e 20 53 65 65 0a 62 65 6c ue(s)\&. See.bel
9300: 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69 ow for the possi
9310: 62 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70 61 ble arguments pa
9320: 73 73 65 64 20 74 6f 20 74 68 65 20 63 61 6c 6c ssed to the call
9330: 62 61 63 6b 20 73 63 72 69 70 74 5c 26 2e 20 49 back script\&. I
9340: 66 20 6e 6f 74 0a 73 70 65 63 69 66 69 65 64 2c f not.specified,
9350: 20 4f 70 65 6e 53 53 4c 20 77 69 6c 6c 20 61 63 OpenSSL will ac
9360: 63 65 70 74 20 61 6c 6c 20 76 61 6c 69 64 20 63 cept all valid c
9370: 65 72 74 69 66 69 63 61 74 65 73 20 61 6e 64 20 ertificates and
9380: 65 78 74 65 6e 73 69 6f 6e 73 5c 26 2e 20 54 6f extensions\&. To
9390: 20 72 65 6a 65 63 74 0a 74 68 65 20 76 61 6c 75 reject.the valu
93a0: 65 20 61 6e 64 20 61 62 6f 72 74 20 74 68 65 20 e and abort the
93b0: 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 74 68 65 20 connection, the
93c0: 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 callback should
93d0: 72 65 74 75 72 6e 20 30 5c 26 2e 20 54 6f 20 61 return 0\&. To a
93e0: 63 63 65 70 74 20 74 68 65 0a 76 61 6c 75 65 20 ccept the.value
93f0: 61 6e 64 20 63 6f 6e 74 69 6e 75 65 20 74 68 65 and continue the
9400: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20 connection, it
9410: 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 31 5c should return 1\
9420: 26 2e 20 54 6f 20 72 65 6a 65 63 74 20 74 68 65 &. To reject the
9430: 20 76 61 6c 75 65 2c 20 62 75 74 0a 63 6f 6e 74 value, but.cont
9440: 69 6e 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 inue the connect
9450: 69 6f 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 72 ion, it should r
9460: 65 74 75 72 6e 20 32 5c 26 2e 20 54 68 69 73 20 eturn 2\&. This
9470: 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 callback is new
9480: 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 for TclTLS 1\&.8
9490: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 61 6c 70 6e 5c \&...TP.\fBalpn\
94a0: 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 fR \fIchannelId
94b0: 70 72 6f 74 6f 63 6f 6c 20 6d 61 74 63 68 5c 66 protocol match\f
94c0: 52 0a 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 R.For servers, t
94d0: 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c his form of call
94e0: 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 back is invoked
94f0: 77 68 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 20 when the client
9500: 41 4c 50 4e 20 65 78 74 65 6e 73 69 6f 6e 20 69 ALPN extension i
9510: 73 0a 72 65 63 65 69 76 65 64 5c 26 2e 20 49 66 s.received\&. If
9520: 20 5c 66 49 6d 61 74 63 68 5c 66 52 20 69 73 20 \fImatch\fR is
9530: 74 72 75 65 2c 20 74 68 65 6e 20 5c 66 49 70 72 true, then \fIpr
9540: 6f 74 6f 63 6f 6c 5c 66 52 20 69 73 20 74 68 65 otocol\fR is the
9550: 20 66 69 72 73 74 0a 5c 66 42 2d 61 6c 70 6e 5c first.\fB-alpn\
9560: 66 52 20 70 72 6f 74 6f 63 6f 6c 20 6f 70 74 69 fR protocol opti
9570: 6f 6e 20 69 6e 20 63 6f 6d 6d 6f 6e 20 74 6f 20 on in common to
9580: 62 6f 74 68 20 74 68 65 20 63 6c 69 65 6e 74 20 both the client
9590: 61 6e 64 20 73 65 72 76 65 72 5c 26 2e 0a 49 66 and server\&..If
95a0: 20 6e 6f 74 2c 20 74 68 65 20 66 69 72 73 74 20 not, the first
95b0: 63 6c 69 65 6e 74 20 73 70 65 63 69 66 69 65 64 client specified
95c0: 20 70 72 6f 74 6f 63 6f 6c 20 69 73 20 75 73 65 protocol is use
95d0: 64 5c 26 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 d\&. This callba
95e0: 63 6b 20 69 73 20 63 61 6c 6c 65 64 0a 61 66 74 ck is called.aft
95f0: 65 72 20 74 68 65 20 48 65 6c 6c 6f 20 61 6e 64 er the Hello and
9600: 20 53 4e 49 20 63 61 6c 6c 62 61 63 6b 73 5c 26 SNI callbacks\&
9610: 2e 0a 2e 54 50 0a 5c 66 42 68 65 6c 6c 6f 5c 66 ...TP.\fBhello\f
9620: 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 73 R \fIchannelId s
9630: 65 72 76 65 72 6e 61 6d 65 20 73 65 73 73 69 6f ervername sessio
9640: 6e 5f 69 64 5c 66 52 0a 46 6f 72 20 73 65 72 76 n_id\fR.For serv
9650: 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f ers, this form o
9660: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e f callback is in
9670: 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 63 6c 69 voked during cli
9680: 65 6e 74 20 68 65 6c 6c 6f 20 6d 65 73 73 61 67 ent hello messag
9690: 65 0a 70 72 6f 63 65 73 73 69 6e 67 5c 26 2e 20 e.processing\&.
96a0: 54 68 65 20 70 75 72 70 6f 73 65 20 69 73 20 73 The purpose is s
96b0: 6f 20 74 68 65 20 73 65 72 76 65 72 20 63 61 6e o the server can
96c0: 20 73 65 6c 65 63 74 20 74 68 65 20 61 70 70 72 select the appr
96d0: 6f 70 72 69 61 74 65 20 63 65 72 74 69 66 69 63 opriate certific
96e0: 61 74 65 0a 74 6f 20 70 72 65 73 65 6e 74 20 74 ate.to present t
96f0: 6f 20 74 68 65 20 63 6c 69 65 6e 74 2c 20 61 6e o the client, an
9700: 64 20 74 6f 20 6d 61 6b 65 20 6f 74 68 65 72 20 d to make other
9710: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 64 configuration ad
9720: 6a 75 73 74 6d 65 6e 74 73 20 72 65 6c 65 76 61 justments releva
9730: 6e 74 0a 74 6f 20 74 68 61 74 20 73 65 72 76 65 nt.to that serve
9740: 72 20 6e 61 6d 65 20 61 6e 64 20 69 74 73 20 63 r name and its c
9750: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 5c 26 2e 20 onfiguration\&.
9760: 49 74 20 69 73 20 63 61 6c 6c 65 64 20 62 65 66 It is called bef
9770: 6f 72 65 20 74 68 65 20 53 4e 49 20 61 6e 64 20 ore the SNI and
9780: 41 4c 50 4e 0a 63 61 6c 6c 62 61 63 6b 73 5c 26 ALPN.callbacks\&
9790: 2e 0a 2e 54 50 0a 5c 66 42 73 6e 69 5c 66 52 20 ...TP.\fBsni\fR
97a0: 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 73 65 72 \fIchannelId ser
97b0: 76 65 72 6e 61 6d 65 5c 66 52 0a 46 6f 72 20 73 vername\fR.For s
97c0: 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 ervers, this for
97d0: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 m of callback is
97e0: 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74 68 invoked when th
97f0: 65 20 53 65 72 76 65 72 20 4e 61 6d 65 20 49 6e e Server Name In
9800: 64 69 63 61 74 69 6f 6e 0a 28 53 4e 49 29 20 65 dication.(SNI) e
9810: 78 74 65 6e 73 69 6f 6e 20 69 73 20 72 65 63 65 xtension is rece
9820: 69 76 65 64 5c 26 2e 20 54 68 65 20 5c 66 49 73 ived\&. The \fIs
9830: 65 72 76 65 72 6e 61 6d 65 5c 66 52 20 61 72 67 ervername\fR arg
9840: 75 6d 65 6e 74 20 69 73 20 74 68 65 20 63 6c 69 ument is the cli
9850: 65 6e 74 0a 70 72 6f 76 69 64 65 64 20 73 65 72 ent.provided ser
9860: 76 65 72 20 6e 61 6d 65 20 73 70 65 63 69 66 69 ver name specifi
9870: 65 64 20 69 6e 20 74 68 65 20 5c 66 42 2d 73 65 ed in the \fB-se
9880: 72 76 65 72 6e 61 6d 65 5c 66 52 20 6f 70 74 69 rvername\fR opti
9890: 6f 6e 5c 26 2e 20 54 68 65 0a 70 75 72 70 6f 73 on\&. The.purpos
98a0: 65 20 69 73 20 73 6f 20 77 68 65 6e 20 61 20 73 e is so when a s
98b0: 65 72 76 65 72 20 73 75 70 70 6f 72 74 73 20 6d erver supports m
98c0: 75 6c 74 69 70 6c 65 20 6e 61 6d 65 73 2c 20 74 ultiple names, t
98d0: 68 65 20 72 69 67 68 74 20 63 65 72 74 69 66 69 he right certifi
98e0: 63 61 74 65 0a 63 61 6e 20 62 65 20 75 73 65 64 cate.can be used
98f0: 5c 26 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 64 \&. It is called
9900: 20 61 66 74 65 72 20 74 68 65 20 48 65 6c 6c 6f after the Hello
9910: 20 63 61 6c 6c 62 61 63 6b 20 62 75 74 20 62 65 callback but be
9920: 66 6f 72 65 20 74 68 65 20 41 4c 50 4e 0a 63 61 fore the ALPN.ca
9930: 6c 6c 62 61 63 6b 5c 26 2e 0a 2e 54 50 0a 5c 66 llback\&...TP.\f
9940: 42 76 65 72 69 66 79 5c 66 52 20 5c 66 49 63 68 Bverify\fR \fIch
9950: 61 6e 6e 65 6c 49 64 20 64 65 70 74 68 20 63 65 annelId depth ce
9960: 72 74 20 73 74 61 74 75 73 20 65 72 72 6f 72 5c rt status error\
9970: 66 52 0a 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 fR.This form of
9980: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f callback is invo
9990: 6b 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 20 77 ked by OpenSSL w
99a0: 68 65 6e 20 61 20 6e 65 77 20 63 65 72 74 69 66 hen a new certif
99b0: 69 63 61 74 65 20 69 73 20 72 65 63 65 69 76 65 icate is receive
99c0: 64 0a 66 72 6f 6d 20 74 68 65 20 70 65 65 72 5c d.from the peer\
99d0: 26 2e 20 49 74 20 61 6c 6c 6f 77 73 20 74 68 65 &. It allows the
99e0: 20 63 6c 69 65 6e 74 20 74 6f 20 63 68 65 63 6b client to check
99f0: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
9a00: 20 76 65 72 69 66 69 63 61 74 69 6f 6e 0a 72 65 verification.re
9a10: 73 75 6c 74 73 20 61 6e 64 20 63 68 6f 6f 73 65 sults and choose
9a20: 20 77 68 65 74 68 65 72 20 74 6f 20 63 6f 6e 74 whether to cont
9a30: 69 6e 75 65 20 6f 72 20 6e 6f 74 5c 26 2e 20 49 inue or not\&. I
9a40: 74 20 69 73 20 63 61 6c 6c 65 64 20 66 6f 72 20 t is called for
9a50: 65 61 63 68 0a 63 65 72 74 69 66 69 63 61 74 65 each.certificate
9a60: 20 69 6e 20 74 68 65 20 63 65 72 74 69 66 69 63 in the certific
9a70: 61 74 65 20 63 68 61 69 6e 5c 26 2e 20 54 68 69 ate chain\&. Thi
9a80: 73 20 63 61 6c 6c 62 61 63 6b 20 77 61 73 20 6d s callback was m
9a90: 6f 76 65 64 20 66 72 6f 6d 0a 5c 66 42 2d 63 6f oved from.\fB-co
9aa0: 6d 6d 61 6e 64 5c 66 52 20 69 6e 20 54 63 6c 54 mmand\fR in TclT
9ab0: 4c 53 20 31 5c 26 2e 38 5c 26 2e 20 54 68 65 20 LS 1\&.8\&. The
9ac0: 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 0a 2e arguments are:..
9ad0: 52 53 0a 2e 54 50 0a 5c 66 49 64 65 70 74 68 5c RS..TP.\fIdepth\
9ae0: 66 52 0a 54 68 65 20 64 65 70 74 68 20 69 73 20 fR.The depth is
9af0: 74 68 65 20 69 6e 74 65 67 65 72 20 64 65 70 74 the integer dept
9b00: 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 h of the certifi
9b10: 63 61 74 65 20 69 6e 20 74 68 65 20 63 65 72 74 cate in the cert
9b20: 69 66 69 63 61 74 65 20 63 68 61 69 6e 2c 0a 77 ificate chain,.w
9b30: 68 65 72 65 20 30 20 69 73 20 74 68 65 20 70 65 here 0 is the pe
9b40: 65 72 20 63 65 72 74 69 66 69 63 61 74 65 20 61 er certificate a
9b50: 6e 64 20 68 69 67 68 65 72 20 76 61 6c 75 65 73 nd higher values
9b60: 20 67 6f 69 6e 67 20 75 70 20 74 6f 20 74 68 65 going up to the
9b70: 20 43 65 72 74 69 66 69 63 61 74 65 0a 41 75 74 Certificate.Aut
9b80: 68 6f 72 69 74 79 20 28 43 41 29 5c 26 2e 0a 2e hority (CA)\&...
9b90: 54 50 0a 5c 66 49 63 65 72 74 5c 66 52 0a 54 68 TP.\fIcert\fR.Th
9ba0: 65 20 63 65 72 74 20 61 72 67 75 6d 65 6e 74 20 e cert argument
9bb0: 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 is a list of key
9bc0: 2d 76 61 6c 75 65 20 70 61 69 72 73 20 73 69 6d -value pairs sim
9bd0: 69 6c 61 72 20 74 6f 20 74 68 6f 73 65 20 72 65 ilar to those re
9be0: 74 75 72 6e 65 64 20 62 79 0a 5c 66 42 74 6c 73 turned by.\fBtls
9bf0: 3a 3a 73 74 61 74 75 73 5c 66 52 5c 26 2e 0a 2e ::status\fR\&...
9c00: 54 50 0a 5c 66 49 73 74 61 74 75 73 5c 66 52 0a TP.\fIstatus\fR.
9c10: 54 68 65 20 73 74 61 74 75 73 20 61 72 67 75 6d The status argum
9c20: 65 6e 74 20 69 73 20 74 68 65 20 62 6f 6f 6c 65 ent is the boole
9c30: 61 6e 20 76 61 6c 69 64 69 74 79 20 6f 66 20 74 an validity of t
9c40: 68 65 20 63 75 72 72 65 6e 74 20 63 65 72 74 69 he current certi
9c50: 66 69 63 61 74 65 20 77 68 65 72 65 20 30 0a 69 ficate where 0.i
9c60: 73 20 69 6e 76 61 6c 69 64 20 61 6e 64 20 31 20 s invalid and 1
9c70: 69 73 20 76 61 6c 69 64 5c 26 2e 0a 2e 54 50 0a is valid\&...TP.
9c80: 5c 66 49 65 72 72 6f 72 5c 66 52 0a 54 68 65 20 \fIerror\fR.The
9c90: 65 72 72 6f 72 20 61 72 67 75 6d 65 6e 74 20 69 error argument i
9ca0: 73 20 74 68 65 20 65 72 72 6f 72 20 6d 65 73 73 s the error mess
9cb0: 61 67 65 2c 20 69 66 20 61 6e 79 2c 20 67 65 6e age, if any, gen
9cc0: 65 72 61 74 65 64 20 62 79 0a 5c 66 42 58 35 30 erated by.\fBX50
9cd0: 39 5f 53 54 4f 52 45 5f 43 54 58 5f 67 65 74 5f 9_STORE_CTX_get_
9ce0: 65 72 72 6f 72 28 29 5c 66 52 5c 26 2e 0a 2e 52 error()\fR\&...R
9cf0: 45 0a 2e 50 50 0a 52 65 66 65 72 65 6e 63 65 20 E..PP.Reference
9d00: 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20 implementations
9d10: 6f 66 20 74 68 65 73 65 20 63 61 6c 6c 62 61 63 of these callbac
9d20: 6b 73 20 61 72 65 20 70 72 6f 76 69 64 65 64 20 ks are provided
9d30: 69 6e 20 22 5c 66 49 74 6c 73 5c 26 2e 74 63 6c in "\fItls\&.tcl
9d40: 5c 66 52 22 0a 61 73 20 5c 66 42 74 6c 73 3a 3a \fR".as \fBtls::
9d50: 63 61 6c 6c 62 61 63 6b 5c 66 52 2c 20 5c 66 42 callback\fR, \fB
9d60: 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 5c 66 52 tls::password\fR
9d70: 2c 20 61 6e 64 20 5c 66 42 74 6c 73 3a 3a 76 61 , and \fBtls::va
9d80: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 lidate_command\f
9d90: 52 0a 72 65 73 70 65 63 74 69 76 65 6c 79 5c 26 R.respectively\&
9da0: 2e 20 4e 6f 74 65 20 74 68 61 74 20 74 68 65 73 . Note that thes
9db0: 65 20 61 72 65 20 6f 6e 6c 79 20 5c 66 49 73 61 e are only \fIsa
9dc0: 6d 70 6c 65 5c 66 52 20 69 6d 70 6c 65 6d 65 6e mple\fR implemen
9dd0: 74 61 74 69 6f 6e 73 5c 26 2e 20 49 6e 20 61 20 tations\&. In a
9de0: 6d 6f 72 65 0a 72 65 61 6c 69 73 74 69 63 20 64 more.realistic d
9df0: 65 70 6c 6f 79 6d 65 6e 74 20 79 6f 75 20 77 6f eployment you wo
9e00: 75 6c 64 20 73 70 65 63 69 66 79 20 79 6f 75 72 uld specify your
9e10: 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 20 73 63 own callback sc
9e20: 72 69 70 74 73 20 6f 6e 20 65 61 63 68 20 54 4c ripts on each TL
9e30: 53 0a 63 68 61 6e 6e 65 6c 20 75 73 69 6e 67 20 S.channel using
9e40: 74 68 65 20 5c 66 42 2d 63 6f 6d 6d 61 6e 64 5c the \fB-command\
9e50: 66 52 2c 20 5c 66 42 2d 70 61 73 73 77 6f 72 64 fR, \fB-password
9e60: 5c 66 52 2c 20 61 6e 64 0a 5c 66 42 2d 76 61 6c \fR, and.\fB-val
9e70: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 52 idate_command\fR
9e80: 20 6f 70 74 69 6f 6e 73 5c 26 2e 0a 2e 50 50 0a options\&...PP.
9e90: 54 68 65 20 64 65 66 61 75 6c 74 20 62 65 68 61 The default beha
9ea0: 76 69 6f 72 20 77 68 65 6e 20 74 68 65 20 5c 66 vior when the \f
9eb0: 42 2d 63 6f 6d 6d 61 6e 64 5c 66 52 20 61 6e 64 B-command\fR and
9ec0: 20 5c 66 42 2d 76 61 6c 69 64 61 74 65 5f 63 6f \fB-validate_co
9ed0: 6d 6d 61 6e 64 5c 66 52 0a 6f 70 74 69 6f 6e 73 mmand\fR.options
9ee0: 20 61 72 65 20 6e 6f 74 20 73 70 65 63 69 66 69 are not specifi
9ef0: 65 64 2c 20 69 73 20 66 6f 72 20 54 63 6c 54 4c ed, is for TclTL
9f00: 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 S to process the
9f10: 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 associated libr
9f20: 61 72 79 0a 63 61 6c 6c 62 61 63 6b 73 20 69 6e ary.callbacks in
9f30: 74 65 72 6e 61 6c 6c 79 5c 26 2e 20 54 68 65 20 ternally\&. The
9f40: 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 default behavior
9f50: 20 77 68 65 6e 20 74 68 65 20 5c 66 42 2d 70 61 when the \fB-pa
9f60: 73 73 77 6f 72 64 5c 66 52 20 6f 70 74 69 6f 6e ssword\fR option
9f70: 0a 69 73 20 6e 6f 74 20 73 70 65 63 69 66 69 65 .is not specifie
9f80: 64 20 69 73 20 66 6f 72 20 54 63 6c 54 4c 53 20 d is for TclTLS
9f90: 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 61 to process the a
9fa0: 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72 ssociated librar
9fb0: 79 20 63 61 6c 6c 62 61 63 6b 73 20 62 79 0a 61 y callbacks by.a
9fc0: 74 74 65 6d 70 74 69 6e 67 20 74 6f 20 63 61 6c ttempting to cal
9fd0: 6c 20 5c 66 42 74 6c 73 3a 3a 70 61 73 73 77 6f l \fBtls::passwo
9fe0: 72 64 5c 66 52 5c 26 2e 20 54 68 65 20 64 69 66 rd\fR\&. The dif
9ff0: 66 65 72 65 6e 63 65 20 62 65 74 77 65 65 6e 20 ference between
a000: 74 68 65 73 65 20 74 77 6f 0a 62 65 68 61 76 69 these two.behavi
a010: 6f 72 73 20 69 73 20 61 20 63 6f 6e 73 65 71 75 ors is a consequ
a020: 65 6e 63 65 20 6f 66 20 6d 61 69 6e 74 61 69 6e ence of maintain
a030: 69 6e 67 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 ing compatibilit
a040: 79 20 77 69 74 68 20 65 61 72 6c 69 65 72 0a 69 y with earlier.i
a050: 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 5c 26 mplementations\&
a060: 2e 0a 2e 50 50 0a 5c 66 49 54 68 65 20 75 73 65 ...PP.\fIThe use
a070: 20 6f 66 20 74 68 65 20 72 65 66 65 72 65 6e 63 of the referenc
a080: 65 20 63 61 6c 6c 62 61 63 6b 73 20 5c 66 42 74 e callbacks \fBt
a090: 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 5c 66 52 2c ls::callback\fR,
a0a0: 20 5c 66 42 74 6c 73 3a 3a 70 61 73 73 77 6f 72 \fBtls::passwor
a0b0: 64 5c 66 52 2c 0a 61 6e 64 20 5c 66 42 74 6c 73 d\fR,.and \fBtls
a0c0: 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 ::validate_comma
a0d0: 6e 64 5c 66 52 20 69 73 20 6e 6f 74 20 72 65 63 nd\fR is not rec
a0e0: 6f 6d 6d 65 6e 64 65 64 5c 26 2e 20 54 68 65 79 ommended\&. They
a0f0: 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 20 may be removed
a100: 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65 from future rele
a110: 61 73 65 73 5c 26 2e 5c 66 52 0a 2e 53 48 20 44 ases\&.\fR..SH D
a120: 45 42 55 47 0a 46 6f 72 20 6d 6f 73 74 20 64 65 EBUG.For most de
a130: 62 75 67 67 69 6e 67 20 6e 65 65 64 73 2c 20 74 bugging needs, t
a140: 68 65 20 5c 66 42 2d 63 61 6c 6c 62 61 63 6b 5c he \fB-callback\
a150: 66 52 20 6f 70 74 69 6f 6e 20 63 61 6e 20 62 65 fR option can be
a160: 20 75 73 65 64 20 74 6f 20 70 72 6f 76 69 64 65 used to provide
a170: 0a 73 75 66 66 69 63 69 65 6e 74 20 69 6e 73 69 .sufficient insi
a180: 67 68 74 20 61 6e 64 20 69 6e 66 6f 72 6d 61 74 ght and informat
a190: 69 6f 6e 20 6f 6e 20 74 68 65 20 54 4c 53 20 68 ion on the TLS h
a1a0: 61 6e 64 73 68 61 6b 65 20 61 6e 64 20 70 72 6f andshake and pro
a1b0: 67 72 65 73 73 5c 26 2e 20 49 66 0a 66 75 72 74 gress\&. If.furt
a1c0: 68 65 72 20 74 72 6f 75 62 6c 65 73 68 6f 6f 74 her troubleshoot
a1d0: 69 6e 67 20 69 6e 73 69 67 68 74 20 69 73 20 6e ing insight is n
a1e0: 65 65 64 65 64 2c 20 74 68 65 20 63 6f 6d 70 69 eeded, the compi
a1f0: 6c 65 20 74 69 6d 65 20 6f 70 74 69 6f 6e 0a 5c le time option.\
a200: 66 42 2d 2d 65 6e 61 62 6c 65 2d 64 65 62 75 67 fB--enable-debug
a210: 5c 66 52 20 63 61 6e 20 62 65 20 75 73 65 64 20 \fR can be used
a220: 74 6f 20 67 65 74 20 64 65 74 61 69 6c 65 64 20 to get detailed
a230: 65 78 65 63 75 74 69 6f 6e 20 66 6c 6f 77 20 73 execution flow s
a240: 74 61 74 75 73 5c 26 2e 0a 2e 50 50 0a 54 4c 53 tatus\&...PP.TLS
a250: 20 6b 65 79 20 6c 6f 67 67 69 6e 67 20 63 61 6e key logging can
a260: 20 62 65 20 65 6e 61 62 6c 65 64 20 62 79 20 73 be enabled by s
a270: 65 74 74 69 6e 67 20 74 68 65 20 65 6e 76 69 72 etting the envir
a280: 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 0a onment variable.
a290: 5c 66 42 53 53 4c 4b 45 59 4c 4f 47 46 49 4c 45 \fBSSLKEYLOGFILE
a2a0: 5c 66 52 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 \fR to the name
a2b0: 6f 66 20 74 68 65 20 66 69 6c 65 20 74 6f 20 6c of the file to l
a2c0: 6f 67 20 74 6f 5c 26 2e 20 54 68 65 6e 20 77 68 og to\&. Then wh
a2d0: 65 6e 65 76 65 72 20 54 4c 53 20 6b 65 79 0a 6d enever TLS key.m
a2e0: 61 74 65 72 69 61 6c 20 69 73 20 67 65 6e 65 72 aterial is gener
a2f0: 61 74 65 64 20 6f 72 20 72 65 63 65 69 76 65 64 ated or received
a300: 20 69 74 20 77 69 6c 6c 20 62 65 20 6c 6f 67 67 it will be logg
a310: 65 64 20 74 6f 20 74 68 65 20 66 69 6c 65 5c 26 ed to the file\&
a320: 2e 20 54 68 69 73 20 69 73 20 75 73 65 66 75 6c . This is useful
a330: 0a 66 6f 72 20 6c 6f 67 67 69 6e 67 20 6b 65 79 .for logging key
a340: 20 64 61 74 61 20 66 6f 72 20 6e 65 74 77 6f 72 data for networ
a350: 6b 20 6c 6f 67 67 69 6e 67 20 74 6f 6f 6c 73 20 k logging tools
a360: 74 6f 20 75 73 65 20 74 6f 20 64 65 63 72 79 70 to use to decryp
a370: 74 20 74 68 65 20 64 61 74 61 5c 26 2e 0a 2e 50 t the data\&...P
a380: 50 0a 54 68 65 20 5c 66 42 74 6c 73 3a 3a 64 65 P.The \fBtls::de
a390: 62 75 67 5c 66 52 20 76 61 72 69 61 62 6c 65 20 bug\fR variable
a3a0: 70 72 6f 76 69 64 65 73 20 73 6f 6d 65 20 61 64 provides some ad
a3b0: 64 69 74 69 6f 6e 61 6c 20 63 6f 6e 74 72 6f 6c ditional control
a3c0: 20 6f 76 65 72 20 74 68 65 0a 64 65 62 75 67 20 over the.debug
a3d0: 6c 6f 67 67 69 6e 67 20 69 6e 20 74 68 65 20 5c logging in the \
a3e0: 66 42 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 5c fBtls::callback\
a3f0: 66 52 2c 20 5c 66 42 74 6c 73 3a 3a 70 61 73 73 fR, \fBtls::pass
a400: 77 6f 72 64 5c 66 52 2c 20 61 6e 64 0a 5c 66 42 word\fR, and.\fB
a410: 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f tls::validate_co
a420: 6d 6d 61 6e 64 5c 66 52 20 64 65 66 61 75 6c 74 mmand\fR default
a430: 20 68 61 6e 64 6c 65 72 73 20 69 6e 20 22 5c 66 handlers in "\f
a440: 49 74 6c 73 5c 26 2e 74 63 6c 5c 66 52 22 5c 26 Itls\&.tcl\fR"\&
a450: 2e 0a 54 68 65 20 64 65 66 61 75 6c 74 20 76 61 ..The default va
a460: 6c 75 65 20 69 73 20 30 20 77 69 74 68 20 68 69 lue is 0 with hi
a470: 67 68 65 72 20 76 61 6c 75 65 73 20 70 72 6f 64 gher values prod
a480: 75 63 69 6e 67 20 6d 6f 72 65 20 64 69 61 67 6e ucing more diagn
a490: 6f 73 74 69 63 20 6f 75 74 70 75 74 2c 0a 61 6e ostic output,.an
a4a0: 64 20 77 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 63 d will also forc
a4b0: 65 20 74 68 65 20 76 65 72 69 66 79 20 6d 65 74 e the verify met
a4c0: 68 6f 64 20 69 6e 20 5c 66 42 74 6c 73 3a 3a 63 hod in \fBtls::c
a4d0: 61 6c 6c 62 61 63 6b 5c 66 52 20 74 6f 20 61 63 allback\fR to ac
a4e0: 63 65 70 74 20 74 68 65 0a 63 65 72 74 69 66 69 cept the.certifi
a4f0: 63 61 74 65 2c 20 65 76 65 6e 20 69 66 20 69 74 cate, even if it
a500: 20 69 73 20 69 6e 76 61 6c 69 64 20 77 68 65 6e is invalid when
a510: 20 74 68 65 20 5c 66 42 2d 76 61 6c 69 64 61 74 the \fB-validat
a520: 65 63 6f 6d 6d 61 6e 64 5c 66 52 0a 6f 70 74 69 ecommand\fR.opti
a530: 6f 6e 20 69 73 20 73 65 74 20 74 6f 20 5c 66 42 on is set to \fB
a540: 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f tls::validate_co
a550: 6d 6d 61 6e 64 5c 66 52 5c 26 2e 0a 2e 50 50 0a mmand\fR\&...PP.
a560: 5c 66 49 54 68 65 20 75 73 65 20 6f 66 20 74 68 \fIThe use of th
a570: 65 20 76 61 72 69 61 62 6c 65 20 5c 66 42 74 6c e variable \fBtl
a580: 73 3a 3a 64 65 62 75 67 5c 66 52 20 69 73 20 6e s::debug\fR is n
a590: 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 5c 26 ot recommended\&
a5a0: 2e 0a 49 74 20 6d 61 79 20 62 65 20 72 65 6d 6f ..It may be remo
a5b0: 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65 20 ved from future
a5c0: 72 65 6c 65 61 73 65 73 5c 26 2e 5c 66 52 0a 2e releases\&.\fR..
a5d0: 53 48 20 45 58 41 4d 50 4c 45 53 0a 54 68 65 20 SH EXAMPLES.The
a5e0: 66 6f 6c 6c 6f 77 69 6e 67 20 61 72 65 20 65 78 following are ex
a5f0: 61 6d 70 6c 65 20 73 63 72 69 70 74 73 20 74 6f ample scripts to
a600: 20 64 6f 77 6e 6c 6f 61 64 20 61 20 77 65 62 70 download a webp
a610: 61 67 65 20 61 6e 64 20 66 69 6c 65 20 75 73 69 age and file usi
a620: 6e 67 20 74 68 65 0a 68 74 74 70 20 70 61 63 6b ng the.http pack
a630: 61 67 65 5c 26 2e 20 53 65 65 20 5c 66 42 43 65 age\&. See \fBCe
a640: 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 rtificate Valida
a650: 74 69 6f 6e 5c 66 52 20 66 6f 72 20 77 68 65 6e tion\fR for when
a660: 20 74 68 65 0a 5c 66 42 2d 63 61 64 69 72 5c 66 the.\fB-cadir\f
a670: 52 2c 20 5c 66 42 2d 63 61 66 69 6c 65 5c 66 52 R, \fB-cafile\fR
a680: 2c 20 61 6e 64 20 5c 66 42 2d 63 61 73 74 6f 72 , and \fB-castor
a690: 65 5c 66 52 20 6f 70 74 69 6f 6e 73 20 61 72 65 e\fR options are
a6a0: 20 61 6c 73 6f 0a 6e 65 65 64 65 64 5c 26 2e 20 also.needed\&.
a6b0: 53 65 65 20 74 68 65 20 22 5c 66 49 64 65 6d 6f See the "\fIdemo
a6c0: 73 5c 66 52 22 20 64 69 72 65 63 74 6f 72 79 20 s\fR" directory
a6d0: 66 6f 72 20 6d 6f 72 65 20 65 78 61 6d 70 6c 65 for more example
a6e0: 20 73 63 72 69 70 74 73 5c 26 2e 0a 2e 50 50 0a scripts\&...PP.
a6f0: 45 78 61 6d 70 6c 65 20 23 31 3a 20 44 6f 77 6e Example #1: Down
a700: 6c 6f 61 64 20 61 20 77 65 62 20 70 61 67 65 0a load a web page.
a710: 2e 43 53 0a 0a 0a 0a 70 61 63 6b 61 67 65 20 72 .CS....package r
a720: 65 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b equire http.pack
a730: 61 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a age require tls.
a740: 0a 73 65 74 20 75 72 6c 20 22 68 74 74 70 73 3a .set url "https:
a750: 2f 2f 77 77 77 5c 26 2e 74 63 6c 5c 26 2e 74 6b //www\&.tcl\&.tk
a760: 2f 22 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 65 /".http::registe
a770: 72 20 68 74 74 70 73 20 34 34 33 20 5b 6c 69 73 r https 443 [lis
a780: 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 t ::tls::socket
a790: 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 -autoservername
a7a0: 31 20 2d 72 65 71 75 69 72 65 20 31 5d 0a 0a 23 1 -require 1]..#
a7b0: 20 47 65 74 20 55 52 4c 0a 73 65 74 20 74 6f 6b Get URL.set tok
a7c0: 65 6e 20 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c en [http::geturl
a7d0: 20 24 75 72 6c 5d 0a 0a 23 20 43 68 65 63 6b 20 $url]..# Check
a7e0: 66 6f 72 20 65 72 72 6f 72 0a 69 66 20 7b 5b 68 for error.if {[h
a7f0: 74 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b ttp::status $tok
a800: 65 6e 5d 20 6e 65 20 22 6f 6b 22 7d 20 7b 0a 20 en] ne "ok"} {.
a810: 20 20 20 70 75 74 73 20 5b 66 6f 72 6d 61 74 20 puts [format
a820: 22 45 72 72 6f 72 20 25 73 22 20 5b 68 74 74 70 "Error %s" [http
a830: 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d ::status $token]
a840: 5d 0a 7d 0a 0a 23 20 53 61 76 65 20 77 65 62 20 ].}..# Save web
a850: 70 61 67 65 20 74 6f 20 66 69 6c 65 0a 73 65 74 page to file.set
a860: 20 63 68 20 5b 6f 70 65 6e 20 65 78 61 6d 70 6c ch [open exampl
a870: 65 5c 26 2e 68 74 6d 6c 20 77 62 5d 0a 70 75 74 e\&.html wb].put
a880: 73 20 24 63 68 20 5b 68 74 74 70 3a 3a 64 61 74 s $ch [http::dat
a890: 61 20 24 74 6f 6b 65 6e 5d 0a 63 6c 6f 73 65 20 a $token].close
a8a0: 24 63 68 0a 0a 23 20 43 6c 65 61 6e 75 70 0a 3a $ch..# Cleanup.:
a8b0: 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 24 :http::cleanup $
a8c0: 74 6f 6b 65 6e 0a 0a 2e 43 45 0a 45 78 61 6d 70 token...CE.Examp
a8d0: 6c 65 20 23 32 3a 20 44 6f 77 6e 6c 6f 61 64 20 le #2: Download
a8e0: 61 20 66 69 6c 65 0a 2e 43 53 0a 0a 0a 0a 70 61 a file..CS....pa
a8f0: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 74 ckage require ht
a900: 74 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 tp.package requi
a910: 72 65 20 74 6c 73 0a 0a 73 65 74 20 75 72 6c 20 re tls..set url
a920: 22 68 74 74 70 73 3a 2f 2f 77 69 6b 69 5c 26 2e "https://wiki\&.
a930: 74 63 6c 2d 6c 61 6e 67 5c 26 2e 6f 72 67 2f 73 tcl-lang\&.org/s
a940: 69 74 65 6d 61 70 5c 26 2e 78 6d 6c 22 0a 68 74 itemap\&.xml".ht
a950: 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 74 tp::register htt
a960: 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 ps 443 [list ::t
a970: 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f ls::socket -auto
a980: 73 65 72 76 65 72 6e 61 6d 65 20 31 20 2d 72 65 servername 1 -re
a990: 71 75 69 72 65 20 31 5d 0a 0a 23 20 4f 70 65 6e quire 1]..# Open
a9a0: 20 6f 75 74 70 75 74 20 66 69 6c 65 0a 73 65 74 output file.set
a9b0: 20 66 69 6c 65 6e 61 6d 65 20 5b 66 69 6c 65 20 filename [file
a9c0: 74 61 69 6c 20 24 75 72 6c 5d 0a 73 65 74 20 63 tail $url].set c
a9d0: 68 20 5b 6f 70 65 6e 20 24 66 69 6c 65 6e 61 6d h [open $filenam
a9e0: 65 20 77 62 5d 0a 0a 23 20 47 65 74 20 66 69 6c e wb]..# Get fil
a9f0: 65 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 3a 3a 68 e.set token [::h
aa00: 74 74 70 3a 3a 67 65 74 75 72 6c 20 24 75 72 6c ttp::geturl $url
aa10: 20 2d 62 6c 6f 63 6b 73 69 7a 65 20 36 35 35 33 -blocksize 6553
aa20: 36 20 2d 63 68 61 6e 6e 65 6c 20 24 63 68 5d 0a 6 -channel $ch].
aa30: 0a 23 20 43 68 65 63 6b 20 66 6f 72 20 65 72 72 .# Check for err
aa40: 6f 72 0a 69 66 20 7b 5b 68 74 74 70 3a 3a 73 74 or.if {[http::st
aa50: 61 74 75 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 20 atus $token] ne
aa60: 22 6f 6b 22 7d 20 7b 0a 20 20 20 20 70 75 74 73 "ok"} {. puts
aa70: 20 5b 66 6f 72 6d 61 74 20 22 45 72 72 6f 72 20 [format "Error
aa80: 25 73 22 20 5b 68 74 74 70 3a 3a 73 74 61 74 75 %s" [http::statu
aa90: 73 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 0a 23 20 s $token]].}..#
aaa0: 43 6c 65 61 6e 75 70 0a 63 6c 6f 73 65 20 24 63 Cleanup.close $c
aab0: 68 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 h.::http::cleanu
aac0: 70 20 24 74 6f 6b 65 6e 0a 0a 2e 43 45 0a 2e 53 p $token...CE..S
aad0: 48 20 22 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 H "SPECIAL CONSI
aae0: 44 45 52 41 54 49 4f 4e 53 22 0a 54 68 65 20 63 DERATIONS".The c
aaf0: 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20 74 apabilities of t
ab00: 68 69 73 20 70 61 63 6b 61 67 65 20 63 61 6e 20 his package can
ab10: 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c 79 20 vary enormously
ab20: 62 61 73 65 64 20 75 70 6f 6e 20 68 6f 77 20 74 based upon how t
ab30: 68 65 0a 6c 69 6e 6b 65 64 20 74 6f 20 4f 70 65 he.linked to Ope
ab40: 6e 53 53 4c 20 6c 69 62 72 61 72 79 20 77 61 73 nSSL library was
ab50: 20 63 6f 6e 66 69 67 75 72 65 64 20 61 6e 64 20 configured and
ab60: 62 75 69 6c 74 5c 26 2e 20 4e 65 77 20 76 65 72 built\&. New ver
ab70: 73 69 6f 6e 73 20 6d 61 79 20 6f 62 73 6f 6c 65 sions may obsole
ab80: 74 65 0a 6f 6c 64 65 72 20 70 72 6f 74 6f 63 6f te.older protoco
ab90: 6c 20 76 65 72 73 69 6f 6e 73 2c 20 61 64 64 20 l versions, add
aba0: 6f 72 20 72 65 6d 6f 76 65 20 63 69 70 68 65 72 or remove cipher
abb0: 73 2c 20 63 68 61 6e 67 65 20 64 65 66 61 75 6c s, change defaul
abc0: 74 20 76 61 6c 75 65 73 2c 20 65 74 63 5c 26 2e t values, etc\&.
abd0: 0a 55 73 65 20 74 68 65 20 5c 66 42 74 6c 73 3a .Use the \fBtls:
abe0: 3a 70 72 6f 74 6f 63 6f 6c 73 5c 66 52 20 63 6f :protocols\fR co
abf0: 6d 6d 61 6e 64 20 74 6f 20 6f 62 74 61 69 6e 20 mmand to obtain
ac00: 74 68 65 20 73 75 70 70 6f 72 74 65 64 0a 70 72 the supported.pr
ac10: 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73 5c otocol versions\
ac20: 26 2e 0a 2e 53 48 20 22 45 52 52 4f 52 20 4d 45 &...SH "ERROR ME
ac30: 53 53 41 47 45 53 22 0a 53 6f 6d 65 20 4f 70 73 SSAGES".Some Ops
ac40: 6e 53 53 6c 20 65 72 72 6f 72 20 6d 65 73 73 61 nSSl error messa
ac50: 67 65 73 20 68 61 76 65 20 63 72 79 70 74 69 63 ges have cryptic
ac60: 20 6d 65 61 6e 69 6e 67 73 5c 26 2e 20 54 68 69 meanings\&. Thi
ac70: 73 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6d s is a list of m
ac80: 65 73 73 61 67 65 73 0a 61 6c 6f 6e 67 20 77 69 essages.along wi
ac90: 74 68 20 74 68 65 69 72 20 74 72 75 65 20 6d 65 th their true me
aca0: 61 6e 69 6e 67 5c 26 2e 0a 2e 54 50 0a 5c 66 49 aning\&...TP.\fI
acb0: 68 61 6e 64 73 68 61 6b 65 20 66 61 69 6c 65 64 handshake failed
acc0: 3a 20 63 65 72 74 69 66 69 63 61 74 65 20 76 65 : certificate ve
acd0: 72 69 66 79 20 66 61 69 6c 65 64 20 64 75 65 20 rify failed due
ace0: 74 6f 20 22 75 6e 61 62 6c 65 20 74 6f 20 67 65 to "unable to ge
acf0: 74 20 6c 6f 63 61 6c 20 69 73 73 75 65 72 20 63 t local issuer c
ad00: 65 72 74 69 66 69 63 61 74 65 22 5c 66 52 0a 54 ertificate"\fR.T
ad10: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 73 20 he certificates
ad20: 69 6e 20 74 68 65 20 43 41 20 66 69 6c 65 20 6f in the CA file o
ad30: 72 20 63 65 72 74 69 66 69 63 61 74 65 20 73 74 r certificate st
ad40: 6f 72 65 20 65 69 74 68 65 72 20 64 6f 20 6e 6f ore either do no
ad50: 74 20 68 61 76 65 20 6f 6e 65 20 6f 72 0a 6d 6f t have one or.mo
ad60: 72 65 20 69 73 73 75 65 72 73 20 6f 66 20 74 68 re issuers of th
ad70: 65 20 63 65 72 74 69 66 69 63 61 74 65 73 20 79 e certificates y
ad80: 6f 75 20 61 72 65 20 76 61 6c 69 64 61 74 69 6e ou are validatin
ad90: 67 20 6f 72 20 74 68 65 79 20 68 61 76 65 20 65 g or they have e
ada0: 78 70 69 72 65 64 5c 26 2e 0a 55 73 75 61 6c 6c xpired\&..Usuall
adb0: 79 20 74 68 69 73 20 6d 65 61 6e 73 20 79 6f 75 y this means you
adc0: 20 6e 65 65 64 20 61 6e 20 75 70 64 61 74 65 64 need an updated
add0: 20 43 41 63 65 72 74 20 66 69 6c 65 5c 26 2e 0a CAcert file\&..
ade0: 2e 54 50 0a 5c 66 49 70 61 63 6b 65 74 20 6c 65 .TP.\fIpacket le
adf0: 6e 67 74 68 20 74 6f 6f 20 6c 6f 6e 67 5c 66 52 ngth too long\fR
ae00: 0a 43 6c 69 65 6e 74 20 68 61 73 20 74 72 69 65 .Client has trie
ae10: 64 20 74 6f 20 63 6f 6e 6e 65 63 74 20 74 6f 20 d to connect to
ae20: 61 20 48 54 54 50 20 73 65 72 76 65 72 20 6f 6e a HTTP server on
ae30: 20 74 68 65 20 70 6c 61 69 6e 2d 74 65 78 74 20 the plain-text
ae40: 70 6f 72 74 20 69 6e 73 74 65 61 64 20 6f 66 0a port instead of.
ae50: 74 68 65 20 53 53 4c 2f 54 4c 53 20 70 6f 72 74 the SSL/TLS port
ae60: 5c 26 2e 0a 2e 54 50 0a 5c 66 49 75 6e 65 78 70 \&...TP.\fIunexp
ae70: 65 63 74 65 64 20 65 6f 66 20 77 68 69 6c 65 20 ected eof while
ae80: 72 65 61 64 69 6e 67 5c 66 52 0a 54 68 65 20 70 reading\fR.The p
ae90: 65 65 72 20 68 61 73 20 63 6c 6f 73 65 64 20 74 eer has closed t
aea0: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 77 69 he connection wi
aeb0: 74 68 6f 75 74 20 73 65 6e 64 69 6e 67 20 74 68 thout sending th
aec0: 65 20 22 63 6c 6f 73 65 20 6e 6f 74 69 66 79 22 e "close notify"
aed0: 20 73 68 75 74 64 6f 77 6e 0a 61 6c 65 72 74 5c shutdown.alert\
aee0: 26 2e 20 53 6f 6d 65 20 73 65 72 76 65 72 73 20 &. Some servers
aef0: 77 69 6c 6c 20 74 65 72 6d 69 6e 61 74 65 20 74 will terminate t
af00: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 61 66 he connection af
af10: 74 65 72 20 74 68 65 20 66 69 6c 65 20 6f 72 20 ter the file or
af20: 77 65 62 70 61 67 65 20 68 61 73 0a 62 65 65 6e webpage has.been
af30: 20 73 65 6e 74 20 77 69 74 68 6f 75 74 20 73 65 sent without se
af40: 6e 64 69 6e 67 20 74 68 65 20 22 63 6c 6f 73 65 nding the "close
af50: 20 6e 6f 74 69 66 79 22 20 6d 65 73 73 61 67 65 notify" message
af60: 5c 26 2e 20 49 6e 20 74 68 69 73 20 63 61 73 65 \&. In this case
af70: 2c 20 69 74 20 73 68 6f 75 6c 64 0a 6e 6f 74 20 , it should.not
af80: 72 65 73 75 6c 74 20 69 6e 20 61 20 6c 6f 73 73 result in a loss
af90: 20 6f 66 20 64 61 74 61 5c 26 2e 0a 2e 54 50 0a of data\&...TP.
afa0: 5c 66 49 77 72 6f 6e 67 20 76 65 72 73 69 6f 6e \fIwrong version
afb0: 20 6e 75 6d 62 65 72 5c 66 52 0a 43 6c 69 65 6e number\fR.Clien
afc0: 74 20 68 61 73 20 74 72 69 65 64 20 74 6f 20 63 t has tried to c
afd0: 6f 6e 6e 65 63 74 20 74 6f 20 61 20 6e 6f 6e 2d onnect to a non-
afe0: 48 54 54 50 20 73 65 72 76 65 72 20 6f 6e 20 61 HTTP server on a
aff0: 20 6e 6f 6e 2d 54 4c 53 20 28 69 5c 26 2e 65 5c non-TLS (i\&.e\
b000: 26 2e 20 70 6c 61 69 6e 20 74 65 78 74 29 20 70 &. plain text) p
b010: 6f 72 74 5c 26 2e 0a 2e 50 50 0a 2e 53 48 20 22 ort\&...PP..SH "
b020: 53 45 45 20 41 4c 53 4f 22 0a 5c 66 49 4f 70 65 SEE ALSO".\fIOpe
b030: 6e 53 53 4c 5c 66 52 20 5b 68 74 74 70 73 3a 2f nSSL\fR [https:/
b040: 2f 77 77 77 5c 26 2e 6f 70 65 6e 73 73 6c 5c 26 /www\&.openssl\&
b050: 2e 6f 72 67 2f 5d 2c 20 68 74 74 70 2c 20 73 6f .org/], http, so
b060: 63 6b 65 74 0a 2e 53 48 20 4b 45 59 57 4f 52 44 cket..SH KEYWORD
b070: 53 0a 49 2f 4f 2c 20 49 50 20 41 64 64 72 65 73 S.I/O, IP Addres
b080: 73 2c 20 4f 70 65 6e 53 53 4c 2c 20 53 53 4c 2c s, OpenSSL, SSL,
b090: 20 54 43 50 2c 20 54 4c 53 2c 20 54 63 6c 54 4c TCP, TLS, TclTL
b0a0: 53 2c 20 61 73 79 6e 63 68 72 6f 6e 6f 75 73 20 S, asynchronous
b0b0: 49 2f 4f 2c 20 62 69 6e 64 2c 20 63 65 72 74 69 I/O, bind, certi
b0c0: 66 69 63 61 74 65 2c 20 63 68 61 6e 6e 65 6c 2c ficate, channel,
b0d0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 64 6f 6d connection, dom
b0e0: 61 69 6e 20 6e 61 6d 65 2c 20 68 6f 73 74 2c 20 ain name, host,
b0f0: 68 74 74 70 73 2c 20 6e 65 74 77 6f 72 6b 2c 20 https, network,
b100: 6e 65 74 77 6f 72 6b 20 61 64 64 72 65 73 73 2c network address,
b110: 20 73 6f 63 6b 65 74 2c 20 74 6c 73 0a 2e 53 48 socket, tls..SH
b120: 20 43 41 54 45 47 4f 52 59 0a 74 6c 73 0a 2e 53 CATEGORY.tls..S
b130: 48 20 43 4f 50 59 52 49 47 48 54 0a 2e 6e 66 0a H COPYRIGHT..nf.
b140: 43 6f 70 79 72 69 67 68 74 20 28 63 29 20 31 39 Copyright (c) 19
b150: 39 39 20 4d 61 74 74 20 4e 65 77 6d 61 6e 0a 43 99 Matt Newman.C
b160: 6f 70 79 72 69 67 68 74 20 28 63 29 20 32 30 30 opyright (c) 200
b170: 34 20 53 74 61 72 66 69 73 68 20 53 79 73 74 65 4 Starfish Syste
b180: 6d 73 0a 43 6f 70 79 72 69 67 68 74 20 28 63 29 ms.Copyright (c)
b190: 20 32 30 32 34 20 42 72 69 61 6e 20 4f 27 48 61 2024 Brian O'Ha
b1a0: 67 61 6e 0a 0a 2e 66 69 0a gan...fi.