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 31 20 74 6c 73 20 22 54 63 6c 20 \&.0b1 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 31 5c 66 52 0a 2e 73 70 0a 2\&.0b1\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 75 6e 69 6d 70 6f 72 74 5c 66 52 20 5c 66 49 :unimport\fR \fI
1a10: 63 68 61 6e 6e 65 6c 5c 66 52 0a 2e 73 70 0a 5c channel\fR..sp.\
1a20: 66 42 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 fBtls::handshake
1a30: 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 \fR \fIchannel\f
1a40: 52 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a 3a 73 74 R..sp.\fBtls::st
1a50: 61 74 75 73 5c 66 52 20 3f 5c 66 42 2d 6c 6f 63 atus\fR ?\fB-loc
1a60: 61 6c 5c 66 52 3f 20 5c 66 49 63 68 61 6e 6e 65 al\fR? \fIchanne
1a70: 6c 5c 66 52 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a l\fR..sp.\fBtls:
1a80: 3a 63 6f 6e 6e 65 63 74 69 6f 6e 5c 66 52 20 5c :connection\fR \
1a90: 66 49 63 68 61 6e 6e 65 6c 5c 66 52 0a 2e 73 70 fIchannel\fR..sp
1aa0: 0a 5c 66 42 74 6c 73 3a 3a 63 69 70 68 65 72 73 .\fBtls::ciphers
1ab0: 5c 66 52 20 3f 5c 66 49 70 72 6f 74 6f 63 6f 6c \fR ?\fIprotocol
1ac0: 5c 66 52 3f 20 3f 5c 66 49 76 65 72 62 6f 73 65 \fR? ?\fIverbose
1ad0: 5c 66 52 3f 20 3f 5c 66 49 73 75 70 70 6f 72 74 \fR? ?\fIsupport
1ae0: 65 64 5c 66 52 3f 0a 2e 73 70 0a 5c 66 42 74 6c ed\fR?..sp.\fBtl
1af0: 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 5c 66 52 0a s::protocols\fR.
1b00: 2e 73 70 0a 5c 66 42 74 6c 73 3a 3a 76 65 72 73 .sp.\fBtls::vers
1b10: 69 6f 6e 5c 66 52 0a 2e 73 70 0a 2e 42 45 0a 2e ion\fR..sp..BE..
1b20: 53 48 20 44 45 53 43 52 49 50 54 49 4f 4e 0a 54 SH DESCRIPTION.T
1b30: 68 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 his extension pr
1b40: 6f 76 69 64 65 73 20 54 43 4c 20 73 63 72 69 70 ovides TCL scrip
1b50: 74 20 61 63 63 65 73 73 20 74 6f 20 73 65 63 75 t access to secu
1b60: 72 65 20 73 6f 63 6b 65 74 20 63 6f 6d 6d 75 6e re socket commun
1b70: 69 63 61 74 69 6f 6e 73 0a 75 73 69 6e 67 20 74 ications.using t
1b80: 68 65 20 54 72 61 6e 73 70 6f 72 74 20 4c 61 79 he Transport Lay
1b90: 65 72 20 53 65 63 75 72 69 74 79 20 28 54 4c 53 er Security (TLS
1ba0: 29 20 70 72 6f 74 6f 63 6f 6c 5c 26 2e 20 49 74 ) protocol\&. It
1bb0: 20 70 72 6f 76 69 64 65 73 20 61 20 67 65 6e 65 provides a gene
1bc0: 72 69 63 0a 62 69 6e 64 69 6e 67 20 74 6f 20 5c ric.binding to \
1bd0: 66 49 4f 70 65 6e 53 53 4c 5c 66 52 20 5b 68 74 fIOpenSSL\fR [ht
1be0: 74 70 73 3a 2f 2f 77 77 77 5c 26 2e 6f 70 65 6e tps://www\&.open
1bf0: 73 73 6c 5c 26 2e 6f 72 67 2f 5d 2c 20 75 74 69 ssl\&.org/], uti
1c00: 6c 69 7a 69 6e 67 20 74 68 65 0a 5c 66 42 54 63 lizing the.\fBTc
1c10: 6c 5f 53 74 61 63 6b 43 68 61 6e 6e 65 6c 5c 66 l_StackChannel\f
1c20: 52 20 41 50 49 20 69 6e 20 54 43 4c 20 38 5c 26 R API in TCL 8\&
1c30: 2e 34 20 61 6e 64 20 68 69 67 68 65 72 5c 26 2e .4 and higher\&.
1c40: 0a 54 68 65 73 65 20 73 6f 63 6b 65 74 73 20 62 .These sockets b
1c50: 65 68 61 76 65 20 65 78 61 63 74 6c 79 20 74 68 ehave exactly th
1c60: 65 20 73 61 6d 65 20 61 73 20 63 68 61 6e 6e 65 e same as channe
1c70: 6c 73 20 63 72 65 61 74 65 64 20 75 73 69 6e 67 ls created using
1c80: 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 0a 5c 66 the built-in.\f
1c90: 42 73 6f 63 6b 65 74 5c 66 52 20 63 6f 6d 6d 61 Bsocket\fR comma
1ca0: 6e 64 2c 20 62 75 74 20 70 72 6f 76 69 64 65 20 nd, but provide
1cb0: 61 64 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f additional optio
1cc0: 6e 73 20 66 6f 72 20 63 6f 6e 74 72 6f 6c 6c 69 ns for controlli
1cd0: 6e 67 0a 74 68 65 20 53 53 4c 2f 54 4c 53 20 73 ng.the SSL/TLS s
1ce0: 65 73 73 69 6f 6e 5c 26 2e 0a 2e 53 48 20 43 4f ession\&...SH CO
1cf0: 4d 50 41 54 49 42 49 4c 49 54 59 0a 54 68 69 73 MPATIBILITY.This
1d00: 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 63 6f extension is co
1d10: 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 4f 70 mpatible with Op
1d20: 65 6e 53 53 4c 20 31 5c 26 2e 31 5c 26 2e 31 20 enSSL 1\&.1\&.1
1d30: 6f 72 20 6c 61 74 65 72 5c 26 2e 20 49 74 20 72 or later\&. It r
1d40: 65 71 75 69 72 65 73 20 54 63 6c 0a 76 65 72 73 equires Tcl.vers
1d50: 69 6f 6e 20 38 5c 26 2e 35 20 6f 72 20 6c 61 74 ion 8\&.5 or lat
1d60: 65 72 20 61 6e 64 20 77 69 6c 6c 20 77 6f 72 6b er and will work
1d70: 20 77 69 74 68 20 54 63 6c 20 39 5c 26 2e 30 5c with Tcl 9\&.0\
1d80: 26 2e 0a 2e 53 48 20 43 4f 4d 4d 41 4e 44 53 0a &...SH COMMANDS.
1d90: 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 61 72 The following ar
1da0: 65 20 74 68 65 20 63 6f 6d 6d 61 6e 64 73 20 70 e the commands p
1db0: 72 6f 76 69 64 65 64 20 62 79 20 74 68 65 20 54 rovided by the T
1dc0: 63 4c 54 4c 53 20 70 61 63 6b 61 67 65 5c 26 2e cLTLS package\&.
1dd0: 20 53 65 65 20 74 68 65 0a 5c 66 42 45 78 61 6d See the.\fBExam
1de0: 70 6c 65 73 5c 66 52 20 66 6f 72 20 65 78 61 6d ples\fR for exam
1df0: 70 6c 65 20 75 73 61 67 65 20 61 6e 64 20 74 68 ple usage and th
1e00: 65 20 22 5c 66 49 64 65 6d 6f 73 5c 66 52 22 20 e "\fIdemos\fR"
1e10: 64 69 72 65 63 74 6f 72 79 20 66 6f 72 0a 6d 6f directory for.mo
1e20: 72 65 20 65 78 61 6d 70 6c 65 20 75 73 61 67 65 re example usage
1e30: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a \&...TP.\fBtls::
1e40: 69 6e 69 74 5c 66 52 20 3f 5c 66 49 2d 6f 70 74 init\fR ?\fI-opt
1e50: 69 6f 6e 5c 66 52 3f 20 3f 5c 66 49 76 61 6c 75 ion\fR? ?\fIvalu
1e60: 65 5c 66 52 3f 20 3f 5c 66 49 2d 6f 70 74 69 6f e\fR? ?\fI-optio
1e70: 6e 20 76 61 6c 75 65 20 5c 26 2e 5c 26 2e 5c 26 n value \&.\&.\&
1e80: 2e 5c 66 52 3f 0a 4f 70 74 69 6f 6e 61 6c 20 66 .\fR?.Optional f
1e90: 75 6e 63 74 69 6f 6e 20 74 6f 20 73 65 74 20 74 unction to set t
1ea0: 68 65 20 64 65 66 61 75 6c 74 20 6f 70 74 69 6f he default optio
1eb0: 6e 73 20 75 73 65 64 20 62 79 20 5c 66 42 74 6c ns used by \fBtl
1ec0: 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 5c 26 2e 20 s::socket\fR\&.
1ed0: 49 66 20 79 6f 75 0a 63 61 6c 6c 20 5c 66 42 74 If you.call \fBt
1ee0: 6c 73 3a 3a 69 6d 70 6f 72 74 5c 66 52 20 64 69 ls::import\fR di
1ef0: 72 65 63 74 6c 79 2c 20 74 68 65 20 76 61 6c 75 rectly, the valu
1f00: 65 73 20 73 65 74 20 62 79 20 74 68 69 73 20 63 es set by this c
1f10: 6f 6d 6d 61 6e 64 20 68 61 76 65 20 6e 6f 20 65 ommand have no e
1f20: 66 66 65 63 74 5c 26 2e 0a 54 68 69 73 20 63 6f ffect\&..This co
1f30: 6d 6d 61 6e 64 20 73 75 70 70 6f 72 74 73 20 61 mmand supports a
1f40: 6c 6c 20 6f 66 20 74 68 65 20 73 61 6d 65 20 6f ll of the same o
1f50: 70 74 69 6f 6e 73 20 61 73 20 74 68 65 20 5c 66 ptions as the \f
1f60: 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 20 Btls::socket\fR
1f70: 63 6f 6d 6d 61 6e 64 2c 0a 74 68 6f 75 67 68 20 command,.though
1f80: 79 6f 75 20 73 68 6f 75 6c 64 20 6c 69 6d 69 74 you should limit
1f90: 20 79 6f 75 72 20 6f 70 74 69 6f 6e 73 20 74 6f your options to
1fa0: 20 6f 6e 6c 79 20 54 4c 53 20 72 65 6c 61 74 65 only TLS relate
1fb0: 64 20 6f 6e 65 73 5c 26 2e 0a 2e 54 50 0a 5c 66 d ones\&...TP.\f
1fc0: 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 20 Btls::socket\fR
1fd0: 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 3f 20 ?\fI-option\fR?
1fe0: 3f 5c 66 49 76 61 6c 75 65 5c 66 52 3f 20 3f 5c ?\fIvalue\fR? ?\
1ff0: 66 49 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 fI-option value
2000: 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 20 5c 66 \&.\&.\&.\fR? \f
2010: 49 68 6f 73 74 5c 66 52 20 5c 66 49 70 6f 72 74 Ihost\fR \fIport
2020: 5c 66 52 0a 54 68 69 73 20 69 73 20 61 20 68 65 \fR.This is a he
2030: 6c 70 65 72 20 66 75 6e 63 74 69 6f 6e 20 74 68 lper function th
2040: 61 74 20 75 74 69 6c 69 7a 65 73 20 74 68 65 20 at utilizes the
2050: 75 6e 64 65 72 6c 79 69 6e 67 20 63 6f 6d 6d 61 underlying comma
2060: 6e 64 73 20 5c 66 42 73 6f 63 6b 65 74 5c 66 52 nds \fBsocket\fR
2070: 0a 61 6e 64 20 5c 66 42 74 6c 73 3a 3a 69 6d 70 .and \fBtls::imp
2080: 6f 72 74 5c 66 52 20 74 6f 20 63 72 65 61 74 65 ort\fR to create
2090: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 5c the connection\
20a0: 26 2e 20 49 74 20 62 65 68 61 76 65 73 20 74 68 &. It behaves th
20b0: 65 20 73 61 6d 65 20 61 73 20 74 68 65 0a 6e 61 e same as the.na
20c0: 74 69 76 65 20 54 43 4c 20 5c 66 42 73 6f 63 6b tive TCL \fBsock
20d0: 65 74 5c 66 52 20 63 6f 6d 6d 61 6e 64 2c 20 62 et\fR command, b
20e0: 75 74 20 61 6c 73 6f 20 73 75 70 70 6f 72 74 73 ut also supports
20f0: 20 74 68 65 20 5c 66 42 74 6c 73 3a 69 6d 70 6f the \fBtls:impo
2100: 72 74 5c 66 52 0a 63 6f 6d 6d 61 6e 64 20 6f 70 rt\fR.command op
2110: 74 69 6f 6e 73 20 77 69 74 68 20 6f 6e 65 20 61 tions with one a
2120: 64 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e dditional option
2130: 5c 26 2e 20 49 74 20 72 65 74 75 72 6e 73 20 74 \&. It returns t
2140: 68 65 20 63 68 61 6e 6e 65 6c 20 68 61 6e 64 6c he channel handl
2150: 65 20 69 64 0a 66 6f 72 20 74 68 65 20 6e 65 77 e id.for the new
2160: 20 73 6f 63 6b 65 74 5c 26 2e 0a 2e 52 53 0a 2e socket\&...RS..
2170: 54 50 0a 5c 66 42 2d 61 75 74 6f 73 65 72 76 65 TP.\fB-autoserve
2180: 72 6e 61 6d 65 5c 66 52 20 5c 66 49 62 6f 6f 6c rname\fR \fIbool
2190: 5c 66 52 0a 49 66 20 5c 66 42 74 72 75 65 5c 66 \fR.If \fBtrue\f
21a0: 52 2c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 R, automatically
21b0: 20 73 65 74 20 74 68 65 20 5c 66 42 2d 73 65 72 set the \fB-ser
21c0: 76 65 72 6e 61 6d 65 5c 66 52 20 61 72 67 75 6d vername\fR argum
21d0: 65 6e 74 20 74 6f 20 74 68 65 0a 5c 66 49 68 6f ent to the.\fIho
21e0: 73 74 5c 66 52 20 61 72 67 75 6d 65 6e 74 5c 26 st\fR argument\&
21f0: 2e 20 50 72 69 6f 72 20 74 6f 20 54 63 6c 54 4c . Prior to TclTL
2200: 53 20 32 5c 26 2e 30 2c 20 74 68 65 20 64 65 66 S 2\&.0, the def
2210: 61 75 6c 74 20 69 73 20 5c 66 42 66 61 6c 73 65 ault is \fBfalse
2220: 5c 66 52 5c 26 2e 0a 53 74 61 72 74 69 6e 67 20 \fR\&..Starting
2230: 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 2e 30 2c in TclTLS 2\&.0,
2240: 20 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 the default is
2250: 5c 66 42 74 72 75 65 5c 66 52 20 75 6e 6c 65 73 \fBtrue\fR unles
2260: 73 20 5c 66 42 2d 73 65 72 76 65 72 6e 61 6d 65 s \fB-servername
2270: 5c 66 52 0a 69 73 20 61 6c 73 6f 20 73 70 65 63 \fR.is also spec
2280: 69 66 69 65 64 5c 26 2e 0a 2e 52 45 0a 2e 54 50 ified\&...RE..TP
2290: 0a 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 5c .\fBtls::socket\
22a0: 66 52 20 5c 66 42 2d 73 65 72 76 65 72 5c 66 52 fR \fB-server\fR
22b0: 20 5c 66 49 63 6f 6d 6d 61 6e 64 5c 66 52 20 3f \fIcommand\fR ?
22c0: 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 3f 20 3f \fI-option\fR? ?
22d0: 5c 66 49 76 61 6c 75 65 5c 66 52 3f 20 3f 5c 66 \fIvalue\fR? ?\f
22e0: 49 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 5c I-option value \
22f0: 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 20 5c 66 49 &.\&.\&.\fR? \fI
2300: 70 6f 72 74 5c 66 52 0a 53 61 6d 65 20 61 73 20 port\fR.Same as
2310: 70 72 65 76 69 6f 75 73 2c 20 62 75 74 20 69 6e previous, but in
2320: 73 74 65 61 64 20 63 72 65 61 74 65 73 20 61 20 stead creates a
2330: 73 65 72 76 65 72 20 73 6f 63 6b 65 74 20 66 6f server socket fo
2340: 72 20 63 6c 69 65 6e 74 73 20 74 6f 20 63 6f 6e r clients to con
2350: 6e 65 63 74 20 74 6f 0a 6a 75 73 74 20 6c 69 6b nect to.just lik
2360: 65 20 74 68 65 20 54 63 6c 20 5c 66 42 73 6f 63 e the Tcl \fBsoc
2370: 6b 65 74 20 2d 73 65 72 76 65 72 5c 66 52 20 63 ket -server\fR c
2380: 6f 6d 6d 61 6e 64 5c 26 2e 20 49 74 20 72 65 74 ommand\&. It ret
2390: 75 72 6e 73 20 74 68 65 20 63 68 61 6e 6e 65 6c urns the channel
23a0: 0a 68 61 6e 64 6c 65 20 69 64 20 66 6f 72 20 74 .handle id for t
23b0: 68 65 20 6e 65 77 20 73 6f 63 6b 65 74 5c 26 2e he new socket\&.
23c0: 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 69 6d 70 ..TP.\fBtls::imp
23d0: 6f 72 74 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 ort\fR \fIchanne
23e0: 6c 5c 66 52 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e l\fR ?\fI-option
23f0: 5c 66 52 3f 20 3f 5c 66 49 76 61 6c 75 65 5c 66 \fR? ?\fIvalue\f
2400: 52 3f 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 20 76 R? ?\fI-option v
2410: 61 6c 75 65 20 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 alue \&.\&.\&.\f
2420: 52 3f 0a 53 74 61 72 74 20 54 4c 53 20 65 6e 63 R?.Start TLS enc
2430: 72 79 70 74 69 6f 6e 20 6f 6e 20 54 43 4c 20 63 ryption on TCL c
2440: 68 61 6e 6e 65 6c 20 5c 66 49 63 68 61 6e 6e 65 hannel \fIchanne
2450: 6c 5c 66 52 20 76 69 61 20 61 20 73 74 61 63 6b l\fR via a stack
2460: 65 64 20 63 68 61 6e 6e 65 6c 5c 26 2e 20 49 74 ed channel\&. It
2470: 0a 6e 65 65 64 20 6e 6f 74 20 62 65 20 61 20 73 .need not be a s
2480: 6f 63 6b 65 74 2c 20 62 75 74 20 6d 75 73 74 20 ocket, but must
2490: 70 72 6f 76 69 64 65 20 62 69 2d 64 69 72 65 63 provide bi-direc
24a0: 74 69 6f 6e 61 6c 20 66 6c 6f 77 5c 26 2e 20 41 tional flow\&. A
24b0: 6c 73 6f 20 73 65 74 73 20 73 65 73 73 69 6f 6e lso sets session
24c0: 0a 70 61 72 61 6d 65 74 65 72 73 20 66 6f 72 20 .parameters for
24d0: 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 5c 26 2e SSL handshake\&.
24e0: 20 56 61 6c 69 64 20 6f 70 74 69 6f 6e 73 20 61 Valid options a
24f0: 72 65 3a 0a 2e 52 53 0a 2e 54 50 0a 5c 66 42 2d re:..RS..TP.\fB-
2500: 61 6c 70 6e 5c 66 52 20 5c 66 49 6c 69 73 74 5c alpn\fR \fIlist\
2510: 66 52 0a 4c 69 73 74 20 6f 66 20 70 72 6f 74 6f fR.List of proto
2520: 63 6f 6c 73 20 74 6f 20 6f 66 66 65 72 20 64 75 cols to offer du
2530: 72 69 6e 67 20 41 70 70 6c 69 63 61 74 69 6f 6e ring Application
2540: 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 20 -Layer Protocol
2550: 4e 65 67 6f 74 69 61 74 69 6f 6e 0a 28 41 4c 50 Negotiation.(ALP
2560: 4e 29 5c 26 2e 20 46 6f 72 20 65 78 61 6d 70 6c N)\&. For exampl
2570: 65 3a 20 5c 66 42 68 32 5c 66 52 20 61 6e 64 20 e: \fBh2\fR and
2580: 5c 66 42 68 74 74 70 2f 31 5c 26 2e 31 5c 66 52 \fBhttp/1\&.1\fR
2590: 2c 20 62 75 74 20 6e 6f 74 20 5c 66 42 68 33 5c , but not \fBh3\
25a0: 66 52 20 6f 72 0a 5c 66 42 71 75 69 63 5c 66 52 fR or.\fBquic\fR
25b0: 5c 26 2e 20 54 68 69 73 20 6f 70 74 69 6f 6e 20 \&. This option
25c0: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c is new for TclTL
25d0: 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c S 1\&.8\&...TP.\
25e0: 66 42 2d 63 61 64 69 72 5c 66 52 20 5c 66 49 64 fB-cadir\fR \fId
25f0: 69 72 65 63 74 6f 72 79 5c 66 52 0a 53 70 65 63 irectory\fR.Spec
2600: 69 66 69 65 73 20 74 68 65 20 64 69 72 65 63 74 ifies the direct
2610: 6f 72 79 20 77 68 65 72 65 20 74 68 65 20 43 65 ory where the Ce
2620: 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 rtificate Author
2630: 69 74 79 20 28 43 41 29 20 63 65 72 74 69 66 69 ity (CA) certifi
2640: 63 61 74 65 73 20 61 72 65 0a 73 74 6f 72 65 64 cates are.stored
2650: 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 \&. The default
2660: 69 73 20 70 6c 61 74 66 6f 72 6d 20 73 70 65 63 is platform spec
2670: 69 66 69 63 20 61 6e 64 20 63 61 6e 20 62 65 20 ific and can be
2680: 73 65 74 20 61 74 20 63 6f 6d 70 69 6c 65 20 74 set at compile t
2690: 69 6d 65 5c 26 2e 20 54 68 65 0a 64 65 66 61 75 ime\&. The.defau
26a0: 6c 74 20 6c 6f 63 61 74 69 6f 6e 20 63 61 6e 20 lt location can
26b0: 62 65 20 6f 76 65 72 72 69 64 64 65 6e 20 62 79 be overridden by
26c0: 20 74 68 65 20 5c 66 42 53 53 4c 5f 43 45 52 54 the \fBSSL_CERT
26d0: 5f 44 49 52 5c 66 52 20 65 6e 76 69 72 6f 6e 6d _DIR\fR environm
26e0: 65 6e 74 0a 76 61 72 69 61 62 6c 65 5c 26 2e 20 ent.variable\&.
26f0: 53 65 65 20 5c 66 42 43 65 72 74 69 66 69 63 61 See \fBCertifica
2700: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 5c 66 52 te Validation\fR
2710: 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c for more detail
2720: 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 61 66 s\&...TP.\fB-caf
2730: 69 6c 65 5c 66 52 20 5c 66 49 66 69 6c 65 6e 61 ile\fR \fIfilena
2740: 6d 65 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 me\fR.Specifies
2750: 74 68 65 20 66 69 6c 65 20 77 69 74 68 20 74 68 the file with th
2760: 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 e Certificate Au
2770: 74 68 6f 72 69 74 79 20 28 43 41 29 20 63 65 72 thority (CA) cer
2780: 74 69 66 69 63 61 74 65 73 20 74 6f 20 75 73 65 tificates to use
2790: 20 69 6e 0a 5c 66 42 50 45 4d 5c 66 52 20 66 69 in.\fBPEM\fR fi
27a0: 6c 65 20 66 6f 72 6d 61 74 5c 26 2e 20 54 68 65 le format\&. The
27b0: 20 64 65 66 61 75 6c 74 20 69 73 20 22 5c 66 49 default is "\fI
27c0: 63 65 72 74 5c 26 2e 70 65 6d 5c 66 52 22 2c 20 cert\&.pem\fR",
27d0: 69 6e 20 74 68 65 20 4f 70 65 6e 53 53 4c 0a 64 in the OpenSSL.d
27e0: 69 72 65 63 74 6f 72 79 5c 26 2e 20 54 68 65 20 irectory\&. The
27f0: 64 65 66 61 75 6c 74 20 66 69 6c 65 20 63 61 6e default file can
2800: 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e 20 62 be overridden b
2810: 79 20 74 68 65 20 5c 66 42 53 53 4c 5f 43 45 52 y the \fBSSL_CER
2820: 54 5f 46 49 4c 45 5c 66 52 20 65 6e 76 69 72 6f T_FILE\fR enviro
2830: 6e 6d 65 6e 74 0a 76 61 72 69 61 62 6c 65 5c 26 nment.variable\&
2840: 2e 20 53 65 65 20 5c 66 42 43 65 72 74 69 66 69 . See \fBCertifi
2850: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 5c cate Validation\
2860: 66 52 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 fR for more deta
2870: 69 6c 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 ils\&...TP.\fB-c
2880: 61 73 74 6f 72 65 5c 66 52 20 5c 66 49 55 52 49 astore\fR \fIURI
2890: 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 \fR.Specifies th
28a0: 65 20 55 6e 69 66 6f 72 6d 20 52 65 73 6f 75 72 e Uniform Resour
28b0: 63 65 20 49 64 65 6e 74 69 66 69 65 72 20 28 55 ce Identifier (U
28c0: 52 49 29 20 66 6f 72 20 74 68 65 20 43 65 72 74 RI) for the Cert
28d0: 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 ificate Authorit
28e0: 79 0a 28 43 41 29 20 73 74 6f 72 65 2c 20 77 68 y.(CA) store, wh
28f0: 69 63 68 20 6d 61 79 20 62 65 20 61 20 73 69 6e ich may be a sin
2900: 67 6c 65 20 63 6f 6e 74 61 69 6e 65 72 20 6f 72 gle container or
2910: 20 61 20 63 61 74 61 6c 6f 67 20 6f 66 20 63 6f a catalog of co
2920: 6e 74 61 69 6e 65 72 73 5c 26 2e 0a 53 74 61 72 ntainers\&..Star
2930: 74 69 6e 67 20 77 69 74 68 20 4f 70 65 6e 53 53 ting with OpenSS
2940: 4c 20 33 5c 26 2e 32 20 6f 6e 20 4d 53 20 57 69 L 3\&.2 on MS Wi
2950: 6e 64 6f 77 73 2c 20 73 65 74 20 74 6f 20 22 5c ndows, set to "\
2960: 66 42 6f 72 67 5c 26 2e 6f 70 65 6e 73 73 6c 5c fBorg\&.openssl\
2970: 26 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 5c 66 52 &.winstore://\fR
2980: 22 0a 74 6f 20 75 73 65 20 74 68 65 20 62 75 69 ".to use the bui
2990: 6c 74 2d 69 6e 20 4d 53 20 57 69 6e 64 6f 77 73 lt-in MS Windows
29a0: 20 43 65 72 74 69 66 69 63 61 74 65 20 53 74 6f Certificate Sto
29b0: 72 65 5c 26 2e 0a 53 65 65 20 5c 66 42 43 65 72 re\&..See \fBCer
29c0: 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 tificate Validat
29d0: 69 6f 6e 5c 66 52 20 66 6f 72 20 6d 6f 72 65 20 ion\fR for more
29e0: 64 65 74 61 69 6c 73 5c 26 2e 0a 54 68 69 73 20 details\&..This
29f0: 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f option is new fo
2a00: 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 r TclTLS 1\&.8\&
2a10: 2e 0a 2e 54 50 0a 5c 66 42 2d 63 65 72 74 66 69 ...TP.\fB-certfi
2a20: 6c 65 5c 66 52 20 5c 66 49 66 69 6c 65 6e 61 6d le\fR \fIfilenam
2a30: 65 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 e\fR.Specifies t
2a40: 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 66 he name of the f
2a50: 69 6c 65 20 77 69 74 68 20 74 68 65 20 63 65 72 ile with the cer
2a60: 74 69 66 69 63 61 74 65 20 74 6f 20 75 73 65 20 tificate to use
2a70: 69 6e 20 50 45 4d 20 66 6f 72 6d 61 74 0a 61 73 in PEM format.as
2a80: 20 74 68 65 20 6c 6f 63 61 6c 20 28 63 6c 69 65 the local (clie
2a90: 6e 74 20 6f 72 20 73 65 72 76 65 72 29 20 63 65 nt or server) ce
2aa0: 72 74 69 66 69 63 61 74 65 5c 26 2e 20 49 74 20 rtificate\&. It
2ab0: 61 6c 73 6f 20 63 6f 6e 74 61 69 6e 73 20 74 68 also contains th
2ac0: 65 20 70 75 62 6c 69 63 20 6b 65 79 5c 26 2e 0a e public key\&..
2ad0: 2e 54 50 0a 5c 66 42 2d 63 65 72 74 5c 66 52 20 .TP.\fB-cert\fR
2ae0: 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 53 70 65 \fIstring\fR.Spe
2af0: 63 69 66 69 65 73 20 74 68 65 20 63 65 72 74 69 cifies the certi
2b00: 66 69 63 61 74 65 20 74 6f 20 75 73 65 20 61 73 ficate to use as
2b10: 20 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20 73 a DER encoded s
2b20: 74 72 69 6e 67 20 28 58 5c 26 2e 35 30 39 20 44 tring (X\&.509 D
2b30: 45 52 29 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 ER)\&...TP.\fB-c
2b40: 69 70 68 65 72 5c 66 52 20 5c 66 49 73 74 72 69 ipher\fR \fIstri
2b50: 6e 67 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 ng\fR.Specifies
2b60: 74 68 65 20 6c 69 73 74 20 6f 66 20 63 69 70 68 the list of ciph
2b70: 65 72 73 20 74 6f 20 75 73 65 20 66 6f 72 20 54 ers to use for T
2b80: 4c 53 20 31 5c 26 2e 32 20 61 6e 64 20 65 61 72 LS 1\&.2 and ear
2b90: 6c 69 65 72 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 lier connections
2ba0: 5c 26 2e 0a 53 74 72 69 6e 67 20 69 73 20 61 20 \&..String is a
2bb0: 63 6f 6c 6f 6e 20 22 5c 66 42 3a 5c 66 52 22 20 colon "\fB:\fR"
2bc0: 73 65 70 61 72 61 74 65 64 20 6c 69 73 74 20 6f separated list o
2bd0: 66 20 63 69 70 68 65 72 73 5c 26 2e 0a 43 69 70 f ciphers\&..Cip
2be0: 68 65 72 73 20 63 61 6e 20 62 65 20 63 6f 6d 62 hers can be comb
2bf0: 69 6e 65 64 20 75 73 69 6e 67 20 74 68 65 20 22 ined using the "
2c00: 5c 66 42 2b 5c 66 52 22 20 63 68 61 72 61 63 74 \fB+\fR" charact
2c10: 65 72 5c 26 2e 0a 50 72 65 66 69 78 65 73 20 63 er\&..Prefixes c
2c20: 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 70 65 an be used to pe
2c30: 72 6d 61 6e 65 6e 74 6c 79 20 72 65 6d 6f 76 65 rmanently remove
2c40: 20 22 5c 66 42 21 5c 66 52 22 2c 20 64 65 6c 65 "\fB!\fR", dele
2c50: 74 65 20 22 5c 66 42 2d 5c 66 52 22 2c 20 6f 72 te "\fB-\fR", or
2c60: 0a 6d 6f 76 65 20 74 6f 20 74 68 65 20 65 6e 64 .move to the end
2c70: 20 22 5c 66 42 2b 5c 66 52 22 20 61 20 73 70 65 "\fB+\fR" a spe
2c80: 63 69 66 69 65 64 20 63 69 70 68 65 72 5c 26 2e cified cipher\&.
2c90: 0a 4b 65 79 77 6f 72 64 73 20 5c 66 42 40 53 54 .Keywords \fB@ST
2ca0: 52 45 4e 47 54 48 5c 66 52 20 28 73 6f 72 74 20 RENGTH\fR (sort
2cb0: 62 79 20 61 6c 67 6f 72 69 74 68 6d 20 6b 65 79 by algorithm key
2cc0: 20 6c 65 6e 67 74 68 29 2c 0a 5c 66 42 40 53 45 length),.\fB@SE
2cd0: 43 4c 45 56 45 4c 3d 5c 66 52 5c 66 49 6e 5c 66 CLEVEL=\fR\fIn\f
2ce0: 52 20 28 73 65 74 20 73 65 63 75 72 69 74 79 20 R (set security
2cf0: 6c 65 76 65 6c 20 74 6f 20 6e 29 2c 20 61 6e 64 level to n), and
2d00: 0a 5c 66 42 44 45 46 41 55 4c 54 5c 66 52 20 28 .\fBDEFAULT\fR (
2d10: 75 73 65 20 64 65 66 61 75 6c 74 20 63 69 70 68 use default ciph
2d20: 65 72 20 6c 69 73 74 2c 20 61 74 20 73 74 61 72 er list, at star
2d30: 74 20 6f 6e 6c 79 29 20 63 61 6e 20 61 6c 73 6f t only) can also
2d40: 20 62 65 20 73 70 65 63 69 66 69 65 64 5c 26 2e be specified\&.
2d50: 0a 53 65 65 20 74 68 65 20 5c 66 49 4f 70 65 6e .See the \fIOpen
2d60: 53 53 4c 5c 66 52 20 5b 68 74 74 70 73 3a 2f 2f SSL\fR [https://
2d70: 64 6f 63 73 5c 26 2e 6f 70 65 6e 73 73 6c 5c 26 docs\&.openssl\&
2d80: 2e 6f 72 67 2f 6d 61 73 74 65 72 2f 6d 61 6e 31 .org/master/man1
2d90: 2f 6f 70 65 6e 73 73 6c 2d 63 69 70 68 65 72 73 /openssl-ciphers
2da0: 2f 23 6f 70 74 69 6f 6e 73 5d 0a 64 6f 63 75 6d /#options].docum
2db0: 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74 68 65 entation for the
2dc0: 20 66 75 6c 6c 20 6c 69 73 74 20 6f 66 20 76 61 full list of va
2dd0: 6c 69 64 20 76 61 6c 75 65 73 5c 26 2e 0a 2e 54 lid values\&...T
2de0: 50 0a 5c 66 42 2d 63 69 70 68 65 72 73 75 69 74 P.\fB-ciphersuit
2df0: 65 73 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c es\fR \fIstring\
2e00: 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 fR.Specifies the
2e10: 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 list of cipher
2e20: 73 75 69 74 65 73 20 74 6f 20 75 73 65 20 66 6f suites to use fo
2e30: 72 20 54 4c 53 20 31 5c 26 2e 33 20 61 73 20 61 r TLS 1\&.3 as a
2e40: 20 63 6f 6c 6f 6e 0a 22 5c 66 42 3a 5c 66 52 22 colon."\fB:\fR"
2e50: 20 73 65 70 61 72 61 74 65 64 20 6c 69 73 74 20 separated list
2e60: 6f 66 20 63 69 70 68 65 72 20 73 75 69 74 65 20 of cipher suite
2e70: 6e 61 6d 65 73 5c 26 2e 20 53 65 65 20 74 68 65 names\&. See the
2e80: 0a 5c 66 49 4f 70 65 6e 53 53 4c 5c 66 52 20 5b .\fIOpenSSL\fR [
2e90: 68 74 74 70 73 3a 2f 2f 64 6f 63 73 5c 26 2e 6f https://docs\&.o
2ea0: 70 65 6e 73 73 6c 5c 26 2e 6f 72 67 2f 6d 61 73 penssl\&.org/mas
2eb0: 74 65 72 2f 6d 61 6e 31 2f 6f 70 65 6e 73 73 6c ter/man1/openssl
2ec0: 2d 63 69 70 68 65 72 73 2f 23 6f 70 74 69 6f 6e -ciphers/#option
2ed0: 73 5d 0a 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e s].documentation
2ee0: 20 66 6f 72 20 74 68 65 20 66 75 6c 6c 20 6c 69 for the full li
2ef0: 73 74 20 6f 66 20 76 61 6c 69 64 20 76 61 6c 75 st of valid valu
2f00: 65 73 5c 26 2e 0a 54 68 69 73 20 6f 70 74 69 6f es\&..This optio
2f10: 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c n is new for Tcl
2f20: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 TLS 1\&.8\&...TP
2f30: 0a 5c 66 42 2d 63 6f 6d 6d 61 6e 64 5c 66 52 20 .\fB-command\fR
2f40: 5c 66 49 63 61 6c 6c 62 61 63 6b 5c 66 52 0a 53 \fIcallback\fR.S
2f50: 70 65 63 69 66 69 65 73 20 74 68 65 20 63 61 6c pecifies the cal
2f60: 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f lback command to
2f70: 20 62 65 20 69 6e 76 6f 6b 65 64 20 61 74 20 73 be invoked at s
2f80: 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 everal points du
2f90: 72 69 6e 67 20 74 68 65 0a 68 61 6e 64 73 68 61 ring the.handsha
2fa0: 6b 65 20 74 6f 20 70 61 73 73 20 65 72 72 6f 72 ke to pass error
2fb0: 73 2c 20 74 72 61 63 69 6e 67 20 69 6e 66 6f 72 s, tracing infor
2fc0: 6d 61 74 69 6f 6e 2c 20 61 6e 64 20 70 72 6f 74 mation, and prot
2fd0: 6f 63 6f 6c 20 6d 65 73 73 61 67 65 73 5c 26 2e ocol messages\&.
2fe0: 0a 53 65 65 20 5c 66 42 43 61 6c 6c 62 61 63 6b .See \fBCallback
2ff0: 20 4f 70 74 69 6f 6e 73 5c 66 52 20 66 6f 72 20 Options\fR for
3000: 6d 6f 72 65 20 69 6e 66 6f 5c 26 2e 0a 2e 54 50 more info\&...TP
3010: 0a 5c 66 42 2d 64 68 70 61 72 61 6d 73 5c 66 52 .\fB-dhparams\fR
3020: 20 5c 66 49 66 69 6c 65 6e 61 6d 65 5c 66 52 0a \fIfilename\fR.
3030: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 44 69 Specifies the Di
3040: 66 66 69 65 2d 48 65 6c 6c 6d 61 6e 20 28 44 48 ffie-Hellman (DH
3050: 29 20 70 61 72 61 6d 65 74 65 72 73 20 66 69 6c ) parameters fil
3060: 65 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 6b 65 79 e\&...TP.\fB-key
3070: 66 69 6c 65 5c 66 52 20 5c 66 49 66 69 6c 65 6e file\fR \fIfilen
3080: 61 6d 65 5c 66 52 0a 53 70 65 63 69 66 69 65 73 ame\fR.Specifies
3090: 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 the private key
30a0: 20 66 69 6c 65 5c 26 2e 20 54 68 65 20 64 65 66 file\&. The def
30b0: 61 75 6c 74 20 69 73 20 74 6f 20 75 73 65 20 74 ault is to use t
30c0: 68 65 20 66 69 6c 65 0a 73 70 65 63 69 66 69 65 he file.specifie
30d0: 64 20 62 79 20 74 68 65 20 5c 66 49 2d 63 65 72 d by the \fI-cer
30e0: 74 66 69 6c 65 5c 66 52 20 6f 70 74 69 6f 6e 5c tfile\fR option\
30f0: 26 2e 0a 2e 54 50 0a 5c 66 42 2d 6b 65 79 5c 66 &...TP.\fB-key\f
3100: 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 53 R \fIstring\fR.S
3110: 70 65 63 69 66 69 65 73 20 74 68 65 20 70 72 69 pecifies the pri
3120: 76 61 74 65 20 6b 65 79 20 74 6f 20 75 73 65 20 vate key to use
3130: 61 73 20 61 20 44 45 52 20 65 6e 63 6f 64 65 64 as a DER encoded
3140: 20 73 74 72 69 6e 67 20 28 50 4b 43 53 23 31 20 string (PKCS#1
3150: 44 45 52 29 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d DER)\&...TP.\fB-
3160: 6d 6f 64 65 6c 5c 66 52 20 5c 66 49 63 68 61 6e model\fR \fIchan
3170: 6e 65 6c 5c 66 52 0a 46 6f 72 63 65 20 74 68 69 nel\fR.Force thi
3180: 73 20 63 68 61 6e 6e 65 6c 20 74 6f 20 73 68 61 s channel to sha
3190: 72 65 20 74 68 65 20 73 61 6d 65 20 5c 66 49 53 re the same \fIS
31a0: 53 4c 5f 43 54 58 5c 66 52 20 73 74 72 75 63 74 SL_CTX\fR struct
31b0: 75 72 65 20 61 73 20 74 68 65 0a 73 70 65 63 69 ure as the.speci
31c0: 66 69 65 64 20 5c 66 49 63 68 61 6e 6e 65 6c 5c fied \fIchannel\
31d0: 66 52 2c 20 61 6e 64 20 74 68 65 72 65 66 6f 72 fR, and therefor
31e0: 65 20 73 68 61 72 65 20 63 6f 6e 66 69 67 2c 20 e share config,
31f0: 63 61 6c 6c 62 61 63 6b 73 2c 20 65 74 63 5c 26 callbacks, etc\&
3200: 2e 0a 2e 54 50 0a 5c 66 42 2d 70 61 73 73 77 6f ...TP.\fB-passwo
3210: 72 64 5c 66 52 20 5c 66 49 63 61 6c 6c 62 61 63 rd\fR \fIcallbac
3220: 6b 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 k\fR.Specifies t
3230: 68 65 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d he callback comm
3240: 61 6e 64 20 74 6f 20 69 6e 76 6f 6b 65 20 77 68 and to invoke wh
3250: 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73 en OpenSSL needs
3260: 20 74 6f 20 6f 62 74 61 69 6e 20 61 0a 70 61 73 to obtain a.pas
3270: 73 77 6f 72 64 5c 26 2e 20 54 68 69 73 20 69 73 sword\&. This is
3280: 20 74 79 70 69 63 61 6c 6c 79 20 75 73 65 64 20 typically used
3290: 74 6f 20 75 6e 6c 6f 63 6b 20 74 68 65 20 70 72 to unlock the pr
32a0: 69 76 61 74 65 20 6b 65 79 20 6f 66 20 61 20 63 ivate key of a c
32b0: 65 72 74 69 66 69 63 61 74 65 5c 26 2e 0a 54 68 ertificate\&..Th
32c0: 65 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c e callback shoul
32d0: 64 20 72 65 74 75 72 6e 20 61 20 70 61 73 73 77 d return a passw
32e0: 6f 72 64 20 73 74 72 69 6e 67 5c 26 2e 20 54 68 ord string\&. Th
32f0: 69 73 20 6f 70 74 69 6f 6e 20 68 61 73 20 63 68 is option has ch
3300: 61 6e 67 65 64 20 66 6f 72 0a 54 63 6c 54 4c 53 anged for.TclTLS
3310: 20 31 5c 26 2e 38 5c 26 2e 20 53 65 65 20 5c 66 1\&.8\&. See \f
3320: 42 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e BCallback Option
3330: 73 5c 66 52 20 66 6f 72 20 6d 6f 72 65 20 69 6e s\fR for more in
3340: 66 6f 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 70 6f fo\&...TP.\fB-po
3350: 73 74 5f 68 61 6e 64 73 68 61 6b 65 5c 66 52 20 st_handshake\fR
3360: 5c 66 49 62 6f 6f 6c 5c 66 52 0a 41 6c 6c 6f 77 \fIbool\fR.Allow
3370: 20 70 6f 73 74 2d 68 61 6e 64 73 68 61 6b 65 20 post-handshake
3380: 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 75 session ticket u
3390: 70 64 61 74 65 73 5c 26 2e 20 54 68 69 73 20 6f pdates\&. This o
33a0: 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 ption is new for
33b0: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
33c0: 0a 2e 54 50 0a 5c 66 42 2d 72 65 71 75 65 73 74 ..TP.\fB-request
33d0: 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 52 \fR \fIbool\fR.R
33e0: 65 71 75 65 73 74 20 61 20 63 65 72 74 69 66 69 equest a certifi
33f0: 63 61 74 65 20 66 72 6f 6d 20 74 68 65 20 70 65 cate from the pe
3400: 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 53 53 er during the SS
3410: 4c 20 68 61 6e 64 73 68 61 6b 65 5c 26 2e 20 54 L handshake\&. T
3420: 68 69 73 20 69 73 20 6e 65 65 64 65 64 0a 74 6f his is needed.to
3430: 20 64 6f 20 43 65 72 74 69 66 69 63 61 74 65 20 do Certificate
3440: 56 61 6c 69 64 61 74 69 6f 6e 5c 26 2e 20 53 74 Validation\&. St
3450: 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 arting in TclTLS
3460: 20 31 5c 26 2e 38 2c 20 74 68 65 20 64 65 66 61 1\&.8, the defa
3470: 75 6c 74 20 69 73 0a 5c 66 42 74 72 75 65 5c 66 ult is.\fBtrue\f
3480: 52 5c 26 2e 20 53 74 61 72 74 69 6e 67 20 69 6e R\&. Starting in
3490: 20 54 63 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 49 TclTLS 2\&.0, I
34a0: 66 20 73 65 74 20 74 6f 20 5c 66 42 66 61 6c 73 f set to \fBfals
34b0: 65 5c 66 52 20 61 6e 64 0a 5c 66 42 2d 72 65 71 e\fR and.\fB-req
34c0: 75 69 72 65 5c 66 52 20 69 73 20 5c 66 42 74 72 uire\fR is \fBtr
34d0: 75 65 5c 66 52 2c 20 74 68 65 6e 20 74 68 69 73 ue\fR, then this
34e0: 20 77 69 6c 6c 20 62 65 20 6f 76 65 72 72 69 64 will be overrid
34f0: 64 65 6e 20 74 6f 20 5c 66 42 74 72 75 65 5c 66 den to \fBtrue\f
3500: 52 5c 26 2e 0a 53 65 65 20 5c 66 42 43 65 72 74 R\&..See \fBCert
3510: 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 ificate Validati
3520: 6f 6e 5c 66 52 20 66 6f 72 20 6d 6f 72 65 20 64 on\fR for more d
3530: 65 74 61 69 6c 73 5c 26 2e 0a 2e 54 50 0a 5c 66 etails\&...TP.\f
3540: 42 2d 72 65 71 75 69 72 65 5c 66 52 20 5c 66 49 B-require\fR \fI
3550: 62 6f 6f 6c 5c 66 52 0a 52 65 71 75 69 72 65 20 bool\fR.Require
3560: 61 20 76 61 6c 69 64 20 63 65 72 74 69 66 69 63 a valid certific
3570: 61 74 65 20 66 72 6f 6d 20 74 68 65 20 70 65 65 ate from the pee
3580: 72 20 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c r during the SSL
3590: 20 68 61 6e 64 73 68 61 6b 65 5c 26 2e 20 49 66 handshake\&. If
35a0: 20 74 68 69 73 20 69 73 0a 73 65 74 20 74 6f 20 this is.set to
35b0: 74 72 75 65 2c 20 74 68 65 6e 20 5c 66 42 2d 72 true, then \fB-r
35c0: 65 71 75 65 73 74 5c 66 52 20 6d 75 73 74 20 61 equest\fR must a
35d0: 6c 73 6f 20 62 65 20 73 65 74 20 74 6f 20 74 72 lso be set to tr
35e0: 75 65 20 61 6e 64 20 61 20 65 69 74 68 65 72 0a ue and a either.
35f0: 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c 20 5c 66 \fB-cadir\fR, \f
3600: 42 2d 63 61 66 69 6c 65 5c 66 52 2c 20 5c 66 42 B-cafile\fR, \fB
3610: 2d 63 61 73 74 6f 72 65 5c 66 52 2c 20 6f 72 20 -castore\fR, or
3620: 61 20 70 6c 61 74 66 6f 72 6d 20 64 65 66 61 75 a platform defau
3630: 6c 74 0a 6d 75 73 74 20 62 65 20 70 72 6f 76 69 lt.must be provi
3640: 64 65 64 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 ded in order to
3650: 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74 validate against
3660: 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 \&. The default
3670: 69 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 20 in TclTLS 1\&.8
3680: 61 6e 64 0a 65 61 72 6c 69 65 72 20 76 65 72 73 and.earlier vers
3690: 69 6f 6e 73 20 69 73 20 5c 66 42 66 61 6c 73 65 ions is \fBfalse
36a0: 5c 66 52 20 73 69 6e 63 65 20 6e 6f 74 20 61 6c \fR since not al
36b0: 6c 20 70 6c 61 74 66 6f 72 6d 73 20 68 61 76 65 l platforms have
36c0: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 6f certificates to
36d0: 0a 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 .validate agains
36e0: 74 20 69 6e 20 61 20 66 6f 72 6d 20 63 6f 6d 70 t in a form comp
36f0: 61 74 69 62 6c 65 20 77 69 74 68 20 4f 70 65 6e atible with Open
3700: 53 53 4c 5c 26 2e 20 53 74 61 72 74 69 6e 67 20 SSL\&. Starting
3710: 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 2e 30 2c in TclTLS 2\&.0,
3720: 0a 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 .the default is
3730: 5c 66 42 74 72 75 65 5c 66 52 5c 26 2e 0a 53 65 \fBtrue\fR\&..Se
3740: 65 20 5c 66 42 43 65 72 74 69 66 69 63 61 74 65 e \fBCertificate
3750: 20 56 61 6c 69 64 61 74 69 6f 6e 5c 66 52 20 66 Validation\fR f
3760: 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 5c or more details\
3770: 26 2e 0a 2e 54 50 0a 5c 66 42 2d 73 65 63 75 72 &...TP.\fB-secur
3780: 69 74 79 5f 6c 65 76 65 6c 5c 66 52 20 5c 66 49 ity_level\fR \fI
3790: 69 6e 74 65 67 65 72 5c 66 52 0a 53 70 65 63 69 integer\fR.Speci
37a0: 66 69 65 73 20 74 68 65 20 73 65 63 75 72 69 74 fies the securit
37b0: 79 20 6c 65 76 65 6c 20 28 76 61 6c 75 65 20 66 y level (value f
37c0: 72 6f 6d 20 30 20 74 6f 20 35 29 5c 26 2e 20 54 rom 0 to 5)\&. T
37d0: 68 65 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 he security leve
37e0: 6c 20 61 66 66 65 63 74 73 0a 74 68 65 20 61 6c l affects.the al
37f0: 6c 6f 77 65 64 20 63 69 70 68 65 72 20 73 75 69 lowed cipher sui
3800: 74 65 20 65 6e 63 72 79 70 74 69 6f 6e 20 61 6c te encryption al
3810: 67 6f 72 69 74 68 6d 73 2c 20 73 75 70 70 6f 72 gorithms, suppor
3820: 74 65 64 20 45 43 43 20 63 75 72 76 65 73 2c 0a ted ECC curves,.
3830: 73 75 70 70 6f 72 74 65 64 20 73 69 67 6e 61 74 supported signat
3840: 75 72 65 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20 ure algorithms,
3850: 44 48 20 70 61 72 61 6d 65 74 65 72 20 73 69 7a DH parameter siz
3860: 65 73 2c 20 63 65 72 74 69 66 69 63 61 74 65 20 es, certificate
3870: 6b 65 79 20 73 69 7a 65 73 0a 61 6e 64 20 73 69 key sizes.and si
3880: 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 69 74 68 gnature algorith
3890: 6d 73 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c ms\&. The defaul
38a0: 74 20 69 73 20 31 20 70 72 69 6f 72 20 74 6f 20 t is 1 prior to
38b0: 4f 70 65 6e 53 53 4c 20 33 5c 26 2e 32 20 61 6e OpenSSL 3\&.2 an
38c0: 64 20 32 0a 74 68 65 72 65 61 66 74 65 72 5c 26 d 2.thereafter\&
38d0: 2e 20 4c 65 76 65 6c 20 33 20 61 6e 64 20 68 69 . Level 3 and hi
38e0: 67 68 65 72 20 64 69 73 61 62 6c 65 20 73 75 70 gher disable sup
38f0: 70 6f 72 74 20 66 6f 72 20 73 65 73 73 69 6f 6e port for session
3900: 20 74 69 63 6b 65 74 73 20 61 6e 64 0a 6f 6e 6c tickets and.onl
3910: 79 20 61 63 63 65 70 74 20 63 69 70 68 65 72 20 y accept cipher
3920: 73 75 69 74 65 73 20 74 68 61 74 20 70 72 6f 76 suites that prov
3930: 69 64 65 20 66 6f 72 77 61 72 64 20 73 65 63 72 ide forward secr
3940: 65 63 79 5c 26 2e 0a 54 68 69 73 20 6f 70 74 69 ecy\&..This opti
3950: 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 on is new for Tc
3960: 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 lTLS 1\&.8\&...T
3970: 50 0a 5c 66 42 2d 73 65 72 76 65 72 5c 66 52 20 P.\fB-server\fR
3980: 5c 66 49 62 6f 6f 6c 5c 66 52 0a 53 70 65 63 69 \fIbool\fR.Speci
3990: 66 69 65 73 20 77 68 65 74 68 65 72 20 74 6f 20 fies whether to
39a0: 61 63 74 20 61 73 20 61 20 73 65 72 76 65 72 20 act as a server
39b0: 61 6e 64 20 72 65 73 70 6f 6e 64 20 77 69 74 68 and respond with
39c0: 20 61 20 73 65 72 76 65 72 20 68 61 6e 64 73 68 a server handsh
39d0: 61 6b 65 20 77 68 65 6e 20 61 0a 63 6c 69 65 6e ake when a.clien
39e0: 74 20 63 6f 6e 6e 65 63 74 73 20 61 6e 64 20 70 t connects and p
39f0: 72 6f 76 69 64 65 73 20 61 20 63 6c 69 65 6e 74 rovides a client
3a00: 20 68 61 6e 64 73 68 61 6b 65 5c 26 2e 20 54 68 handshake\&. Th
3a10: 65 20 64 65 66 61 75 6c 74 20 69 73 20 5c 66 42 e default is \fB
3a20: 66 61 6c 73 65 5c 66 52 5c 26 2e 0a 2e 54 50 0a false\fR\&...TP.
3a30: 5c 66 42 2d 73 65 72 76 65 72 6e 61 6d 65 5c 66 \fB-servername\f
3a40: 52 20 5c 66 49 68 6f 73 74 6e 61 6d 65 5c 66 52 R \fIhostname\fR
3a50: 0a 53 70 65 63 69 66 79 20 74 68 65 20 70 65 65 .Specify the pee
3a60: 72 27 73 20 68 6f 73 74 6e 61 6d 65 5c 26 2e 20 r's hostname\&.
3a70: 54 68 69 73 20 69 73 20 75 73 65 64 20 74 6f 20 This is used to
3a80: 73 65 74 20 74 68 65 20 54 4c 53 20 53 65 72 76 set the TLS Serv
3a90: 65 72 20 4e 61 6d 65 20 49 6e 64 69 63 61 74 69 er Name Indicati
3aa0: 6f 6e 0a 28 53 4e 49 29 20 65 78 74 65 6e 73 69 on.(SNI) extensi
3ab0: 6f 6e 5c 26 2e 20 53 65 74 20 74 68 69 73 20 74 on\&. Set this t
3ac0: 6f 20 74 68 65 20 65 78 70 65 63 74 65 64 20 73 o the expected s
3ad0: 65 72 76 65 72 6e 61 6d 65 20 69 6e 20 74 68 65 ervername in the
3ae0: 20 73 65 72 76 65 72 27 73 20 63 65 72 74 69 66 server's certif
3af0: 69 63 61 74 65 0a 6f 72 20 6f 6e 65 20 6f 66 20 icate.or one of
3b00: 74 68 65 20 53 75 62 6a 65 63 74 20 41 6c 74 65 the Subject Alte
3b10: 72 6e 61 74 65 20 4e 61 6d 65 73 20 28 53 41 4e rnate Names (SAN
3b20: 29 5c 26 2e 20 53 74 61 72 74 69 6e 67 20 69 6e )\&. Starting in
3b30: 20 54 63 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 74 TclTLS 2\&.0, t
3b40: 68 69 73 20 77 69 6c 6c 0a 64 65 66 61 75 6c 74 his will.default
3b50: 20 74 6f 20 74 68 65 20 68 6f 73 74 20 66 6f 72 to the host for
3b60: 20 74 68 65 20 5c 66 42 74 6c 73 3a 3a 73 6f 63 the \fBtls::soc
3b70: 6b 65 74 5c 66 52 20 63 6f 6d 6d 61 6e 64 5c 26 ket\fR command\&
3b80: 2e 0a 2e 54 50 0a 5c 66 42 2d 73 65 73 73 69 6f ...TP.\fB-sessio
3b90: 6e 5f 69 64 5c 66 52 20 5c 66 49 62 69 6e 61 72 n_id\fR \fIbinar
3ba0: 79 5f 73 74 72 69 6e 67 5c 66 52 0a 53 70 65 63 y_string\fR.Spec
3bb0: 69 66 69 65 73 20 74 68 65 20 73 65 73 73 69 6f ifies the sessio
3bc0: 6e 20 69 64 20 74 6f 20 72 65 73 75 6d 65 20 61 n id to resume a
3bd0: 20 73 65 73 73 69 6f 6e 5c 26 2e 20 4e 6f 74 20 session\&. Not
3be0: 73 75 70 70 6f 72 74 65 64 20 79 65 74 5c 26 2e supported yet\&.
3bf0: 0a 54 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 .This option is
3c00: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
3c10: 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d \&.8\&...TP.\fB-
3c20: 73 73 6c 32 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c ssl2\fR \fIbool\
3c30: 66 52 0a 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 fR.Enable use of
3c40: 20 53 53 4c 20 76 32 5c 26 2e 54 68 65 20 64 65 SSL v2\&.The de
3c50: 66 61 75 6c 74 20 69 73 20 5c 66 42 66 61 6c 73 fault is \fBfals
3c60: 65 5c 66 52 5c 26 2e 0a 4f 70 65 6e 53 53 4c 20 e\fR\&..OpenSSL
3c70: 31 5c 26 2e 31 2b 20 6e 6f 20 6c 6f 6e 67 65 72 1\&.1+ no longer
3c80: 20 73 75 70 70 6f 72 74 73 20 53 53 4c 20 76 32 supports SSL v2
3c90: 2c 20 73 6f 20 74 68 69 73 20 6d 61 79 20 6e 6f , so this may no
3ca0: 74 20 68 61 76 65 20 61 6e 79 20 65 66 66 65 63 t have any effec
3cb0: 74 5c 26 2e 0a 53 65 65 20 74 68 65 20 5c 66 42 t\&..See the \fB
3cc0: 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 5c 66 tls::protocols\f
3cd0: 52 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 73 75 R command for su
3ce0: 70 70 6f 72 74 65 64 20 70 72 6f 74 6f 63 6f 6c pported protocol
3cf0: 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 73 73 6c s\&...TP.\fB-ssl
3d00: 33 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 3\fR \fIbool\fR.
3d10: 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 53 53 Enable use of SS
3d20: 4c 20 76 33 5c 26 2e 20 54 68 65 20 64 65 66 61 L v3\&. The defa
3d30: 75 6c 74 20 69 73 20 5c 66 42 66 61 6c 73 65 5c ult is \fBfalse\
3d40: 66 52 5c 26 2e 20 53 74 61 72 74 69 6e 67 20 69 fR\&. Starting i
3d50: 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 2c 0a n TclTLS 1\&.8,.
3d60: 75 73 65 20 6f 66 20 53 53 4c 20 76 33 20 69 66 use of SSL v3 if
3d70: 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 only available
3d80: 76 69 61 20 61 20 63 6f 6d 70 69 6c 65 20 74 69 via a compile ti
3d90: 6d 65 20 6f 70 74 69 6f 6e 5c 26 2e 0a 53 65 65 me option\&..See
3da0: 20 74 68 65 20 5c 66 42 74 6c 73 3a 3a 70 72 6f the \fBtls::pro
3db0: 74 6f 63 6f 6c 73 5c 66 52 20 63 6f 6d 6d 61 6e tocols\fR comman
3dc0: 64 20 66 6f 72 20 73 75 70 70 6f 72 74 65 64 20 d for supported
3dd0: 70 72 6f 74 6f 63 6f 6c 73 5c 26 2e 0a 2e 54 50 protocols\&...TP
3de0: 0a 5c 66 42 2d 74 6c 73 31 5c 66 52 20 5c 66 49 .\fB-tls1\fR \fI
3df0: 62 6f 6f 6c 5c 66 52 0a 45 6e 61 62 6c 65 20 75 bool\fR.Enable u
3e00: 73 65 20 6f 66 20 54 4c 53 20 76 31 5c 26 2e 20 se of TLS v1\&.
3e10: 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 Starting in TclT
3e20: 4c 53 20 32 5c 26 2e 30 2c 20 74 68 65 20 64 65 LS 2\&.0, the de
3e30: 66 61 75 6c 74 20 69 73 20 5c 66 42 66 61 6c 73 fault is \fBfals
3e40: 65 5c 66 52 5c 26 2e 0a 4e 6f 74 65 3a 20 54 4c e\fR\&..Note: TL
3e50: 53 20 31 5c 26 2e 30 20 6e 65 65 64 73 20 53 48 S 1\&.0 needs SH
3e60: 41 31 20 74 6f 20 6f 70 65 72 61 74 65 2c 20 77 A1 to operate, w
3e70: 68 69 63 68 20 69 73 20 6f 6e 6c 79 20 61 76 61 hich is only ava
3e80: 69 6c 61 62 6c 65 20 69 6e 20 73 65 63 75 72 69 ilable in securi
3e90: 74 79 20 6c 65 76 65 6c 0a 30 20 66 6f 72 20 4f ty level.0 for O
3ea0: 70 65 6e 20 53 53 4c 20 33 5c 26 2e 30 2b 5c 26 pen SSL 3\&.0+\&
3eb0: 2e 20 53 65 65 20 74 68 65 20 5c 66 49 2d 73 65 . See the \fI-se
3ec0: 63 75 72 69 74 79 5f 6c 65 76 65 6c 5c 66 52 20 curity_level\fR
3ed0: 6f 70 74 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 option\&...TP.\f
3ee0: 42 2d 74 6c 73 31 5c 26 2e 31 5c 66 52 20 5c 66 B-tls1\&.1\fR \f
3ef0: 49 62 6f 6f 6c 5c 66 52 0a 45 6e 61 62 6c 65 20 Ibool\fR.Enable
3f00: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 5c 26 2e use of TLS v1\&.
3f10: 31 5c 26 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 1\&. Starting in
3f20: 20 54 63 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 74 TclTLS 2\&.0, t
3f30: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 5c 66 he default is \f
3f40: 42 66 61 6c 73 65 5c 66 52 5c 26 2e 0a 4e 6f 74 Bfalse\fR\&..Not
3f50: 65 3a 20 54 4c 53 20 31 5c 26 2e 31 20 6e 65 65 e: TLS 1\&.1 nee
3f60: 64 73 20 53 48 41 31 20 74 6f 20 6f 70 65 72 61 ds SHA1 to opera
3f70: 74 65 2c 20 77 68 69 63 68 20 69 73 20 6f 6e 6c te, which is onl
3f80: 79 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 73 y available in s
3f90: 65 63 75 72 69 74 79 20 6c 65 76 65 6c 0a 30 20 ecurity level.0
3fa0: 66 6f 72 20 4f 70 65 6e 20 53 53 4c 20 33 5c 26 for Open SSL 3\&
3fb0: 2e 30 2b 5c 26 2e 20 53 65 65 20 74 68 65 20 5c .0+\&. See the \
3fc0: 66 49 2d 73 65 63 75 72 69 74 79 5f 6c 65 76 65 fI-security_leve
3fd0: 6c 5c 66 52 20 6f 70 74 69 6f 6e 5c 26 2e 0a 2e l\fR option\&...
3fe0: 54 50 0a 5c 66 42 2d 74 6c 73 31 5c 26 2e 32 5c TP.\fB-tls1\&.2\
3ff0: 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 45 6e fR \fIbool\fR.En
4000: 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 able use of TLS
4010: 76 31 5c 26 2e 32 5c 26 2e 20 54 68 65 20 64 65 v1\&.2\&. The de
4020: 66 61 75 6c 74 20 69 73 20 5c 66 42 74 72 75 65 fault is \fBtrue
4030: 5c 66 52 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 74 \fR\&...TP.\fB-t
4040: 6c 73 31 5c 26 2e 33 5c 66 52 20 5c 66 49 62 6f ls1\&.3\fR \fIbo
4050: 6f 6c 5c 66 52 0a 45 6e 61 62 6c 65 20 75 73 65 ol\fR.Enable use
4060: 20 6f 66 20 54 4c 53 20 76 31 5c 26 2e 33 5c 26 of TLS v1\&.3\&
4070: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 . The default is
4080: 20 5c 66 42 74 72 75 65 5c 66 52 5c 26 2e 20 54 \fBtrue\fR\&. T
4090: 68 69 73 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 his is only avai
40a0: 6c 61 62 6c 65 0a 73 74 61 72 74 69 6e 67 20 77 lable.starting w
40b0: 69 74 68 20 4f 70 65 6e 53 53 4c 20 31 5c 26 2e ith OpenSSL 1\&.
40c0: 31 5c 26 2e 31 20 61 6e 64 20 54 63 6c 54 4c 53 1\&.1 and TclTLS
40d0: 20 31 5c 26 2e 37 5c 26 2e 0a 2e 54 50 0a 5c 66 1\&.7\&...TP.\f
40e0: 42 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e B-validatecomman
40f0: 64 5c 66 52 20 5c 66 49 63 61 6c 6c 62 61 63 6b d\fR \fIcallback
4100: 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 \fR.Specifies th
4110: 65 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 e callback comma
4120: 6e 64 20 74 6f 20 69 6e 76 6f 6b 65 20 74 6f 20 nd to invoke to
4130: 76 61 6c 69 64 61 74 65 20 74 68 65 20 70 65 65 validate the pee
4140: 72 20 63 65 72 74 69 66 69 63 61 74 65 73 0a 61 r certificates.a
4150: 6e 64 20 6f 74 68 65 72 20 63 6f 6e 66 69 67 20 nd other config
4160: 69 6e 66 6f 20 64 75 72 69 6e 67 20 74 68 65 20 info during the
4170: 70 72 6f 74 6f 63 6f 6c 20 6e 65 67 6f 74 69 61 protocol negotia
4180: 74 69 6f 6e 20 70 68 61 73 65 5c 26 2e 20 54 68 tion phase\&. Th
4190: 69 73 20 63 61 6e 20 62 65 20 75 73 65 64 0a 62 is can be used.b
41a0: 79 20 54 43 4c 20 73 63 72 69 70 74 73 20 74 6f y TCL scripts to
41b0: 20 70 65 72 66 6f 72 6d 20 74 68 65 69 72 20 6f perform their o
41c0: 77 6e 20 43 65 72 74 69 66 69 63 61 74 65 20 56 wn Certificate V
41d0: 61 6c 69 64 61 74 69 6f 6e 20 74 6f 20 73 75 70 alidation to sup
41e0: 70 6c 65 6d 65 6e 74 20 74 68 65 0a 64 65 66 61 plement the.defa
41f0: 75 6c 74 20 76 61 6c 69 64 61 74 69 6f 6e 20 70 ult validation p
4200: 72 6f 76 69 64 65 64 20 62 79 20 4f 70 65 6e 53 rovided by OpenS
4210: 53 4c 5c 26 2e 20 54 68 65 20 73 63 72 69 70 74 SL\&. The script
4220: 20 6d 75 73 74 20 72 65 74 75 72 6e 20 61 20 62 must return a b
4230: 6f 6f 6c 65 61 6e 20 74 72 75 65 0a 74 6f 20 63 oolean true.to c
4240: 6f 6e 74 69 6e 75 65 20 74 68 65 20 6e 65 67 6f ontinue the nego
4250: 74 69 61 74 69 6f 6e 5c 26 2e 20 53 65 65 20 5c tiation\&. See \
4260: 66 42 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f fBCallback Optio
4270: 6e 73 5c 66 52 20 66 6f 72 20 6d 6f 72 65 20 69 ns\fR for more i
4280: 6e 66 6f 5c 26 2e 0a 54 68 69 73 20 6f 70 74 69 nfo\&..This opti
4290: 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 on is new for Tc
42a0: 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 52 lTLS 1\&.8\&...R
42b0: 45 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 75 6e E..TP.\fBtls::un
42c0: 69 6d 70 6f 72 74 5c 66 52 20 5c 66 49 63 68 61 import\fR \fIcha
42d0: 6e 6e 65 6c 5c 66 52 0a 43 6f 6d 70 6c 69 6d 65 nnel\fR.Complime
42e0: 6e 74 20 74 6f 20 5c 66 42 74 6c 73 3a 3a 69 6d nt to \fBtls::im
42f0: 70 6f 72 74 5c 66 52 5c 26 2e 20 55 73 65 64 20 port\fR\&. Used
4300: 74 6f 20 72 65 6d 6f 76 65 20 74 68 65 20 74 6f to remove the to
4310: 70 20 6c 65 76 65 6c 20 73 74 61 63 6b 65 64 20 p level stacked
4320: 63 68 61 6e 6e 65 6c 0a 66 72 6f 6d 20 5c 66 49 channel.from \fI
4330: 63 68 61 6e 6e 65 6c 5c 66 52 5c 26 2e 20 54 68 channel\fR\&. Th
4340: 69 73 20 75 6e 73 74 61 63 6b 73 20 74 68 65 20 is unstacks the
4350: 65 6e 63 72 79 70 74 69 6f 6e 20 6f 66 20 61 20 encryption of a
4360: 72 65 67 75 6c 61 72 20 54 43 4c 20 63 68 61 6e regular TCL chan
4370: 6e 65 6c 5c 26 2e 20 41 6e 0a 65 72 72 6f 72 20 nel\&. An.error
4380: 69 73 20 74 68 72 6f 77 6e 20 69 66 20 54 4c 53 is thrown if TLS
4390: 20 69 73 20 6e 6f 74 20 74 68 65 20 74 6f 70 20 is not the top
43a0: 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20 stacked channel
43b0: 74 79 70 65 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 type\&...TP.\fBt
43c0: 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 5c 66 52 ls::handshake\fR
43d0: 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 0a 46 \fIchannel\fR.F
43e0: 6f 72 63 65 73 20 74 68 65 20 54 4c 53 20 6e 65 orces the TLS ne
43f0: 67 6f 74 69 61 74 69 6f 6e 20 68 61 6e 64 73 68 gotiation handsh
4400: 61 6b 65 20 74 6f 20 74 61 6b 65 20 70 6c 61 63 ake to take plac
4410: 65 20 69 6d 6d 65 64 69 61 74 65 6c 79 2c 20 61 e immediately, a
4420: 6e 64 20 72 65 74 75 72 6e 73 20 30 0a 69 66 20 nd returns 0.if
4430: 68 61 6e 64 73 68 61 6b 65 20 69 73 20 73 74 69 handshake is sti
4440: 6c 6c 20 69 6e 20 70 72 6f 67 72 65 73 73 20 28 ll in progress (
4450: 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 29 2c 20 6f non-blocking), o
4460: 72 20 31 20 69 66 20 74 68 65 20 68 61 6e 64 73 r 1 if the hands
4470: 68 61 6b 65 20 77 61 73 0a 73 75 63 63 65 73 73 hake was.success
4480: 66 75 6c 5c 26 2e 20 49 66 20 74 68 65 20 68 61 ful\&. If the ha
4490: 6e 64 73 68 61 6b 65 20 66 61 69 6c 65 64 2c 20 ndshake failed,
44a0: 61 6e 20 65 72 72 6f 72 20 77 69 6c 6c 20 62 65 an error will be
44b0: 20 72 65 74 75 72 6e 65 64 5c 26 2e 0a 2e 54 50 returned\&...TP
44c0: 0a 5c 66 42 74 6c 73 3a 3a 73 74 61 74 75 73 5c .\fBtls::status\
44d0: 66 52 20 3f 5c 66 42 2d 6c 6f 63 61 6c 5c 66 52 fR ?\fB-local\fR
44e0: 3f 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 0a ? \fIchannel\fR.
44f0: 52 65 74 75 72 6e 73 20 74 68 65 20 63 75 72 72 Returns the curr
4500: 65 6e 74 20 73 74 61 74 75 73 20 6f 66 20 61 6e ent status of an
4510: 20 53 53 4c 20 63 68 61 6e 6e 65 6c 5c 26 2e 20 SSL channel\&.
4520: 54 68 65 20 72 65 73 75 6c 74 20 69 73 20 61 20 The result is a
4530: 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 list of key-valu
4540: 65 0a 70 61 69 72 73 20 64 65 73 63 72 69 62 69 e.pairs describi
4550: 6e 67 20 74 68 65 20 53 53 4c 2c 20 63 65 72 74 ng the SSL, cert
4560: 69 66 69 63 61 74 65 2c 20 61 6e 64 20 63 65 72 ificate, and cer
4570: 74 69 66 69 63 61 74 65 20 76 65 72 69 66 69 63 tificate verific
4580: 61 74 69 6f 6e 20 73 74 61 74 75 73 5c 26 2e 20 ation status\&.
4590: 49 66 0a 74 68 65 20 53 53 4c 20 68 61 6e 64 73 If.the SSL hands
45a0: 68 61 6b 65 20 68 61 73 20 6e 6f 74 20 79 65 74 hake has not yet
45b0: 20 63 6f 6d 70 6c 65 74 65 64 2c 20 61 6e 20 65 completed, an e
45c0: 6d 70 74 79 20 6c 69 73 74 20 69 73 20 72 65 74 mpty list is ret
45d0: 75 72 6e 65 64 5c 26 2e 20 49 66 20 74 68 65 0a urned\&. If the.
45e0: 5c 66 42 2d 6c 6f 63 61 6c 5c 66 52 20 6f 70 74 \fB-local\fR opt
45f0: 69 6f 6e 20 69 73 20 73 70 65 63 69 66 69 65 64 ion is specified
4600: 2c 20 74 68 65 6e 20 74 68 65 20 6c 6f 63 61 6c , then the local
4610: 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 20 certificate is
4620: 75 73 65 64 5c 26 2e 20 52 65 74 75 72 6e 65 64 used\&. Returned
4630: 0a 76 61 6c 75 65 73 20 69 6e 63 6c 75 64 65 3a .values include:
4640: 0a 2e 73 70 0a 53 53 4c 20 53 74 61 74 75 73 0a ..sp.SSL Status.
4650: 2e 52 53 0a 2e 54 50 0a 5c 66 42 61 6c 70 6e 5c .RS..TP.\fBalpn\
4660: 66 52 20 5c 66 49 70 72 6f 74 6f 63 6f 6c 5c 66 fR \fIprotocol\f
4670: 52 0a 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 73 R.The protocol s
4680: 65 6c 65 63 74 65 64 20 61 66 74 65 72 20 41 70 elected after Ap
4690: 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 20 plication-Layer
46a0: 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 Protocol Negotia
46b0: 74 69 6f 6e 20 28 41 4c 50 4e 29 5c 26 2e 0a 54 tion (ALPN)\&..T
46c0: 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 his value is new
46d0: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e for TclTLS 1\&.
46e0: 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 63 69 70 68 8\&...TP.\fBciph
46f0: 65 72 5c 66 52 20 5c 66 49 63 69 70 68 65 72 5c er\fR \fIcipher\
4700: 66 52 0a 54 68 65 20 63 75 72 72 65 6e 74 20 63 fR.The current c
4710: 69 70 68 65 72 20 69 6e 20 75 73 65 20 66 6f 72 ipher in use for
4720: 20 74 68 65 20 73 65 73 73 69 6f 6e 5c 26 2e 0a the session\&..
4730: 2e 54 50 0a 5c 66 42 70 65 65 72 6e 61 6d 65 5c .TP.\fBpeername\
4740: 66 52 20 5c 66 49 6e 61 6d 65 5c 66 52 0a 54 68 fR \fIname\fR.Th
4750: 65 20 70 65 65 72 6e 61 6d 65 20 66 72 6f 6d 20 e peername from
4760: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 5c the certificate\
4770: 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 &..This value is
4780: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
4790: 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 1\&.8\&...TP.\fB
47a0: 70 72 6f 74 6f 63 6f 6c 5c 66 52 20 5c 66 49 76 protocol\fR \fIv
47b0: 65 72 73 69 6f 6e 5c 66 52 0a 54 68 65 20 70 72 ersion\fR.The pr
47c0: 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75 otocol version u
47d0: 73 65 64 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e sed for the conn
47e0: 65 63 74 69 6f 6e 3a 20 53 53 4c 32 2c 20 53 53 ection: SSL2, SS
47f0: 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 5c 26 L3, TLS1, TLS1\&
4800: 2e 31 2c 20 54 4c 53 31 5c 26 2e 32 2c 0a 54 4c .1, TLS1\&.2,.TL
4810: 53 31 5c 26 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f S1\&.3, or unkno
4820: 77 6e 5c 26 2e 20 54 68 69 73 20 76 61 6c 75 65 wn\&. This value
4830: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
4840: 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a LS 1\&.8\&...TP.
4850: 5c 66 42 73 62 69 74 73 5c 66 52 20 5c 66 49 6e \fBsbits\fR \fIn
4860: 5c 66 52 0a 54 68 65 20 6e 75 6d 62 65 72 20 6f \fR.The number o
4870: 66 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 f bits used for
4880: 74 68 65 20 73 65 73 73 69 6f 6e 20 6b 65 79 5c the session key\
4890: 26 2e 0a 2e 54 50 0a 5c 66 42 73 69 67 6e 61 74 &...TP.\fBsignat
48a0: 75 72 65 48 61 73 68 41 6c 67 6f 72 69 74 68 6d ureHashAlgorithm
48b0: 5c 66 52 20 5c 66 49 61 6c 67 6f 72 69 74 68 6d \fR \fIalgorithm
48c0: 5c 66 52 0a 54 68 65 20 73 69 67 6e 61 74 75 72 \fR.The signatur
48d0: 65 20 68 61 73 68 20 61 6c 67 6f 72 69 74 68 6d e hash algorithm
48e0: 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 \&..This value i
48f0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
4900: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 1\&.8\&...TP.\f
4910: 42 73 69 67 6e 61 74 75 72 65 54 79 70 65 5c 66 BsignatureType\f
4920: 52 20 5c 66 49 74 79 70 65 5c 66 52 0a 54 68 65 R \fItype\fR.The
4930: 20 73 69 67 6e 61 74 75 72 65 20 74 79 70 65 20 signature type
4940: 76 61 6c 75 65 5c 26 2e 0a 54 68 69 73 20 76 61 value\&..This va
4950: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 lue is new for T
4960: 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e clTLS 1\&.8\&...
4970: 54 50 0a 5c 66 42 76 65 72 69 66 79 44 65 70 74 TP.\fBverifyDept
4980: 68 5c 66 52 20 5c 66 49 6e 5c 66 52 0a 4d 61 78 h\fR \fIn\fR.Max
4990: 69 6d 75 6d 20 64 65 70 74 68 20 66 6f 72 20 74 imum depth for t
49a0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63 he certificate c
49b0: 68 61 69 6e 20 76 65 72 69 66 69 63 61 74 69 6f hain verificatio
49c0: 6e 5c 26 2e 20 44 65 66 61 75 6c 74 20 69 73 20 n\&. Default is
49d0: 2d 31 2c 20 74 6f 20 63 68 65 63 6b 20 61 6c 6c -1, to check all
49e0: 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 \&..This value i
49f0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
4a00: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 1\&.8\&...TP.\f
4a10: 42 76 65 72 69 66 79 4d 6f 64 65 5c 66 52 20 5c BverifyMode\fR \
4a20: 66 49 6c 69 73 74 5c 66 52 0a 4c 69 73 74 20 6f fIlist\fR.List o
4a30: 66 20 63 65 72 74 69 66 69 63 61 74 65 20 76 65 f certificate ve
4a40: 72 69 66 69 63 61 74 69 6f 6e 20 6d 6f 64 65 73 rification modes
4a50: 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 \&..This value i
4a60: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
4a70: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 1\&.8\&...TP.\f
4a80: 42 76 65 72 69 66 79 52 65 73 75 6c 74 5c 66 52 BverifyResult\fR
4a90: 20 5c 66 49 72 65 73 75 6c 74 5c 66 52 0a 43 65 \fIresult\fR.Ce
4aa0: 72 74 69 66 69 63 61 74 65 20 76 65 72 69 66 69 rtificate verifi
4ab0: 63 61 74 69 6f 6e 20 72 65 73 75 6c 74 5c 26 2e cation result\&.
4ac0: 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e .This value is n
4ad0: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c ew for TclTLS 1\
4ae0: 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 63 61 &.8\&...TP.\fBca
4af0: 5f 6e 61 6d 65 73 5c 66 52 20 5c 66 49 6c 69 73 _names\fR \fIlis
4b00: 74 5c 66 52 0a 4c 69 73 74 20 6f 66 20 74 68 65 t\fR.List of the
4b10: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 Certificate Aut
4b20: 68 6f 72 69 74 69 65 73 20 75 73 65 64 20 74 6f horities used to
4b30: 20 63 72 65 61 74 65 20 74 68 65 20 63 65 72 74 create the cert
4b40: 69 66 69 63 61 74 65 5c 26 2e 0a 54 68 69 73 20 ificate\&..This
4b50: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
4b60: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
4b70: 0a 2e 52 45 0a 2e 49 50 0a 43 65 72 74 69 66 69 ..RE..IP.Certifi
4b80: 63 61 74 65 20 53 74 61 74 75 73 0a 2e 52 53 0a cate Status..RS.
4b90: 2e 54 50 0a 5c 66 42 61 6c 6c 5c 66 52 20 5c 66 .TP.\fBall\fR \f
4ba0: 49 73 74 72 69 6e 67 5c 66 52 0a 44 75 6d 70 20 Istring\fR.Dump
4bb0: 6f 66 20 61 6c 6c 20 63 65 72 74 69 66 69 63 61 of all certifica
4bc0: 74 65 20 69 6e 66 6f 5c 26 2e 0a 54 68 69 73 20 te info\&..This
4bd0: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
4be0: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
4bf0: 0a 2e 54 50 0a 5c 66 42 76 65 72 73 69 6f 6e 5c ..TP.\fBversion\
4c00: 66 52 20 5c 66 49 76 61 6c 75 65 5c 66 52 0a 54 fR \fIvalue\fR.T
4c10: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 76 he certificate v
4c20: 65 72 73 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 ersion\&...TP.\f
4c30: 42 73 65 72 69 61 6c 4e 75 6d 62 65 72 5c 66 52 BserialNumber\fR
4c40: 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 54 68 \fIstring\fR.Th
4c50: 65 20 73 65 72 69 61 6c 20 6e 75 6d 62 65 72 20 e serial number
4c60: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 of the certifica
4c70: 74 65 20 61 73 20 61 20 68 65 78 20 73 74 72 69 te as a hex stri
4c80: 6e 67 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 ng\&..This value
4c90: 20 77 61 73 20 63 68 61 6e 67 65 64 20 66 72 6f was changed fro
4ca0: 6d 20 73 65 72 69 61 6c 20 69 6e 20 54 63 6c 54 m serial in TclT
4cb0: 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a LS 1\&.8\&...TP.
4cc0: 5c 66 42 73 69 67 6e 61 74 75 72 65 5c 66 52 20 \fBsignature\fR
4cd0: 5c 66 49 61 6c 67 6f 72 69 74 68 6d 5c 66 52 0a \fIalgorithm\fR.
4ce0: 43 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d Cipher algorithm
4cf0: 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 69 66 used for certif
4d00: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 5c icate signature\
4d10: 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 &..This value is
4d20: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
4d30: 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 1\&.8\&...TP.\fB
4d40: 69 73 73 75 65 72 5c 66 52 20 5c 66 49 73 74 72 issuer\fR \fIstr
4d50: 69 6e 67 5c 66 52 0a 54 68 65 20 64 69 73 74 69 ing\fR.The disti
4d60: 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44 nguished name (D
4d70: 4e 29 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 N) of the certif
4d80: 69 63 61 74 65 20 69 73 73 75 65 72 5c 26 2e 0a icate issuer\&..
4d90: 2e 54 50 0a 5c 66 42 6e 6f 74 42 65 66 6f 72 65 .TP.\fBnotBefore
4da0: 5c 66 52 20 5c 66 49 64 61 74 65 5c 66 52 0a 54 \fR \fIdate\fR.T
4db0: 68 65 20 62 65 67 69 6e 6e 69 6e 67 20 64 61 74 he beginning dat
4dc0: 65 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 e of the certifi
4dd0: 63 61 74 65 20 76 61 6c 69 64 69 74 79 5c 26 2e cate validity\&.
4de0: 0a 2e 54 50 0a 5c 66 42 6e 6f 74 41 66 74 65 72 ..TP.\fBnotAfter
4df0: 5c 66 52 20 5c 66 49 64 61 74 65 5c 66 52 0a 54 \fR \fIdate\fR.T
4e00: 68 65 20 65 78 70 69 72 61 74 69 6f 6e 20 64 61 he expiration da
4e10: 74 65 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 te of the certif
4e20: 69 63 61 74 65 20 76 61 6c 69 64 69 74 79 5c 26 icate validity\&
4e30: 2e 0a 2e 54 50 0a 5c 66 42 73 75 62 6a 65 63 74 ...TP.\fBsubject
4e40: 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 \fR \fIstring\fR
4e50: 0a 54 68 65 20 64 69 73 74 69 6e 67 75 69 73 68 .The distinguish
4e60: 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 ed name (DN) of
4e70: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
4e80: 73 75 62 6a 65 63 74 5c 26 2e 20 46 69 65 6c 64 subject\&. Field
4e90: 73 20 69 6e 63 6c 75 64 65 3a 20 43 6f 6d 6d 6f s include: Commo
4ea0: 6e 0a 4e 61 6d 65 20 28 43 4e 29 2c 20 4f 72 67 n.Name (CN), Org
4eb0: 61 6e 69 7a 61 74 69 6f 6e 20 28 4f 29 2c 20 4c anization (O), L
4ec0: 6f 63 61 6c 69 74 79 20 6f 72 20 43 69 74 79 20 ocality or City
4ed0: 28 4c 29 2c 20 53 74 61 74 65 20 6f 72 20 50 72 (L), State or Pr
4ee0: 6f 76 69 6e 63 65 20 28 53 29 2c 20 61 6e 64 0a ovince (S), and.
4ef0: 43 6f 75 6e 74 72 79 20 4e 61 6d 65 20 28 43 29 Country Name (C)
4f00: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 69 73 73 75 65 \&...TP.\fBissue
4f10: 72 55 6e 69 71 75 65 49 44 5c 66 52 20 5c 66 49 rUniqueID\fR \fI
4f20: 73 74 72 69 6e 67 5c 66 52 0a 54 68 65 20 69 73 string\fR.The is
4f30: 73 75 65 72 20 75 6e 69 71 75 65 20 69 64 5c 26 suer unique id\&
4f40: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 ..This value is
4f50: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
4f60: 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 \&.8\&...TP.\fBs
4f70: 75 62 6a 65 63 74 55 6e 69 71 75 65 49 44 5c 66 ubjectUniqueID\f
4f80: 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 54 R \fIstring\fR.T
4f90: 68 65 20 73 75 62 6a 65 63 74 20 75 6e 69 71 75 he subject uniqu
4fa0: 65 20 69 64 5c 26 2e 0a 54 68 69 73 20 76 61 6c e id\&..This val
4fb0: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 ue is new for Tc
4fc0: 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 lTLS 1\&.8\&...T
4fd0: 50 0a 5c 66 42 6e 75 6d 5f 65 78 74 65 6e 73 69 P.\fBnum_extensi
4fe0: 6f 6e 73 5c 66 52 20 5c 66 49 6e 5c 66 52 0a 4e ons\fR \fIn\fR.N
4ff0: 75 6d 62 65 72 20 6f 66 20 63 65 72 74 69 66 69 umber of certifi
5000: 63 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 73 5c cate extensions\
5010: 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 &..This value is
5020: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
5030: 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 1\&.8\&...TP.\fB
5040: 65 78 74 65 6e 73 69 6f 6e 73 5c 66 52 20 5c 66 extensions\fR \f
5050: 49 6c 69 73 74 5c 66 52 0a 4c 69 73 74 20 6f 66 Ilist\fR.List of
5060: 20 63 65 72 74 69 66 69 63 61 74 65 20 65 78 74 certificate ext
5070: 65 6e 73 69 6f 6e 20 6e 61 6d 65 73 5c 26 2e 0a ension names\&..
5080: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 This value is ne
5090: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 w for TclTLS 1\&
50a0: 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 61 75 74 .8\&...TP.\fBaut
50b0: 68 6f 72 69 74 79 4b 65 79 49 64 65 6e 74 69 66 horityKeyIdentif
50c0: 69 65 72 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 ier\fR \fIstring
50d0: 5c 66 52 0a 41 75 74 68 6f 72 69 74 79 20 4b 65 \fR.Authority Ke
50e0: 79 20 49 64 65 6e 74 69 66 69 65 72 20 28 41 4b y Identifier (AK
50f0: 49 29 20 6f 66 20 74 68 65 20 49 73 73 75 69 6e I) of the Issuin
5100: 67 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 g CA certificate
5110: 20 74 68 61 74 20 73 69 67 6e 65 64 20 74 68 65 that signed the
5120: 0a 53 53 4c 20 63 65 72 74 69 66 69 63 61 74 65 .SSL certificate
5130: 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 as a hex string
5140: 5c 26 2e 20 54 68 69 73 20 76 61 6c 75 65 20 6d \&. This value m
5150: 61 74 63 68 65 73 20 74 68 65 20 53 4b 49 20 76 atches the SKI v
5160: 61 6c 75 65 20 6f 66 20 74 68 65 0a 49 6e 74 65 alue of the.Inte
5170: 72 6d 65 64 69 61 74 65 20 43 41 20 63 65 72 74 rmediate CA cert
5180: 69 66 69 63 61 74 65 5c 26 2e 0a 54 68 69 73 20 ificate\&..This
5190: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
51a0: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
51b0: 0a 2e 54 50 0a 5c 66 42 73 75 62 6a 65 63 74 4b ..TP.\fBsubjectK
51c0: 65 79 49 64 65 6e 74 69 66 69 65 72 5c 66 52 20 eyIdentifier\fR
51d0: 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 53 75 62 \fIstring\fR.Sub
51e0: 6a 65 63 74 20 4b 65 79 20 49 64 65 6e 74 69 66 ject Key Identif
51f0: 69 65 72 20 28 53 4b 49 29 20 68 61 73 68 20 6f ier (SKI) hash o
5200: 66 20 74 68 65 20 70 75 62 6c 69 63 20 6b 65 79 f the public key
5210: 20 69 6e 73 69 64 65 20 74 68 65 20 63 65 72 74 inside the cert
5220: 69 66 69 63 61 74 65 20 61 73 20 61 0a 68 65 78 ificate as a.hex
5230: 20 73 74 72 69 6e 67 5c 26 2e 20 55 73 65 64 20 string\&. Used
5240: 74 6f 20 69 64 65 6e 74 69 66 79 20 63 65 72 74 to identify cert
5250: 69 66 69 63 61 74 65 73 20 74 68 61 74 20 63 6f ificates that co
5260: 6e 74 61 69 6e 20 61 20 70 61 72 74 69 63 75 6c ntain a particul
5270: 61 72 20 70 75 62 6c 69 63 20 6b 65 79 5c 26 2e ar public key\&.
5280: 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e .This value is n
5290: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c ew for TclTLS 1\
52a0: 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 75 &.8\&...TP.\fBsu
52b0: 62 6a 65 63 74 41 6c 74 4e 61 6d 65 5c 66 52 20 bjectAltName\fR
52c0: 5c 66 49 6c 69 73 74 5c 66 52 0a 4c 69 73 74 20 \fIlist\fR.List
52d0: 6f 66 20 61 6c 6c 20 6f 66 20 74 68 65 20 53 75 of all of the Su
52e0: 62 6a 65 63 74 20 41 6c 74 65 72 6e 61 74 69 76 bject Alternativ
52f0: 65 20 4e 61 6d 65 73 20 28 53 41 4e 29 20 69 6e e Names (SAN) in
5300: 63 6c 75 64 69 6e 67 20 64 6f 6d 61 69 6e 20 6e cluding domain n
5310: 61 6d 65 73 2c 20 73 75 62 0a 64 6f 6d 61 69 6e ames, sub.domain
5320: 73 2c 20 61 6e 64 20 49 50 20 61 64 64 72 65 73 s, and IP addres
5330: 73 65 73 20 74 68 61 74 20 61 72 65 20 73 65 63 ses that are sec
5340: 75 72 65 64 20 62 79 20 74 68 65 20 63 65 72 74 ured by the cert
5350: 69 66 69 63 61 74 65 5c 26 2e 0a 54 68 69 73 20 ificate\&..This
5360: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
5370: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
5380: 0a 2e 54 50 0a 5c 66 42 6f 63 73 70 5c 66 52 20 ..TP.\fBocsp\fR
5390: 5c 66 49 6c 69 73 74 5c 66 52 0a 4c 69 73 74 20 \fIlist\fR.List
53a0: 6f 66 20 61 6c 6c 20 4f 6e 6c 69 6e 65 20 43 65 of all Online Ce
53b0: 72 74 69 66 69 63 61 74 65 20 53 74 61 74 75 73 rtificate Status
53c0: 20 50 72 6f 74 6f 63 6f 6c 20 28 4f 43 53 50 29 Protocol (OCSP)
53d0: 20 55 52 4c 73 20 74 68 61 74 20 63 61 6e 20 62 URLs that can b
53e0: 65 20 75 73 65 64 20 74 6f 0a 63 68 65 63 6b 20 e used to.check
53f0: 74 68 65 20 76 61 6c 69 64 69 74 79 20 6f 66 20 the validity of
5400: 74 68 69 73 20 63 65 72 74 69 66 69 63 61 74 65 this certificate
5410: 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 \&..This value i
5420: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
5430: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 1\&.8\&...TP.\f
5440: 42 63 65 72 74 69 66 69 63 61 74 65 5c 66 52 20 Bcertificate\fR
5450: 5c 66 49 63 65 72 74 5c 66 52 0a 54 68 65 20 50 \fIcert\fR.The P
5460: 45 4d 20 65 6e 63 6f 64 65 64 20 63 65 72 74 69 EM encoded certi
5470: 66 69 63 61 74 65 5c 26 2e 0a 2e 54 50 0a 5c 66 ficate\&...TP.\f
5480: 42 73 69 67 6e 61 74 75 72 65 41 6c 67 6f 72 69 BsignatureAlgori
5490: 74 68 6d 5c 66 52 20 5c 66 49 61 6c 67 6f 72 69 thm\fR \fIalgori
54a0: 74 68 6d 5c 66 52 0a 43 69 70 68 65 72 20 61 6c thm\fR.Cipher al
54b0: 67 6f 72 69 74 68 6d 20 75 73 65 64 20 66 6f 72 gorithm used for
54c0: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
54d0: 20 73 69 67 6e 61 74 75 72 65 5c 26 2e 0a 54 68 signature\&..Th
54e0: 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 is value is new
54f0: 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 for TclTLS 1\&.8
5500: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 69 67 6e 61 \&...TP.\fBsigna
5510: 74 75 72 65 56 61 6c 75 65 5c 66 52 20 5c 66 49 tureValue\fR \fI
5520: 73 74 72 69 6e 67 5c 66 52 0a 43 65 72 74 69 66 string\fR.Certif
5530: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 icate signature
5540: 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 5c as a hex string\
5550: 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 &..This value is
5560: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
5570: 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 1\&.8\&...TP.\fB
5580: 73 69 67 6e 61 74 75 72 65 44 69 67 65 73 74 5c signatureDigest\
5590: 66 52 20 5c 66 49 76 65 72 73 69 6f 6e 5c 66 52 fR \fIversion\fR
55a0: 0a 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 .Certificate sig
55b0: 6e 69 6e 67 20 64 69 67 65 73 74 20 61 73 20 61 ning digest as a
55c0: 20 68 65 78 20 73 74 72 69 6e 67 5c 26 2e 0a 54 hex string\&..T
55d0: 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 his value is new
55e0: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e for TclTLS 1\&.
55f0: 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 70 75 62 6c 8\&...TP.\fBpubl
5600: 69 63 4b 65 79 41 6c 67 6f 72 69 74 68 6d 5c 66 icKeyAlgorithm\f
5610: 52 20 5c 66 49 61 6c 67 6f 72 69 74 68 6d 5c 66 R \fIalgorithm\f
5620: 52 0a 43 65 72 74 69 66 69 63 61 74 65 20 73 69 R.Certificate si
5630: 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20 6b gnature public k
5640: 65 79 20 61 6c 67 6f 72 69 74 68 6d 5c 26 2e 0a ey algorithm\&..
5650: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 This value is ne
5660: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 w for TclTLS 1\&
5670: 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 70 75 62 .8\&...TP.\fBpub
5680: 6c 69 63 4b 65 79 5c 66 52 20 5c 66 49 73 74 72 licKey\fR \fIstr
5690: 69 6e 67 5c 66 52 0a 43 65 72 74 69 66 69 63 61 ing\fR.Certifica
56a0: 74 65 20 73 69 67 6e 61 74 75 72 65 20 70 75 62 te signature pub
56b0: 6c 69 63 20 6b 65 79 20 61 73 20 61 20 68 65 78 lic key as a hex
56c0: 20 73 74 72 69 6e 67 5c 26 2e 0a 54 68 69 73 20 string\&..This
56d0: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
56e0: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
56f0: 0a 2e 54 50 0a 5c 66 42 62 69 74 73 5c 66 52 20 ..TP.\fBbits\fR
5700: 5c 66 49 6e 5c 66 52 0a 4e 75 6d 62 65 72 20 6f \fIn\fR.Number o
5710: 66 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 f bits used for
5720: 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e certificate sign
5730: 61 74 75 72 65 20 6b 65 79 5c 26 2e 0a 54 68 69 ature key\&..Thi
5740: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 s value is new f
5750: 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c or TclTLS 1\&.8\
5760: 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 6c 66 5f 73 &...TP.\fBself_s
5770: 69 67 6e 65 64 5c 66 52 20 5c 66 49 62 6f 6f 6c igned\fR \fIbool
5780: 65 61 6e 5c 66 52 0a 57 68 65 74 68 65 72 20 74 ean\fR.Whether t
5790: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 73 he certificate s
57a0: 69 67 6e 61 74 75 72 65 20 69 73 20 73 65 6c 66 ignature is self
57b0: 20 73 69 67 6e 65 64 5c 26 2e 0a 54 68 69 73 20 signed\&..This
57c0: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
57d0: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
57e0: 0a 2e 54 50 0a 5c 66 42 73 68 61 31 5f 68 61 73 ..TP.\fBsha1_has
57f0: 68 5c 66 52 20 5c 66 49 68 61 73 68 5c 66 52 0a h\fR \fIhash\fR.
5800: 54 68 65 20 53 48 41 31 20 68 61 73 68 20 6f 66 The SHA1 hash of
5810: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
5820: 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 as a hex string
5830: 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 \&..This value i
5840: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
5850: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 1\&.8\&...TP.\f
5860: 42 73 68 61 32 35 36 5f 68 61 73 68 5c 66 52 20 Bsha256_hash\fR
5870: 5c 66 49 68 61 73 68 5c 66 52 0a 54 68 65 20 53 \fIhash\fR.The S
5880: 48 41 32 35 36 20 68 61 73 68 20 6f 66 20 74 68 HA256 hash of th
5890: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73 e certificate as
58a0: 20 61 20 68 65 78 20 73 74 72 69 6e 67 5c 26 2e a hex string\&.
58b0: 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e .This value is n
58c0: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c ew for TclTLS 1\
58d0: 26 2e 38 5c 26 2e 0a 2e 52 45 0a 2e 54 50 0a 5c &.8\&...RE..TP.\
58e0: 66 42 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f fBtls::connectio
58f0: 6e 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 5c n\fR \fIchannel\
5900: 66 52 0a 52 65 74 75 72 6e 73 20 74 68 65 20 63 fR.Returns the c
5910: 75 72 72 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f urrent connectio
5920: 6e 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 53 n status of an S
5930: 53 4c 20 63 68 61 6e 6e 65 6c 5c 26 2e 20 54 68 SL channel\&. Th
5940: 65 20 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69 e result is a li
5950: 73 74 0a 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 st.of key-value
5960: 70 61 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 pairs describing
5970: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 5c the connection\
5980: 26 2e 0a 54 68 69 73 20 63 6f 6d 6d 61 6e 64 20 &..This command
5990: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c is new for TclTL
59a0: 53 20 31 5c 26 2e 38 5c 26 2e 20 52 65 74 75 72 S 1\&.8\&. Retur
59b0: 6e 65 64 20 76 61 6c 75 65 73 20 69 6e 63 6c 75 ned values inclu
59c0: 64 65 3a 0a 2e 73 70 0a 53 53 4c 20 53 74 61 74 de:..sp.SSL Stat
59d0: 75 73 0a 2e 52 53 0a 2e 54 50 0a 5c 66 42 73 74 us..RS..TP.\fBst
59e0: 61 74 65 5c 66 52 20 5c 66 49 73 74 61 74 65 5c ate\fR \fIstate\
59f0: 66 52 0a 53 74 61 74 65 20 6f 66 20 74 68 65 20 fR.State of the
5a00: 63 6f 6e 6e 65 63 74 69 6f 6e 5c 26 2e 0a 2e 54 connection\&...T
5a10: 50 0a 5c 66 42 73 65 72 76 65 72 6e 61 6d 65 5c P.\fBservername\
5a20: 66 52 20 5c 66 49 6e 61 6d 65 5c 66 52 0a 54 68 fR \fIname\fR.Th
5a30: 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 6f e name of the co
5a40: 6e 6e 65 63 74 65 64 20 74 6f 20 73 65 72 76 65 nnected to serve
5a50: 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 70 72 6f 74 r\&...TP.\fBprot
5a60: 6f 63 6f 6c 5c 66 52 20 5c 66 49 76 65 72 73 69 ocol\fR \fIversi
5a70: 6f 6e 5c 66 52 0a 54 68 65 20 70 72 6f 74 6f 63 on\fR.The protoc
5a80: 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20 ol version used
5a90: 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 for the connecti
5aa0: 6f 6e 3a 20 53 53 4c 32 2c 20 53 53 4c 33 2c 20 on: SSL2, SSL3,
5ab0: 54 4c 53 31 2c 20 54 4c 53 31 5c 26 2e 31 2c 20 TLS1, TLS1\&.1,
5ac0: 54 4c 53 31 5c 26 2e 32 2c 20 54 4c 53 31 5c 26 TLS1\&.2, TLS1\&
5ad0: 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e 5c 26 .3, or unknown\&
5ae0: 2e 0a 2e 54 50 0a 5c 66 42 72 65 6e 65 67 6f 74 ...TP.\fBrenegot
5af0: 69 61 74 69 6f 6e 5f 61 6c 6c 6f 77 65 64 5c 66 iation_allowed\f
5b00: 52 20 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a R \fIboolean\fR.
5b10: 57 68 65 74 68 65 72 20 70 72 6f 74 6f 63 6f 6c Whether protocol
5b20: 20 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 20 69 renegotiation i
5b30: 73 20 73 75 70 70 6f 72 74 65 64 20 6f 72 20 6e s supported or n
5b40: 6f 74 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 63 ot\&...TP.\fBsec
5b50: 75 72 69 74 79 5f 6c 65 76 65 6c 5c 66 52 20 5c urity_level\fR \
5b60: 66 49 6c 65 76 65 6c 5c 66 52 0a 54 68 65 20 73 fIlevel\fR.The s
5b70: 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20 75 73 ecurity level us
5b80: 65 64 20 66 6f 72 20 73 65 6c 65 63 74 69 6f 6e ed for selection
5b90: 20 6f 66 20 63 69 70 68 65 72 73 2c 20 6b 65 79 of ciphers, key
5ba0: 20 73 69 7a 65 2c 20 65 74 63 5c 26 2e 0a 2e 54 size, etc\&...T
5bb0: 50 0a 5c 66 42 73 65 73 73 69 6f 6e 5f 72 65 75 P.\fBsession_reu
5bc0: 73 65 64 5c 66 52 20 5c 66 49 62 6f 6f 6c 65 61 sed\fR \fIboolea
5bd0: 6e 5c 66 52 0a 57 68 65 74 68 65 72 20 74 68 65 n\fR.Whether the
5be0: 20 73 65 73 73 69 6f 6e 20 68 61 73 20 62 65 65 session has bee
5bf0: 6e 20 72 65 75 73 65 64 20 6f 72 20 6e 6f 74 5c n reused or not\
5c00: 26 2e 0a 2e 54 50 0a 5c 66 42 69 73 5f 73 65 72 &...TP.\fBis_ser
5c10: 76 65 72 5c 66 52 20 5c 66 49 62 6f 6f 6c 65 61 ver\fR \fIboolea
5c20: 6e 5c 66 52 0a 57 68 65 74 68 65 72 20 74 68 65 n\fR.Whether the
5c30: 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 69 73 20 63 connection is c
5c40: 6f 6e 66 69 67 75 72 65 64 20 61 73 20 61 20 73 onfigured as a s
5c50: 65 72 76 65 72 20 28 31 29 20 6f 72 20 63 6c 69 erver (1) or cli
5c60: 65 6e 74 20 28 30 29 5c 26 2e 0a 2e 54 50 0a 5c ent (0)\&...TP.\
5c70: 66 42 63 6f 6d 70 72 65 73 73 69 6f 6e 5c 66 52 fBcompression\fR
5c80: 20 5c 66 49 6d 6f 64 65 5c 66 52 0a 43 6f 6d 70 \fImode\fR.Comp
5c90: 72 65 73 73 69 6f 6e 20 6d 65 74 68 6f 64 5c 26 ression method\&
5ca0: 2e 0a 2e 54 50 0a 5c 66 42 65 78 70 61 6e 73 69 ...TP.\fBexpansi
5cb0: 6f 6e 5c 66 52 20 5c 66 49 6d 6f 64 65 5c 66 52 on\fR \fImode\fR
5cc0: 0a 45 78 70 61 6e 73 69 6f 6e 20 6d 65 74 68 6f .Expansion metho
5cd0: 64 5c 26 2e 0a 2e 54 50 0a 5c 66 42 63 61 4c 69 d\&...TP.\fBcaLi
5ce0: 73 74 5c 66 52 20 5c 66 49 6c 69 73 74 5c 66 52 st\fR \fIlist\fR
5cf0: 0a 4c 69 73 74 20 6f 66 20 43 65 72 74 69 66 69 .List of Certifi
5d00: 63 61 74 65 20 41 75 74 68 6f 72 69 74 69 65 73 cate Authorities
5d10: 20 28 43 41 29 20 66 6f 72 20 58 5c 26 2e 35 30 (CA) for X\&.50
5d20: 39 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 2e 9 certificate\&.
5d30: 0a 2e 52 45 0a 2e 49 50 0a 43 69 70 68 65 72 20 ..RE..IP.Cipher
5d40: 49 6e 66 6f 0a 2e 52 53 0a 2e 54 50 0a 5c 66 42 Info..RS..TP.\fB
5d50: 63 69 70 68 65 72 5c 66 52 20 5c 66 49 63 69 70 cipher\fR \fIcip
5d60: 68 65 72 5c 66 52 0a 54 68 65 20 63 75 72 72 65 her\fR.The curre
5d70: 6e 74 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 nt cipher in use
5d80: 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 for the connect
5d90: 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 74 ion\&...TP.\fBst
5da0: 61 6e 64 61 72 64 5f 6e 61 6d 65 5c 66 52 20 5c andard_name\fR \
5db0: 66 49 6e 61 6d 65 5c 66 52 0a 54 68 65 20 73 74 fIname\fR.The st
5dc0: 61 6e 64 61 72 64 20 52 46 43 20 6e 61 6d 65 20 andard RFC name
5dd0: 6f 66 20 63 69 70 68 65 72 5c 26 2e 0a 2e 54 50 of cipher\&...TP
5de0: 0a 5c 66 42 61 6c 67 6f 72 69 74 68 6d 5f 62 69 .\fBalgorithm_bi
5df0: 74 73 5c 66 52 20 5c 66 49 6e 5c 66 52 0a 54 68 ts\fR \fIn\fR.Th
5e00: 65 20 6e 75 6d 62 65 72 20 6f 66 20 70 72 6f 63 e number of proc
5e10: 65 73 73 65 64 20 62 69 74 73 20 75 73 65 64 20 essed bits used
5e20: 66 6f 72 20 63 69 70 68 65 72 5c 26 2e 0a 2e 54 for cipher\&...T
5e30: 50 0a 5c 66 42 73 65 63 72 65 74 5f 62 69 74 73 P.\fBsecret_bits
5e40: 5c 66 52 20 5c 66 49 6e 5c 66 52 0a 54 68 65 20 \fR \fIn\fR.The
5e50: 6e 75 6d 62 65 72 20 6f 66 20 73 65 63 72 65 74 number of secret
5e60: 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 bits used for c
5e70: 69 70 68 65 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 ipher\&...TP.\fB
5e80: 6d 69 6e 5f 76 65 72 73 69 6f 6e 5c 66 52 20 5c min_version\fR \
5e90: 66 49 76 65 72 73 69 6f 6e 5c 66 52 0a 54 68 65 fIversion\fR.The
5ea0: 20 6d 69 6e 69 6d 75 6d 20 70 72 6f 74 6f 63 6f minimum protoco
5eb0: 6c 20 76 65 72 73 69 6f 6e 20 66 6f 72 20 63 69 l version for ci
5ec0: 70 68 65 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 63 pher\&...TP.\fBc
5ed0: 69 70 68 65 72 5f 69 73 5f 61 65 61 64 5c 66 52 ipher_is_aead\fR
5ee0: 20 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a 57 \fIboolean\fR.W
5ef0: 68 65 74 68 65 72 20 74 68 65 20 63 69 70 68 65 hether the ciphe
5f00: 72 20 69 73 20 41 75 74 68 65 6e 74 69 63 61 74 r is Authenticat
5f10: 65 64 20 45 6e 63 72 79 70 74 69 6f 6e 20 77 69 ed Encryption wi
5f20: 74 68 20 41 73 73 6f 63 69 61 74 65 64 20 44 61 th Associated Da
5f30: 74 61 20 28 41 45 41 44 29 5c 26 2e 0a 2e 54 50 ta (AEAD)\&...TP
5f40: 0a 5c 66 42 63 69 70 68 65 72 5f 69 64 5c 66 52 .\fBcipher_id\fR
5f50: 20 5c 66 49 69 64 5c 66 52 0a 54 68 65 20 4f 70 \fIid\fR.The Op
5f60: 65 6e 53 53 4c 20 63 69 70 68 65 72 20 69 64 5c enSSL cipher id\
5f70: 26 2e 0a 2e 54 50 0a 5c 66 42 64 65 73 63 72 69 &...TP.\fBdescri
5f80: 70 74 69 6f 6e 5c 66 52 20 5c 66 49 73 74 72 69 ption\fR \fIstri
5f90: 6e 67 5c 66 52 0a 41 20 74 65 78 74 20 64 65 73 ng\fR.A text des
5fa0: 63 72 69 70 74 69 6f 6e 20 6f 66 20 74 68 65 20 cription of the
5fb0: 63 69 70 68 65 72 5c 26 2e 0a 2e 54 50 0a 5c 66 cipher\&...TP.\f
5fc0: 42 68 61 6e 64 73 68 61 6b 65 5f 64 69 67 65 73 Bhandshake_diges
5fd0: 74 5c 66 52 20 5c 66 49 62 6f 6f 6c 65 61 6e 5c t\fR \fIboolean\
5fe0: 66 52 0a 44 69 67 65 73 74 20 75 73 65 64 20 64 fR.Digest used d
5ff0: 75 72 69 6e 67 20 68 61 6e 64 73 68 61 6b 65 5c uring handshake\
6000: 26 2e 0a 2e 52 45 0a 2e 49 50 0a 53 65 73 73 69 &...RE..IP.Sessi
6010: 6f 6e 20 49 6e 66 6f 0a 2e 52 53 0a 2e 54 50 0a on Info..RS..TP.
6020: 5c 66 42 61 6c 70 6e 5c 66 52 20 5c 66 49 70 72 \fBalpn\fR \fIpr
6030: 6f 74 6f 63 6f 6c 5c 66 52 0a 54 68 65 20 70 72 otocol\fR.The pr
6040: 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 otocol selected
6050: 61 66 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f after Applicatio
6060: 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c n-Layer Protocol
6070: 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c Negotiation (AL
6080: 50 4e 29 5c 26 2e 0a 2e 54 50 0a 5c 66 42 72 65 PN)\&...TP.\fBre
6090: 73 75 6d 61 62 6c 65 5c 66 52 20 5c 66 49 62 6f sumable\fR \fIbo
60a0: 6f 6c 65 61 6e 5c 66 52 0a 57 68 65 74 68 65 72 olean\fR.Whether
60b0: 20 74 68 65 20 73 65 73 73 69 6f 6e 20 63 61 6e the session can
60c0: 20 62 65 20 72 65 73 75 6d 65 64 20 6f 72 20 6e be resumed or n
60d0: 6f 74 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 74 61 ot\&...TP.\fBsta
60e0: 72 74 5f 74 69 6d 65 5c 66 52 20 5c 66 49 73 65 rt_time\fR \fIse
60f0: 63 6f 6e 64 73 5c 66 52 0a 54 69 6d 65 20 73 69 conds\fR.Time si
6100: 6e 63 65 20 73 65 73 73 69 6f 6e 20 73 74 61 72 nce session star
6110: 74 65 64 20 69 6e 20 73 65 63 6f 6e 64 73 20 73 ted in seconds s
6120: 69 6e 63 65 20 65 70 6f 63 68 5c 26 2e 0a 2e 54 ince epoch\&...T
6130: 50 0a 5c 66 42 74 69 6d 65 6f 75 74 5c 66 52 20 P.\fBtimeout\fR
6140: 5c 66 49 73 65 63 6f 6e 64 73 5c 66 52 0a 4d 61 \fIseconds\fR.Ma
6150: 78 20 64 75 72 61 74 69 6f 6e 20 6f 66 20 73 65 x duration of se
6160: 73 73 69 6f 6e 20 69 6e 20 73 65 63 6f 6e 64 73 ssion in seconds
6170: 20 62 65 66 6f 72 65 20 74 69 6d 65 2d 6f 75 74 before time-out
6180: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 6c 69 66 65 74 \&...TP.\fBlifet
6190: 69 6d 65 5c 66 52 20 5c 66 49 73 65 63 6f 6e 64 ime\fR \fIsecond
61a0: 73 5c 66 52 0a 53 65 73 73 69 6f 6e 20 74 69 63 s\fR.Session tic
61b0: 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 68 69 6e ket lifetime hin
61c0: 74 20 69 6e 20 73 65 63 6f 6e 64 73 5c 26 2e 0a t in seconds\&..
61d0: 2e 54 50 0a 5c 66 42 73 65 73 73 69 6f 6e 5f 69 .TP.\fBsession_i
61e0: 64 5c 66 52 20 5c 66 49 62 69 6e 61 72 79 5f 73 d\fR \fIbinary_s
61f0: 74 72 69 6e 67 5c 66 52 0a 55 6e 69 71 75 65 20 tring\fR.Unique
6200: 73 65 73 73 69 6f 6e 20 69 64 20 66 6f 72 20 75 session id for u
6210: 73 65 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 se in resuming t
6220: 68 65 20 73 65 73 73 69 6f 6e 5c 26 2e 0a 2e 54 he session\&...T
6230: 50 0a 5c 66 42 73 65 73 73 69 6f 6e 5f 74 69 63 P.\fBsession_tic
6240: 6b 65 74 5c 66 52 20 5c 66 49 62 69 6e 61 72 79 ket\fR \fIbinary
6250: 5f 73 74 72 69 6e 67 5c 66 52 0a 55 6e 69 71 75 _string\fR.Uniqu
6260: 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 e session ticket
6270: 20 66 6f 72 20 75 73 65 20 69 6e 20 72 65 73 75 for use in resu
6280: 6d 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e ming the session
6290: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 69 63 6b 65 \&...TP.\fBticke
62a0: 74 5f 61 70 70 5f 64 61 74 61 5c 66 52 20 5c 66 t_app_data\fR \f
62b0: 49 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 5c 66 Ibinary_string\f
62c0: 52 0a 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e R.Unique session
62d0: 20 74 69 63 6b 65 74 20 61 70 70 6c 69 63 61 74 ticket applicat
62e0: 69 6f 6e 20 64 61 74 61 5c 26 2e 0a 2e 54 50 0a ion data\&...TP.
62f0: 5c 66 42 6d 61 73 74 65 72 5f 6b 65 79 5c 66 52 \fBmaster_key\fR
6300: 20 5c 66 49 62 69 6e 61 72 79 5f 73 74 72 69 6e \fIbinary_strin
6310: 67 5c 66 52 0a 55 6e 69 71 75 65 20 73 65 73 73 g\fR.Unique sess
6320: 69 6f 6e 20 6d 61 73 74 65 72 20 6b 65 79 5c 26 ion master key\&
6330: 2e 0a 2e 54 50 0a 5c 66 42 73 65 73 73 69 6f 6e ...TP.\fBsession
6340: 5f 63 61 63 68 65 5f 6d 6f 64 65 5c 66 52 20 5c _cache_mode\fR \
6350: 66 49 6d 6f 64 65 5c 66 52 0a 53 65 72 76 65 72 fImode\fR.Server
6360: 20 63 61 63 68 65 20 6d 6f 64 65 20 28 63 6c 69 cache mode (cli
6370: 65 6e 74 2c 20 73 65 72 76 65 72 2c 20 6f 72 20 ent, server, or
6380: 62 6f 74 68 29 5c 26 2e 0a 2e 52 45 0a 2e 54 50 both)\&...RE..TP
6390: 0a 5c 66 42 74 6c 73 3a 3a 63 69 70 68 65 72 73 .\fBtls::ciphers
63a0: 5c 66 52 20 3f 5c 66 49 70 72 6f 74 6f 63 6f 6c \fR ?\fIprotocol
63b0: 5c 66 52 3f 20 3f 5c 66 49 76 65 72 62 6f 73 65 \fR? ?\fIverbose
63c0: 5c 66 52 3f 20 3f 5c 66 49 73 75 70 70 6f 72 74 \fR? ?\fIsupport
63d0: 65 64 5c 66 52 3f 0a 57 69 74 68 6f 75 74 20 61 ed\fR?.Without a
63e0: 6e 79 20 6f 70 74 69 6f 6e 73 2c 20 69 74 20 72 ny options, it r
63f0: 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 eturns a list of
6400: 20 61 6c 6c 20 73 79 6d 6d 65 74 72 69 63 20 63 all symmetric c
6410: 69 70 68 65 72 73 20 66 6f 72 20 75 73 65 20 77 iphers for use w
6420: 69 74 68 20 74 68 65 0a 5c 66 49 2d 63 69 70 68 ith the.\fI-ciph
6430: 65 72 5c 66 52 20 6f 70 74 69 6f 6e 5c 26 2e 20 er\fR option\&.
6440: 57 69 74 68 20 5c 66 49 70 72 6f 74 6f 63 6f 6c With \fIprotocol
6450: 5c 66 52 2c 20 6f 6e 6c 79 20 74 68 65 20 63 69 \fR, only the ci
6460: 70 68 65 72 73 20 73 75 70 70 6f 72 74 65 64 20 phers supported
6470: 66 6f 72 20 74 68 61 74 0a 70 72 6f 74 6f 63 6f for that.protoco
6480: 6c 20 61 72 65 20 72 65 74 75 72 6e 65 64 5c 26 l are returned\&
6490: 2e 20 53 65 65 20 74 68 65 20 5c 66 42 74 6c 73 . See the \fBtls
64a0: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 5c 66 52 20 63 ::protocols\fR c
64b0: 6f 6d 6d 61 6e 64 20 66 6f 72 20 74 68 65 20 73 ommand for the s
64c0: 75 70 70 6f 72 74 65 64 0a 70 72 6f 74 6f 63 6f upported.protoco
64d0: 6c 73 5c 26 2e 20 49 66 20 5c 66 49 76 65 72 62 ls\&. If \fIverb
64e0: 6f 73 65 5c 66 52 20 69 73 20 73 70 65 63 69 66 ose\fR is specif
64f0: 69 65 64 20 61 73 20 74 72 75 65 20 74 68 65 6e ied as true then
6500: 20 61 20 76 65 72 62 6f 73 65 2c 20 68 75 6d 61 a verbose, huma
6510: 6e 20 72 65 61 64 61 62 6c 65 0a 6c 69 73 74 20 n readable.list
6520: 69 73 20 72 65 74 75 72 6e 65 64 20 77 69 74 68 is returned with
6530: 20 61 64 64 69 74 69 6f 6e 61 6c 20 69 6e 66 6f additional info
6540: 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 63 rmation on the c
6550: 69 70 68 65 72 5c 26 2e 20 49 66 20 5c 66 49 73 ipher\&. If \fIs
6560: 75 70 70 6f 72 74 65 64 5c 66 52 0a 69 73 20 73 upported\fR.is s
6570: 70 65 63 69 66 69 65 64 20 61 73 20 74 72 75 65 pecified as true
6580: 2c 20 74 68 65 6e 20 6f 6e 6c 79 20 74 68 65 20 , then only the
6590: 63 69 70 68 65 72 73 20 73 75 70 70 6f 72 74 65 ciphers supporte
65a0: 64 20 66 6f 72 20 70 72 6f 74 6f 63 6f 6c 20 77 d for protocol w
65b0: 69 6c 6c 20 62 65 20 6c 69 73 74 65 64 5c 26 2e ill be listed\&.
65c0: 0a 54 68 65 20 5c 66 49 73 75 70 70 6f 72 74 65 .The \fIsupporte
65d0: 64 5c 66 52 20 61 72 67 20 69 73 20 6e 65 77 20 d\fR arg is new
65e0: 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 for TclTLS 1\&.8
65f0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a \&...TP.\fBtls::
6600: 70 72 6f 74 6f 63 6f 6c 73 5c 66 52 0a 52 65 74 protocols\fR.Ret
6610: 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 74 urns a list of t
6620: 68 65 20 73 75 70 70 6f 72 74 65 64 20 53 53 4c he supported SSL
6630: 2f 54 4c 53 20 70 72 6f 74 6f 63 6f 6c 73 5c 26 /TLS protocols\&
6640: 2e 20 56 61 6c 69 64 20 76 61 6c 75 65 73 20 61 . Valid values a
6650: 72 65 3a 0a 5c 66 42 73 73 6c 32 5c 66 52 2c 20 re:.\fBssl2\fR,
6660: 5c 66 42 73 73 6c 33 5c 66 52 2c 20 5c 66 42 74 \fBssl3\fR, \fBt
6670: 6c 73 31 5c 66 52 2c 20 5c 66 42 74 6c 73 31 5c ls1\fR, \fBtls1\
6680: 26 2e 31 5c 66 52 2c 20 5c 66 42 74 6c 73 31 5c &.1\fR, \fBtls1\
6690: 26 2e 32 5c 66 52 2c 20 61 6e 64 0a 5c 66 42 74 &.2\fR, and.\fBt
66a0: 6c 73 31 5c 26 2e 33 5c 66 52 5c 26 2e 20 45 78 ls1\&.3\fR\&. Ex
66b0: 61 63 74 20 6c 69 73 74 20 64 65 70 65 6e 64 73 act list depends
66c0: 20 6f 6e 20 4f 70 65 6e 53 53 4c 20 76 65 72 73 on OpenSSL vers
66d0: 69 6f 6e 20 61 6e 64 20 63 6f 6d 70 69 6c 65 20 ion and compile
66e0: 74 69 6d 65 20 66 6c 61 67 73 5c 26 2e 0a 54 68 time flags\&..Th
66f0: 69 73 20 63 6f 6d 6d 61 6e 64 20 69 73 20 6e 65 is command is ne
6700: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 w for TclTLS 1\&
6710: 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 6c 73 .8\&...TP.\fBtls
6720: 3a 3a 76 65 72 73 69 6f 6e 5c 66 52 0a 52 65 74 ::version\fR.Ret
6730: 75 72 6e 73 20 74 68 65 20 4f 70 65 6e 53 53 4c urns the OpenSSL
6740: 20 76 65 72 73 69 6f 6e 20 73 74 72 69 6e 67 5c version string\
6750: 26 2e 0a 2e 50 50 0a 2e 53 48 20 22 43 45 52 54 &...PP..SH "CERT
6760: 49 46 49 43 41 54 45 20 56 41 4c 49 44 41 54 49 IFICATE VALIDATI
6770: 4f 4e 22 0a 2e 53 53 20 22 50 4b 49 20 41 4e 44 ON"..SS "PKI AND
6780: 20 43 45 52 54 49 46 49 43 41 54 45 53 22 0a 55 CERTIFICATES".U
6790: 73 69 6e 67 20 74 68 65 20 50 75 62 6c 69 63 20 sing the Public
67a0: 4b 65 79 20 49 6e 66 72 61 73 74 72 75 63 74 75 Key Infrastructu
67b0: 72 65 20 28 50 4b 49 29 2c 20 65 61 63 68 20 75 re (PKI), each u
67c0: 73 65 72 20 63 72 65 61 74 65 73 20 61 20 70 72 ser creates a pr
67d0: 69 76 61 74 65 20 6b 65 79 20 74 68 61 74 0a 6f ivate key that.o
67e0: 6e 6c 79 20 74 68 65 79 20 6b 6e 6f 77 20 61 62 nly they know ab
67f0: 6f 75 74 20 61 6e 64 20 61 20 70 75 62 6c 69 63 out and a public
6800: 20 6b 65 79 20 74 68 65 79 20 63 61 6e 20 65 78 key they can ex
6810: 63 68 61 6e 67 65 20 77 69 74 68 20 6f 74 68 65 change with othe
6820: 72 73 20 66 6f 72 20 75 73 65 20 69 6e 0a 65 6e rs for use in.en
6830: 63 72 79 70 74 69 6e 67 20 61 6e 64 20 64 65 63 crypting and dec
6840: 72 79 70 74 69 6e 67 20 64 61 74 61 5c 26 2e 20 rypting data\&.
6850: 54 68 65 20 70 72 6f 63 65 73 73 20 69 73 20 74 The process is t
6860: 68 65 20 73 65 6e 64 65 72 20 65 6e 63 72 79 70 he sender encryp
6870: 74 73 20 74 68 65 69 72 20 64 61 74 61 0a 75 73 ts their data.us
6880: 69 6e 67 20 74 68 65 69 72 20 70 72 69 76 61 74 ing their privat
6890: 65 20 6b 65 79 20 61 6e 64 20 74 68 65 20 72 65 e key and the re
68a0: 63 65 69 76 65 72 27 73 20 70 75 62 6c 69 63 20 ceiver's public
68b0: 6b 65 79 5c 26 2e 20 54 68 65 20 64 61 74 61 20 key\&. The data
68c0: 69 73 20 74 68 65 6e 20 73 65 6e 74 0a 74 6f 20 is then sent.to
68d0: 74 68 65 20 72 65 63 65 69 76 65 72 5c 26 2e 20 the receiver\&.
68e0: 49 6e 20 61 20 73 69 6d 69 6c 61 72 20 6d 61 6e In a similar man
68f0: 6e 65 72 2c 20 74 68 65 20 72 65 63 65 69 76 65 ner, the receive
6900: 72 20 75 73 65 73 20 74 68 65 69 72 20 70 72 69 r uses their pri
6910: 76 61 74 65 20 6b 65 79 20 61 6e 64 0a 74 68 65 vate key and.the
6920: 20 73 65 6e 64 65 72 27 73 20 70 75 62 6c 69 63 sender's public
6930: 20 6b 65 79 20 74 6f 20 64 65 63 72 79 70 74 20 key to decrypt
6940: 74 68 65 20 64 61 74 61 5c 26 2e 20 54 68 69 73 the data\&. This
6950: 20 70 72 6f 76 69 64 65 73 20 64 61 74 61 20 69 provides data i
6960: 6e 74 65 67 72 69 74 79 2c 20 74 6f 0a 65 6e 73 ntegrity, to.ens
6970: 75 72 65 20 74 68 65 20 64 61 74 61 20 63 61 6e ure the data can
6980: 27 74 20 62 65 20 76 69 65 77 65 64 20 6f 72 20 't be viewed or
6990: 61 6c 74 65 72 65 64 20 64 75 72 69 6e 67 20 74 altered during t
69a0: 72 61 6e 73 70 6f 72 74 5c 26 2e 20 53 65 65 20 ransport\&. See
69b0: 74 68 65 0a 5c 66 42 2d 6b 65 79 5c 66 52 20 61 the.\fB-key\fR a
69c0: 6e 64 20 5c 66 42 2d 6b 65 79 66 69 6c 65 5c 66 nd \fB-keyfile\f
69d0: 52 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 68 6f R options for ho
69e0: 77 20 74 6f 20 73 70 65 63 69 66 79 20 74 68 65 w to specify the
69f0: 20 70 72 69 76 61 74 65 20 6b 65 79 5c 26 2e 0a private key\&..
6a00: 41 6c 73 6f 20 73 65 65 20 74 68 65 20 5c 66 42 Also see the \fB
6a10: 2d 70 61 73 73 77 6f 72 64 5c 66 52 20 6f 70 74 -password\fR opt
6a20: 69 6f 6e 20 66 6f 72 20 68 6f 77 20 74 6f 20 70 ion for how to p
6a30: 72 6f 76 69 64 65 20 74 68 65 20 70 61 73 73 77 rovide the passw
6a40: 6f 72 64 5c 26 2e 0a 2e 50 50 0a 49 6e 20 6f 72 ord\&...PP.In or
6a50: 64 65 72 20 74 6f 20 70 72 6f 76 69 64 65 20 61 der to provide a
6a60: 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 2c 20 69 uthentication, i
6a70: 5c 26 2e 65 5c 26 2e 20 65 6e 73 75 72 69 6e 67 \&.e\&. ensuring
6a80: 20 73 6f 6d 65 6f 6e 65 20 69 73 20 77 68 6f 20 someone is who
6a90: 74 68 65 79 20 73 61 79 20 74 68 65 79 0a 61 72 they say they.ar
6aa0: 65 2c 20 74 68 65 20 70 75 62 6c 69 63 20 6b 65 e, the public ke
6ab0: 79 20 61 6e 64 20 75 73 65 72 20 69 64 65 6e 74 y and user ident
6ac0: 69 66 69 63 61 74 69 6f 6e 20 69 6e 66 6f 20 69 ification info i
6ad0: 73 20 73 74 6f 72 65 64 20 69 6e 20 61 20 58 5c s stored in a X\
6ae0: 26 2e 35 30 39 0a 63 65 72 74 69 66 69 63 61 74 &.509.certificat
6af0: 65 20 61 6e 64 20 74 68 61 74 20 63 65 72 74 69 e and that certi
6b00: 66 69 63 61 74 65 20 69 73 20 61 75 74 68 65 6e ficate is authen
6b10: 74 69 63 61 74 65 64 20 28 69 5c 26 2e 65 5c 26 ticated (i\&.e\&
6b20: 2e 20 73 69 67 6e 65 64 29 20 62 79 20 61 20 43 . signed) by a C
6b30: 65 72 74 69 66 69 63 61 74 65 0a 41 75 74 68 6f ertificate.Autho
6b40: 72 69 74 79 20 28 43 41 29 5c 26 2e 20 55 73 65 rity (CA)\&. Use
6b50: 72 73 20 63 61 6e 20 74 68 65 6e 20 65 78 63 68 rs can then exch
6b60: 61 6e 67 65 20 74 68 65 73 65 20 63 65 72 74 69 ange these certi
6b70: 66 69 63 61 74 65 73 20 64 75 72 69 6e 67 20 74 ficates during t
6b80: 68 65 20 54 4c 53 0a 69 6e 69 74 69 61 6c 69 7a he TLS.initializ
6b90: 61 74 69 6f 6e 20 70 72 6f 63 65 73 73 20 61 6e ation process an
6ba0: 64 20 63 68 65 63 6b 20 74 68 65 6d 20 61 67 61 d check them aga
6bb0: 69 6e 73 74 20 74 68 65 20 72 6f 6f 74 20 43 41 inst the root CA
6bc0: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 6f certificates to
6bd0: 20 65 6e 73 75 72 65 0a 74 68 65 79 20 61 72 65 ensure.they are
6be0: 20 76 61 6c 69 64 5c 26 2e 20 54 68 69 73 20 69 valid\&. This i
6bf0: 73 20 68 61 6e 64 6c 65 64 20 62 79 20 4f 70 65 s handled by Ope
6c00: 6e 53 53 4c 20 76 69 61 20 74 68 65 20 5c 66 42 nSSL via the \fB
6c10: 2d 72 65 71 75 65 73 74 5c 66 52 20 61 6e 64 0a -request\fR and.
6c20: 5c 66 42 2d 72 65 71 75 69 72 65 5c 66 52 20 6f \fB-require\fR o
6c30: 70 74 69 6f 6e 73 5c 26 2e 20 53 65 65 20 74 68 ptions\&. See th
6c40: 65 20 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c 20 e \fB-cadir\fR,
6c50: 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c 20 61 6e \fB-cadir\fR, an
6c60: 64 0a 5c 66 42 2d 63 61 73 74 6f 72 65 5c 66 52 d.\fB-castore\fR
6c70: 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 68 6f 77 options for how
6c80: 20 74 70 20 73 70 65 63 69 66 79 20 77 68 65 72 tp specify wher
6c90: 65 20 74 6f 20 66 69 6e 64 20 74 68 65 20 43 41 e to find the CA
6ca0: 20 63 65 72 74 69 66 69 63 61 74 65 73 5c 26 2e certificates\&.
6cb0: 0a 4f 70 74 69 6f 6e 61 6c 6c 79 2c 20 69 6e 20 .Optionally, in
6cc0: 61 20 66 75 74 75 72 65 20 72 65 6c 65 61 73 65 a future release
6cd0: 2c 20 74 68 65 79 20 63 61 6e 20 61 6c 73 6f 20 , they can also
6ce0: 62 65 20 63 68 65 63 6b 65 64 20 61 67 61 69 6e be checked again
6cf0: 73 74 20 74 68 65 20 43 65 72 74 69 66 69 63 61 st the Certifica
6d00: 74 65 0a 52 65 76 6f 63 61 74 69 6f 6e 20 4c 69 te.Revocation Li
6d10: 73 74 20 28 43 52 4c 29 20 6f 66 20 72 65 76 6f st (CRL) of revo
6d20: 6b 65 64 20 63 65 72 74 69 66 69 63 61 74 65 73 ked certificates
6d30: 5c 26 2e 20 43 65 72 74 69 66 69 63 61 74 65 73 \&. Certificates
6d40: 20 63 61 6e 20 61 6c 73 6f 20 62 65 0a 73 65 6c can also be.sel
6d50: 66 2d 73 69 67 6e 65 64 2c 20 62 75 74 20 74 68 f-signed, but th
6d60: 65 79 20 61 72 65 20 62 79 20 64 65 66 61 75 6c ey are by defaul
6d70: 74 20 6e 6f 74 20 74 72 75 73 74 65 64 20 75 6e t not trusted un
6d80: 6c 65 73 73 20 79 6f 75 20 61 64 64 20 74 68 65 less you add the
6d90: 6d 20 74 6f 20 79 6f 75 72 0a 63 65 72 74 69 66 m to your.certif
6da0: 69 63 61 74 65 20 73 74 6f 72 65 5c 26 2e 0a 2e icate store\&...
6db0: 50 50 0a 54 79 70 69 63 61 6c 6c 79 20 77 68 65 PP.Typically whe
6dc0: 6e 20 76 69 73 69 74 69 6e 67 20 77 65 62 20 73 n visiting web s
6dd0: 69 74 65 73 2c 20 6f 6e 6c 79 20 74 68 65 20 63 ites, only the c
6de0: 6c 69 65 6e 74 20 6e 65 65 64 73 20 74 6f 20 63 lient needs to c
6df0: 68 65 63 6b 20 74 68 65 20 73 65 72 76 65 72 27 heck the server'
6e00: 73 0a 63 65 72 74 69 66 69 63 61 74 65 20 74 6f s.certificate to
6e10: 20 65 6e 73 75 72 65 20 69 74 20 69 73 20 76 61 ensure it is va
6e20: 6c 69 64 5c 26 2e 20 54 68 65 20 73 65 72 76 65 lid\&. The serve
6e30: 72 20 64 6f 65 73 6e 27 74 20 6e 65 65 64 20 74 r doesn't need t
6e40: 6f 20 63 68 65 63 6b 20 74 68 65 20 63 6c 69 65 o check the clie
6e50: 6e 74 0a 63 65 72 74 69 66 69 63 61 74 65 20 75 nt.certificate u
6e60: 6e 6c 65 73 73 20 79 6f 75 20 6e 65 65 64 20 74 nless you need t
6e70: 6f 20 61 75 74 68 65 6e 74 69 63 61 74 65 20 77 o authenticate w
6e80: 69 74 68 20 74 68 65 6d 20 74 6f 20 6c 6f 67 69 ith them to logi
6e90: 6e 2c 20 65 74 63 5c 26 2e 20 53 65 65 20 74 68 n, etc\&. See th
6ea0: 65 0a 5c 66 42 2d 63 65 72 74 5c 66 52 20 61 6e e.\fB-cert\fR an
6eb0: 64 20 5c 66 42 2d 63 65 72 74 66 69 6c 65 5c 66 d \fB-certfile\f
6ec0: 52 20 6f 70 74 69 6f 6e 73 20 69 66 20 79 6f 75 R options if you
6ed0: 20 6e 65 65 64 20 74 6f 20 70 72 6f 76 69 64 65 need to provide
6ee0: 20 61 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 a certificate\&
6ef0: 2e 0a 2e 53 53 20 22 53 55 4d 4d 41 52 59 20 4f ...SS "SUMMARY O
6f00: 46 20 43 4f 4d 4d 41 4e 44 20 4c 49 4e 45 20 4f F COMMAND LINE O
6f10: 50 54 49 4f 4e 53 22 0a 54 68 65 20 66 6f 6c 6c PTIONS".The foll
6f20: 6f 77 69 6e 67 20 6f 70 74 69 6f 6e 73 20 61 72 owing options ar
6f30: 65 20 75 73 65 64 20 66 6f 72 20 70 65 65 72 20 e used for peer
6f40: 63 65 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 certificate vali
6f50: 64 61 74 69 6f 6e 3a 0a 2e 54 50 0a 5c 66 42 2d dation:..TP.\fB-
6f60: 63 61 64 69 72 5c 66 52 20 5c 66 49 64 69 72 65 cadir\fR \fIdire
6f70: 63 74 6f 72 79 5c 66 52 0a 53 70 65 63 69 66 69 ctory\fR.Specifi
6f80: 65 73 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 es the directory
6f90: 20 77 68 65 72 65 20 74 68 65 20 43 65 72 74 69 where the Certi
6fa0: 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 ficate Authority
6fb0: 20 28 43 41 29 20 63 65 72 74 69 66 69 63 61 74 (CA) certificat
6fc0: 65 73 20 61 72 65 0a 73 74 6f 72 65 64 5c 26 2e es are.stored\&.
6fd0: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 The default is
6fe0: 70 6c 61 74 66 6f 72 6d 20 73 70 65 63 69 66 69 platform specifi
6ff0: 63 2c 20 62 75 74 20 69 73 20 75 73 75 61 6c 6c c, but is usuall
7000: 79 20 22 5c 66 49 2f 65 74 63 2f 73 73 6c 2f 63 y "\fI/etc/ssl/c
7010: 65 72 74 73 5c 66 52 22 20 6f 6e 0a 4c 69 6e 75 erts\fR" on.Linu
7020: 78 2f 55 6e 69 78 20 73 79 73 74 65 6d 73 5c 26 x/Unix systems\&
7030: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 6c 6f . The default lo
7040: 63 61 74 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76 cation can be ov
7050: 65 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 0a erridden by the.
7060: 5c 66 42 53 53 4c 5f 43 45 52 54 5f 44 49 52 5c \fBSSL_CERT_DIR\
7070: 66 52 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 fR environment v
7080: 61 72 69 61 62 6c 65 5c 26 2e 0a 2e 54 50 0a 5c ariable\&...TP.\
7090: 66 42 2d 63 61 66 69 6c 65 5c 66 52 20 5c 66 49 fB-cafile\fR \fI
70a0: 66 69 6c 65 6e 61 6d 65 5c 66 52 0a 53 70 65 63 filename\fR.Spec
70b0: 69 66 69 65 73 20 74 68 65 20 66 69 6c 65 20 77 ifies the file w
70c0: 69 74 68 20 74 68 65 20 43 65 72 74 69 66 69 63 ith the Certific
70d0: 61 74 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 ate Authority (C
70e0: 41 29 20 63 65 72 74 69 66 69 63 61 74 65 73 20 A) certificates
70f0: 74 6f 20 75 73 65 20 69 6e 0a 5c 66 42 50 45 4d to use in.\fBPEM
7100: 5c 66 52 20 66 69 6c 65 20 66 6f 72 6d 61 74 5c \fR file format\
7110: 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 &. The default i
7120: 73 20 22 5c 66 49 63 65 72 74 5c 26 2e 70 65 6d s "\fIcert\&.pem
7130: 5c 66 52 22 2c 20 69 6e 20 74 68 65 20 4f 70 65 \fR", in the Ope
7140: 6e 53 53 4c 0a 64 69 72 65 63 74 6f 72 79 5c 26 nSSL.directory\&
7150: 2e 20 4f 6e 20 4c 69 6e 75 78 2f 55 6e 69 78 20 . On Linux/Unix
7160: 73 79 73 74 65 6d 73 2c 20 74 68 69 73 20 69 73 systems, this is
7170: 20 75 73 75 61 6c 6c 79 20 22 5c 66 49 2f 65 74 usually "\fI/et
7180: 63 2f 73 73 6c 2f 63 61 2d 62 75 6e 64 6c 65 5c c/ssl/ca-bundle\
7190: 26 2e 70 65 6d 5c 66 52 22 5c 26 2e 0a 54 68 65 &.pem\fR"\&..The
71a0: 20 64 65 66 61 75 6c 74 20 66 69 6c 65 20 63 61 default file ca
71b0: 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e 20 n be overridden
71c0: 62 79 20 74 68 65 20 5c 66 42 53 53 4c 5f 43 45 by the \fBSSL_CE
71d0: 52 54 5f 46 49 4c 45 5c 66 52 20 65 6e 76 69 72 RT_FILE\fR envir
71e0: 6f 6e 6d 65 6e 74 0a 76 61 72 69 61 62 6c 65 5c onment.variable\
71f0: 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 61 73 74 6f &...TP.\fB-casto
7200: 72 65 5c 66 52 20 5c 66 49 55 52 49 5c 66 52 0a re\fR \fIURI\fR.
7210: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 55 6e Specifies the Un
7220: 69 66 6f 72 6d 20 52 65 73 6f 75 72 63 65 20 49 iform Resource I
7230: 64 65 6e 74 69 66 69 65 72 20 28 55 52 49 29 20 dentifier (URI)
7240: 66 6f 72 20 74 68 65 20 43 65 72 74 69 66 69 63 for the Certific
7250: 61 74 65 20 41 75 74 68 6f 72 69 74 79 0a 28 43 ate Authority.(C
7260: 41 29 20 73 74 6f 72 65 2c 20 77 68 69 63 68 20 A) store, which
7270: 6d 61 79 20 62 65 20 61 20 73 69 6e 67 6c 65 20 may be a single
7280: 63 6f 6e 74 61 69 6e 65 72 20 6f 72 20 61 20 63 container or a c
7290: 61 74 61 6c 6f 67 20 6f 66 20 63 6f 6e 74 61 69 atalog of contai
72a0: 6e 65 72 73 5c 26 2e 0a 53 74 61 72 74 69 6e 67 ners\&..Starting
72b0: 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 33 5c with OpenSSL 3\
72c0: 26 2e 32 20 6f 6e 20 4d 53 20 57 69 6e 64 6f 77 &.2 on MS Window
72d0: 73 2c 20 73 65 74 20 74 6f 20 22 5c 66 42 6f 72 s, set to "\fBor
72e0: 67 5c 26 2e 6f 70 65 6e 73 73 6c 5c 26 2e 77 69 g\&.openssl\&.wi
72f0: 6e 73 74 6f 72 65 3a 2f 2f 5c 66 52 22 0a 74 6f nstore://\fR".to
7300: 20 75 73 65 20 74 68 65 20 62 75 69 6c 74 2d 69 use the built-i
7310: 6e 20 4d 53 20 57 69 6e 64 6f 77 73 20 43 65 72 n MS Windows Cer
7320: 74 69 66 69 63 61 74 65 20 53 74 6f 72 65 5c 26 tificate Store\&
7330: 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 . Starting in Tc
7340: 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 74 68 69 73 lTLS 2\&.0, this
7350: 0a 69 73 20 74 68 65 20 64 65 66 61 75 6c 74 20 .is the default
7360: 69 66 20 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c if \fB-cadir\fR,
7370: 20 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c 20 61 \fB-cadir\fR, a
7380: 6e 64 20 5c 66 42 2d 63 61 73 74 6f 72 65 5c 66 nd \fB-castore\f
7390: 52 20 61 72 65 0a 6e 6f 74 20 73 70 65 63 69 66 R are.not specif
73a0: 69 65 64 5c 26 2e 20 54 68 69 73 20 73 74 6f 72 ied\&. This stor
73b0: 65 20 6f 6e 6c 79 20 73 75 70 70 6f 72 74 73 20 e only supports
73c0: 72 6f 6f 74 20 63 65 72 74 69 66 69 63 61 74 65 root certificate
73d0: 20 73 74 6f 72 65 73 5c 26 2e 20 53 65 65 0a 5c stores\&. See.\
73e0: 66 42 43 65 72 74 69 66 69 63 61 74 65 20 56 61 fBCertificate Va
73f0: 6c 69 64 61 74 69 6f 6e 5c 66 52 20 66 6f 72 20 lidation\fR for
7400: 6d 6f 72 65 20 64 65 74 61 69 6c 73 5c 26 2e 0a more details\&..
7410: 2e 54 50 0a 5c 66 42 2d 72 65 71 75 65 73 74 5c .TP.\fB-request\
7420: 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 52 65 fR \fIbool\fR.Re
7430: 71 75 65 73 74 20 61 20 63 65 72 74 69 66 69 63 quest a certific
7440: 61 74 65 20 66 72 6f 6d 20 74 68 65 20 70 65 65 ate from the pee
7450: 72 20 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c r during the SSL
7460: 20 68 61 6e 64 73 68 61 6b 65 5c 26 2e 20 54 68 handshake\&. Th
7470: 69 73 20 69 73 20 6e 65 65 64 65 64 0a 74 6f 20 is is needed.to
7480: 64 6f 20 43 65 72 74 69 66 69 63 61 74 65 20 56 do Certificate V
7490: 61 6c 69 64 61 74 69 6f 6e 5c 26 2e 20 53 74 61 alidation\&. Sta
74a0: 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 rting in TclTLS
74b0: 31 5c 26 2e 38 2c 20 74 68 65 20 64 65 66 61 75 1\&.8, the defau
74c0: 6c 74 20 69 73 0a 5c 66 42 74 72 75 65 5c 66 52 lt is.\fBtrue\fR
74d0: 5c 26 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 \&. Starting in
74e0: 54 63 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 49 66 TclTLS 2\&.0, If
74f0: 20 73 65 74 20 74 6f 20 5c 66 42 66 61 6c 73 65 set to \fBfalse
7500: 5c 66 52 20 61 6e 64 0a 5c 66 42 2d 72 65 71 75 \fR and.\fB-requ
7510: 69 72 65 5c 66 52 20 69 73 20 5c 66 42 74 72 75 ire\fR is \fBtru
7520: 65 5c 66 52 2c 20 74 68 65 6e 20 74 68 69 73 20 e\fR, then this
7530: 77 69 6c 6c 20 62 65 20 6f 76 65 72 72 69 64 64 will be overridd
7540: 65 6e 20 74 6f 20 5c 66 42 74 72 75 65 5c 66 52 en to \fBtrue\fR
7550: 5c 26 2e 0a 49 6e 20 61 64 64 69 74 69 6f 6e 2c \&..In addition,
7560: 20 74 68 65 20 63 6c 69 65 6e 74 20 63 61 6e 20 the client can
7570: 6d 61 6e 75 61 6c 6c 79 20 69 6e 73 70 65 63 74 manually inspect
7580: 20 61 6e 64 20 61 63 63 65 70 74 20 6f 72 20 72 and accept or r
7590: 65 6a 65 63 74 0a 65 61 63 68 20 63 65 72 74 69 eject.each certi
75a0: 66 69 63 61 74 65 20 75 73 69 6e 67 20 74 68 65 ficate using the
75b0: 20 5c 66 49 2d 76 61 6c 69 64 61 74 65 63 6f 6d \fI-validatecom
75c0: 6d 61 6e 64 5c 66 52 20 6f 70 74 69 6f 6e 5c 26 mand\fR option\&
75d0: 2e 0a 2e 54 50 0a 5c 66 42 2d 72 65 71 75 69 72 ...TP.\fB-requir
75e0: 65 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a e\fR \fIbool\fR.
75f0: 52 65 71 75 69 72 65 20 61 20 76 61 6c 69 64 20 Require a valid
7600: 63 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d certificate from
7610: 20 74 68 65 20 70 65 65 72 20 64 75 72 69 6e 67 the peer during
7620: 20 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 the SSL handsha
7630: 6b 65 5c 26 2e 20 49 66 20 74 68 69 73 20 69 73 ke\&. If this is
7640: 0a 73 65 74 20 74 6f 20 74 72 75 65 2c 20 74 68 .set to true, th
7650: 65 6e 20 5c 66 42 2d 72 65 71 75 65 73 74 5c 66 en \fB-request\f
7660: 52 20 6d 75 73 74 20 61 6c 73 6f 20 62 65 20 73 R must also be s
7670: 65 74 20 74 6f 20 74 72 75 65 20 61 6e 64 20 61 et to true and a
7680: 20 65 69 74 68 65 72 0a 5c 66 42 2d 63 61 64 69 either.\fB-cadi
7690: 72 5c 66 52 2c 20 5c 66 42 2d 63 61 66 69 6c 65 r\fR, \fB-cafile
76a0: 5c 66 52 2c 20 5c 66 42 2d 63 61 73 74 6f 72 65 \fR, \fB-castore
76b0: 5c 66 52 2c 20 6f 72 20 61 20 70 6c 61 74 66 6f \fR, or a platfo
76c0: 72 6d 20 64 65 66 61 75 6c 74 0a 6d 75 73 74 20 rm default.must
76d0: 62 65 20 70 72 6f 76 69 64 65 64 20 69 6e 20 6f be provided in o
76e0: 72 64 65 72 20 74 6f 20 76 61 6c 69 64 61 74 65 rder to validate
76f0: 20 61 67 61 69 6e 73 74 5c 26 2e 20 54 68 65 20 against\&. The
7700: 64 65 66 61 75 6c 74 20 69 6e 20 54 63 6c 54 4c default in TclTL
7710: 53 20 31 5c 26 2e 38 20 61 6e 64 0a 65 61 72 6c S 1\&.8 and.earl
7720: 69 65 72 20 76 65 72 73 69 6f 6e 73 20 69 73 20 ier versions is
7730: 5c 66 42 66 61 6c 73 65 5c 66 52 20 73 69 6e 63 \fBfalse\fR sinc
7740: 65 20 6e 6f 74 20 61 6c 6c 20 70 6c 61 74 66 6f e not all platfo
7750: 72 6d 73 20 68 61 76 65 20 63 65 72 74 69 66 69 rms have certifi
7760: 63 61 74 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 cates to.validat
7770: 65 20 61 67 61 69 6e 73 74 20 69 6e 20 61 20 66 e against in a f
7780: 6f 72 6d 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 orm compatible w
7790: 69 74 68 20 4f 70 65 6e 53 53 4c 5c 26 2e 20 53 ith OpenSSL\&. S
77a0: 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c tarting in TclTL
77b0: 53 20 32 5c 26 2e 30 2c 0a 74 68 65 20 64 65 66 S 2\&.0,.the def
77c0: 61 75 6c 74 20 69 73 20 5c 66 42 74 72 75 65 5c ault is \fBtrue\
77d0: 66 52 5c 26 2e 0a 2e 50 50 0a 2e 53 53 20 22 57 fR\&...PP..SS "W
77e0: 48 45 4e 20 41 52 45 20 43 4f 4d 4d 41 4e 44 20 HEN ARE COMMAND
77f0: 4c 49 4e 45 20 4f 50 54 49 4f 4e 53 20 4e 45 45 LINE OPTIONS NEE
7800: 44 45 44 3f 22 0a 49 6e 20 54 63 6c 54 4c 53 20 DED?".In TclTLS
7810: 31 5c 26 2e 38 20 61 6e 64 20 65 61 72 6c 69 65 1\&.8 and earlie
7820: 72 20 76 65 72 73 69 6f 6e 73 2c 20 63 65 72 74 r versions, cert
7830: 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 74 69 ificate validati
7840: 6f 6e 20 69 73 0a 5c 66 49 4e 4f 54 5c 66 52 20 on is.\fINOT\fR
7850: 65 6e 61 62 6c 65 64 20 62 79 20 64 65 66 61 75 enabled by defau
7860: 6c 74 5c 26 2e 20 54 68 69 73 20 6c 69 6d 69 74 lt\&. This limit
7870: 61 74 69 6f 6e 20 69 73 20 64 75 65 20 74 6f 20 ation is due to
7880: 74 68 65 20 6c 61 63 6b 20 6f 66 20 61 20 63 6f the lack of a co
7890: 6d 6d 6f 6e 0a 63 72 6f 73 73 20 70 6c 61 74 66 mmon.cross platf
78a0: 6f 72 6d 20 64 61 74 61 62 61 73 65 20 6f 66 20 orm database of
78b0: 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 Certificate Auth
78c0: 6f 72 69 74 79 20 28 43 41 29 20 70 72 6f 76 69 ority (CA) provi
78d0: 64 65 64 20 63 65 72 74 69 66 69 63 61 74 65 73 ded certificates
78e0: 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 67 61 to.validate aga
78f0: 69 6e 73 74 5c 26 2e 20 4d 61 6e 79 20 4c 69 6e inst\&. Many Lin
7900: 75 78 20 73 79 73 74 65 6d 73 20 6e 61 74 69 76 ux systems nativ
7910: 65 6c 79 20 73 75 70 70 6f 72 74 20 4f 70 65 6e ely support Open
7920: 53 53 4c 20 61 6e 64 20 74 68 75 73 20 68 61 76 SSL and thus hav
7930: 65 0a 74 68 65 73 65 20 63 65 72 74 69 66 69 63 e.these certific
7940: 61 74 65 73 20 69 6e 73 74 61 6c 6c 65 64 20 61 ates installed a
7950: 73 20 70 61 72 74 20 6f 66 20 74 68 65 20 4f 53 s part of the OS
7960: 2c 20 62 75 74 20 4d 61 63 4f 53 20 61 6e 64 20 , but MacOS and
7970: 4d 53 20 57 69 6e 64 6f 77 73 20 64 6f 20 6e 6f MS Windows do no
7980: 74 5c 26 2e 0a 53 74 61 72 69 6e 67 20 69 6e 20 t\&..Staring in
7990: 54 63 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 74 68 TclTLS 2\&.0, th
79a0: 69 73 20 68 61 73 20 62 65 65 6e 20 63 68 61 6e is has been chan
79b0: 67 65 64 20 74 6f 20 72 65 71 75 69 72 65 20 63 ged to require c
79c0: 65 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 ertificate valid
79d0: 61 74 69 6f 6e 0a 62 79 20 64 65 66 61 75 6c 74 ation.by default
79e0: 5c 26 2e 20 49 6e 20 6f 72 64 65 72 20 74 6f 20 \&. In order to
79f0: 75 73 65 20 74 68 65 20 5c 66 42 2d 72 65 71 75 use the \fB-requ
7a00: 69 72 65 5c 66 52 20 6f 70 74 69 6f 6e 2c 20 6f ire\fR option, o
7a10: 6e 65 20 6f 66 20 74 68 65 20 66 6f 6c 6c 6f 77 ne of the follow
7a20: 69 6e 67 0a 6d 75 73 74 20 62 65 20 74 72 75 65 ing.must be true
7a30: 3a 0a 2e 49 50 20 5c 28 62 75 0a 4f 6e 20 4c 69 :..IP \(bu.On Li
7a40: 6e 75 78 20 61 6e 64 20 55 6e 69 78 20 73 79 73 nux and Unix sys
7a50: 74 65 6d 73 20 77 69 74 68 20 4f 70 65 6e 53 53 tems with OpenSS
7a60: 4c 20 61 6c 72 65 61 64 79 20 69 6e 73 74 61 6c L already instal
7a70: 6c 65 64 20 6f 72 20 69 66 20 74 68 65 20 43 41 led or if the CA
7a80: 0a 63 65 72 74 69 66 69 63 61 74 65 73 20 61 72 .certificates ar
7a90: 65 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 50 e available in P
7aa0: 45 4d 20 66 6f 72 6d 61 74 2c 20 61 6e 64 20 69 EM format, and i
7ab0: 66 20 74 68 65 79 20 61 72 65 20 73 74 6f 72 65 f they are store
7ac0: 64 20 69 6e 20 74 68 65 0a 73 74 61 6e 64 61 72 d in the.standar
7ad0: 64 20 6c 6f 63 61 74 69 6f 6e 73 2c 20 6f 72 20 d locations, or
7ae0: 69 66 20 74 68 65 20 5c 66 42 53 53 4c 5f 43 45 if the \fBSSL_CE
7af0: 52 54 5f 44 49 52 5c 66 52 20 6f 72 20 5c 66 42 RT_DIR\fR or \fB
7b00: 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 5c 66 52 SSL_CERT_FILE\fR
7b10: 0a 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 .environment var
7b20: 69 61 62 6c 65 73 20 61 72 65 20 73 65 74 2c 20 iables are set,
7b30: 74 68 65 6e 20 5c 66 42 2d 63 61 64 69 72 5c 66 then \fB-cadir\f
7b40: 52 2c 20 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c R, \fB-cadir\fR,
7b50: 0a 61 6e 64 20 5c 66 42 2d 63 61 73 74 6f 72 65 .and \fB-castore
7b60: 5c 66 52 20 61 72 65 6e 27 74 20 6e 65 65 64 65 \fR aren't neede
7b70: 64 5c 26 2e 0a 2e 49 50 20 5c 28 62 75 0a 49 66 d\&...IP \(bu.If
7b80: 20 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f 74 20 OpenSSL is not
7b90: 69 6e 73 74 61 6c 6c 65 64 20 69 6e 20 74 68 65 installed in the
7ba0: 20 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 69 6f default locatio
7bb0: 6e 2c 20 6f 72 20 77 68 65 6e 20 75 73 69 6e 67 n, or when using
7bc0: 20 4d 61 63 20 4f 53 0a 6f 72 20 4d 53 20 57 69 Mac OS.or MS Wi
7bd0: 6e 64 6f 77 73 20 61 6e 64 20 4f 70 65 6e 53 53 ndows and OpenSS
7be0: 4c 20 69 73 20 69 6e 73 74 61 6c 6c 65 64 2c 20 L is installed,
7bf0: 74 68 65 20 5c 66 42 53 53 4c 5f 43 45 52 54 5f the \fBSSL_CERT_
7c00: 44 49 52 5c 66 52 20 61 6e 64 2f 6f 72 0a 5c 66 DIR\fR and/or.\f
7c10: 42 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 5c 66 BSSL_CERT_FILE\f
7c20: 52 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 R environment va
7c30: 72 69 61 62 6c 65 73 20 6f 72 20 74 68 65 20 6f riables or the o
7c40: 6e 65 20 6f 66 20 74 68 65 20 5c 66 42 2d 63 61 ne of the \fB-ca
7c50: 64 69 72 5c 66 52 2c 0a 5c 66 42 2d 63 61 64 69 dir\fR,.\fB-cadi
7c60: 72 5c 66 52 2c 20 6f 72 20 5c 66 42 2d 63 61 73 r\fR, or \fB-cas
7c70: 74 6f 72 65 5c 66 52 20 6f 70 74 69 6f 6e 73 20 tore\fR options
7c80: 6d 75 73 74 20 62 65 20 64 65 66 69 6e 65 64 5c must be defined\
7c90: 26 2e 0a 2e 49 50 20 5c 28 62 75 0a 4f 6e 20 4d &...IP \(bu.On M
7ca0: 53 20 57 69 6e 64 6f 77 73 2c 20 73 74 61 72 74 S Windows, start
7cb0: 69 6e 67 20 69 6e 20 4f 70 65 6e 53 53 4c 20 33 ing in OpenSSL 3
7cc0: 5c 26 2e 32 2c 20 69 74 20 69 73 20 6e 6f 77 20 \&.2, it is now
7cd0: 70 6f 73 73 69 62 6c 65 20 74 6f 20 61 63 63 65 possible to acce
7ce0: 73 73 20 74 68 65 0a 62 75 69 6c 74 2d 69 6e 20 ss the.built-in
7cf0: 57 69 6e 64 6f 77 73 20 43 65 72 74 69 66 69 63 Windows Certific
7d00: 61 74 65 20 53 74 6f 72 65 20 66 72 6f 6d 20 4f ate Store from O
7d10: 70 65 6e 53 53 4c 5c 26 2e 20 54 68 69 73 20 63 penSSL\&. This c
7d20: 61 6e 20 75 74 69 6c 69 7a 65 64 20 62 79 0a 73 an utilized by.s
7d30: 65 74 74 69 6e 67 20 74 68 65 20 5c 66 42 2d 63 etting the \fB-c
7d40: 61 73 74 6f 72 65 5c 66 52 20 6f 70 74 69 6f 6e astore\fR option
7d50: 20 74 6f 20 22 5c 66 42 6f 72 67 5c 26 2e 6f 70 to "\fBorg\&.op
7d60: 65 6e 73 73 6c 5c 26 2e 77 69 6e 73 74 6f 72 65 enssl\&.winstore
7d70: 3a 2f 2f 5c 66 52 22 5c 26 2e 0a 49 6e 20 54 63 ://\fR"\&..In Tc
7d80: 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 74 68 69 73 lTLS 2\&.0, this
7d90: 20 69 73 20 74 68 65 20 64 65 66 61 75 6c 74 20 is the default
7da0: 76 61 6c 75 65 20 69 66 20 5c 66 42 2d 63 61 64 value if \fB-cad
7db0: 69 72 5c 66 52 2c 0a 5c 66 42 2d 63 61 64 69 72 ir\fR,.\fB-cadir
7dc0: 5c 66 52 2c 20 61 6e 64 20 5c 66 42 2d 63 61 73 \fR, and \fB-cas
7dd0: 74 6f 72 65 5c 66 52 20 61 72 65 20 6e 6f 74 20 tore\fR are not
7de0: 73 70 65 63 69 66 69 65 64 5c 26 2e 0a 2e 49 50 specified\&...IP
7df0: 20 5c 28 62 75 0a 49 66 20 4f 70 65 6e 53 53 4c \(bu.If OpenSSL
7e00: 20 69 73 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 65 is not installe
7e10: 64 20 6f 72 20 74 68 65 20 43 41 20 63 65 72 74 d or the CA cert
7e20: 69 66 69 63 61 74 65 73 20 61 72 65 20 6e 6f 74 ificates are not
7e30: 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 50 45 available in PE
7e40: 4d 0a 66 6f 72 6d 61 74 2c 20 74 68 65 20 43 41 M.format, the CA
7e50: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 6d 75 certificates mu
7e60: 73 74 20 62 65 20 64 6f 77 6e 6c 6f 61 64 65 64 st be downloaded
7e70: 20 61 6e 64 20 69 6e 73 74 61 6c 6c 65 64 20 77 and installed w
7e80: 69 74 68 20 74 68 65 20 75 73 65 72 0a 73 6f 66 ith the user.sof
7e90: 74 77 61 72 65 5c 26 2e 20 54 68 65 20 43 55 52 tware\&. The CUR
7ea0: 4c 20 74 65 61 6d 20 6d 61 6b 65 73 20 74 68 65 L team makes the
7eb0: 6d 20 61 76 61 69 6c 61 62 6c 65 20 61 74 0a 5c m available at.\
7ec0: 66 49 43 41 20 63 65 72 74 69 66 69 63 61 74 65 fICA certificate
7ed0: 73 20 65 78 74 72 61 63 74 65 64 0a 66 72 6f 6d s extracted.from
7ee0: 20 4d 6f 7a 69 6c 6c 61 5c 66 52 20 5b 68 74 74 Mozilla\fR [htt
7ef0: 70 73 3a 2f 2f 63 75 72 6c 5c 26 2e 73 65 2f 64 ps://curl\&.se/d
7f00: 6f 63 73 2f 63 61 65 78 74 72 61 63 74 5c 26 2e ocs/caextract\&.
7f10: 68 74 6d 6c 5d 20 69 6e 20 74 68 65 20 22 5c 66 html] in the "\f
7f20: 49 63 61 63 65 72 74 5c 26 2e 70 65 6d 5c 66 52 Icacert\&.pem\fR
7f30: 22 20 66 69 6c 65 5c 26 2e 20 59 6f 75 20 6d 75 " file\&. You mu
7f40: 73 74 20 74 68 65 6e 20 65 69 74 68 65 72 20 73 st then either s
7f50: 65 74 20 74 68 65 0a 5c 66 42 53 53 4c 5f 43 45 et the.\fBSSL_CE
7f60: 52 54 5f 44 49 52 5c 66 52 20 61 6e 64 2f 6f 72 RT_DIR\fR and/or
7f70: 20 5c 66 42 53 53 4c 5f 43 45 52 54 5f 46 49 4c \fBSSL_CERT_FIL
7f80: 45 5c 66 52 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 E\fR environment
7f90: 20 76 61 72 69 61 62 6c 65 73 20 6f 72 20 74 68 variables or th
7fa0: 65 0a 5c 66 42 2d 63 61 64 69 72 5c 66 52 20 6f e.\fB-cadir\fR o
7fb0: 72 20 5c 66 42 2d 63 61 66 69 6c 65 5c 66 52 20 r \fB-cafile\fR
7fc0: 6f 70 74 69 6f 6e 73 20 74 6f 20 74 68 65 20 43 options to the C
7fd0: 41 20 63 65 72 74 20 66 69 6c 65 27 73 20 69 6e A cert file's in
7fe0: 73 74 61 6c 6c 0a 6c 6f 63 61 74 69 6f 6e 5c 26 stall.location\&
7ff0: 2e 20 49 74 20 69 73 20 79 6f 75 72 20 72 65 73 . It is your res
8000: 70 6f 6e 73 69 62 69 6c 69 74 79 20 74 6f 20 6b ponsibility to k
8010: 65 65 70 20 74 68 69 73 20 66 69 6c 65 20 75 70 eep this file up
8020: 20 74 6f 20 64 61 74 65 5c 26 2e 0a 2e 50 50 0a to date\&...PP.
8030: 2e 53 48 20 22 43 41 4c 4c 42 41 43 4b 20 4f 50 .SH "CALLBACK OP
8040: 54 49 4f 4e 53 22 0a 41 73 20 70 72 65 76 69 6f TIONS".As previo
8050: 75 73 6c 79 20 64 65 73 63 72 69 62 65 64 2c 20 usly described,
8060: 65 61 63 68 20 63 68 61 6e 6e 65 6c 20 63 61 6e each channel can
8070: 20 62 65 20 67 69 76 65 6e 20 74 68 65 69 72 20 be given their
8080: 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 73 0a 74 6f own callbacks.to
8090: 20 68 61 6e 64 6c 65 20 69 6e 74 65 72 6d 65 64 handle intermed
80a0: 69 61 74 65 20 70 72 6f 63 65 73 73 69 6e 67 20 iate processing
80b0: 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c by the OpenSSL l
80c0: 69 62 72 61 72 79 2c 20 75 73 69 6e 67 20 74 68 ibrary, using th
80d0: 65 0a 5c 66 42 2d 63 6f 6d 6d 61 6e 64 5c 66 52 e.\fB-command\fR
80e0: 2c 20 5c 66 42 2d 70 61 73 73 77 6f 72 64 5c 66 , \fB-password\f
80f0: 52 2c 20 61 6e 64 20 5c 66 42 2d 76 61 6c 69 64 R, and \fB-valid
8100: 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 52 20 6f ate_command\fR o
8110: 70 74 69 6f 6e 73 0a 70 61 73 73 65 64 20 74 6f ptions.passed to
8120: 20 65 69 74 68 65 72 20 6f 66 20 5c 66 42 74 6c either of \fBtl
8130: 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 20 6f 72 20 s::socket\fR or
8140: 5c 66 42 74 6c 73 3a 3a 69 6d 70 6f 72 74 5c 66 \fBtls::import\f
8150: 52 5c 26 2e 0a 55 6e 6c 69 6b 65 20 70 72 65 76 R\&..Unlike prev
8160: 69 6f 75 73 20 76 65 72 73 69 6f 6e 73 20 6f 66 ious versions of
8170: 20 54 63 6c 54 4c 53 2c 20 6f 6e 6c 79 20 69 66 TclTLS, only if
8180: 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 67 65 the callback ge
8190: 6e 65 72 61 74 65 73 20 61 6e 20 65 72 72 6f 72 nerates an error
81a0: 2c 0a 77 69 6c 6c 20 74 68 65 20 5c 66 42 62 67 ,.will the \fBbg
81b0: 65 72 72 6f 72 5c 66 52 20 63 6f 6d 6d 61 6e 64 error\fR command
81c0: 20 62 65 20 69 6e 76 6f 6b 65 64 20 77 69 74 68 be invoked with
81d0: 20 74 68 65 20 65 72 72 6f 72 20 69 6e 66 6f 72 the error infor
81e0: 6d 61 74 69 6f 6e 5c 26 2e 0a 2e 53 53 20 22 56 mation\&...SS "V
81f0: 41 4c 55 45 53 20 46 4f 52 20 43 4f 4d 4d 41 4e ALUES FOR COMMAN
8200: 44 20 43 41 4c 4c 42 41 43 4b 22 0a 54 68 65 20 D CALLBACK".The
8210: 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 callback for the
8220: 20 5c 66 42 2d 63 6f 6d 6d 61 6e 64 5c 66 52 20 \fB-command\fR
8230: 6f 70 74 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 option is invoke
8240: 64 20 61 74 20 73 65 76 65 72 61 6c 20 70 6f 69 d at several poi
8250: 6e 74 73 20 64 75 72 69 6e 67 20 74 68 65 0a 4f nts during the.O
8260: 70 65 6e 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 penSSL handshake
8270: 20 61 6e 64 20 64 75 72 69 6e 67 20 72 6f 75 74 and during rout
8280: 69 6e 65 20 6f 70 65 72 61 74 69 6f 6e 73 5c 26 ine operations\&
8290: 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 . See below for
82a0: 74 68 65 20 70 6f 73 73 69 62 6c 65 0a 61 72 67 the possible.arg
82b0: 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f uments passed to
82c0: 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 the callback sc
82d0: 72 69 70 74 5c 26 2e 20 56 61 6c 75 65 73 20 72 ript\&. Values r
82e0: 65 74 75 72 6e 65 64 20 66 72 6f 6d 20 74 68 65 eturned from the
82f0: 20 63 61 6c 6c 62 61 63 6b 20 61 72 65 0a 69 67 callback are.ig
8300: 6e 6f 72 65 64 5c 26 2e 0a 2e 54 50 0a 5c 66 42 nored\&...TP.\fB
8310: 65 72 72 6f 72 5c 66 52 20 5c 66 49 63 68 61 6e error\fR \fIchan
8320: 6e 65 6c 49 64 20 6d 65 73 73 61 67 65 5c 66 52 nelId message\fR
8330: 0a 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 .This form of ca
8340: 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 llback is invoke
8350: 64 20 77 68 65 6e 65 76 65 72 20 61 6e 20 65 72 d whenever an er
8360: 72 6f 72 20 6f 63 63 75 72 73 20 64 75 72 69 6e ror occurs durin
8370: 67 20 74 68 65 20 69 6e 69 74 69 61 6c 0a 63 6f g the initial.co
8380: 6e 6e 65 63 74 69 6f 6e 2c 20 68 61 6e 64 73 68 nnection, handsh
8390: 61 6b 65 2c 20 6f 72 20 49 2f 4f 20 6f 70 65 72 ake, or I/O oper
83a0: 61 74 69 6f 6e 73 5c 26 2e 20 54 68 65 20 5c 66 ations\&. The \f
83b0: 49 6d 65 73 73 61 67 65 5c 66 52 20 61 72 67 75 Imessage\fR argu
83c0: 6d 65 6e 74 20 63 61 6e 20 62 65 0a 66 72 6f 6d ment can be.from
83d0: 20 74 68 65 20 54 63 6c 5f 45 72 72 6e 6f 4d 73 the Tcl_ErrnoMs
83e0: 67 2c 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 g, OpenSSL funct
83f0: 69 6f 6e 20 5c 66 42 45 52 52 5f 72 65 61 73 6f ion \fBERR_reaso
8400: 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e 67 28 29 n_error_string()
8410: 5c 66 52 2c 0a 6f 72 20 61 20 63 75 73 74 6f 6d \fR,.or a custom
8420: 20 6d 65 73 73 61 67 65 5c 26 2e 20 54 68 69 73 message\&. This
8430: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 callback is new
8440: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e for TclTLS 1\&.
8450: 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 69 6e 66 6f 8\&...TP.\fBinfo
8460: 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 \fR \fIchannelId
8470: 20 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20 6d 65 73 major minor mes
8480: 73 61 67 65 20 74 79 70 65 5c 66 52 0a 54 68 69 sage type\fR.Thi
8490: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 s form of callba
84a0: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 ck is invoked by
84b0: 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e the OpenSSL fun
84c0: 63 74 69 6f 6e 0a 5c 66 42 53 53 4c 5f 73 65 74 ction.\fBSSL_set
84d0: 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 29 _info_callback()
84e0: 5c 66 52 20 64 75 72 69 6e 67 20 74 68 65 20 69 \fR during the i
84f0: 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f nitial connectio
8500: 6e 20 61 6e 64 20 68 61 6e 64 73 68 61 6b 65 0a n and handshake.
8510: 6f 70 65 72 61 74 69 6f 6e 73 5c 26 2e 20 54 68 operations\&. Th
8520: 65 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a e arguments are:
8530: 0a 2e 52 53 0a 2e 54 50 0a 5c 66 49 6d 61 6a 6f ..RS..TP.\fImajo
8540: 72 5c 66 52 0a 4d 61 6a 6f 72 20 63 61 74 65 67 r\fR.Major categ
8550: 6f 72 79 20 66 6f 72 20 65 72 72 6f 72 5c 26 2e ory for error\&.
8560: 20 56 61 6c 69 64 20 65 6e 75 6d 73 20 61 72 65 Valid enums are
8570: 3a 20 5c 66 42 68 61 6e 64 73 68 61 6b 65 5c 66 : \fBhandshake\f
8580: 52 2c 20 5c 66 42 61 6c 65 72 74 5c 66 52 2c 0a R, \fBalert\fR,.
8590: 5c 66 42 63 6f 6e 6e 65 63 74 5c 66 52 2c 20 5c \fBconnect\fR, \
85a0: 66 42 61 63 63 65 70 74 5c 66 52 5c 26 2e 0a 2e fBaccept\fR\&...
85b0: 54 50 0a 5c 66 49 6d 69 6e 6f 72 5c 66 52 0a 4d TP.\fIminor\fR.M
85c0: 69 6e 6f 72 20 63 61 74 65 67 6f 72 79 20 66 6f inor category fo
85d0: 72 20 65 72 72 6f 72 5c 26 2e 20 56 61 6c 69 64 r error\&. Valid
85e0: 20 65 6e 75 6d 73 20 61 72 65 3a 20 5c 66 42 73 enums are: \fBs
85f0: 74 61 72 74 5c 66 52 2c 20 5c 66 42 64 6f 6e 65 tart\fR, \fBdone
8600: 5c 66 52 2c 20 5c 66 42 72 65 61 64 5c 66 52 2c \fR, \fBread\fR,
8610: 0a 5c 66 42 77 72 69 74 65 5c 66 52 2c 20 5c 66 .\fBwrite\fR, \f
8620: 42 6c 6f 6f 70 5c 66 52 2c 20 5c 66 42 65 78 69 Bloop\fR, \fBexi
8630: 74 5c 66 52 5c 26 2e 0a 2e 54 50 0a 5c 66 49 6d t\fR\&...TP.\fIm
8640: 65 73 73 61 67 65 5c 66 52 0a 44 65 73 63 72 69 essage\fR.Descri
8650: 70 74 69 76 65 20 6d 65 73 73 61 67 65 20 73 74 ptive message st
8660: 72 69 6e 67 20 77 68 69 63 68 20 6d 61 79 20 62 ring which may b
8670: 65 20 67 65 6e 65 72 61 74 65 64 20 65 69 74 68 e generated eith
8680: 65 72 20 62 79 0a 5c 66 42 53 53 4c 5f 73 74 61 er by.\fBSSL_sta
8690: 74 65 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 te_string_long()
86a0: 5c 66 52 20 6f 72 20 5c 66 42 53 53 4c 5f 61 6c \fR or \fBSSL_al
86b0: 65 72 74 5f 64 65 73 63 5f 73 74 72 69 6e 67 5f ert_desc_string_
86c0: 6c 6f 6e 67 28 29 5c 66 52 2c 0a 64 65 70 65 6e long()\fR,.depen
86d0: 64 69 6e 67 20 6f 6e 20 74 68 65 20 63 6f 6e 74 ding on the cont
86e0: 65 78 74 5c 26 2e 0a 2e 54 50 0a 5c 66 49 74 79 ext\&...TP.\fIty
86f0: 70 65 5c 66 52 0a 46 6f 72 20 61 6c 65 72 74 73 pe\fR.For alerts
8700: 2c 20 74 68 65 20 70 6f 73 73 69 62 6c 65 20 76 , the possible v
8710: 61 6c 75 65 73 20 61 72 65 3a 20 5c 66 42 77 61 alues are: \fBwa
8720: 72 6e 69 6e 67 5c 66 52 2c 0a 5c 66 42 66 61 74 rning\fR,.\fBfat
8730: 61 6c 5c 66 52 2c 20 61 6e 64 20 5c 66 42 75 6e al\fR, and \fBun
8740: 6b 6e 6f 77 6e 5c 66 52 5c 26 2e 20 46 6f 72 20 known\fR\&. For
8750: 6f 74 68 65 72 73 2c 20 5c 66 42 69 6e 66 6f 5c others, \fBinfo\
8760: 66 52 20 69 73 20 75 73 65 64 5c 26 2e 0a 54 68 fR is used\&..Th
8770: 69 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e is argument is n
8780: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c ew for TclTLS 1\
8790: 26 2e 38 5c 26 2e 0a 2e 52 45 0a 2e 54 50 0a 5c &.8\&...RE..TP.\
87a0: 66 42 6d 65 73 73 61 67 65 5c 66 52 20 5c 66 49 fBmessage\fR \fI
87b0: 63 68 61 6e 6e 65 6c 49 64 20 64 69 72 65 63 74 channelId direct
87c0: 69 6f 6e 20 76 65 72 73 69 6f 6e 20 63 6f 6e 74 ion version cont
87d0: 65 6e 74 5f 74 79 70 65 20 6d 65 73 73 61 67 65 ent_type message
87e0: 5c 66 52 0a 54 68 69 73 20 66 6f 72 6d 20 6f 66 \fR.This form of
87f0: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 callback is inv
8800: 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e oked by the Open
8810: 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 5c 66 42 SSL function.\fB
8820: 53 53 4c 5f 73 65 74 5f 6d 73 67 5f 63 61 6c 6c SSL_set_msg_call
8830: 62 61 63 6b 28 29 5c 66 52 20 77 68 65 6e 65 76 back()\fR whenev
8840: 65 72 20 61 20 6d 65 73 73 61 67 65 20 69 73 20 er a message is
8850: 73 65 6e 74 20 6f 72 20 72 65 63 65 69 76 65 64 sent or received
8860: 20 64 75 72 69 6e 67 20 74 68 65 0a 69 6e 69 74 during the.init
8870: 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 ial connection,
8880: 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f handshake, or I/
8890: 4f 20 6f 70 65 72 61 74 69 6f 6e 73 5c 26 2e 20 O operations\&.
88a0: 49 74 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c It is only avail
88b0: 61 62 6c 65 20 77 68 65 6e 0a 4f 70 65 6e 53 53 able when.OpenSS
88c0: 4c 20 69 73 20 63 6f 6d 70 6c 69 65 64 20 77 69 L is complied wi
88d0: 74 68 20 74 68 65 20 5c 66 42 65 6e 61 62 6c 65 th the \fBenable
88e0: 2d 73 73 6c 2d 74 72 61 63 65 5c 66 52 20 6f 70 -ssl-trace\fR op
88f0: 74 69 6f 6e 5c 26 2e 20 54 68 69 73 20 63 61 6c tion\&. This cal
8900: 6c 62 61 63 6b 20 69 73 0a 6e 65 77 20 66 6f 72 lback is.new for
8910: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
8920: 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61 The arguments a
8930: 72 65 3a 0a 2e 52 53 0a 2e 54 50 0a 5c 66 49 64 re:..RS..TP.\fId
8940: 69 72 65 63 74 69 6f 6e 5c 66 52 0a 44 69 72 65 irection\fR.Dire
8950: 63 74 69 6f 6e 20 69 73 20 65 69 74 68 65 72 20 ction is either
8960: 5c 66 42 53 65 6e 74 5c 66 52 20 6f 72 20 5c 66 \fBSent\fR or \f
8970: 42 52 65 63 65 69 76 65 64 5c 66 52 5c 26 2e 0a BReceived\fR\&..
8980: 2e 54 50 0a 5c 66 49 76 65 72 73 69 6f 6e 5c 66 .TP.\fIversion\f
8990: 52 0a 56 65 72 73 69 6f 6e 20 69 73 20 74 68 65 R.Version is the
89a0: 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f protocol versio
89b0: 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 49 63 6f 6e 74 n\&...TP.\fIcont
89c0: 65 6e 74 5f 74 79 70 65 5c 66 52 0a 43 6f 6e 74 ent_type\fR.Cont
89d0: 65 6e 74 20 74 79 70 65 20 69 73 20 74 68 65 20 ent type is the
89e0: 6d 65 73 73 61 67 65 20 63 6f 6e 74 65 6e 74 20 message content
89f0: 74 79 70 65 5c 26 2e 0a 2e 54 50 0a 5c 66 49 6d type\&...TP.\fIm
8a00: 65 73 73 61 67 65 5c 66 52 0a 4d 65 73 73 61 67 essage\fR.Messag
8a10: 65 20 69 73 20 6d 6f 72 65 20 69 6e 66 6f 20 66 e is more info f
8a20: 72 6f 6d 20 74 68 65 20 5c 66 42 53 53 4c 5f 74 rom the \fBSSL_t
8a30: 72 61 63 65 5c 66 52 20 41 50 49 5c 26 2e 0a 2e race\fR API\&...
8a40: 52 45 0a 2e 54 50 0a 5c 66 42 73 65 73 73 69 6f RE..TP.\fBsessio
8a50: 6e 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 n\fR \fIchannelI
8a60: 64 20 73 65 73 73 69 6f 6e 5f 69 64 20 73 65 73 d session_id ses
8a70: 73 69 6f 6e 5f 74 69 63 6b 65 74 20 6c 69 66 65 sion_ticket life
8a80: 74 69 6d 65 5c 66 52 0a 54 68 69 73 20 66 6f 72 time\fR.This for
8a90: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 m of callback is
8aa0: 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 invoked by the
8ab0: 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e OpenSSL function
8ac0: 0a 5c 66 42 53 53 4c 5f 43 54 58 5f 73 65 73 73 .\fBSSL_CTX_sess
8ad0: 5f 73 65 74 5f 6e 65 77 5f 63 62 28 29 5c 66 52 _set_new_cb()\fR
8ae0: 20 77 68 65 6e 65 76 65 72 20 61 20 6e 65 77 20 whenever a new
8af0: 73 65 73 73 69 6f 6e 20 69 64 20 69 73 20 73 65 session id is se
8b00: 6e 74 20 62 79 20 74 68 65 0a 73 65 72 76 65 72 nt by the.server
8b10: 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e 69 74 during the init
8b20: 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 61 ial connection a
8b30: 6e 64 20 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 nd handshake and
8b40: 20 61 6c 73 6f 20 64 75 72 69 6e 67 20 74 68 65 also during the
8b50: 20 73 65 73 73 69 6f 6e 0a 69 66 20 74 68 65 20 session.if the
8b60: 5c 66 42 2d 70 6f 73 74 5f 68 61 6e 64 73 68 61 \fB-post_handsha
8b70: 6b 65 5c 66 52 20 6f 70 74 69 6f 6e 20 69 73 20 ke\fR option is
8b80: 73 65 74 20 74 6f 20 74 72 75 65 5c 26 2e 20 54 set to true\&. T
8b90: 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 his callback is
8ba0: 6e 65 77 20 66 6f 72 0a 54 63 6c 54 4c 53 20 31 new for.TclTLS 1
8bb0: 5c 26 2e 38 5c 26 2e 20 54 68 65 20 61 72 67 75 \&.8\&. The argu
8bc0: 6d 65 6e 74 73 20 61 72 65 3a 0a 2e 52 53 0a 2e ments are:..RS..
8bd0: 54 50 0a 5c 66 49 73 65 73 73 69 6f 6e 5f 69 64 TP.\fIsession_id
8be0: 5c 66 52 0a 53 65 73 73 69 6f 6e 20 49 64 20 69 \fR.Session Id i
8bf0: 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 73 65 s the current se
8c00: 73 73 69 6f 6e 20 69 64 65 6e 74 69 66 69 65 72 ssion identifier
8c10: 0a 2e 54 50 0a 5c 66 49 73 65 73 73 69 6f 6e 5f ..TP.\fIsession_
8c20: 74 69 63 6b 65 74 5c 66 52 0a 54 69 63 6b 65 74 ticket\fR.Ticket
8c30: 20 69 73 20 74 68 65 20 73 65 73 73 69 6f 6e 20 is the session
8c40: 74 69 63 6b 65 74 20 69 6e 66 6f 0a 2e 54 50 0a ticket info..TP.
8c50: 5c 66 49 6c 69 66 65 74 69 6d 65 5c 66 52 0a 4c \fIlifetime\fR.L
8c60: 69 66 65 74 69 6d 65 20 69 73 20 74 68 65 20 74 ifetime is the t
8c70: 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 69 icket lifetime i
8c80: 6e 20 73 65 63 6f 6e 64 73 5c 26 2e 0a 2e 52 45 n seconds\&...RE
8c90: 0a 2e 54 50 0a 5c 66 42 76 65 72 69 66 79 5c 66 ..TP.\fBverify\f
8ca0: 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 64 R \fIchannelId d
8cb0: 65 70 74 68 20 63 65 72 74 20 73 74 61 74 75 73 epth cert status
8cc0: 20 65 72 72 6f 72 5c 66 52 0a 54 68 69 73 20 63 error\fR.This c
8cd0: 61 6c 6c 62 61 63 6b 20 77 61 73 20 6d 6f 76 65 allback was move
8ce0: 64 20 74 6f 20 5c 66 42 2d 76 61 6c 69 64 61 74 d to \fB-validat
8cf0: 65 63 6f 6d 6d 61 6e 64 5c 66 52 20 69 6e 20 54 ecommand\fR in T
8d00: 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e clTLS 1\&.8\&...
8d10: 50 50 0a 2e 53 53 20 22 56 41 4c 55 45 53 20 46 PP..SS "VALUES F
8d20: 4f 52 20 50 41 53 53 57 4f 52 44 20 43 41 4c 4c OR PASSWORD CALL
8d30: 42 41 43 4b 22 0a 54 68 65 20 63 61 6c 6c 62 61 BACK".The callba
8d40: 63 6b 20 66 6f 72 20 74 68 65 20 5c 66 42 2d 70 ck for the \fB-p
8d50: 61 73 73 77 6f 72 64 5c 66 52 20 6f 70 74 69 6f assword\fR optio
8d60: 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 n is invoked by
8d70: 54 63 6c 54 4c 53 20 77 68 65 6e 65 76 65 72 20 TclTLS whenever
8d80: 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73 0a 74 6f OpenSSL needs.to
8d90: 20 6f 62 74 61 69 6e 20 61 20 70 61 73 73 77 6f obtain a passwo
8da0: 72 64 5c 26 2e 20 53 65 65 20 62 65 6c 6f 77 20 rd\&. See below
8db0: 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 for the possible
8dc0: 20 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65 arguments passe
8dd0: 64 20 74 6f 20 74 68 65 0a 63 61 6c 6c 62 61 63 d to the.callbac
8de0: 6b 20 73 63 72 69 70 74 5c 26 2e 20 54 68 65 20 k script\&. The
8df0: 75 73 65 72 20 70 72 6f 76 69 64 65 64 20 70 61 user provided pa
8e00: 73 73 77 6f 72 64 20 69 73 20 65 78 70 65 63 74 ssword is expect
8e10: 65 64 20 74 6f 20 62 65 20 72 65 74 75 72 6e 65 ed to be returne
8e20: 64 20 62 79 20 74 68 65 0a 63 61 6c 6c 62 61 63 d by the.callbac
8e30: 6b 5c 26 2e 0a 2e 54 50 0a 5c 66 42 70 61 73 73 k\&...TP.\fBpass
8e40: 77 6f 72 64 5c 66 52 20 5c 66 49 72 77 66 6c 61 word\fR \fIrwfla
8e50: 67 20 73 69 7a 65 5c 66 52 0a 49 6e 76 6f 6b 65 g size\fR.Invoke
8e60: 64 20 77 68 65 6e 20 6c 6f 61 64 69 6e 67 20 6f d when loading o
8e70: 72 20 73 74 6f 72 69 6e 67 20 61 6e 20 65 6e 63 r storing an enc
8e80: 72 79 70 74 65 64 20 50 45 4d 20 63 65 72 74 69 rypted PEM certi
8e90: 66 69 63 61 74 65 5c 26 2e 20 54 68 65 20 61 72 ficate\&. The ar
8ea0: 67 75 6d 65 6e 74 73 20 61 72 65 3a 0a 2e 52 53 guments are:..RS
8eb0: 0a 2e 54 50 0a 5c 66 49 72 77 66 6c 61 67 5c 66 ..TP.\fIrwflag\f
8ec0: 52 0a 54 68 65 20 72 65 61 64 2f 77 72 69 74 65 R.The read/write
8ed0: 20 66 6c 61 67 20 69 73 20 30 20 66 6f 72 20 72 flag is 0 for r
8ee0: 65 61 64 69 6e 67 2f 64 65 63 72 79 70 74 69 6f eading/decryptio
8ef0: 6e 20 6f 72 20 31 20 66 6f 72 20 77 72 69 74 69 n or 1 for writi
8f00: 6e 67 2f 65 6e 63 72 79 70 74 69 6f 6e 5c 26 2e ng/encryption\&.
8f10: 0a 54 68 65 20 6c 61 74 74 65 72 20 63 61 6e 20 .The latter can
8f20: 62 65 20 75 73 65 64 20 74 6f 20 64 65 74 65 72 be used to deter
8f30: 6d 69 6e 65 20 77 68 65 6e 20 74 6f 20 70 72 6f mine when to pro
8f40: 6d 70 74 20 74 68 65 20 75 73 65 72 20 74 6f 20 mpt the user to
8f50: 63 6f 6e 66 69 72 6d 5c 26 2e 0a 54 68 69 73 20 confirm\&..This
8f60: 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 77 20 argument is new
8f70: 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 for TclTLS 1\&.8
8f80: 5c 26 2e 0a 2e 54 50 0a 5c 66 49 73 69 7a 65 5c \&...TP.\fIsize\
8f90: 66 52 0a 54 68 65 20 73 69 7a 65 20 69 73 20 74 fR.The size is t
8fa0: 68 65 20 6d 61 78 69 6d 75 6d 20 6c 65 6e 67 74 he maximum lengt
8fb0: 68 20 6f 66 20 74 68 65 20 70 61 73 73 77 6f 72 h of the passwor
8fc0: 64 20 69 6e 20 62 79 74 65 73 5c 26 2e 0a 54 68 d in bytes\&..Th
8fd0: 69 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e is argument is n
8fe0: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c ew for TclTLS 1\
8ff0: 26 2e 38 5c 26 2e 0a 2e 52 45 0a 2e 50 50 0a 2e &.8\&...RE..PP..
9000: 53 53 20 22 56 41 4c 55 45 53 20 46 4f 52 20 56 SS "VALUES FOR V
9010: 41 4c 49 44 41 54 45 20 43 4f 4d 4d 41 4e 44 20 ALIDATE COMMAND
9020: 43 41 4c 4c 42 41 43 4b 22 0a 54 68 65 20 63 61 CALLBACK".The ca
9030: 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20 5c llback for the \
9040: 66 42 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 fB-validatecomma
9050: 6e 64 5c 66 52 20 6f 70 74 69 6f 6e 20 69 73 20 nd\fR option is
9060: 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 74 invoked during t
9070: 68 65 20 68 61 6e 64 73 68 61 6b 65 0a 70 72 6f he handshake.pro
9080: 63 65 73 73 20 69 6e 20 6f 72 64 65 72 20 66 6f cess in order fo
9090: 72 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f r the applicatio
90a0: 6e 20 74 6f 20 76 61 6c 69 64 61 74 65 20 74 68 n to validate th
90b0: 65 20 70 72 6f 76 69 64 65 64 20 76 61 6c 75 65 e provided value
90c0: 28 73 29 5c 26 2e 20 53 65 65 0a 62 65 6c 6f 77 (s)\&. See.below
90d0: 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c for the possibl
90e0: 65 20 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 e arguments pass
90f0: 65 64 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 ed to the callba
9100: 63 6b 20 73 63 72 69 70 74 5c 26 2e 20 49 66 20 ck script\&. If
9110: 6e 6f 74 0a 73 70 65 63 69 66 69 65 64 2c 20 4f not.specified, O
9120: 70 65 6e 53 53 4c 20 77 69 6c 6c 20 61 63 63 65 penSSL will acce
9130: 70 74 20 61 6c 6c 20 76 61 6c 69 64 20 63 65 72 pt all valid cer
9140: 74 69 66 69 63 61 74 65 73 20 61 6e 64 20 65 78 tificates and ex
9150: 74 65 6e 73 69 6f 6e 73 5c 26 2e 20 54 6f 20 72 tensions\&. To r
9160: 65 6a 65 63 74 0a 74 68 65 20 76 61 6c 75 65 20 eject.the value
9170: 61 6e 64 20 61 62 6f 72 74 20 74 68 65 20 63 6f and abort the co
9180: 6e 6e 65 63 74 69 6f 6e 2c 20 74 68 65 20 63 61 nnection, the ca
9190: 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 llback should re
91a0: 74 75 72 6e 20 30 5c 26 2e 20 54 6f 20 61 63 63 turn 0\&. To acc
91b0: 65 70 74 20 74 68 65 0a 76 61 6c 75 65 20 61 6e ept the.value an
91c0: 64 20 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 d continue the c
91d0: 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73 68 onnection, it sh
91e0: 6f 75 6c 64 20 72 65 74 75 72 6e 20 31 5c 26 2e ould return 1\&.
91f0: 20 54 6f 20 72 65 6a 65 63 74 20 74 68 65 20 76 To reject the v
9200: 61 6c 75 65 2c 20 62 75 74 0a 63 6f 6e 74 69 6e alue, but.contin
9210: 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f ue the connectio
9220: 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 72 65 74 n, it should ret
9230: 75 72 6e 20 32 5c 26 2e 20 54 68 69 73 20 63 61 urn 2\&. This ca
9240: 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 66 6f llback is new fo
9250: 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 r TclTLS 1\&.8\&
9260: 2e 0a 2e 54 50 0a 5c 66 42 61 6c 70 6e 5c 66 52 ...TP.\fBalpn\fR
9270: 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 70 72 \fIchannelId pr
9280: 6f 74 6f 63 6f 6c 20 6d 61 74 63 68 5c 66 52 0a otocol match\fR.
9290: 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 For servers, thi
92a0: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 s form of callba
92b0: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 ck is invoked wh
92c0: 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 20 41 4c en the client AL
92d0: 50 4e 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 0a PN extension is.
92e0: 72 65 63 65 69 76 65 64 5c 26 2e 20 49 66 20 5c received\&. If \
92f0: 66 49 6d 61 74 63 68 5c 66 52 20 69 73 20 74 72 fImatch\fR is tr
9300: 75 65 2c 20 74 68 65 6e 20 5c 66 49 70 72 6f 74 ue, then \fIprot
9310: 6f 63 6f 6c 5c 66 52 20 69 73 20 74 68 65 20 66 ocol\fR is the f
9320: 69 72 73 74 0a 5c 66 42 2d 61 6c 70 6e 5c 66 52 irst.\fB-alpn\fR
9330: 20 70 72 6f 74 6f 63 6f 6c 20 6f 70 74 69 6f 6e protocol option
9340: 20 69 6e 20 63 6f 6d 6d 6f 6e 20 74 6f 20 62 6f in common to bo
9350: 74 68 20 74 68 65 20 63 6c 69 65 6e 74 20 61 6e th the client an
9360: 64 20 73 65 72 76 65 72 5c 26 2e 0a 49 66 20 6e d server\&..If n
9370: 6f 74 2c 20 74 68 65 20 66 69 72 73 74 20 63 6c ot, the first cl
9380: 69 65 6e 74 20 73 70 65 63 69 66 69 65 64 20 70 ient specified p
9390: 72 6f 74 6f 63 6f 6c 20 69 73 20 75 73 65 64 5c rotocol is used\
93a0: 26 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b &. This callback
93b0: 20 69 73 20 63 61 6c 6c 65 64 0a 61 66 74 65 72 is called.after
93c0: 20 74 68 65 20 48 65 6c 6c 6f 20 61 6e 64 20 41 the Hello and A
93d0: 4c 50 4e 20 63 61 6c 6c 62 61 63 6b 73 5c 26 2e LPN callbacks\&.
93e0: 0a 2e 54 50 0a 5c 66 42 68 65 6c 6c 6f 5c 66 52 ..TP.\fBhello\fR
93f0: 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 73 65 \fIchannelId se
9400: 72 76 65 72 6e 61 6d 65 5c 66 52 0a 46 6f 72 20 rvername\fR.For
9410: 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f servers, this fo
9420: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 rm of callback i
9430: 73 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 s invoked during
9440: 20 63 6c 69 65 6e 74 20 68 65 6c 6c 6f 20 6d 65 client hello me
9450: 73 73 61 67 65 0a 70 72 6f 63 65 73 73 69 6e 67 ssage.processing
9460: 5c 26 2e 20 54 68 65 20 70 75 72 70 6f 73 65 20 \&. The purpose
9470: 69 73 20 73 6f 20 74 68 65 20 73 65 72 76 65 72 is so the server
9480: 20 63 61 6e 20 73 65 6c 65 63 74 20 74 68 65 20 can select the
9490: 61 70 70 72 6f 70 72 69 61 74 65 20 63 65 72 74 appropriate cert
94a0: 69 66 69 63 61 74 65 0a 74 6f 20 70 72 65 73 65 ificate.to prese
94b0: 6e 74 20 74 6f 20 74 68 65 20 63 6c 69 65 6e 74 nt to the client
94c0: 2c 20 61 6e 64 20 74 6f 20 6d 61 6b 65 20 6f 74 , and to make ot
94d0: 68 65 72 20 63 6f 6e 66 69 67 75 72 61 74 69 6f her configuratio
94e0: 6e 20 61 64 6a 75 73 74 6d 65 6e 74 73 20 72 65 n adjustments re
94f0: 6c 65 76 61 6e 74 0a 74 6f 20 74 68 61 74 20 73 levant.to that s
9500: 65 72 76 65 72 20 6e 61 6d 65 20 61 6e 64 20 69 erver name and i
9510: 74 73 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e ts configuration
9520: 5c 26 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 64 \&. It is called
9530: 20 62 65 66 6f 72 65 20 74 68 65 20 53 4e 49 20 before the SNI
9540: 61 6e 64 20 41 4c 50 4e 0a 63 61 6c 6c 62 61 63 and ALPN.callbac
9550: 6b 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 6e 69 ks\&...TP.\fBsni
9560: 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 \fR \fIchannelId
9570: 20 73 65 72 76 65 72 6e 61 6d 65 5c 66 52 0a 46 servername\fR.F
9580: 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 73 or servers, this
9590: 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 form of callbac
95a0: 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 k is invoked whe
95b0: 6e 20 74 68 65 20 53 65 72 76 65 72 20 4e 61 6d n the Server Nam
95c0: 65 20 49 6e 64 69 63 61 74 69 6f 6e 0a 28 53 4e e Indication.(SN
95d0: 49 29 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 I) extension is
95e0: 72 65 63 65 69 76 65 64 5c 26 2e 20 54 68 65 20 received\&. The
95f0: 5c 66 49 73 65 72 76 65 72 6e 61 6d 65 5c 66 52 \fIservername\fR
9600: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74 68 65 argument is the
9610: 20 63 6c 69 65 6e 74 0a 70 72 6f 76 69 64 65 64 client.provided
9620: 20 73 65 72 76 65 72 20 6e 61 6d 65 20 73 70 65 server name spe
9630: 63 69 66 69 65 64 20 69 6e 20 74 68 65 20 5c 66 cified in the \f
9640: 42 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e B-servername</b>
9650: 5c 66 52 20 6f 70 74 69 6f 6e 5c 26 2e 20 54 68 \fR option\&. Th
9660: 65 0a 70 75 72 70 6f 73 65 20 69 73 20 73 6f 20 e.purpose is so
9670: 77 68 65 6e 20 61 20 73 65 72 76 65 72 20 73 75 when a server su
9680: 70 70 6f 72 74 73 20 6d 75 6c 74 69 70 6c 65 20 pports multiple
9690: 6e 61 6d 65 73 2c 20 74 68 65 20 72 69 67 68 74 names, the right
96a0: 20 63 65 72 74 69 66 69 63 61 74 65 0a 63 61 6e certificate.can
96b0: 20 62 65 20 75 73 65 64 5c 26 2e 20 49 74 20 69 be used\&. It i
96c0: 73 20 63 61 6c 6c 65 64 20 61 66 74 65 72 20 74 s called after t
96d0: 68 65 20 68 65 6c 6c 6f 20 63 61 6c 6c 62 61 63 he hello callbac
96e0: 6b 20 62 75 74 20 62 65 66 6f 72 65 20 74 68 65 k but before the
96f0: 20 41 4c 50 4e 0a 63 61 6c 6c 62 61 63 6b 5c 26 ALPN.callback\&
9700: 2e 0a 2e 54 50 0a 5c 66 42 76 65 72 69 66 79 5c ...TP.\fBverify\
9710: 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 fR \fIchannelId
9720: 64 65 70 74 68 20 63 65 72 74 20 73 74 61 74 75 depth cert statu
9730: 73 20 65 72 72 6f 72 5c 66 52 0a 54 68 69 73 20 s error\fR.This
9740: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b form of callback
9750: 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 4f is invoked by O
9760: 70 65 6e 53 53 4c 20 77 68 65 6e 20 61 20 6e 65 penSSL when a ne
9770: 77 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 w certificate is
9780: 20 72 65 63 65 69 76 65 64 0a 66 72 6f 6d 20 74 received.from t
9790: 68 65 20 70 65 65 72 5c 26 2e 20 49 74 20 61 6c he peer\&. It al
97a0: 6c 6f 77 73 20 74 68 65 20 63 6c 69 65 6e 74 20 lows the client
97b0: 74 6f 20 63 68 65 63 6b 20 74 68 65 20 63 65 72 to check the cer
97c0: 74 69 66 69 63 61 74 65 20 76 65 72 69 66 69 63 tificate verific
97d0: 61 74 69 6f 6e 0a 72 65 73 75 6c 74 73 20 61 6e ation.results an
97e0: 64 20 63 68 6f 6f 73 65 20 77 68 65 74 68 65 72 d choose whether
97f0: 20 74 6f 20 63 6f 6e 74 69 6e 75 65 20 6f 72 20 to continue or
9800: 6e 6f 74 5c 26 2e 20 49 74 20 69 73 20 63 61 6c not\&. It is cal
9810: 6c 65 64 20 66 6f 72 20 65 61 63 68 0a 63 65 72 led for each.cer
9820: 74 69 66 69 63 61 74 65 20 69 6e 20 74 68 65 20 tificate in the
9830: 63 65 72 74 69 66 69 63 61 74 65 20 63 68 61 69 certificate chai
9840: 6e 5c 26 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 n\&. This callba
9850: 63 6b 20 77 61 73 20 6d 6f 76 65 64 20 66 72 6f ck was moved fro
9860: 6d 0a 5c 66 42 2d 63 6f 6d 6d 61 6e 64 5c 66 52 m.\fB-command\fR
9870: 20 69 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 in TclTLS 1\&.8
9880: 5c 26 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74 \&. The argument
9890: 73 20 61 72 65 3a 0a 2e 52 53 0a 2e 54 50 0a 5c s are:..RS..TP.\
98a0: 66 49 64 65 70 74 68 5c 66 52 0a 54 68 65 20 64 fIdepth\fR.The d
98b0: 65 70 74 68 20 69 73 20 74 68 65 20 69 6e 74 65 epth is the inte
98c0: 67 65 72 20 64 65 70 74 68 20 6f 66 20 74 68 65 ger depth of the
98d0: 20 63 65 72 74 69 66 69 63 61 74 65 20 69 6e 20 certificate in
98e0: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
98f0: 63 68 61 69 6e 2c 0a 77 68 65 72 65 20 30 20 69 chain,.where 0 i
9900: 73 20 74 68 65 20 70 65 65 72 20 63 65 72 74 69 s the peer certi
9910: 66 69 63 61 74 65 20 61 6e 64 20 68 69 67 68 65 ficate and highe
9920: 72 20 76 61 6c 75 65 73 20 67 6f 69 6e 67 20 75 r values going u
9930: 70 20 74 6f 20 74 68 65 20 43 65 72 74 69 66 69 p to the Certifi
9940: 63 61 74 65 0a 41 75 74 68 6f 72 69 74 79 20 28 cate.Authority (
9950: 43 41 29 5c 26 2e 0a 2e 54 50 0a 5c 66 49 63 65 CA)\&...TP.\fIce
9960: 72 74 5c 66 52 0a 54 68 65 20 63 65 72 74 20 61 rt\fR.The cert a
9970: 72 67 75 6d 65 6e 74 20 69 73 20 61 20 6c 69 73 rgument is a lis
9980: 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 t of key-value p
9990: 61 69 72 73 20 73 69 6d 69 6c 61 72 20 74 6f 20 airs similar to
99a0: 74 68 6f 73 65 20 72 65 74 75 72 6e 65 64 20 62 those returned b
99b0: 79 0a 5c 66 42 74 6c 73 3a 3a 73 74 61 74 75 73 y.\fBtls::status
99c0: 5c 66 52 5c 26 2e 0a 2e 54 50 0a 5c 66 49 73 74 \fR\&...TP.\fIst
99d0: 61 74 75 73 5c 66 52 0a 54 68 65 20 73 74 61 74 atus\fR.The stat
99e0: 75 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74 us argument is t
99f0: 68 65 20 62 6f 6f 6c 65 61 6e 20 76 61 6c 69 64 he boolean valid
9a00: 69 74 79 20 6f 66 20 74 68 65 20 63 75 72 72 65 ity of the curre
9a10: 6e 74 20 63 65 72 74 69 66 69 63 61 74 65 20 77 nt certificate w
9a20: 68 65 72 65 20 30 0a 69 73 20 69 6e 76 61 6c 69 here 0.is invali
9a30: 64 20 61 6e 64 20 31 20 69 73 20 76 61 6c 69 64 d and 1 is valid
9a40: 5c 26 2e 0a 2e 54 50 0a 5c 66 49 65 72 72 6f 72 \&...TP.\fIerror
9a50: 5c 66 52 0a 54 68 65 20 65 72 72 6f 72 20 61 72 \fR.The error ar
9a60: 67 75 6d 65 6e 74 20 69 73 20 74 68 65 20 65 72 gument is the er
9a70: 72 6f 72 20 6d 65 73 73 61 67 65 2c 20 69 66 20 ror message, if
9a80: 61 6e 79 2c 20 67 65 6e 65 72 61 74 65 64 20 62 any, generated b
9a90: 79 0a 5c 66 42 58 35 30 39 5f 53 54 4f 52 45 5f y.\fBX509_STORE_
9aa0: 43 54 58 5f 67 65 74 5f 65 72 72 6f 72 28 29 5c CTX_get_error()\
9ab0: 66 52 5c 26 2e 0a 2e 52 45 0a 2e 50 50 0a 52 65 fR\&...RE..PP.Re
9ac0: 66 65 72 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e ference implemen
9ad0: 74 61 74 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 tations of these
9ae0: 20 63 61 6c 6c 62 61 63 6b 73 20 61 72 65 20 70 callbacks are p
9af0: 72 6f 76 69 64 65 64 20 69 6e 20 22 5c 66 49 74 rovided in "\fIt
9b00: 6c 73 5c 26 2e 74 63 6c 5c 66 52 22 0a 61 73 20 ls\&.tcl\fR".as
9b10: 5c 66 42 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b \fBtls::callback
9b20: 5c 66 52 2c 20 5c 66 42 74 6c 73 3a 3a 70 61 73 \fR, \fBtls::pas
9b30: 73 77 6f 72 64 5c 66 52 2c 20 61 6e 64 20 5c 66 sword\fR, and \f
9b40: 42 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 Btls::validate_c
9b50: 6f 6d 6d 61 6e 64 5c 66 52 0a 72 65 73 70 65 63 ommand\fR.respec
9b60: 74 69 76 65 6c 79 5c 26 2e 20 4e 6f 74 65 20 74 tively\&. Note t
9b70: 68 61 74 20 74 68 65 73 65 20 61 72 65 20 6f 6e hat these are on
9b80: 6c 79 20 5c 66 49 73 61 6d 70 6c 65 5c 66 52 20 ly \fIsample\fR
9b90: 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 5c implementations\
9ba0: 26 2e 20 49 6e 20 61 20 6d 6f 72 65 0a 72 65 61 &. In a more.rea
9bb0: 6c 69 73 74 69 63 20 64 65 70 6c 6f 79 6d 65 6e listic deploymen
9bc0: 74 20 79 6f 75 20 77 6f 75 6c 64 20 73 70 65 63 t you would spec
9bd0: 69 66 79 20 79 6f 75 72 20 6f 77 6e 20 63 61 6c ify your own cal
9be0: 6c 62 61 63 6b 20 73 63 72 69 70 74 73 20 6f 6e lback scripts on
9bf0: 20 65 61 63 68 20 54 4c 53 0a 63 68 61 6e 6e 65 each TLS.channe
9c00: 6c 20 75 73 69 6e 67 20 74 68 65 20 5c 66 42 2d l using the \fB-
9c10: 63 6f 6d 6d 61 6e 64 5c 66 52 2c 20 5c 66 42 2d command\fR, \fB-
9c20: 70 61 73 73 77 6f 72 64 5c 66 52 2c 20 61 6e 64 password\fR, and
9c30: 0a 5c 66 42 2d 76 61 6c 69 64 61 74 65 5f 63 6f .\fB-validate_co
9c40: 6d 6d 61 6e 64 5c 66 52 20 6f 70 74 69 6f 6e 73 mmand\fR options
9c50: 5c 26 2e 0a 2e 50 50 0a 54 68 65 20 64 65 66 61 \&...PP.The defa
9c60: 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 65 ult behavior whe
9c70: 6e 20 74 68 65 20 5c 66 42 2d 63 6f 6d 6d 61 6e n the \fB-comman
9c80: 64 5c 66 52 20 61 6e 64 20 5c 66 42 2d 76 61 6c d\fR and \fB-val
9c90: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 52 idate_command\fR
9ca0: 0a 6f 70 74 69 6f 6e 73 20 61 72 65 20 6e 6f 74 .options are not
9cb0: 20 73 70 65 63 69 66 69 65 64 2c 20 69 73 20 66 specified, is f
9cc0: 6f 72 20 54 63 6c 54 4c 53 20 74 6f 20 70 72 6f or TclTLS to pro
9cd0: 63 65 73 73 20 74 68 65 20 61 73 73 6f 63 69 61 cess the associa
9ce0: 74 65 64 20 6c 69 62 72 61 72 79 0a 63 61 6c 6c ted library.call
9cf0: 62 61 63 6b 73 20 69 6e 74 65 72 6e 61 6c 6c 79 backs internally
9d00: 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 \&. The default
9d10: 62 65 68 61 76 69 6f 72 20 77 68 65 6e 20 74 68 behavior when th
9d20: 65 20 5c 66 42 2d 70 61 73 73 77 6f 72 64 5c 66 e \fB-password\f
9d30: 52 20 6f 70 74 69 6f 6e 0a 69 73 20 6e 6f 74 20 R option.is not
9d40: 73 70 65 63 69 66 69 65 64 20 69 73 20 66 6f 72 specified is for
9d50: 20 54 63 6c 54 4c 53 20 74 6f 20 70 72 6f 63 65 TclTLS to proce
9d60: 73 73 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 ss the associate
9d70: 64 20 6c 69 62 72 61 72 79 20 63 61 6c 6c 62 61 d library callba
9d80: 63 6b 73 20 62 79 0a 61 74 74 65 6d 70 74 69 6e cks by.attemptin
9d90: 67 20 74 6f 20 63 61 6c 6c 20 5c 66 42 74 6c 73 g to call \fBtls
9da0: 3a 3a 70 61 73 73 77 6f 72 64 5c 66 52 5c 26 2e ::password\fR\&.
9db0: 20 54 68 65 20 64 69 66 66 65 72 65 6e 63 65 20 The difference
9dc0: 62 65 74 77 65 65 6e 20 74 68 65 73 65 20 74 77 between these tw
9dd0: 6f 0a 62 65 68 61 76 69 6f 72 73 20 69 73 20 61 o.behaviors is a
9de0: 20 63 6f 6e 73 65 71 75 65 6e 63 65 20 6f 66 20 consequence of
9df0: 6d 61 69 6e 74 61 69 6e 69 6e 67 20 63 6f 6d 70 maintaining comp
9e00: 61 74 69 62 69 6c 69 74 79 20 77 69 74 68 20 65 atibility with e
9e10: 61 72 6c 69 65 72 0a 69 6d 70 6c 65 6d 65 6e 74 arlier.implement
9e20: 61 74 69 6f 6e 73 5c 26 2e 0a 2e 50 50 0a 5c 66 ations\&...PP.\f
9e30: 49 54 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 IThe use of the
9e40: 72 65 66 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 reference callba
9e50: 63 6b 73 20 5c 66 42 74 6c 73 3a 3a 63 61 6c 6c cks \fBtls::call
9e60: 62 61 63 6b 5c 66 52 2c 20 5c 66 42 74 6c 73 3a back\fR, \fBtls:
9e70: 3a 70 61 73 73 77 6f 72 64 5c 66 52 2c 0a 61 6e :password\fR,.an
9e80: 64 20 5c 66 42 74 6c 73 3a 3a 76 61 6c 69 64 61 d \fBtls::valida
9e90: 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 52 20 69 73 te_command\fR is
9ea0: 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 not recommended
9eb0: 5c 26 2e 20 54 68 65 79 20 6d 61 79 20 62 65 20 \&. They may be
9ec0: 72 65 6d 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 removed from fut
9ed0: 75 72 65 20 72 65 6c 65 61 73 65 73 5c 26 2e 5c ure releases\&.\
9ee0: 66 52 0a 2e 53 48 20 44 45 42 55 47 0a 46 6f 72 fR..SH DEBUG.For
9ef0: 20 6d 6f 73 74 20 64 65 62 75 67 67 69 6e 67 20 most debugging
9f00: 6e 65 65 64 73 2c 20 74 68 65 20 5c 66 42 2d 63 needs, the \fB-c
9f10: 61 6c 6c 62 61 63 6b 5c 66 52 20 6f 70 74 69 6f allback\fR optio
9f20: 6e 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f n can be used to
9f30: 20 70 72 6f 76 69 64 65 0a 73 75 66 66 69 63 69 provide.suffici
9f40: 65 6e 74 20 69 6e 73 69 67 68 74 20 61 6e 64 20 ent insight and
9f50: 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 information on t
9f60: 68 65 20 54 4c 53 20 68 61 6e 64 73 68 61 6b 65 he TLS handshake
9f70: 20 61 6e 64 20 70 72 6f 67 72 65 73 73 5c 26 2e and progress\&.
9f80: 20 49 66 0a 66 75 72 74 68 65 72 20 74 72 6f 75 If.further trou
9f90: 62 6c 65 73 68 6f 6f 74 69 6e 67 20 69 6e 73 69 bleshooting insi
9fa0: 67 68 74 20 69 73 20 6e 65 65 64 65 64 2c 20 74 ght is needed, t
9fb0: 68 65 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 he compile time
9fc0: 6f 70 74 69 6f 6e 0a 5c 66 42 2d 2d 65 6e 61 62 option.\fB--enab
9fd0: 6c 65 2d 64 65 62 75 67 5c 66 52 20 63 61 6e 20 le-debug\fR can
9fe0: 62 65 20 75 73 65 64 20 74 6f 20 67 65 74 20 64 be used to get d
9ff0: 65 74 61 69 6c 65 64 20 65 78 65 63 75 74 69 6f etailed executio
a000: 6e 20 66 6c 6f 77 20 73 74 61 74 75 73 5c 26 2e n flow status\&.
a010: 0a 2e 50 50 0a 54 4c 53 20 6b 65 79 20 6c 6f 67 ..PP.TLS key log
a020: 67 69 6e 67 20 63 61 6e 20 62 65 20 65 6e 61 62 ging can be enab
a030: 6c 65 64 20 62 79 20 73 65 74 74 69 6e 67 20 74 led by setting t
a040: 68 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 he environment v
a050: 61 72 69 61 62 6c 65 0a 5c 66 42 53 53 4c 4b 45 ariable.\fBSSLKE
a060: 59 4c 4f 47 46 49 4c 45 5c 66 52 20 74 6f 20 74 YLOGFILE\fR to t
a070: 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 66 he name of the f
a080: 69 6c 65 20 74 6f 20 6c 6f 67 20 74 6f 5c 26 2e ile to log to\&.
a090: 20 54 68 65 6e 20 77 68 65 6e 65 76 65 72 20 54 Then whenever T
a0a0: 4c 53 20 6b 65 79 0a 6d 61 74 65 72 69 61 6c 20 LS key.material
a0b0: 69 73 20 67 65 6e 65 72 61 74 65 64 20 6f 72 20 is generated or
a0c0: 72 65 63 65 69 76 65 64 20 69 74 20 77 69 6c 6c received it will
a0d0: 20 62 65 20 6c 6f 67 67 65 64 20 74 6f 20 74 68 be logged to th
a0e0: 65 20 66 69 6c 65 5c 26 2e 20 54 68 69 73 20 69 e file\&. This i
a0f0: 73 20 75 73 65 66 75 6c 0a 66 6f 72 20 6c 6f 67 s useful.for log
a100: 67 69 6e 67 20 6b 65 79 20 64 61 74 61 20 66 6f ging key data fo
a110: 72 20 6e 65 74 77 6f 72 6b 20 6c 6f 67 67 69 6e r network loggin
a120: 67 20 74 6f 6f 6c 73 20 74 6f 20 75 73 65 20 74 g tools to use t
a130: 6f 20 64 65 63 72 79 70 74 20 74 68 65 20 64 61 o decrypt the da
a140: 74 61 5c 26 2e 0a 2e 50 50 0a 54 68 65 20 5c 66 ta\&...PP.The \f
a150: 42 74 6c 73 3a 3a 64 65 62 75 67 5c 66 52 20 76 Btls::debug\fR v
a160: 61 72 69 61 62 6c 65 20 70 72 6f 76 69 64 65 73 ariable provides
a170: 20 73 6f 6d 65 20 61 64 64 69 74 69 6f 6e 61 6c some additional
a180: 20 63 6f 6e 74 72 6f 6c 20 6f 76 65 72 20 74 68 control over th
a190: 65 0a 64 65 62 75 67 20 6c 6f 67 67 69 6e 67 20 e.debug logging
a1a0: 69 6e 20 74 68 65 20 5c 66 42 74 6c 73 3a 3a 63 in the \fBtls::c
a1b0: 61 6c 6c 62 61 63 6b 5c 66 52 2c 20 5c 66 42 74 allback\fR, \fBt
a1c0: 6c 73 3a 3a 70 61 73 73 77 6f 72 64 5c 66 52 2c ls::password\fR,
a1d0: 20 61 6e 64 0a 5c 66 42 74 6c 73 3a 3a 76 61 6c and.\fBtls::val
a1e0: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 52 idate_command\fR
a1f0: 20 64 65 66 61 75 6c 74 20 68 61 6e 64 6c 65 72 default handler
a200: 73 20 69 6e 20 22 5c 66 49 74 6c 73 5c 26 2e 74 s in "\fItls\&.t
a210: 63 6c 5c 66 52 22 5c 26 2e 0a 54 68 65 20 64 65 cl\fR"\&..The de
a220: 66 61 75 6c 74 20 76 61 6c 75 65 20 69 73 20 30 fault value is 0
a230: 20 77 69 74 68 20 68 69 67 68 65 72 20 76 61 6c with higher val
a240: 75 65 73 20 70 72 6f 64 75 63 69 6e 67 20 6d 6f ues producing mo
a250: 72 65 20 64 69 61 67 6e 6f 73 74 69 63 20 6f 75 re diagnostic ou
a260: 74 70 75 74 2c 0a 61 6e 64 20 77 69 6c 6c 20 61 tput,.and will a
a270: 6c 73 6f 20 66 6f 72 63 65 20 74 68 65 20 76 65 lso force the ve
a280: 72 69 66 79 20 6d 65 74 68 6f 64 20 69 6e 20 5c rify method in \
a290: 66 42 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 5c fBtls::callback\
a2a0: 66 52 20 74 6f 20 61 63 63 65 70 74 20 74 68 65 fR to accept the
a2b0: 0a 63 65 72 74 69 66 69 63 61 74 65 2c 20 65 76 .certificate, ev
a2c0: 65 6e 20 69 66 20 69 74 20 69 73 20 69 6e 76 61 en if it is inva
a2d0: 6c 69 64 20 77 68 65 6e 20 74 68 65 20 5c 66 42 lid when the \fB
a2e0: 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 -validatecommand
a2f0: 5c 66 52 0a 6f 70 74 69 6f 6e 20 69 73 20 73 65 \fR.option is se
a300: 74 20 74 6f 20 5c 66 42 74 6c 73 3a 3a 76 61 6c t to \fBtls::val
a310: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 52 idate_command\fR
a320: 5c 26 2e 0a 2e 50 50 0a 5c 66 49 54 68 65 20 75 \&...PP.\fIThe u
a330: 73 65 20 6f 66 20 74 68 65 20 76 61 72 69 61 62 se of the variab
a340: 6c 65 20 5c 66 42 74 6c 73 3a 3a 64 65 62 75 67 le \fBtls::debug
a350: 5c 66 52 20 69 73 20 6e 6f 74 20 72 65 63 6f 6d \fR is not recom
a360: 6d 65 6e 64 65 64 5c 26 2e 0a 49 74 20 6d 61 79 mended\&..It may
a370: 20 62 65 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d be removed from
a380: 20 66 75 74 75 72 65 20 72 65 6c 65 61 73 65 73 future releases
a390: 5c 26 2e 5c 66 52 0a 2e 53 48 20 45 58 41 4d 50 \&.\fR..SH EXAMP
a3a0: 4c 45 53 0a 54 68 65 20 66 6f 6c 6c 6f 77 69 6e LES.The followin
a3b0: 67 20 61 72 65 20 65 78 61 6d 70 6c 65 20 73 63 g are example sc
a3c0: 72 69 70 74 73 20 74 6f 20 64 6f 77 6e 6c 6f 61 ripts to downloa
a3d0: 64 20 61 20 77 65 62 70 61 67 65 20 61 6e 64 20 d a webpage and
a3e0: 66 69 6c 65 20 75 73 69 6e 67 20 74 68 65 0a 68 file using the.h
a3f0: 74 74 70 20 70 61 63 6b 61 67 65 5c 26 2e 20 53 ttp package\&. S
a400: 65 65 20 5c 66 42 43 65 72 74 69 66 69 63 61 74 ee \fBCertificat
a410: 65 20 56 61 6c 69 64 61 74 69 6f 6e 5c 66 52 20 e Validation\fR
a420: 66 6f 72 20 77 68 65 6e 20 74 68 65 0a 5c 66 42 for when the.\fB
a430: 2d 63 61 64 69 72 5c 66 52 2c 20 5c 66 42 2d 63 -cadir\fR, \fB-c
a440: 61 66 69 6c 65 5c 66 52 2c 20 61 6e 64 20 5c 66 afile\fR, and \f
a450: 42 2d 63 61 73 74 6f 72 65 5c 66 52 20 6f 70 74 B-castore\fR opt
a460: 69 6f 6e 73 20 61 72 65 20 61 6c 73 6f 0a 6e 65 ions are also.ne
a470: 65 64 65 64 5c 26 2e 20 53 65 65 20 74 68 65 20 eded\&. See the
a480: 22 5c 66 49 64 65 6d 6f 73 5c 66 52 22 20 64 69 "\fIdemos\fR" di
a490: 72 65 63 74 6f 72 79 20 66 6f 72 20 6d 6f 72 65 rectory for more
a4a0: 20 65 78 61 6d 70 6c 65 20 73 63 72 69 70 74 73 example scripts
a4b0: 5c 26 2e 0a 2e 50 50 0a 45 78 61 6d 70 6c 65 20 \&...PP.Example
a4c0: 23 31 3a 20 44 6f 77 6e 6c 6f 61 64 20 61 20 77 #1: Download a w
a4d0: 65 62 20 70 61 67 65 0a 2e 43 53 0a 0a 0a 0a 70 eb page..CS....p
a4e0: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 ackage require h
a4f0: 74 74 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 ttp.package requ
a500: 69 72 65 20 74 6c 73 0a 0a 73 65 74 20 75 72 6c ire tls..set url
a510: 20 22 68 74 74 70 73 3a 2f 2f 77 77 77 5c 26 2e "https://www\&.
a520: 74 63 6c 5c 26 2e 74 6b 2f 22 0a 68 74 74 70 3a tcl\&.tk/".http:
a530: 3a 72 65 67 69 73 74 65 72 20 68 74 74 70 73 20 :register https
a540: 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a 443 [list ::tls:
a550: 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73 65 72 :socket -autoser
a560: 76 65 72 6e 61 6d 65 20 31 20 2d 72 65 71 75 69 vername 1 -requi
a570: 72 65 20 31 5d 0a 0a 23 20 47 65 74 20 55 52 4c re 1]..# Get URL
a580: 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 68 74 74 70 .set token [http
a590: 3a 3a 67 65 74 75 72 6c 20 24 75 72 6c 5d 0a 0a ::geturl $url]..
a5a0: 23 20 43 68 65 63 6b 20 66 6f 72 20 65 72 72 6f # Check for erro
a5b0: 72 0a 69 66 20 7b 5b 68 74 74 70 3a 3a 73 74 61 r.if {[http::sta
a5c0: 74 75 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 20 22 tus $token] ne "
a5d0: 6f 6b 22 7d 20 7b 0a 20 20 20 20 70 75 74 73 20 ok"} {. puts
a5e0: 5b 66 6f 72 6d 61 74 20 22 45 72 72 6f 72 20 25 [format "Error %
a5f0: 73 22 20 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 s" [http::status
a600: 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 0a 23 20 53 $token]].}..# S
a610: 61 76 65 20 77 65 62 20 70 61 67 65 20 74 6f 20 ave web page to
a620: 66 69 6c 65 0a 73 65 74 20 63 68 20 5b 6f 70 65 file.set ch [ope
a630: 6e 20 65 78 61 6d 70 6c 65 5c 26 2e 68 74 6d 6c n example\&.html
a640: 20 77 62 5d 0a 70 75 74 73 20 24 63 68 20 5b 68 wb].puts $ch [h
a650: 74 74 70 3a 3a 64 61 74 61 20 24 74 6f 6b 65 6e ttp::data $token
a660: 5d 0a 63 6c 6f 73 65 20 24 63 68 0a 0a 23 20 43 ].close $ch..# C
a670: 6c 65 61 6e 75 70 0a 3a 3a 68 74 74 70 3a 3a 63 leanup.::http::c
a680: 6c 65 61 6e 75 70 20 24 74 6f 6b 65 6e 0a 0a 2e leanup $token...
a690: 43 45 0a 45 78 61 6d 70 6c 65 20 23 32 3a 20 44 CE.Example #2: D
a6a0: 6f 77 6e 6c 6f 61 64 20 61 20 66 69 6c 65 0a 2e ownload a file..
a6b0: 43 53 0a 0a 0a 0a 70 61 63 6b 61 67 65 20 72 65 CS....package re
a6c0: 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61 quire http.packa
a6d0: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a 0a ge require tls..
a6e0: 73 65 74 20 75 72 6c 20 22 68 74 74 70 73 3a 2f set url "https:/
a6f0: 2f 77 69 6b 69 5c 26 2e 74 63 6c 2d 6c 61 6e 67 /wiki\&.tcl-lang
a700: 5c 26 2e 6f 72 67 2f 73 69 74 65 6d 61 70 5c 26 \&.org/sitemap\&
a710: 2e 78 6d 6c 22 0a 68 74 74 70 3a 3a 72 65 67 69 .xml".http::regi
a720: 73 74 65 72 20 68 74 74 70 73 20 34 34 33 20 5b ster https 443 [
a730: 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b list ::tls::sock
a740: 65 74 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 et -autoserverna
a750: 6d 65 20 31 20 2d 72 65 71 75 69 72 65 20 31 5d me 1 -require 1]
a760: 0a 0a 23 20 4f 70 65 6e 20 6f 75 74 70 75 74 20 ..# Open output
a770: 66 69 6c 65 0a 73 65 74 20 66 69 6c 65 6e 61 6d file.set filenam
a780: 65 20 5b 66 69 6c 65 20 74 61 69 6c 20 24 75 72 e [file tail $ur
a790: 6c 5d 0a 73 65 74 20 63 68 20 5b 6f 70 65 6e 20 l].set ch [open
a7a0: 24 66 69 6c 65 6e 61 6d 65 20 77 62 5d 0a 0a 23 $filename wb]..#
a7b0: 20 47 65 74 20 66 69 6c 65 0a 73 65 74 20 74 6f Get file.set to
a7c0: 6b 65 6e 20 5b 3a 3a 68 74 74 70 3a 3a 67 65 74 ken [::http::get
a7d0: 75 72 6c 20 24 75 72 6c 20 2d 62 6c 6f 63 6b 73 url $url -blocks
a7e0: 69 7a 65 20 36 35 35 33 36 20 2d 63 68 61 6e 6e ize 65536 -chann
a7f0: 65 6c 20 24 63 68 5d 0a 0a 23 20 43 68 65 63 6b el $ch]..# Check
a800: 20 66 6f 72 20 65 72 72 6f 72 0a 69 66 20 7b 5b for error.if {[
a810: 68 74 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f http::status $to
a820: 6b 65 6e 5d 20 6e 65 20 22 6f 6b 22 7d 20 7b 0a ken] ne "ok"} {.
a830: 20 20 20 20 70 75 74 73 20 5b 66 6f 72 6d 61 74 puts [format
a840: 20 22 45 72 72 6f 72 20 25 73 22 20 5b 68 74 74 "Error %s" [htt
a850: 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e p::status $token
a860: 5d 5d 0a 7d 0a 0a 23 20 43 6c 65 61 6e 75 70 0a ]].}..# Cleanup.
a870: 63 6c 6f 73 65 20 24 63 68 0a 3a 3a 68 74 74 70 close $ch.::http
a880: 3a 3a 63 6c 65 61 6e 75 70 20 24 74 6f 6b 65 6e ::cleanup $token
a890: 0a 0a 2e 43 45 0a 2e 53 48 20 22 53 50 45 43 49 ...CE..SH "SPECI
a8a0: 41 4c 20 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e AL CONSIDERATION
a8b0: 53 22 0a 54 68 65 20 63 61 70 61 62 69 6c 69 74 S".The capabilit
a8c0: 69 65 73 20 6f 66 20 74 68 69 73 20 70 61 63 6b ies of this pack
a8d0: 61 67 65 20 63 61 6e 20 76 61 72 79 20 65 6e 6f age can vary eno
a8e0: 72 6d 6f 75 73 6c 79 20 62 61 73 65 64 20 75 70 rmously based up
a8f0: 6f 6e 20 68 6f 77 20 74 68 65 0a 6c 69 6e 6b 65 on how the.linke
a900: 64 20 74 6f 20 4f 70 65 6e 53 53 4c 20 6c 69 62 d to OpenSSL lib
a910: 72 61 72 79 20 77 61 73 20 63 6f 6e 66 69 67 75 rary was configu
a920: 72 65 64 20 61 6e 64 20 62 75 69 6c 74 5c 26 2e red and built\&.
a930: 20 4e 65 77 20 76 65 72 73 69 6f 6e 73 20 6d 61 New versions ma
a940: 79 20 6f 62 73 6f 6c 65 74 65 0a 6f 6c 64 65 72 y obsolete.older
a950: 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f protocol versio
a960: 6e 73 2c 20 61 64 64 20 6f 72 20 72 65 6d 6f 76 ns, add or remov
a970: 65 20 63 69 70 68 65 72 73 2c 20 63 68 61 6e 67 e ciphers, chang
a980: 65 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65 73 e default values
a990: 2c 20 65 74 63 5c 26 2e 0a 55 73 65 20 74 68 65 , etc\&..Use the
a9a0: 20 5c 66 42 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f \fBtls::protoco
a9b0: 6c 73 5c 66 52 20 63 6f 6d 6d 61 6e 64 73 20 74 ls\fR commands t
a9c0: 6f 20 6f 62 74 61 69 6e 20 74 68 65 20 73 75 70 o obtain the sup
a9d0: 70 6f 72 74 65 64 0a 70 72 6f 74 6f 63 6f 6c 20 ported.protocol
a9e0: 76 65 72 73 69 6f 6e 73 5c 26 2e 0a 2e 53 48 20 versions\&...SH
a9f0: 22 53 45 45 20 41 4c 53 4f 22 0a 5c 66 49 4f 70 "SEE ALSO".\fIOp
aa00: 65 6e 53 53 4c 5c 66 52 20 5b 68 74 74 70 73 3a enSSL\fR [https:
aa10: 2f 2f 77 77 77 5c 26 2e 6f 70 65 6e 73 73 6c 5c //www\&.openssl\
aa20: 26 2e 6f 72 67 2f 5d 2c 20 68 74 74 70 2c 20 73 &.org/], http, s
aa30: 6f 63 6b 65 74 0a 2e 53 48 20 4b 45 59 57 4f 52 ocket..SH KEYWOR
aa40: 44 53 0a 49 2f 4f 2c 20 49 50 20 41 64 64 72 65 DS.I/O, IP Addre
aa50: 73 73 2c 20 4f 70 65 6e 53 53 4c 2c 20 53 53 4c ss, OpenSSL, SSL
aa60: 2c 20 54 43 50 2c 20 54 4c 53 2c 20 54 63 6c 54 , TCP, TLS, TclT
aa70: 4c 53 2c 20 61 73 79 6e 63 68 72 6f 6e 6f 75 73 LS, asynchronous
aa80: 20 49 2f 4f 2c 20 62 69 6e 64 2c 20 63 65 72 74 I/O, bind, cert
aa90: 69 66 69 63 61 74 65 2c 20 63 68 61 6e 6e 65 6c ificate, channel
aaa0: 2c 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 64 6f , connection, do
aab0: 6d 61 69 6e 20 6e 61 6d 65 2c 20 68 6f 73 74 2c main name, host,
aac0: 20 68 74 74 70 73 2c 20 6e 65 74 77 6f 72 6b 2c https, network,
aad0: 20 6e 65 74 77 6f 72 6b 20 61 64 64 72 65 73 73 network address
aae0: 2c 20 73 6f 63 6b 65 74 2c 20 74 6c 73 0a 2e 53 , socket, tls..S
aaf0: 48 20 43 41 54 45 47 4f 52 59 0a 74 6c 73 0a 2e H CATEGORY.tls..
ab00: 53 48 20 43 4f 50 59 52 49 47 48 54 0a 2e 6e 66 SH COPYRIGHT..nf
ab10: 0a 43 6f 70 79 72 69 67 68 74 20 28 63 29 20 31 .Copyright (c) 1
ab20: 39 39 39 20 4d 61 74 74 20 4e 65 77 6d 61 6e 0a 999 Matt Newman.
ab30: 43 6f 70 79 72 69 67 68 74 20 28 63 29 20 32 30 Copyright (c) 20
ab40: 30 34 20 53 74 61 72 66 69 73 68 20 53 79 73 74 04 Starfish Syst
ab50: 65 6d 73 0a 43 6f 70 79 72 69 67 68 74 20 28 63 ems.Copyright (c
ab60: 29 20 32 30 32 34 20 42 72 69 61 6e 20 4f 27 48 ) 2024 Brian O'H
ab70: 61 67 61 6e 0a 0a 2e 66 69 0a agan...fi.