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 4d 41 4e 44 53 0a 54 68 65 20 66 6f 6c 6c 6f MMANDS.The follo
1d00: 77 69 6e 67 20 61 72 65 20 74 68 65 20 63 6f 6d wing are the com
1d10: 6d 61 6e 64 73 20 70 72 6f 76 69 64 65 64 20 62 mands provided b
1d20: 79 20 74 68 65 20 54 63 4c 54 4c 53 20 70 61 63 y the TcLTLS pac
1d30: 6b 61 67 65 5c 26 2e 20 53 65 65 20 74 68 65 0a kage\&. See the.
1d40: 5c 66 42 45 78 61 6d 70 6c 65 73 5c 66 52 20 66 \fBExamples\fR f
1d50: 6f 72 20 65 78 61 6d 70 6c 65 20 75 73 61 67 65 or example usage
1d60: 20 61 6e 64 20 74 68 65 20 22 5c 66 49 64 65 6d and the "\fIdem
1d70: 6f 73 5c 66 52 22 20 64 69 72 65 63 74 6f 72 79 os\fR" directory
1d80: 20 66 6f 72 0a 6d 6f 72 65 20 65 78 61 6d 70 6c for.more exampl
1d90: 65 20 75 73 61 67 65 5c 26 2e 0a 2e 54 50 0a 5c e usage\&...TP.\
1da0: 66 42 74 6c 73 3a 3a 69 6e 69 74 5c 66 52 20 3f fBtls::init\fR ?
1db0: 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 3f 20 3f \fI-option\fR? ?
1dc0: 5c 66 49 76 61 6c 75 65 5c 66 52 3f 20 3f 5c 66 \fIvalue\fR? ?\f
1dd0: 49 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 5c I-option value \
1de0: 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 0a 4f 70 74 &.\&.\&.\fR?.Opt
1df0: 69 6f 6e 61 6c 20 66 75 6e 63 74 69 6f 6e 20 74 ional function t
1e00: 6f 20 73 65 74 20 74 68 65 20 64 65 66 61 75 6c o set the defaul
1e10: 74 20 6f 70 74 69 6f 6e 73 20 75 73 65 64 20 62 t options used b
1e20: 79 20 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 y \fBtls::socket
1e30: 5c 66 52 5c 26 2e 20 49 66 20 79 6f 75 0a 63 61 \fR\&. If you.ca
1e40: 6c 6c 20 5c 66 42 74 6c 73 3a 3a 69 6d 70 6f 72 ll \fBtls::impor
1e50: 74 5c 66 52 20 64 69 72 65 63 74 6c 79 2c 20 74 t\fR directly, t
1e60: 68 65 20 76 61 6c 75 65 73 20 73 65 74 20 62 79 he values set by
1e70: 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 20 68 61 this command ha
1e80: 76 65 20 6e 6f 20 65 66 66 65 63 74 5c 26 2e 0a ve no effect\&..
1e90: 54 68 69 73 20 63 6f 6d 6d 61 6e 64 20 73 75 70 This command sup
1ea0: 70 6f 72 74 73 20 61 6c 6c 20 6f 66 20 74 68 65 ports all of the
1eb0: 20 73 61 6d 65 20 6f 70 74 69 6f 6e 73 20 61 73 same options as
1ec0: 20 74 68 65 20 5c 66 42 74 6c 73 3a 3a 73 6f 63 the \fBtls::soc
1ed0: 6b 65 74 5c 66 52 20 63 6f 6d 6d 61 6e 64 2c 0a ket\fR command,.
1ee0: 74 68 6f 75 67 68 20 79 6f 75 20 73 68 6f 75 6c though you shoul
1ef0: 64 20 6c 69 6d 69 74 20 79 6f 75 72 20 6f 70 74 d limit your opt
1f00: 69 6f 6e 73 20 74 6f 20 6f 6e 6c 79 20 54 4c 53 ions to only TLS
1f10: 20 72 65 6c 61 74 65 64 20 6f 6e 65 73 5c 26 2e related ones\&.
1f20: 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 73 6f 63 ..TP.\fBtls::soc
1f30: 6b 65 74 5c 66 52 20 3f 5c 66 49 2d 6f 70 74 69 ket\fR ?\fI-opti
1f40: 6f 6e 5c 66 52 3f 20 3f 5c 66 49 76 61 6c 75 65 on\fR? ?\fIvalue
1f50: 5c 66 52 3f 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e \fR? ?\fI-option
1f60: 20 76 61 6c 75 65 20 5c 26 2e 5c 26 2e 5c 26 2e value \&.\&.\&.
1f70: 5c 66 52 3f 20 5c 66 49 68 6f 73 74 5c 66 52 20 \fR? \fIhost\fR
1f80: 5c 66 49 70 6f 72 74 5c 66 52 0a 54 68 69 73 20 \fIport\fR.This
1f90: 69 73 20 61 20 68 65 6c 70 65 72 20 66 75 6e 63 is a helper func
1fa0: 74 69 6f 6e 20 74 68 61 74 20 75 74 69 6c 69 7a tion that utiliz
1fb0: 65 73 20 74 68 65 20 75 6e 64 65 72 6c 79 69 6e es the underlyin
1fc0: 67 20 63 6f 6d 6d 61 6e 64 73 20 5c 66 42 73 6f g commands \fBso
1fd0: 63 6b 65 74 5c 66 52 0a 61 6e 64 20 5c 66 42 74 cket\fR.and \fBt
1fe0: 6c 73 3a 3a 69 6d 70 6f 72 74 5c 66 52 20 74 6f ls::import\fR to
1ff0: 20 63 72 65 61 74 65 20 74 68 65 20 63 6f 6e 6e create the conn
2000: 65 63 74 69 6f 6e 5c 26 2e 20 49 74 20 62 65 68 ection\&. It beh
2010: 61 76 65 73 20 74 68 65 20 73 61 6d 65 20 61 73 aves the same as
2020: 20 74 68 65 0a 6e 61 74 69 76 65 20 54 43 4c 20 the.native TCL
2030: 5c 66 42 73 6f 63 6b 65 74 5c 66 52 20 63 6f 6d \fBsocket\fR com
2040: 6d 61 6e 64 2c 20 62 75 74 20 61 6c 73 6f 20 73 mand, but also s
2050: 75 70 70 6f 72 74 73 20 74 68 65 20 5c 66 42 74 upports the \fBt
2060: 6c 73 3a 69 6d 70 6f 72 74 5c 66 52 0a 63 6f 6d ls:import\fR.com
2070: 6d 61 6e 64 20 6f 70 74 69 6f 6e 73 20 77 69 74 mand options wit
2080: 68 20 6f 6e 65 20 61 64 64 69 74 69 6f 6e 61 6c h one additional
2090: 20 6f 70 74 69 6f 6e 5c 26 2e 20 49 74 20 72 65 option\&. It re
20a0: 74 75 72 6e 73 20 74 68 65 20 63 68 61 6e 6e 65 turns the channe
20b0: 6c 20 68 61 6e 64 6c 65 20 69 64 0a 66 6f 72 20 l handle id.for
20c0: 74 68 65 20 6e 65 77 20 73 6f 63 6b 65 74 5c 26 the new socket\&
20d0: 2e 0a 2e 52 53 0a 2e 54 50 0a 5c 66 42 2d 61 75 ...RS..TP.\fB-au
20e0: 74 6f 73 65 72 76 65 72 6e 61 6d 65 5c 66 52 20 toservername\fR
20f0: 5c 66 49 62 6f 6f 6c 5c 66 52 0a 49 66 20 5c 66 \fIbool\fR.If \f
2100: 42 74 72 75 65 5c 66 52 2c 20 61 75 74 6f 6d 61 Btrue\fR, automa
2110: 74 69 63 61 6c 6c 79 20 73 65 74 20 74 68 65 20 tically set the
2120: 5c 66 42 2d 73 65 72 76 65 72 6e 61 6d 65 5c 66 \fB-servername\f
2130: 52 20 61 72 67 75 6d 65 6e 74 20 74 6f 20 74 68 R argument to th
2140: 65 0a 5c 66 49 68 6f 73 74 5c 66 52 20 61 72 67 e.\fIhost\fR arg
2150: 75 6d 65 6e 74 5c 26 2e 20 50 72 69 6f 72 20 74 ument\&. Prior t
2160: 6f 20 54 63 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 o TclTLS 2\&.0,
2170: 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 5c the default is \
2180: 66 42 66 61 6c 73 65 5c 66 52 5c 26 2e 0a 53 74 fBfalse\fR\&..St
2190: 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 arting in TclTLS
21a0: 20 32 5c 26 2e 30 2c 20 74 68 65 20 64 65 66 61 2\&.0, the defa
21b0: 75 6c 74 20 69 73 20 5c 66 42 74 72 75 65 5c 66 ult is \fBtrue\f
21c0: 52 20 75 6e 6c 65 73 73 20 5c 66 42 2d 73 65 72 R unless \fB-ser
21d0: 76 65 72 6e 61 6d 65 5c 66 52 0a 69 73 20 61 6c vername\fR.is al
21e0: 73 6f 20 73 70 65 63 69 66 69 65 64 5c 26 2e 0a so specified\&..
21f0: 2e 52 45 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a .RE..TP.\fBtls::
2200: 73 6f 63 6b 65 74 5c 66 52 20 5c 66 42 2d 73 65 socket\fR \fB-se
2210: 72 76 65 72 5c 66 52 20 5c 66 49 63 6f 6d 6d 61 rver\fR \fIcomma
2220: 6e 64 5c 66 52 20 3f 5c 66 49 2d 6f 70 74 69 6f nd\fR ?\fI-optio
2230: 6e 5c 66 52 3f 20 3f 5c 66 49 76 61 6c 75 65 5c n\fR? ?\fIvalue\
2240: 66 52 3f 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 20 fR? ?\fI-option
2250: 76 61 6c 75 65 20 5c 26 2e 5c 26 2e 5c 26 2e 5c value \&.\&.\&.\
2260: 66 52 3f 20 5c 66 49 70 6f 72 74 5c 66 52 0a 53 fR? \fIport\fR.S
2270: 61 6d 65 20 61 73 20 70 72 65 76 69 6f 75 73 2c ame as previous,
2280: 20 62 75 74 20 69 6e 73 74 65 61 64 20 63 72 65 but instead cre
2290: 61 74 65 73 20 61 20 73 65 72 76 65 72 20 73 6f ates a server so
22a0: 63 6b 65 74 20 66 6f 72 20 63 6c 69 65 6e 74 73 cket for clients
22b0: 20 74 6f 20 63 6f 6e 6e 65 63 74 20 74 6f 0a 6a to connect to.j
22c0: 75 73 74 20 6c 69 6b 65 20 74 68 65 20 54 63 6c ust like the Tcl
22d0: 20 5c 66 42 73 6f 63 6b 65 74 20 2d 73 65 72 76 \fBsocket -serv
22e0: 65 72 5c 66 52 20 63 6f 6d 6d 61 6e 64 5c 26 2e er\fR command\&.
22f0: 20 49 74 20 72 65 74 75 72 6e 73 20 74 68 65 20 It returns the
2300: 63 68 61 6e 6e 65 6c 0a 68 61 6e 64 6c 65 20 69 channel.handle i
2310: 64 20 66 6f 72 20 74 68 65 20 6e 65 77 20 73 6f d for the new so
2320: 63 6b 65 74 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 cket\&...TP.\fBt
2330: 6c 73 3a 3a 69 6d 70 6f 72 74 5c 66 52 20 5c 66 ls::import\fR \f
2340: 49 63 68 61 6e 6e 65 6c 5c 66 52 20 3f 5c 66 49 Ichannel\fR ?\fI
2350: 2d 6f 70 74 69 6f 6e 5c 66 52 3f 20 3f 5c 66 49 -option\fR? ?\fI
2360: 76 61 6c 75 65 5c 66 52 3f 20 3f 5c 66 49 2d 6f value\fR? ?\fI-o
2370: 70 74 69 6f 6e 20 76 61 6c 75 65 20 5c 26 2e 5c ption value \&.\
2380: 26 2e 5c 26 2e 5c 66 52 3f 0a 53 74 61 72 74 20 &.\&.\fR?.Start
2390: 54 4c 53 20 65 6e 63 72 79 70 74 69 6f 6e 20 6f TLS encryption o
23a0: 6e 20 54 43 4c 20 63 68 61 6e 6e 65 6c 20 5c 66 n TCL channel \f
23b0: 49 63 68 61 6e 6e 65 6c 5c 66 52 20 76 69 61 20 Ichannel\fR via
23c0: 61 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 a stacked channe
23d0: 6c 5c 26 2e 20 49 74 0a 6e 65 65 64 20 6e 6f 74 l\&. It.need not
23e0: 20 62 65 20 61 20 73 6f 63 6b 65 74 2c 20 62 75 be a socket, bu
23f0: 74 20 6d 75 73 74 20 70 72 6f 76 69 64 65 20 62 t must provide b
2400: 69 2d 64 69 72 65 63 74 69 6f 6e 61 6c 20 66 6c i-directional fl
2410: 6f 77 5c 26 2e 20 41 6c 73 6f 20 73 65 74 73 20 ow\&. Also sets
2420: 73 65 73 73 69 6f 6e 0a 70 61 72 61 6d 65 74 65 session.paramete
2430: 72 73 20 66 6f 72 20 53 53 4c 20 68 61 6e 64 73 rs for SSL hands
2440: 68 61 6b 65 5c 26 2e 20 56 61 6c 69 64 20 6f 70 hake\&. Valid op
2450: 74 69 6f 6e 73 20 61 72 65 3a 0a 2e 52 53 0a 2e tions are:..RS..
2460: 54 50 0a 5c 66 42 2d 61 6c 70 6e 5c 66 52 20 5c TP.\fB-alpn\fR \
2470: 66 49 6c 69 73 74 5c 66 52 0a 4c 69 73 74 20 6f fIlist\fR.List o
2480: 66 20 70 72 6f 74 6f 63 6f 6c 73 20 74 6f 20 6f f protocols to o
2490: 66 66 65 72 20 64 75 72 69 6e 67 20 41 70 70 6c ffer during Appl
24a0: 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 ication-Layer Pr
24b0: 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69 otocol Negotiati
24c0: 6f 6e 0a 28 41 4c 50 4e 29 5c 26 2e 20 46 6f 72 on.(ALPN)\&. For
24d0: 20 65 78 61 6d 70 6c 65 3a 20 5c 66 42 68 32 5c example: \fBh2\
24e0: 66 52 20 61 6e 64 20 5c 66 42 68 74 74 70 2f 31 fR and \fBhttp/1
24f0: 5c 26 2e 31 5c 66 52 2c 20 62 75 74 20 6e 6f 74 \&.1\fR, but not
2500: 20 5c 66 42 68 33 5c 66 52 20 6f 72 0a 5c 66 42 \fBh3\fR or.\fB
2510: 71 75 69 63 5c 66 52 5c 26 2e 20 54 68 69 73 20 quic\fR\&. This
2520: 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f option is new fo
2530: 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 r TclTLS 1\&.8\&
2540: 2e 0a 2e 54 50 0a 5c 66 42 2d 63 61 64 69 72 5c ...TP.\fB-cadir\
2550: 66 52 20 5c 66 49 64 69 72 65 63 74 6f 72 79 5c fR \fIdirectory\
2560: 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 fR.Specifies the
2570: 20 64 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 directory where
2580: 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 the Certificate
2590: 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 Authority (CA)
25a0: 63 65 72 74 69 66 69 63 61 74 65 73 20 61 72 65 certificates are
25b0: 0a 73 74 6f 72 65 64 5c 26 2e 20 54 68 65 20 64 .stored\&. The d
25c0: 65 66 61 75 6c 74 20 69 73 20 70 6c 61 74 66 6f efault is platfo
25d0: 72 6d 20 73 70 65 63 69 66 69 63 20 61 6e 64 20 rm specific and
25e0: 63 61 6e 20 62 65 20 73 65 74 20 61 74 20 63 6f can be set at co
25f0: 6d 70 69 6c 65 20 74 69 6d 65 5c 26 2e 20 54 68 mpile time\&. Th
2600: 65 0a 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 69 e.default locati
2610: 6f 6e 20 63 61 6e 20 62 65 20 6f 76 65 72 72 69 on can be overri
2620: 64 64 65 6e 20 62 79 20 74 68 65 20 5c 66 42 53 dden by the \fBS
2630: 53 4c 5f 43 45 52 54 5f 44 49 52 5c 66 52 20 65 SL_CERT_DIR\fR e
2640: 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 61 72 69 61 nvironment.varia
2650: 62 6c 65 5c 26 2e 20 53 65 65 20 5c 66 42 43 65 ble\&. See \fBCe
2660: 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 rtificate Valida
2670: 74 69 6f 6e 5c 66 52 20 66 6f 72 20 6d 6f 72 65 tion\fR for more
2680: 20 64 65 74 61 69 6c 73 5c 26 2e 0a 2e 54 50 0a details\&...TP.
2690: 5c 66 42 2d 63 61 66 69 6c 65 5c 66 52 20 5c 66 \fB-cafile\fR \f
26a0: 49 66 69 6c 65 6e 61 6d 65 5c 66 52 0a 53 70 65 Ifilename\fR.Spe
26b0: 63 69 66 69 65 73 20 74 68 65 20 66 69 6c 65 20 cifies the file
26c0: 77 69 74 68 20 74 68 65 20 43 65 72 74 69 66 69 with the Certifi
26d0: 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20 28 cate Authority (
26e0: 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65 73 CA) certificates
26f0: 20 74 6f 20 75 73 65 20 69 6e 0a 5c 66 42 50 45 to use in.\fBPE
2700: 4d 5c 66 52 20 66 69 6c 65 20 66 6f 72 6d 61 74 M\fR file format
2710: 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 \&. The default
2720: 69 73 20 22 5c 66 49 63 65 72 74 5c 26 2e 70 65 is "\fIcert\&.pe
2730: 6d 5c 66 52 22 2c 20 69 6e 20 74 68 65 20 4f 70 m\fR", in the Op
2740: 65 6e 53 53 4c 0a 64 69 72 65 63 74 6f 72 79 5c enSSL.directory\
2750: 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 66 &. The default f
2760: 69 6c 65 20 63 61 6e 20 62 65 20 6f 76 65 72 72 ile can be overr
2770: 69 64 64 65 6e 20 62 79 20 74 68 65 20 5c 66 42 idden by the \fB
2780: 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 5c 66 52 SSL_CERT_FILE\fR
2790: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 61 72 environment.var
27a0: 69 61 62 6c 65 5c 26 2e 20 53 65 65 20 5c 66 42 iable\&. See \fB
27b0: 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 Certificate Vali
27c0: 64 61 74 69 6f 6e 5c 66 52 20 66 6f 72 20 6d 6f dation\fR for mo
27d0: 72 65 20 64 65 74 61 69 6c 73 5c 26 2e 0a 2e 54 re details\&...T
27e0: 50 0a 5c 66 42 2d 63 61 73 74 6f 72 65 5c 66 52 P.\fB-castore\fR
27f0: 20 5c 66 49 55 52 49 5c 66 52 0a 53 70 65 63 69 \fIURI\fR.Speci
2800: 66 69 65 73 20 74 68 65 20 55 6e 69 66 6f 72 6d fies the Uniform
2810: 20 52 65 73 6f 75 72 63 65 20 49 64 65 6e 74 69 Resource Identi
2820: 66 69 65 72 20 28 55 52 49 29 20 66 6f 72 20 74 fier (URI) for t
2830: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41 he Certificate A
2840: 75 74 68 6f 72 69 74 79 0a 28 43 41 29 20 73 74 uthority.(CA) st
2850: 6f 72 65 2c 20 77 68 69 63 68 20 6d 61 79 20 62 ore, which may b
2860: 65 20 61 20 73 69 6e 67 6c 65 20 63 6f 6e 74 61 e a single conta
2870: 69 6e 65 72 20 6f 72 20 61 20 63 61 74 61 6c 6f iner or a catalo
2880: 67 20 6f 66 20 63 6f 6e 74 61 69 6e 65 72 73 5c g of containers\
2890: 26 2e 0a 53 74 61 72 74 69 6e 67 20 77 69 74 68 &..Starting with
28a0: 20 4f 70 65 6e 53 53 4c 20 33 5c 26 2e 32 20 6f OpenSSL 3\&.2 o
28b0: 6e 20 4d 53 20 57 69 6e 64 6f 77 73 2c 20 73 65 n MS Windows, se
28c0: 74 20 74 6f 20 22 5c 66 42 6f 72 67 5c 26 2e 6f t to "\fBorg\&.o
28d0: 70 65 6e 73 73 6c 5c 26 2e 77 69 6e 73 74 6f 72 penssl\&.winstor
28e0: 65 3a 2f 2f 5c 66 52 22 0a 74 6f 20 75 73 65 20 e://\fR".to use
28f0: 74 68 65 20 62 75 69 6c 74 2d 69 6e 20 4d 53 20 the built-in MS
2900: 57 69 6e 64 6f 77 73 20 43 65 72 74 69 66 69 63 Windows Certific
2910: 61 74 65 20 53 74 6f 72 65 5c 26 2e 0a 53 65 65 ate Store\&..See
2920: 20 5c 66 42 43 65 72 74 69 66 69 63 61 74 65 20 \fBCertificate
2930: 56 61 6c 69 64 61 74 69 6f 6e 5c 66 52 20 66 6f Validation\fR fo
2940: 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 5c 26 r more details\&
2950: 2e 0a 54 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 ..This option is
2960: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
2970: 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 1\&.8\&...TP.\fB
2980: 2d 63 65 72 74 66 69 6c 65 5c 66 52 20 5c 66 49 -certfile\fR \fI
2990: 66 69 6c 65 6e 61 6d 65 5c 66 52 0a 53 70 65 63 filename\fR.Spec
29a0: 69 66 69 65 73 20 74 68 65 20 6e 61 6d 65 20 6f ifies the name o
29b0: 66 20 74 68 65 20 66 69 6c 65 20 77 69 74 68 20 f the file with
29c0: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
29d0: 74 6f 20 75 73 65 20 69 6e 20 50 45 4d 20 66 6f to use in PEM fo
29e0: 72 6d 61 74 0a 61 73 20 74 68 65 20 6c 6f 63 61 rmat.as the loca
29f0: 6c 20 28 63 6c 69 65 6e 74 20 6f 72 20 73 65 72 l (client or ser
2a00: 76 65 72 29 20 63 65 72 74 69 66 69 63 61 74 65 ver) certificate
2a10: 5c 26 2e 20 49 74 20 61 6c 73 6f 20 63 6f 6e 74 \&. It also cont
2a20: 61 69 6e 73 20 74 68 65 20 70 75 62 6c 69 63 20 ains the public
2a30: 6b 65 79 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 key\&...TP.\fB-c
2a40: 65 72 74 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 ert\fR \fIstring
2a50: 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 \fR.Specifies th
2a60: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 74 6f e certificate to
2a70: 20 75 73 65 20 61 73 20 61 20 44 45 52 20 65 6e use as a DER en
2a80: 63 6f 64 65 64 20 73 74 72 69 6e 67 20 28 58 5c coded string (X\
2a90: 26 2e 35 30 39 20 44 45 52 29 5c 26 2e 0a 2e 54 &.509 DER)\&...T
2aa0: 50 0a 5c 66 42 2d 63 69 70 68 65 72 5c 66 52 20 P.\fB-cipher\fR
2ab0: 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 53 70 65 \fIstring\fR.Spe
2ac0: 63 69 66 69 65 73 20 74 68 65 20 6c 69 73 74 20 cifies the list
2ad0: 6f 66 20 63 69 70 68 65 72 73 20 74 6f 20 75 73 of ciphers to us
2ae0: 65 20 66 6f 72 20 54 4c 53 20 31 5c 26 2e 32 20 e for TLS 1\&.2
2af0: 61 6e 64 20 65 61 72 6c 69 65 72 20 63 6f 6e 6e and earlier conn
2b00: 65 63 74 69 6f 6e 73 5c 26 2e 0a 53 74 72 69 6e ections\&..Strin
2b10: 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20 22 5c 66 g is a colon "\f
2b20: 42 3a 5c 66 52 22 20 73 65 70 61 72 61 74 65 64 B:\fR" separated
2b30: 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72 73 list of ciphers
2b40: 5c 26 2e 0a 43 69 70 68 65 72 73 20 63 61 6e 20 \&..Ciphers can
2b50: 62 65 20 63 6f 6d 62 69 6e 65 64 20 75 73 69 6e be combined usin
2b60: 67 20 74 68 65 20 22 5c 66 42 2b 5c 66 52 22 20 g the "\fB+\fR"
2b70: 63 68 61 72 61 63 74 65 72 5c 26 2e 0a 50 72 65 character\&..Pre
2b80: 66 69 78 65 73 20 63 61 6e 20 62 65 20 75 73 65 fixes can be use
2b90: 64 20 74 6f 20 70 65 72 6d 61 6e 65 6e 74 6c 79 d to permanently
2ba0: 20 72 65 6d 6f 76 65 20 22 5c 66 42 21 5c 66 52 remove "\fB!\fR
2bb0: 22 2c 20 64 65 6c 65 74 65 20 22 5c 66 42 2d 5c ", delete "\fB-\
2bc0: 66 52 22 2c 20 6f 72 0a 6d 6f 76 65 20 74 6f 20 fR", or.move to
2bd0: 74 68 65 20 65 6e 64 20 22 5c 66 42 2b 5c 66 52 the end "\fB+\fR
2be0: 22 20 61 20 73 70 65 63 69 66 69 65 64 20 63 69 " a specified ci
2bf0: 70 68 65 72 5c 26 2e 0a 4b 65 79 77 6f 72 64 73 pher\&..Keywords
2c00: 20 5c 66 42 40 53 54 52 45 4e 47 54 48 5c 66 52 \fB@STRENGTH\fR
2c10: 20 28 73 6f 72 74 20 62 79 20 61 6c 67 6f 72 69 (sort by algori
2c20: 74 68 6d 20 6b 65 79 20 6c 65 6e 67 74 68 29 2c thm key length),
2c30: 0a 5c 66 42 40 53 45 43 4c 45 56 45 4c 3d 5c 66 .\fB@SECLEVEL=\f
2c40: 52 5c 66 49 6e 5c 66 52 20 28 73 65 74 20 73 65 R\fIn\fR (set se
2c50: 63 75 72 69 74 79 20 6c 65 76 65 6c 20 74 6f 20 curity level to
2c60: 6e 29 2c 20 61 6e 64 0a 5c 66 42 44 45 46 41 55 n), and.\fBDEFAU
2c70: 4c 54 5c 66 52 20 28 75 73 65 20 64 65 66 61 75 LT\fR (use defau
2c80: 6c 74 20 63 69 70 68 65 72 20 6c 69 73 74 2c 20 lt cipher list,
2c90: 61 74 20 73 74 61 72 74 20 6f 6e 6c 79 29 20 63 at start only) c
2ca0: 61 6e 20 61 6c 73 6f 20 62 65 20 73 70 65 63 69 an also be speci
2cb0: 66 69 65 64 5c 26 2e 0a 53 65 65 20 74 68 65 20 fied\&..See the
2cc0: 5c 66 49 4f 70 65 6e 53 53 4c 5c 66 52 20 5b 68 \fIOpenSSL\fR [h
2cd0: 74 74 70 73 3a 2f 2f 64 6f 63 73 5c 26 2e 6f 70 ttps://docs\&.op
2ce0: 65 6e 73 73 6c 5c 26 2e 6f 72 67 2f 6d 61 73 74 enssl\&.org/mast
2cf0: 65 72 2f 6d 61 6e 31 2f 6f 70 65 6e 73 73 6c 2d er/man1/openssl-
2d00: 63 69 70 68 65 72 73 2f 23 6f 70 74 69 6f 6e 73 ciphers/#options
2d10: 5d 0a 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 ].documentation
2d20: 66 6f 72 20 74 68 65 20 66 75 6c 6c 20 6c 69 73 for the full lis
2d30: 74 20 6f 66 20 76 61 6c 69 64 20 76 61 6c 75 65 t of valid value
2d40: 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 69 70 s\&...TP.\fB-cip
2d50: 68 65 72 73 75 69 74 65 73 5c 66 52 20 5c 66 49 hersuites\fR \fI
2d60: 73 74 72 69 6e 67 5c 66 52 0a 53 70 65 63 69 66 string\fR.Specif
2d70: 69 65 73 20 74 68 65 20 6c 69 73 74 20 6f 66 20 ies the list of
2d80: 63 69 70 68 65 72 20 73 75 69 74 65 73 20 74 6f cipher suites to
2d90: 20 75 73 65 20 66 6f 72 20 54 4c 53 20 31 5c 26 use for TLS 1\&
2da0: 2e 33 20 61 73 20 61 20 63 6f 6c 6f 6e 0a 22 5c .3 as a colon."\
2db0: 66 42 3a 5c 66 52 22 20 73 65 70 61 72 61 74 65 fB:\fR" separate
2dc0: 64 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72 d list of cipher
2dd0: 20 73 75 69 74 65 20 6e 61 6d 65 73 5c 26 2e 20 suite names\&.
2de0: 53 65 65 20 74 68 65 0a 5c 66 49 4f 70 65 6e 53 See the.\fIOpenS
2df0: 53 4c 5c 66 52 20 5b 68 74 74 70 73 3a 2f 2f 64 SL\fR [https://d
2e00: 6f 63 73 5c 26 2e 6f 70 65 6e 73 73 6c 5c 26 2e ocs\&.openssl\&.
2e10: 6f 72 67 2f 6d 61 73 74 65 72 2f 6d 61 6e 31 2f org/master/man1/
2e20: 6f 70 65 6e 73 73 6c 2d 63 69 70 68 65 72 73 2f openssl-ciphers/
2e30: 23 6f 70 74 69 6f 6e 73 5d 0a 64 6f 63 75 6d 65 #options].docume
2e40: 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 ntation for the
2e50: 66 75 6c 6c 20 6c 69 73 74 20 6f 66 20 76 61 6c full list of val
2e60: 69 64 20 76 61 6c 75 65 73 5c 26 2e 0a 54 68 69 id values\&..Thi
2e70: 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 s option is new
2e80: 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 for TclTLS 1\&.8
2e90: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 6f 6d 6d \&...TP.\fB-comm
2ea0: 61 6e 64 5c 66 52 20 5c 66 49 63 61 6c 6c 62 61 and\fR \fIcallba
2eb0: 63 6b 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 ck\fR.Specifies
2ec0: 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d the callback com
2ed0: 6d 61 6e 64 20 74 6f 20 62 65 20 69 6e 76 6f 6b mand to be invok
2ee0: 65 64 20 61 74 20 73 65 76 65 72 61 6c 20 70 6f ed at several po
2ef0: 69 6e 74 73 20 64 75 72 69 6e 67 20 74 68 65 0a ints during the.
2f00: 68 61 6e 64 73 68 61 6b 65 20 74 6f 20 70 61 73 handshake to pas
2f10: 73 20 65 72 72 6f 72 73 2c 20 74 72 61 63 69 6e s errors, tracin
2f20: 67 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 61 g information, a
2f30: 6e 64 20 70 72 6f 74 6f 63 6f 6c 20 6d 65 73 73 nd protocol mess
2f40: 61 67 65 73 5c 26 2e 0a 53 65 65 20 5c 66 42 43 ages\&..See \fBC
2f50: 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73 5c allback Options\
2f60: 66 52 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f fR for more info
2f70: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 64 68 70 61 \&...TP.\fB-dhpa
2f80: 72 61 6d 73 5c 66 52 20 5c 66 49 66 69 6c 65 6e rams\fR \fIfilen
2f90: 61 6d 65 5c 66 52 0a 53 70 65 63 69 66 69 65 73 ame\fR.Specifies
2fa0: 20 74 68 65 20 44 69 66 66 69 65 2d 48 65 6c 6c the Diffie-Hell
2fb0: 6d 61 6e 20 28 44 48 29 20 70 61 72 61 6d 65 74 man (DH) paramet
2fc0: 65 72 73 20 66 69 6c 65 5c 26 2e 0a 2e 54 50 0a ers file\&...TP.
2fd0: 5c 66 42 2d 6b 65 79 66 69 6c 65 5c 66 52 20 5c \fB-keyfile\fR \
2fe0: 66 49 66 69 6c 65 6e 61 6d 65 5c 66 52 0a 53 70 fIfilename\fR.Sp
2ff0: 65 63 69 66 69 65 73 20 74 68 65 20 70 72 69 76 ecifies the priv
3000: 61 74 65 20 6b 65 79 20 66 69 6c 65 5c 26 2e 20 ate key file\&.
3010: 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 74 The default is t
3020: 6f 20 75 73 65 20 74 68 65 20 66 69 6c 65 0a 73 o use the file.s
3030: 70 65 63 69 66 69 65 64 20 62 79 20 74 68 65 20 pecified by the
3040: 5c 66 49 2d 63 65 72 74 66 69 6c 65 5c 66 52 20 \fI-certfile\fR
3050: 6f 70 74 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 option\&...TP.\f
3060: 42 2d 6b 65 79 5c 66 52 20 5c 66 49 73 74 72 69 B-key\fR \fIstri
3070: 6e 67 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 ng\fR.Specifies
3080: 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 20 the private key
3090: 74 6f 20 75 73 65 20 61 73 20 61 20 44 45 52 20 to use as a DER
30a0: 65 6e 63 6f 64 65 64 20 73 74 72 69 6e 67 20 28 encoded string (
30b0: 50 4b 43 53 23 31 20 44 45 52 29 5c 26 2e 0a 2e PKCS#1 DER)\&...
30c0: 54 50 0a 5c 66 42 2d 6d 6f 64 65 6c 5c 66 52 20 TP.\fB-model\fR
30d0: 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 0a 46 6f \fIchannel\fR.Fo
30e0: 72 63 65 20 74 68 69 73 20 63 68 61 6e 6e 65 6c rce this channel
30f0: 20 74 6f 20 73 68 61 72 65 20 74 68 65 20 73 61 to share the sa
3100: 6d 65 20 5c 66 49 53 53 4c 5f 43 54 58 5c 66 52 me \fISSL_CTX\fR
3110: 20 73 74 72 75 63 74 75 72 65 20 61 73 20 74 68 structure as th
3120: 65 0a 73 70 65 63 69 66 69 65 64 20 5c 66 49 63 e.specified \fIc
3130: 68 61 6e 6e 65 6c 5c 66 52 2c 20 61 6e 64 20 74 hannel\fR, and t
3140: 68 65 72 65 66 6f 72 65 20 73 68 61 72 65 20 63 herefore share c
3150: 6f 6e 66 69 67 2c 20 63 61 6c 6c 62 61 63 6b 73 onfig, callbacks
3160: 2c 20 65 74 63 5c 26 2e 0a 2e 54 50 0a 5c 66 42 , etc\&...TP.\fB
3170: 2d 70 61 73 73 77 6f 72 64 5c 66 52 20 5c 66 49 -password\fR \fI
3180: 63 61 6c 6c 62 61 63 6b 5c 66 52 0a 53 70 65 63 callback\fR.Spec
3190: 69 66 69 65 73 20 74 68 65 20 63 61 6c 6c 62 61 ifies the callba
31a0: 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 69 6e ck command to in
31b0: 76 6f 6b 65 20 77 68 65 6e 20 4f 70 65 6e 53 53 voke when OpenSS
31c0: 4c 20 6e 65 65 64 73 20 74 6f 20 6f 62 74 61 69 L needs to obtai
31d0: 6e 20 61 0a 70 61 73 73 77 6f 72 64 5c 26 2e 20 n a.password\&.
31e0: 54 68 69 73 20 69 73 20 74 79 70 69 63 61 6c 6c This is typicall
31f0: 79 20 75 73 65 64 20 74 6f 20 75 6e 6c 6f 63 6b y used to unlock
3200: 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 the private key
3210: 20 6f 66 20 61 20 63 65 72 74 69 66 69 63 61 74 of a certificat
3220: 65 5c 26 2e 0a 54 68 65 20 63 61 6c 6c 62 61 63 e\&..The callbac
3230: 6b 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 k should return
3240: 61 20 70 61 73 73 77 6f 72 64 20 73 74 72 69 6e a password strin
3250: 67 5c 26 2e 20 54 68 69 73 20 6f 70 74 69 6f 6e g\&. This option
3260: 20 68 61 73 20 63 68 61 6e 67 65 64 20 66 6f 72 has changed for
3270: 0a 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e .TclTLS 1\&.8\&.
3280: 20 53 65 65 20 5c 66 42 43 61 6c 6c 62 61 63 6b See \fBCallback
3290: 20 4f 70 74 69 6f 6e 73 5c 66 52 20 66 6f 72 20 Options\fR for
32a0: 6d 6f 72 65 20 69 6e 66 6f 5c 26 2e 0a 2e 54 50 more info\&...TP
32b0: 0a 5c 66 42 2d 70 6f 73 74 5f 68 61 6e 64 73 68 .\fB-post_handsh
32c0: 61 6b 65 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 ake\fR \fIbool\f
32d0: 52 0a 41 6c 6c 6f 77 20 70 6f 73 74 2d 68 61 6e R.Allow post-han
32e0: 64 73 68 61 6b 65 20 73 65 73 73 69 6f 6e 20 74 dshake session t
32f0: 69 63 6b 65 74 20 75 70 64 61 74 65 73 5c 26 2e icket updates\&.
3300: 20 54 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 This option is
3310: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
3320: 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d \&.8\&...TP.\fB-
3330: 72 65 71 75 65 73 74 5c 66 52 20 5c 66 49 62 6f request\fR \fIbo
3340: 6f 6c 5c 66 52 0a 52 65 71 75 65 73 74 20 61 20 ol\fR.Request a
3350: 63 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d certificate from
3360: 20 74 68 65 20 70 65 65 72 20 64 75 72 69 6e 67 the peer during
3370: 20 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 the SSL handsha
3380: 6b 65 5c 26 2e 20 54 68 69 73 20 69 73 20 6e 65 ke\&. This is ne
3390: 65 64 65 64 0a 74 6f 20 64 6f 20 43 65 72 74 69 eded.to do Certi
33a0: 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f ficate Validatio
33b0: 6e 5c 26 2e 20 53 74 61 72 74 69 6e 67 20 69 6e n\&. Starting in
33c0: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 2c 20 74 TclTLS 1\&.8, t
33d0: 68 65 20 64 65 66 61 75 6c 74 20 69 73 0a 5c 66 he default is.\f
33e0: 42 74 72 75 65 5c 66 52 5c 26 2e 20 53 74 61 72 Btrue\fR\&. Star
33f0: 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 ting in TclTLS 2
3400: 5c 26 2e 30 2c 20 49 66 20 73 65 74 20 74 6f 20 \&.0, If set to
3410: 5c 66 42 66 61 6c 73 65 5c 66 52 20 61 6e 64 0a \fBfalse\fR and.
3420: 5c 66 42 2d 72 65 71 75 69 72 65 5c 66 52 20 69 \fB-require\fR i
3430: 73 20 5c 66 42 74 72 75 65 5c 66 52 2c 20 74 68 s \fBtrue\fR, th
3440: 65 6e 20 74 68 69 73 20 77 69 6c 6c 20 62 65 20 en this will be
3450: 6f 76 65 72 72 69 64 64 65 6e 20 74 6f 20 5c 66 overridden to \f
3460: 42 74 72 75 65 5c 66 52 5c 26 2e 0a 53 65 65 20 Btrue\fR\&..See
3470: 5c 66 42 43 65 72 74 69 66 69 63 61 74 65 20 56 \fBCertificate V
3480: 61 6c 69 64 61 74 69 6f 6e 5c 66 52 20 66 6f 72 alidation\fR for
3490: 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 5c 26 2e more details\&.
34a0: 0a 2e 54 50 0a 5c 66 42 2d 72 65 71 75 69 72 65 ..TP.\fB-require
34b0: 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 52 \fR \fIbool\fR.R
34c0: 65 71 75 69 72 65 20 61 20 76 61 6c 69 64 20 63 equire a valid c
34d0: 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20 ertificate from
34e0: 74 68 65 20 70 65 65 72 20 64 75 72 69 6e 67 20 the peer during
34f0: 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b the SSL handshak
3500: 65 5c 26 2e 20 49 66 20 74 68 69 73 20 69 73 0a e\&. If this is.
3510: 73 65 74 20 74 6f 20 74 72 75 65 2c 20 74 68 65 set to true, the
3520: 6e 20 5c 66 42 2d 72 65 71 75 65 73 74 5c 66 52 n \fB-request\fR
3530: 20 6d 75 73 74 20 61 6c 73 6f 20 62 65 20 73 65 must also be se
3540: 74 20 74 6f 20 74 72 75 65 20 61 6e 64 20 61 20 t to true and a
3550: 65 69 74 68 65 72 0a 5c 66 42 2d 63 61 64 69 72 either.\fB-cadir
3560: 5c 66 52 2c 20 5c 66 42 2d 63 61 66 69 6c 65 5c \fR, \fB-cafile\
3570: 66 52 2c 20 5c 66 42 2d 63 61 73 74 6f 72 65 5c fR, \fB-castore\
3580: 66 52 2c 20 6f 72 20 61 20 70 6c 61 74 66 6f 72 fR, or a platfor
3590: 6d 20 64 65 66 61 75 6c 74 0a 6d 75 73 74 20 62 m default.must b
35a0: 65 20 70 72 6f 76 69 64 65 64 20 69 6e 20 6f 72 e provided in or
35b0: 64 65 72 20 74 6f 20 76 61 6c 69 64 61 74 65 20 der to validate
35c0: 61 67 61 69 6e 73 74 5c 26 2e 20 54 68 65 20 64 against\&. The d
35d0: 65 66 61 75 6c 74 20 69 6e 20 54 63 6c 54 4c 53 efault in TclTLS
35e0: 20 31 5c 26 2e 38 20 61 6e 64 0a 65 61 72 6c 69 1\&.8 and.earli
35f0: 65 72 20 76 65 72 73 69 6f 6e 73 20 69 73 20 5c er versions is \
3600: 66 42 66 61 6c 73 65 5c 66 52 20 73 69 6e 63 65 fBfalse\fR since
3610: 20 6e 6f 74 20 61 6c 6c 20 70 6c 61 74 66 6f 72 not all platfor
3620: 6d 73 20 68 61 76 65 20 63 65 72 74 69 66 69 63 ms have certific
3630: 61 74 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 ates to.validate
3640: 20 61 67 61 69 6e 73 74 20 69 6e 20 61 20 66 6f against in a fo
3650: 72 6d 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 rm compatible wi
3660: 74 68 20 4f 70 65 6e 53 53 4c 5c 26 2e 20 53 74 th OpenSSL\&. St
3670: 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 arting in TclTLS
3680: 20 32 5c 26 2e 30 2c 0a 74 68 65 20 64 65 66 61 2\&.0,.the defa
3690: 75 6c 74 20 69 73 20 5c 66 42 74 72 75 65 5c 66 ult is \fBtrue\f
36a0: 52 5c 26 2e 0a 53 65 65 20 5c 66 42 43 65 72 74 R\&..See \fBCert
36b0: 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 ificate Validati
36c0: 6f 6e 5c 66 52 20 66 6f 72 20 6d 6f 72 65 20 64 on\fR for more d
36d0: 65 74 61 69 6c 73 5c 26 2e 0a 2e 54 50 0a 5c 66 etails\&...TP.\f
36e0: 42 2d 73 65 63 75 72 69 74 79 5f 6c 65 76 65 6c B-security_level
36f0: 5c 66 52 20 5c 66 49 69 6e 74 65 67 65 72 5c 66 \fR \fIinteger\f
3700: 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 20 R.Specifies the
3710: 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20 28 security level (
3720: 76 61 6c 75 65 20 66 72 6f 6d 20 30 20 74 6f 20 value from 0 to
3730: 35 29 5c 26 2e 20 54 68 65 20 73 65 63 75 72 69 5)\&. The securi
3740: 74 79 20 6c 65 76 65 6c 20 61 66 66 65 63 74 73 ty level affects
3750: 0a 74 68 65 20 61 6c 6c 6f 77 65 64 20 63 69 70 .the allowed cip
3760: 68 65 72 20 73 75 69 74 65 20 65 6e 63 72 79 70 her suite encryp
3770: 74 69 6f 6e 20 61 6c 67 6f 72 69 74 68 6d 73 2c tion algorithms,
3780: 20 73 75 70 70 6f 72 74 65 64 20 45 43 43 20 63 supported ECC c
3790: 75 72 76 65 73 2c 0a 73 75 70 70 6f 72 74 65 64 urves,.supported
37a0: 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 signature algor
37b0: 69 74 68 6d 73 2c 20 44 48 20 70 61 72 61 6d 65 ithms, DH parame
37c0: 74 65 72 20 73 69 7a 65 73 2c 20 63 65 72 74 69 ter sizes, certi
37d0: 66 69 63 61 74 65 20 6b 65 79 20 73 69 7a 65 73 ficate key sizes
37e0: 0a 61 6e 64 20 73 69 67 6e 61 74 75 72 65 20 61 .and signature a
37f0: 6c 67 6f 72 69 74 68 6d 73 5c 26 2e 20 54 68 65 lgorithms\&. The
3800: 20 64 65 66 61 75 6c 74 20 69 73 20 31 20 70 72 default is 1 pr
3810: 69 6f 72 20 74 6f 20 4f 70 65 6e 53 53 4c 20 33 ior to OpenSSL 3
3820: 5c 26 2e 32 20 61 6e 64 20 32 0a 74 68 65 72 65 \&.2 and 2.there
3830: 61 66 74 65 72 5c 26 2e 20 4c 65 76 65 6c 20 33 after\&. Level 3
3840: 20 61 6e 64 20 68 69 67 68 65 72 20 64 69 73 61 and higher disa
3850: 62 6c 65 20 73 75 70 70 6f 72 74 20 66 6f 72 20 ble support for
3860: 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 73 20 session tickets
3870: 61 6e 64 0a 6f 6e 6c 79 20 61 63 63 65 70 74 20 and.only accept
3880: 63 69 70 68 65 72 20 73 75 69 74 65 73 20 74 68 cipher suites th
3890: 61 74 20 70 72 6f 76 69 64 65 20 66 6f 72 77 61 at provide forwa
38a0: 72 64 20 73 65 63 72 65 63 79 5c 26 2e 0a 54 68 rd secrecy\&..Th
38b0: 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 is option is new
38c0: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e for TclTLS 1\&.
38d0: 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 73 65 72 8\&...TP.\fB-ser
38e0: 76 65 72 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 ver\fR \fIbool\f
38f0: 52 0a 53 70 65 63 69 66 69 65 73 20 77 68 65 74 R.Specifies whet
3900: 68 65 72 20 74 6f 20 61 63 74 20 61 73 20 61 20 her to act as a
3910: 73 65 72 76 65 72 20 61 6e 64 20 72 65 73 70 6f server and respo
3920: 6e 64 20 77 69 74 68 20 61 20 73 65 72 76 65 72 nd with a server
3930: 20 68 61 6e 64 73 68 61 6b 65 20 77 68 65 6e 20 handshake when
3940: 61 0a 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74 a.client connect
3950: 73 20 61 6e 64 20 70 72 6f 76 69 64 65 73 20 61 s and provides a
3960: 20 63 6c 69 65 6e 74 20 68 61 6e 64 73 68 61 6b client handshak
3970: 65 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 e\&. The default
3980: 20 69 73 20 5c 66 42 66 61 6c 73 65 5c 66 52 5c is \fBfalse\fR\
3990: 26 2e 0a 2e 54 50 0a 5c 66 42 2d 73 65 72 76 65 &...TP.\fB-serve
39a0: 72 6e 61 6d 65 5c 66 52 20 5c 66 49 68 6f 73 74 rname\fR \fIhost
39b0: 6e 61 6d 65 5c 66 52 0a 53 70 65 63 69 66 79 20 name\fR.Specify
39c0: 74 68 65 20 70 65 65 72 27 73 20 68 6f 73 74 6e the peer's hostn
39d0: 61 6d 65 5c 26 2e 20 54 68 69 73 20 69 73 20 75 ame\&. This is u
39e0: 73 65 64 20 74 6f 20 73 65 74 20 74 68 65 20 54 sed to set the T
39f0: 4c 53 20 53 65 72 76 65 72 20 4e 61 6d 65 20 49 LS Server Name I
3a00: 6e 64 69 63 61 74 69 6f 6e 0a 28 53 4e 49 29 20 ndication.(SNI)
3a10: 65 78 74 65 6e 73 69 6f 6e 5c 26 2e 20 53 65 74 extension\&. Set
3a20: 20 74 68 69 73 20 74 6f 20 74 68 65 20 65 78 70 this to the exp
3a30: 65 63 74 65 64 20 73 65 72 76 65 72 6e 61 6d 65 ected servername
3a40: 20 69 6e 20 74 68 65 20 73 65 72 76 65 72 27 73 in the server's
3a50: 20 63 65 72 74 69 66 69 63 61 74 65 0a 6f 72 20 certificate.or
3a60: 6f 6e 65 20 6f 66 20 74 68 65 20 53 75 62 6a 65 one of the Subje
3a70: 63 74 20 41 6c 74 65 72 6e 61 74 65 20 4e 61 6d ct Alternate Nam
3a80: 65 73 20 28 53 41 4e 29 5c 26 2e 20 53 74 61 72 es (SAN)\&. Star
3a90: 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 ting in TclTLS 2
3aa0: 5c 26 2e 30 2c 20 74 68 69 73 20 77 69 6c 6c 0a \&.0, this will.
3ab0: 64 65 66 61 75 6c 74 20 74 6f 20 74 68 65 20 68 default to the h
3ac0: 6f 73 74 20 66 6f 72 20 74 68 65 20 5c 66 42 74 ost for the \fBt
3ad0: 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 20 63 6f ls::socket\fR co
3ae0: 6d 6d 61 6e 64 5c 26 2e 0a 2e 54 50 0a 5c 66 42 mmand\&...TP.\fB
3af0: 2d 73 65 73 73 69 6f 6e 5f 69 64 5c 66 52 20 5c -session_id\fR \
3b00: 66 49 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 5c fIbinary_string\
3b10: 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 fR.Specifies the
3b20: 20 73 65 73 73 69 6f 6e 20 69 64 20 74 6f 20 72 session id to r
3b30: 65 73 75 6d 65 20 61 20 73 65 73 73 69 6f 6e 5c esume a session\
3b40: 26 2e 20 4e 6f 74 20 73 75 70 70 6f 72 74 65 64 &. Not supported
3b50: 20 79 65 74 5c 26 2e 0a 54 68 69 73 20 6f 70 74 yet\&..This opt
3b60: 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 ion is new for T
3b70: 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e clTLS 1\&.8\&...
3b80: 54 50 0a 5c 66 42 2d 73 73 6c 32 5c 66 52 20 5c TP.\fB-ssl2\fR \
3b90: 66 49 62 6f 6f 6c 5c 66 52 0a 45 6e 61 62 6c 65 fIbool\fR.Enable
3ba0: 20 75 73 65 20 6f 66 20 53 53 4c 20 76 32 5c 26 use of SSL v2\&
3bb0: 2e 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 .The default is
3bc0: 5c 66 42 66 61 6c 73 65 5c 66 52 5c 26 2e 0a 4f \fBfalse\fR\&..O
3bd0: 70 65 6e 53 53 4c 20 31 5c 26 2e 31 2b 20 6e 6f penSSL 1\&.1+ no
3be0: 20 6c 6f 6e 67 65 72 20 73 75 70 70 6f 72 74 73 longer supports
3bf0: 20 53 53 4c 20 76 32 2c 20 73 6f 20 74 68 69 73 SSL v2, so this
3c00: 20 6d 61 79 20 6e 6f 74 20 68 61 76 65 20 61 6e may not have an
3c10: 79 20 65 66 66 65 63 74 5c 26 2e 0a 53 65 65 20 y effect\&..See
3c20: 74 68 65 20 5c 66 42 74 6c 73 3a 3a 70 72 6f 74 the \fBtls::prot
3c30: 6f 63 6f 6c 73 5c 66 52 20 63 6f 6d 6d 61 6e 64 ocols\fR command
3c40: 20 66 6f 72 20 73 75 70 70 6f 72 74 65 64 20 70 for supported p
3c50: 72 6f 74 6f 63 6f 6c 73 5c 26 2e 0a 2e 54 50 0a rotocols\&...TP.
3c60: 5c 66 42 2d 73 73 6c 33 5c 66 52 20 5c 66 49 62 \fB-ssl3\fR \fIb
3c70: 6f 6f 6c 5c 66 52 0a 45 6e 61 62 6c 65 20 75 73 ool\fR.Enable us
3c80: 65 20 6f 66 20 53 53 4c 20 76 33 5c 26 2e 20 54 e of SSL v3\&. T
3c90: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 5c 66 he default is \f
3ca0: 42 66 61 6c 73 65 5c 66 52 5c 26 2e 20 53 74 61 Bfalse\fR\&. Sta
3cb0: 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 rting in TclTLS
3cc0: 31 5c 26 2e 38 2c 0a 75 73 65 20 6f 66 20 53 53 1\&.8,.use of SS
3cd0: 4c 20 76 33 20 69 66 20 6f 6e 6c 79 20 61 76 61 L v3 if only ava
3ce0: 69 6c 61 62 6c 65 20 76 69 61 20 61 20 63 6f 6d ilable via a com
3cf0: 70 69 6c 65 20 74 69 6d 65 20 6f 70 74 69 6f 6e pile time option
3d00: 5c 26 2e 0a 53 65 65 20 74 68 65 20 5c 66 42 74 \&..See the \fBt
3d10: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 5c 66 52 ls::protocols\fR
3d20: 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 73 75 70 command for sup
3d30: 70 6f 72 74 65 64 20 70 72 6f 74 6f 63 6f 6c 73 ported protocols
3d40: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 74 6c 73 31 \&...TP.\fB-tls1
3d50: 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 45 \fR \fIbool\fR.E
3d60: 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 nable use of TLS
3d70: 20 76 31 5c 26 2e 20 53 74 61 72 74 69 6e 67 20 v1\&. Starting
3d80: 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 2e 30 2c in TclTLS 2\&.0,
3d90: 20 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 the default is
3da0: 5c 66 42 66 61 6c 73 65 5c 66 52 5c 26 2e 0a 4e \fBfalse\fR\&..N
3db0: 6f 74 65 3a 20 54 4c 53 20 31 5c 26 2e 30 20 6e ote: TLS 1\&.0 n
3dc0: 65 65 64 73 20 53 48 41 31 20 74 6f 20 6f 70 65 eeds SHA1 to ope
3dd0: 72 61 74 65 2c 20 77 68 69 63 68 20 69 73 20 6f rate, which is o
3de0: 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 69 6e nly available in
3df0: 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c 0a security level.
3e00: 30 20 66 6f 72 20 4f 70 65 6e 20 53 53 4c 20 33 0 for Open SSL 3
3e10: 5c 26 2e 30 2b 5c 26 2e 20 53 65 65 20 74 68 65 \&.0+\&. See the
3e20: 20 5c 66 49 2d 73 65 63 75 72 69 74 79 5f 6c 65 \fI-security_le
3e30: 76 65 6c 5c 66 52 20 6f 70 74 69 6f 6e 5c 26 2e vel\fR option\&.
3e40: 0a 2e 54 50 0a 5c 66 42 2d 74 6c 73 31 5c 26 2e ..TP.\fB-tls1\&.
3e50: 31 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 1\fR \fIbool\fR.
3e60: 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c Enable use of TL
3e70: 53 20 76 31 5c 26 2e 31 5c 26 2e 20 53 74 61 72 S v1\&.1\&. Star
3e80: 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 ting in TclTLS 2
3e90: 5c 26 2e 30 2c 20 74 68 65 20 64 65 66 61 75 6c \&.0, the defaul
3ea0: 74 20 69 73 20 5c 66 42 66 61 6c 73 65 5c 66 52 t is \fBfalse\fR
3eb0: 5c 26 2e 0a 4e 6f 74 65 3a 20 54 4c 53 20 31 5c \&..Note: TLS 1\
3ec0: 26 2e 31 20 6e 65 65 64 73 20 53 48 41 31 20 74 &.1 needs SHA1 t
3ed0: 6f 20 6f 70 65 72 61 74 65 2c 20 77 68 69 63 68 o operate, which
3ee0: 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 is only availab
3ef0: 6c 65 20 69 6e 20 73 65 63 75 72 69 74 79 20 6c le in security l
3f00: 65 76 65 6c 0a 30 20 66 6f 72 20 4f 70 65 6e 20 evel.0 for Open
3f10: 53 53 4c 20 33 5c 26 2e 30 2b 5c 26 2e 20 53 65 SSL 3\&.0+\&. Se
3f20: 65 20 74 68 65 20 5c 66 49 2d 73 65 63 75 72 69 e the \fI-securi
3f30: 74 79 5f 6c 65 76 65 6c 5c 66 52 20 6f 70 74 69 ty_level\fR opti
3f40: 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 74 6c on\&...TP.\fB-tl
3f50: 73 31 5c 26 2e 32 5c 66 52 20 5c 66 49 62 6f 6f s1\&.2\fR \fIboo
3f60: 6c 5c 66 52 0a 45 6e 61 62 6c 65 20 75 73 65 20 l\fR.Enable use
3f70: 6f 66 20 54 4c 53 20 76 31 5c 26 2e 32 5c 26 2e of TLS v1\&.2\&.
3f80: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 The default is
3f90: 5c 66 42 74 72 75 65 5c 66 52 5c 26 2e 0a 2e 54 \fBtrue\fR\&...T
3fa0: 50 0a 5c 66 42 2d 74 6c 73 31 5c 26 2e 33 5c 66 P.\fB-tls1\&.3\f
3fb0: 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 45 6e 61 R \fIbool\fR.Ena
3fc0: 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 ble use of TLS v
3fd0: 31 5c 26 2e 33 5c 26 2e 20 54 68 65 20 64 65 66 1\&.3\&. The def
3fe0: 61 75 6c 74 20 69 73 20 5c 66 42 74 72 75 65 5c ault is \fBtrue\
3ff0: 66 52 5c 26 2e 20 54 68 69 73 20 69 73 20 6f 6e fR\&. This is on
4000: 6c 79 20 61 76 61 69 6c 61 62 6c 65 0a 73 74 61 ly available.sta
4010: 72 74 69 6e 67 20 77 69 74 68 20 4f 70 65 6e 53 rting with OpenS
4020: 53 4c 20 31 5c 26 2e 31 5c 26 2e 31 20 61 6e 64 SL 1\&.1\&.1 and
4030: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 37 5c 26 2e TclTLS 1\&.7\&.
4040: 0a 2e 54 50 0a 5c 66 42 2d 76 61 6c 69 64 61 74 ..TP.\fB-validat
4050: 65 63 6f 6d 6d 61 6e 64 5c 66 52 20 5c 66 49 63 ecommand\fR \fIc
4060: 61 6c 6c 62 61 63 6b 5c 66 52 0a 53 70 65 63 69 allback\fR.Speci
4070: 66 69 65 73 20 74 68 65 20 63 61 6c 6c 62 61 63 fies the callbac
4080: 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 69 6e 76 k command to inv
4090: 6f 6b 65 20 74 6f 20 76 61 6c 69 64 61 74 65 20 oke to validate
40a0: 74 68 65 20 70 65 65 72 20 63 65 72 74 69 66 69 the peer certifi
40b0: 63 61 74 65 73 0a 61 6e 64 20 6f 74 68 65 72 20 cates.and other
40c0: 63 6f 6e 66 69 67 20 69 6e 66 6f 20 64 75 72 69 config info duri
40d0: 6e 67 20 74 68 65 20 70 72 6f 74 6f 63 6f 6c 20 ng the protocol
40e0: 6e 65 67 6f 74 69 61 74 69 6f 6e 20 70 68 61 73 negotiation phas
40f0: 65 5c 26 2e 20 54 68 69 73 20 63 61 6e 20 62 65 e\&. This can be
4100: 20 75 73 65 64 0a 62 79 20 54 43 4c 20 73 63 72 used.by TCL scr
4110: 69 70 74 73 20 74 6f 20 70 65 72 66 6f 72 6d 20 ipts to perform
4120: 74 68 65 69 72 20 6f 77 6e 20 43 65 72 74 69 66 their own Certif
4130: 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e icate Validation
4140: 20 74 6f 20 73 75 70 70 6c 65 6d 65 6e 74 20 74 to supplement t
4150: 68 65 0a 64 65 66 61 75 6c 74 20 76 61 6c 69 64 he.default valid
4160: 61 74 69 6f 6e 20 70 72 6f 76 69 64 65 64 20 62 ation provided b
4170: 79 20 4f 70 65 6e 53 53 4c 5c 26 2e 20 54 68 65 y OpenSSL\&. The
4180: 20 73 63 72 69 70 74 20 6d 75 73 74 20 72 65 74 script must ret
4190: 75 72 6e 20 61 20 62 6f 6f 6c 65 61 6e 20 74 72 urn a boolean tr
41a0: 75 65 0a 74 6f 20 63 6f 6e 74 69 6e 75 65 20 74 ue.to continue t
41b0: 68 65 20 6e 65 67 6f 74 69 61 74 69 6f 6e 5c 26 he negotiation\&
41c0: 2e 20 53 65 65 20 5c 66 42 43 61 6c 6c 62 61 63 . See \fBCallbac
41d0: 6b 20 4f 70 74 69 6f 6e 73 5c 66 52 20 66 6f 72 k Options\fR for
41e0: 20 6d 6f 72 65 20 69 6e 66 6f 5c 26 2e 0a 54 68 more info\&..Th
41f0: 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 is option is new
4200: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e for TclTLS 1\&.
4210: 38 5c 26 2e 0a 2e 52 45 0a 2e 54 50 0a 5c 66 42 8\&...RE..TP.\fB
4220: 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 5c 66 52 tls::unimport\fR
4230: 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 0a 43 \fIchannel\fR.C
4240: 6f 6d 70 6c 69 6d 65 6e 74 20 74 6f 20 5c 66 42 ompliment to \fB
4250: 74 6c 73 3a 3a 69 6d 70 6f 72 74 5c 66 52 5c 26 tls::import\fR\&
4260: 2e 20 55 73 65 64 20 74 6f 20 72 65 6d 6f 76 65 . Used to remove
4270: 20 74 68 65 20 74 6f 70 20 6c 65 76 65 6c 20 73 the top level s
4280: 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 0a 66 tacked channel.f
4290: 72 6f 6d 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 rom \fIchannel\f
42a0: 52 5c 26 2e 20 54 68 69 73 20 75 6e 73 74 61 63 R\&. This unstac
42b0: 6b 73 20 74 68 65 20 65 6e 63 72 79 70 74 69 6f ks the encryptio
42c0: 6e 20 6f 66 20 61 20 72 65 67 75 6c 61 72 20 54 n of a regular T
42d0: 43 4c 20 63 68 61 6e 6e 65 6c 5c 26 2e 20 41 6e CL channel\&. An
42e0: 0a 65 72 72 6f 72 20 69 73 20 74 68 72 6f 77 6e .error is thrown
42f0: 20 69 66 20 54 4c 53 20 69 73 20 6e 6f 74 20 74 if TLS is not t
4300: 68 65 20 74 6f 70 20 73 74 61 63 6b 65 64 20 63 he top stacked c
4310: 68 61 6e 6e 65 6c 20 74 79 70 65 5c 26 2e 0a 2e hannel type\&...
4320: 54 50 0a 5c 66 42 74 6c 73 3a 3a 68 61 6e 64 73 TP.\fBtls::hands
4330: 68 61 6b 65 5c 66 52 20 5c 66 49 63 68 61 6e 6e hake\fR \fIchann
4340: 65 6c 5c 66 52 0a 46 6f 72 63 65 73 20 74 68 65 el\fR.Forces the
4350: 20 54 4c 53 20 6e 65 67 6f 74 69 61 74 69 6f 6e TLS negotiation
4360: 20 68 61 6e 64 73 68 61 6b 65 20 74 6f 20 74 61 handshake to ta
4370: 6b 65 20 70 6c 61 63 65 20 69 6d 6d 65 64 69 61 ke place immedia
4380: 74 65 6c 79 2c 20 61 6e 64 20 72 65 74 75 72 6e tely, and return
4390: 73 20 30 0a 69 66 20 68 61 6e 64 73 68 61 6b 65 s 0.if handshake
43a0: 20 69 73 20 73 74 69 6c 6c 20 69 6e 20 70 72 6f is still in pro
43b0: 67 72 65 73 73 20 28 6e 6f 6e 2d 62 6c 6f 63 6b gress (non-block
43c0: 69 6e 67 29 2c 20 6f 72 20 31 20 69 66 20 74 68 ing), or 1 if th
43d0: 65 20 68 61 6e 64 73 68 61 6b 65 20 77 61 73 0a e handshake was.
43e0: 73 75 63 63 65 73 73 66 75 6c 5c 26 2e 20 49 66 successful\&. If
43f0: 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 66 the handshake f
4400: 61 69 6c 65 64 2c 20 61 6e 20 65 72 72 6f 72 20 ailed, an error
4410: 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 will be returned
4420: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a \&...TP.\fBtls::
4430: 73 74 61 74 75 73 5c 66 52 20 3f 5c 66 42 2d 6c status\fR ?\fB-l
4440: 6f 63 61 6c 5c 66 52 3f 20 5c 66 49 63 68 61 6e ocal\fR? \fIchan
4450: 6e 65 6c 5c 66 52 0a 52 65 74 75 72 6e 73 20 74 nel\fR.Returns t
4460: 68 65 20 63 75 72 72 65 6e 74 20 73 74 61 74 75 he current statu
4470: 73 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 6e s of an SSL chan
4480: 6e 65 6c 5c 26 2e 20 54 68 65 20 72 65 73 75 6c nel\&. The resul
4490: 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b t is a list of k
44a0: 65 79 2d 76 61 6c 75 65 0a 70 61 69 72 73 20 64 ey-value.pairs d
44b0: 65 73 63 72 69 62 69 6e 67 20 74 68 65 20 53 53 escribing the SS
44c0: 4c 2c 20 63 65 72 74 69 66 69 63 61 74 65 2c 20 L, certificate,
44d0: 61 6e 64 20 63 65 72 74 69 66 69 63 61 74 65 20 and certificate
44e0: 76 65 72 69 66 69 63 61 74 69 6f 6e 20 73 74 61 verification sta
44f0: 74 75 73 5c 26 2e 20 49 66 0a 74 68 65 20 53 53 tus\&. If.the SS
4500: 4c 20 68 61 6e 64 73 68 61 6b 65 20 68 61 73 20 L handshake has
4510: 6e 6f 74 20 79 65 74 20 63 6f 6d 70 6c 65 74 65 not yet complete
4520: 64 2c 20 61 6e 20 65 6d 70 74 79 20 6c 69 73 74 d, an empty list
4530: 20 69 73 20 72 65 74 75 72 6e 65 64 5c 26 2e 20 is returned\&.
4540: 49 66 20 74 68 65 0a 5c 66 42 2d 6c 6f 63 61 6c If the.\fB-local
4550: 5c 66 52 20 6f 70 74 69 6f 6e 20 69 73 20 73 70 \fR option is sp
4560: 65 63 69 66 69 65 64 2c 20 74 68 65 6e 20 74 68 ecified, then th
4570: 65 20 6c 6f 63 61 6c 20 63 65 72 74 69 66 69 63 e local certific
4580: 61 74 65 20 69 73 20 75 73 65 64 5c 26 2e 20 52 ate is used\&. R
4590: 65 74 75 72 6e 65 64 0a 76 61 6c 75 65 73 20 69 eturned.values i
45a0: 6e 63 6c 75 64 65 3a 0a 2e 73 70 0a 53 53 4c 20 nclude:..sp.SSL
45b0: 53 74 61 74 75 73 0a 2e 52 53 0a 2e 54 50 0a 5c Status..RS..TP.\
45c0: 66 42 61 6c 70 6e 5c 66 52 20 5c 66 49 70 72 6f fBalpn\fR \fIpro
45d0: 74 6f 63 6f 6c 5c 66 52 0a 54 68 65 20 70 72 6f tocol\fR.The pro
45e0: 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 tocol selected a
45f0: 66 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e fter Application
4600: 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 20 -Layer Protocol
4610: 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 Negotiation (ALP
4620: 4e 29 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 N)\&..This value
4630: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
4640: 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a LS 1\&.8\&...TP.
4650: 5c 66 42 63 69 70 68 65 72 5c 66 52 20 5c 66 49 \fBcipher\fR \fI
4660: 63 69 70 68 65 72 5c 66 52 0a 54 68 65 20 63 75 cipher\fR.The cu
4670: 72 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e 20 rrent cipher in
4680: 75 73 65 20 66 6f 72 20 74 68 65 20 73 65 73 73 use for the sess
4690: 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 70 65 ion\&...TP.\fBpe
46a0: 65 72 6e 61 6d 65 5c 66 52 20 5c 66 49 6e 61 6d ername\fR \fInam
46b0: 65 5c 66 52 0a 54 68 65 20 70 65 65 72 6e 61 6d e\fR.The peernam
46c0: 65 20 66 72 6f 6d 20 74 68 65 20 63 65 72 74 69 e from the certi
46d0: 66 69 63 61 74 65 5c 26 2e 0a 54 68 69 73 20 76 ficate\&..This v
46e0: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 alue is new for
46f0: 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a TclTLS 1\&.8\&..
4700: 2e 54 50 0a 5c 66 42 70 72 6f 74 6f 63 6f 6c 5c .TP.\fBprotocol\
4710: 66 52 20 5c 66 49 76 65 72 73 69 6f 6e 5c 66 52 fR \fIversion\fR
4720: 0a 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 .The protocol ve
4730: 72 73 69 6f 6e 20 75 73 65 64 20 66 6f 72 20 74 rsion used for t
4740: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a 20 53 he connection: S
4750: 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c SL2, SSL3, TLS1,
4760: 20 54 4c 53 31 5c 26 2e 31 2c 20 54 4c 53 31 5c TLS1\&.1, TLS1\
4770: 26 2e 32 2c 0a 54 4c 53 31 5c 26 2e 33 2c 20 6f &.2,.TLS1\&.3, o
4780: 72 20 75 6e 6b 6e 6f 77 6e 5c 26 2e 20 54 68 69 r unknown\&. Thi
4790: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 s value is new f
47a0: 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c or TclTLS 1\&.8\
47b0: 26 2e 0a 2e 54 50 0a 5c 66 42 73 62 69 74 73 5c &...TP.\fBsbits\
47c0: 66 52 20 5c 66 49 6e 5c 66 52 0a 54 68 65 20 6e fR \fIn\fR.The n
47d0: 75 6d 62 65 72 20 6f 66 20 62 69 74 73 20 75 73 umber of bits us
47e0: 65 64 20 66 6f 72 20 74 68 65 20 73 65 73 73 69 ed for the sessi
47f0: 6f 6e 20 6b 65 79 5c 26 2e 0a 2e 54 50 0a 5c 66 on key\&...TP.\f
4800: 42 73 69 67 6e 61 74 75 72 65 48 61 73 68 41 6c BsignatureHashAl
4810: 67 6f 72 69 74 68 6d 5c 66 52 20 5c 66 49 61 6c gorithm\fR \fIal
4820: 67 6f 72 69 74 68 6d 5c 66 52 0a 54 68 65 20 73 gorithm\fR.The s
4830: 69 67 6e 61 74 75 72 65 20 68 61 73 68 20 61 6c ignature hash al
4840: 67 6f 72 69 74 68 6d 5c 26 2e 0a 54 68 69 73 20 gorithm\&..This
4850: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
4860: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
4870: 0a 2e 54 50 0a 5c 66 42 73 69 67 6e 61 74 75 72 ..TP.\fBsignatur
4880: 65 54 79 70 65 5c 66 52 20 5c 66 49 74 79 70 65 eType\fR \fItype
4890: 5c 66 52 0a 54 68 65 20 73 69 67 6e 61 74 75 72 \fR.The signatur
48a0: 65 20 74 79 70 65 20 76 61 6c 75 65 5c 26 2e 0a e type value\&..
48b0: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 This value is ne
48c0: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 w for TclTLS 1\&
48d0: 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 76 65 72 .8\&...TP.\fBver
48e0: 69 66 79 44 65 70 74 68 5c 66 52 20 5c 66 49 6e ifyDepth\fR \fIn
48f0: 5c 66 52 0a 4d 61 78 69 6d 75 6d 20 64 65 70 74 \fR.Maximum dept
4900: 68 20 66 6f 72 20 74 68 65 20 63 65 72 74 69 66 h for the certif
4910: 69 63 61 74 65 20 63 68 61 69 6e 20 76 65 72 69 icate chain veri
4920: 66 69 63 61 74 69 6f 6e 5c 26 2e 20 44 65 66 61 fication\&. Defa
4930: 75 6c 74 20 69 73 20 2d 31 2c 20 74 6f 20 63 68 ult is -1, to ch
4940: 65 63 6b 20 61 6c 6c 5c 26 2e 0a 54 68 69 73 20 eck all\&..This
4950: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
4960: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
4970: 0a 2e 54 50 0a 5c 66 42 76 65 72 69 66 79 4d 6f ..TP.\fBverifyMo
4980: 64 65 5c 66 52 20 5c 66 49 6c 69 73 74 5c 66 52 de\fR \fIlist\fR
4990: 0a 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 69 .List of certifi
49a0: 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f cate verificatio
49b0: 6e 20 6d 6f 64 65 73 5c 26 2e 0a 54 68 69 73 20 n modes\&..This
49c0: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
49d0: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
49e0: 0a 2e 54 50 0a 5c 66 42 76 65 72 69 66 79 52 65 ..TP.\fBverifyRe
49f0: 73 75 6c 74 5c 66 52 20 5c 66 49 72 65 73 75 6c sult\fR \fIresul
4a00: 74 5c 66 52 0a 43 65 72 74 69 66 69 63 61 74 65 t\fR.Certificate
4a10: 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 72 65 verification re
4a20: 73 75 6c 74 5c 26 2e 0a 54 68 69 73 20 76 61 6c sult\&..This val
4a30: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 ue is new for Tc
4a40: 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 lTLS 1\&.8\&...T
4a50: 50 0a 5c 66 42 63 61 5f 6e 61 6d 65 73 5c 66 52 P.\fBca_names\fR
4a60: 20 5c 66 49 6c 69 73 74 5c 66 52 0a 4c 69 73 74 \fIlist\fR.List
4a70: 20 6f 66 20 74 68 65 20 43 65 72 74 69 66 69 63 of the Certific
4a80: 61 74 65 20 41 75 74 68 6f 72 69 74 69 65 73 20 ate Authorities
4a90: 75 73 65 64 20 74 6f 20 63 72 65 61 74 65 20 74 used to create t
4aa0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 he certificate\&
4ab0: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 ..This value is
4ac0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
4ad0: 5c 26 2e 38 5c 26 2e 0a 2e 52 45 0a 2e 49 50 0a \&.8\&...RE..IP.
4ae0: 43 65 72 74 69 66 69 63 61 74 65 20 53 74 61 74 Certificate Stat
4af0: 75 73 0a 2e 52 53 0a 2e 54 50 0a 5c 66 42 61 6c us..RS..TP.\fBal
4b00: 6c 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 l\fR \fIstring\f
4b10: 52 0a 44 75 6d 70 20 6f 66 20 61 6c 6c 20 63 65 R.Dump of all ce
4b20: 72 74 69 66 69 63 61 74 65 20 69 6e 66 6f 5c 26 rtificate info\&
4b30: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 ..This value is
4b40: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
4b50: 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 76 \&.8\&...TP.\fBv
4b60: 65 72 73 69 6f 6e 5c 66 52 20 5c 66 49 76 61 6c ersion\fR \fIval
4b70: 75 65 5c 66 52 0a 54 68 65 20 63 65 72 74 69 66 ue\fR.The certif
4b80: 69 63 61 74 65 20 76 65 72 73 69 6f 6e 5c 26 2e icate version\&.
4b90: 0a 2e 54 50 0a 5c 66 42 73 65 72 69 61 6c 4e 75 ..TP.\fBserialNu
4ba0: 6d 62 65 72 5c 66 52 20 5c 66 49 73 74 72 69 6e mber\fR \fIstrin
4bb0: 67 5c 66 52 0a 54 68 65 20 73 65 72 69 61 6c 20 g\fR.The serial
4bc0: 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 63 65 number of the ce
4bd0: 72 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68 rtificate as a h
4be0: 65 78 20 73 74 72 69 6e 67 5c 26 2e 0a 54 68 69 ex string\&..Thi
4bf0: 73 20 76 61 6c 75 65 20 77 61 73 20 63 68 61 6e s value was chan
4c00: 67 65 64 20 66 72 6f 6d 20 73 65 72 69 61 6c 20 ged from serial
4c10: 69 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c in TclTLS 1\&.8\
4c20: 26 2e 0a 2e 54 50 0a 5c 66 42 73 69 67 6e 61 74 &...TP.\fBsignat
4c30: 75 72 65 5c 66 52 20 5c 66 49 61 6c 67 6f 72 69 ure\fR \fIalgori
4c40: 74 68 6d 5c 66 52 0a 43 69 70 68 65 72 20 61 6c thm\fR.Cipher al
4c50: 67 6f 72 69 74 68 6d 20 75 73 65 64 20 66 6f 72 gorithm used for
4c60: 20 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67 certificate sig
4c70: 6e 61 74 75 72 65 5c 26 2e 0a 54 68 69 73 20 76 nature\&..This v
4c80: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 alue is new for
4c90: 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a TclTLS 1\&.8\&..
4ca0: 2e 54 50 0a 5c 66 42 69 73 73 75 65 72 5c 66 52 .TP.\fBissuer\fR
4cb0: 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 54 68 \fIstring\fR.Th
4cc0: 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 20 e distinguished
4cd0: 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65 name (DN) of the
4ce0: 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 73 certificate iss
4cf0: 75 65 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 6e 6f uer\&...TP.\fBno
4d00: 74 42 65 66 6f 72 65 5c 66 52 20 5c 66 49 64 61 tBefore\fR \fIda
4d10: 74 65 5c 66 52 0a 54 68 65 20 62 65 67 69 6e 6e te\fR.The beginn
4d20: 69 6e 67 20 64 61 74 65 20 6f 66 20 74 68 65 20 ing date of the
4d30: 63 65 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 certificate vali
4d40: 64 69 74 79 5c 26 2e 0a 2e 54 50 0a 5c 66 42 6e dity\&...TP.\fBn
4d50: 6f 74 41 66 74 65 72 5c 66 52 20 5c 66 49 64 61 otAfter\fR \fIda
4d60: 74 65 5c 66 52 0a 54 68 65 20 65 78 70 69 72 61 te\fR.The expira
4d70: 74 69 6f 6e 20 64 61 74 65 20 6f 66 20 74 68 65 tion date of the
4d80: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61 6c certificate val
4d90: 69 64 69 74 79 5c 26 2e 0a 2e 54 50 0a 5c 66 42 idity\&...TP.\fB
4da0: 73 75 62 6a 65 63 74 5c 66 52 20 5c 66 49 73 74 subject\fR \fIst
4db0: 72 69 6e 67 5c 66 52 0a 54 68 65 20 64 69 73 74 ring\fR.The dist
4dc0: 69 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 20 28 inguished name (
4dd0: 44 4e 29 20 6f 66 20 74 68 65 20 63 65 72 74 69 DN) of the certi
4de0: 66 69 63 61 74 65 20 73 75 62 6a 65 63 74 5c 26 ficate subject\&
4df0: 2e 20 46 69 65 6c 64 73 20 69 6e 63 6c 75 64 65 . Fields include
4e00: 3a 20 43 6f 6d 6d 6f 6e 0a 4e 61 6d 65 20 28 43 : Common.Name (C
4e10: 4e 29 2c 20 4f 72 67 61 6e 69 7a 61 74 69 6f 6e N), Organization
4e20: 20 28 4f 29 2c 20 4c 6f 63 61 6c 69 74 79 20 6f (O), Locality o
4e30: 72 20 43 69 74 79 20 28 4c 29 2c 20 53 74 61 74 r City (L), Stat
4e40: 65 20 6f 72 20 50 72 6f 76 69 6e 63 65 20 28 53 e or Province (S
4e50: 29 2c 20 61 6e 64 0a 43 6f 75 6e 74 72 79 20 4e ), and.Country N
4e60: 61 6d 65 20 28 43 29 5c 26 2e 0a 2e 54 50 0a 5c ame (C)\&...TP.\
4e70: 66 42 69 73 73 75 65 72 55 6e 69 71 75 65 49 44 fBissuerUniqueID
4e80: 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 \fR \fIstring\fR
4e90: 0a 54 68 65 20 69 73 73 75 65 72 20 75 6e 69 71 .The issuer uniq
4ea0: 75 65 20 69 64 5c 26 2e 0a 54 68 69 73 20 76 61 ue id\&..This va
4eb0: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 lue is new for T
4ec0: 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e clTLS 1\&.8\&...
4ed0: 54 50 0a 5c 66 42 73 75 62 6a 65 63 74 55 6e 69 TP.\fBsubjectUni
4ee0: 71 75 65 49 44 5c 66 52 20 5c 66 49 73 74 72 69 queID\fR \fIstri
4ef0: 6e 67 5c 66 52 0a 54 68 65 20 73 75 62 6a 65 63 ng\fR.The subjec
4f00: 74 20 75 6e 69 71 75 65 20 69 64 5c 26 2e 0a 54 t unique id\&..T
4f10: 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 his value is new
4f20: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e for TclTLS 1\&.
4f30: 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 6e 75 6d 5f 8\&...TP.\fBnum_
4f40: 65 78 74 65 6e 73 69 6f 6e 73 5c 66 52 20 5c 66 extensions\fR \f
4f50: 49 6e 5c 66 52 0a 4e 75 6d 62 65 72 20 6f 66 20 In\fR.Number of
4f60: 63 65 72 74 69 66 69 63 61 74 65 20 65 78 74 65 certificate exte
4f70: 6e 73 69 6f 6e 73 5c 26 2e 0a 54 68 69 73 20 76 nsions\&..This v
4f80: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 alue is new for
4f90: 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a TclTLS 1\&.8\&..
4fa0: 2e 54 50 0a 5c 66 42 65 78 74 65 6e 73 69 6f 6e .TP.\fBextension
4fb0: 73 5c 66 52 20 5c 66 49 6c 69 73 74 5c 66 52 0a s\fR \fIlist\fR.
4fc0: 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 69 63 List of certific
4fd0: 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 20 6e 61 ate extension na
4fe0: 6d 65 73 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 mes\&..This valu
4ff0: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
5000: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 TLS 1\&.8\&...TP
5010: 0a 5c 66 42 61 75 74 68 6f 72 69 74 79 4b 65 79 .\fBauthorityKey
5020: 49 64 65 6e 74 69 66 69 65 72 5c 66 52 20 5c 66 Identifier\fR \f
5030: 49 73 74 72 69 6e 67 5c 66 52 0a 41 75 74 68 6f Istring\fR.Autho
5040: 72 69 74 79 20 4b 65 79 20 49 64 65 6e 74 69 66 rity Key Identif
5050: 69 65 72 20 28 41 4b 49 29 20 6f 66 20 74 68 65 ier (AKI) of the
5060: 20 49 73 73 75 69 6e 67 20 43 41 20 63 65 72 74 Issuing CA cert
5070: 69 66 69 63 61 74 65 20 74 68 61 74 20 73 69 67 ificate that sig
5080: 6e 65 64 20 74 68 65 0a 53 53 4c 20 63 65 72 74 ned the.SSL cert
5090: 69 66 69 63 61 74 65 20 61 73 20 61 20 68 65 78 ificate as a hex
50a0: 20 73 74 72 69 6e 67 5c 26 2e 20 54 68 69 73 20 string\&. This
50b0: 76 61 6c 75 65 20 6d 61 74 63 68 65 73 20 74 68 value matches th
50c0: 65 20 53 4b 49 20 76 61 6c 75 65 20 6f 66 20 74 e SKI value of t
50d0: 68 65 0a 49 6e 74 65 72 6d 65 64 69 61 74 65 20 he.Intermediate
50e0: 43 41 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 CA certificate\&
50f0: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 ..This value is
5100: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
5110: 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 \&.8\&...TP.\fBs
5120: 75 62 6a 65 63 74 4b 65 79 49 64 65 6e 74 69 66 ubjectKeyIdentif
5130: 69 65 72 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 ier\fR \fIstring
5140: 5c 66 52 0a 53 75 62 6a 65 63 74 20 4b 65 79 20 \fR.Subject Key
5150: 49 64 65 6e 74 69 66 69 65 72 20 28 53 4b 49 29 Identifier (SKI)
5160: 20 68 61 73 68 20 6f 66 20 74 68 65 20 70 75 62 hash of the pub
5170: 6c 69 63 20 6b 65 79 20 69 6e 73 69 64 65 20 74 lic key inside t
5180: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61 he certificate a
5190: 73 20 61 0a 68 65 78 20 73 74 72 69 6e 67 5c 26 s a.hex string\&
51a0: 2e 20 55 73 65 64 20 74 6f 20 69 64 65 6e 74 69 . Used to identi
51b0: 66 79 20 63 65 72 74 69 66 69 63 61 74 65 73 20 fy certificates
51c0: 74 68 61 74 20 63 6f 6e 74 61 69 6e 20 61 20 70 that contain a p
51d0: 61 72 74 69 63 75 6c 61 72 20 70 75 62 6c 69 63 articular public
51e0: 20 6b 65 79 5c 26 2e 0a 54 68 69 73 20 76 61 6c key\&..This val
51f0: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 ue is new for Tc
5200: 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 lTLS 1\&.8\&...T
5210: 50 0a 5c 66 42 73 75 62 6a 65 63 74 41 6c 74 4e P.\fBsubjectAltN
5220: 61 6d 65 5c 66 52 20 5c 66 49 6c 69 73 74 5c 66 ame\fR \fIlist\f
5230: 52 0a 4c 69 73 74 20 6f 66 20 61 6c 6c 20 6f 66 R.List of all of
5240: 20 74 68 65 20 53 75 62 6a 65 63 74 20 41 6c 74 the Subject Alt
5250: 65 72 6e 61 74 69 76 65 20 4e 61 6d 65 73 20 28 ernative Names (
5260: 53 41 4e 29 20 69 6e 63 6c 75 64 69 6e 67 20 64 SAN) including d
5270: 6f 6d 61 69 6e 20 6e 61 6d 65 73 2c 20 73 75 62 omain names, sub
5280: 0a 64 6f 6d 61 69 6e 73 2c 20 61 6e 64 20 49 50 .domains, and IP
5290: 20 61 64 64 72 65 73 73 65 73 20 74 68 61 74 20 addresses that
52a0: 61 72 65 20 73 65 63 75 72 65 64 20 62 79 20 74 are secured by t
52b0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 he certificate\&
52c0: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 ..This value is
52d0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
52e0: 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 6f \&.8\&...TP.\fBo
52f0: 63 73 70 5c 66 52 20 5c 66 49 6c 69 73 74 5c 66 csp\fR \fIlist\f
5300: 52 0a 4c 69 73 74 20 6f 66 20 61 6c 6c 20 4f 6e R.List of all On
5310: 6c 69 6e 65 20 43 65 72 74 69 66 69 63 61 74 65 line Certificate
5320: 20 53 74 61 74 75 73 20 50 72 6f 74 6f 63 6f 6c Status Protocol
5330: 20 28 4f 43 53 50 29 20 55 52 4c 73 20 74 68 61 (OCSP) URLs tha
5340: 74 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f t can be used to
5350: 0a 63 68 65 63 6b 20 74 68 65 20 76 61 6c 69 64 .check the valid
5360: 69 74 79 20 6f 66 20 74 68 69 73 20 63 65 72 74 ity of this cert
5370: 69 66 69 63 61 74 65 5c 26 2e 0a 54 68 69 73 20 ificate\&..This
5380: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
5390: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
53a0: 0a 2e 54 50 0a 5c 66 42 63 65 72 74 69 66 69 63 ..TP.\fBcertific
53b0: 61 74 65 5c 66 52 20 5c 66 49 63 65 72 74 5c 66 ate\fR \fIcert\f
53c0: 52 0a 54 68 65 20 50 45 4d 20 65 6e 63 6f 64 65 R.The PEM encode
53d0: 64 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 2e d certificate\&.
53e0: 0a 2e 54 50 0a 5c 66 42 73 69 67 6e 61 74 75 72 ..TP.\fBsignatur
53f0: 65 41 6c 67 6f 72 69 74 68 6d 5c 66 52 20 5c 66 eAlgorithm\fR \f
5400: 49 61 6c 67 6f 72 69 74 68 6d 5c 66 52 0a 43 69 Ialgorithm\fR.Ci
5410: 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d 20 75 pher algorithm u
5420: 73 65 64 20 66 6f 72 20 74 68 65 20 63 65 72 74 sed for the cert
5430: 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 ificate signatur
5440: 65 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 e\&..This value
5450: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c is new for TclTL
5460: 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c S 1\&.8\&...TP.\
5470: 66 42 73 69 67 6e 61 74 75 72 65 56 61 6c 75 65 fBsignatureValue
5480: 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 \fR \fIstring\fR
5490: 0a 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 .Certificate sig
54a0: 6e 61 74 75 72 65 20 61 73 20 61 20 68 65 78 20 nature as a hex
54b0: 73 74 72 69 6e 67 5c 26 2e 0a 54 68 69 73 20 76 string\&..This v
54c0: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 alue is new for
54d0: 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a TclTLS 1\&.8\&..
54e0: 2e 54 50 0a 5c 66 42 73 69 67 6e 61 74 75 72 65 .TP.\fBsignature
54f0: 44 69 67 65 73 74 5c 66 52 20 5c 66 49 76 65 72 Digest\fR \fIver
5500: 73 69 6f 6e 5c 66 52 0a 43 65 72 74 69 66 69 63 sion\fR.Certific
5510: 61 74 65 20 73 69 67 6e 69 6e 67 20 64 69 67 65 ate signing dige
5520: 73 74 20 61 73 20 61 20 68 65 78 20 73 74 72 69 st as a hex stri
5530: 6e 67 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 ng\&..This value
5540: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
5550: 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a LS 1\&.8\&...TP.
5560: 5c 66 42 70 75 62 6c 69 63 4b 65 79 41 6c 67 6f \fBpublicKeyAlgo
5570: 72 69 74 68 6d 5c 66 52 20 5c 66 49 61 6c 67 6f rithm\fR \fIalgo
5580: 72 69 74 68 6d 5c 66 52 0a 43 65 72 74 69 66 69 rithm\fR.Certifi
5590: 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 70 cate signature p
55a0: 75 62 6c 69 63 20 6b 65 79 20 61 6c 67 6f 72 69 ublic key algori
55b0: 74 68 6d 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 thm\&..This valu
55c0: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
55d0: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 TLS 1\&.8\&...TP
55e0: 0a 5c 66 42 70 75 62 6c 69 63 4b 65 79 5c 66 52 .\fBpublicKey\fR
55f0: 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 43 65 \fIstring\fR.Ce
5600: 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 rtificate signat
5610: 75 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61 ure public key a
5620: 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 5c 26 s a hex string\&
5630: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 ..This value is
5640: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
5650: 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 62 \&.8\&...TP.\fBb
5660: 69 74 73 5c 66 52 20 5c 66 49 6e 5c 66 52 0a 4e its\fR \fIn\fR.N
5670: 75 6d 62 65 72 20 6f 66 20 62 69 74 73 20 75 73 umber of bits us
5680: 65 64 20 66 6f 72 20 63 65 72 74 69 66 69 63 61 ed for certifica
5690: 74 65 20 73 69 67 6e 61 74 75 72 65 20 6b 65 79 te signature key
56a0: 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 \&..This value i
56b0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
56c0: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 1\&.8\&...TP.\f
56d0: 42 73 65 6c 66 5f 73 69 67 6e 65 64 5c 66 52 20 Bself_signed\fR
56e0: 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a 57 68 \fIboolean\fR.Wh
56f0: 65 74 68 65 72 20 74 68 65 20 63 65 72 74 69 66 ether the certif
5700: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 icate signature
5710: 69 73 20 73 65 6c 66 20 73 69 67 6e 65 64 5c 26 is self signed\&
5720: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 ..This value is
5730: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
5740: 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 \&.8\&...TP.\fBs
5750: 68 61 31 5f 68 61 73 68 5c 66 52 20 5c 66 49 68 ha1_hash\fR \fIh
5760: 61 73 68 5c 66 52 0a 54 68 65 20 53 48 41 31 20 ash\fR.The SHA1
5770: 68 61 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 hash of the cert
5780: 69 66 69 63 61 74 65 20 61 73 20 61 20 68 65 78 ificate as a hex
5790: 20 73 74 72 69 6e 67 5c 26 2e 0a 54 68 69 73 20 string\&..This
57a0: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
57b0: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
57c0: 0a 2e 54 50 0a 5c 66 42 73 68 61 32 35 36 5f 68 ..TP.\fBsha256_h
57d0: 61 73 68 5c 66 52 20 5c 66 49 68 61 73 68 5c 66 ash\fR \fIhash\f
57e0: 52 0a 54 68 65 20 53 48 41 32 35 36 20 68 61 73 R.The SHA256 has
57f0: 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 h of the certifi
5800: 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73 74 cate as a hex st
5810: 72 69 6e 67 5c 26 2e 0a 54 68 69 73 20 76 61 6c ring\&..This val
5820: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 ue is new for Tc
5830: 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 52 lTLS 1\&.8\&...R
5840: 45 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 63 6f E..TP.\fBtls::co
5850: 6e 6e 65 63 74 69 6f 6e 5c 66 52 20 5c 66 49 63 nnection\fR \fIc
5860: 68 61 6e 6e 65 6c 5c 66 52 0a 52 65 74 75 72 6e hannel\fR.Return
5870: 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 63 6f s the current co
5880: 6e 6e 65 63 74 69 6f 6e 20 73 74 61 74 75 73 20 nnection status
5890: 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 of an SSL channe
58a0: 6c 5c 26 2e 20 54 68 65 20 72 65 73 75 6c 74 20 l\&. The result
58b0: 69 73 20 61 20 6c 69 73 74 0a 6f 66 20 6b 65 79 is a list.of key
58c0: 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 65 73 -value pairs des
58d0: 63 72 69 62 69 6e 67 20 74 68 65 20 63 6f 6e 6e cribing the conn
58e0: 65 63 74 69 6f 6e 5c 26 2e 0a 54 68 69 73 20 63 ection\&..This c
58f0: 6f 6d 6d 61 6e 64 20 69 73 20 6e 65 77 20 66 6f ommand is new fo
5900: 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 r TclTLS 1\&.8\&
5910: 2e 20 52 65 74 75 72 6e 65 64 20 76 61 6c 75 65 . Returned value
5920: 73 20 69 6e 63 6c 75 64 65 3a 0a 2e 73 70 0a 53 s include:..sp.S
5930: 53 4c 20 53 74 61 74 75 73 0a 2e 52 53 0a 2e 54 SL Status..RS..T
5940: 50 0a 5c 66 42 73 74 61 74 65 5c 66 52 20 5c 66 P.\fBstate\fR \f
5950: 49 73 74 61 74 65 5c 66 52 0a 53 74 61 74 65 20 Istate\fR.State
5960: 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f of the connectio
5970: 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 72 76 n\&...TP.\fBserv
5980: 65 72 6e 61 6d 65 5c 66 52 20 5c 66 49 6e 61 6d ername\fR \fInam
5990: 65 5c 66 52 0a 54 68 65 20 6e 61 6d 65 20 6f 66 e\fR.The name of
59a0: 20 74 68 65 20 63 6f 6e 6e 65 63 74 65 64 20 74 the connected t
59b0: 6f 20 73 65 72 76 65 72 5c 26 2e 0a 2e 54 50 0a o server\&...TP.
59c0: 5c 66 42 70 72 6f 74 6f 63 6f 6c 5c 66 52 20 5c \fBprotocol\fR \
59d0: 66 49 76 65 72 73 69 6f 6e 5c 66 52 0a 54 68 65 fIversion\fR.The
59e0: 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f protocol versio
59f0: 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 n used for the c
5a00: 6f 6e 6e 65 63 74 69 6f 6e 3a 20 53 53 4c 32 2c onnection: SSL2,
5a10: 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53 SSL3, TLS1, TLS
5a20: 31 5c 26 2e 31 2c 20 54 4c 53 31 5c 26 2e 32 2c 1\&.1, TLS1\&.2,
5a30: 20 54 4c 53 31 5c 26 2e 33 2c 20 6f 72 20 75 6e TLS1\&.3, or un
5a40: 6b 6e 6f 77 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 known\&...TP.\fB
5a50: 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 5f 61 6c renegotiation_al
5a60: 6c 6f 77 65 64 5c 66 52 20 5c 66 49 62 6f 6f 6c lowed\fR \fIbool
5a70: 65 61 6e 5c 66 52 0a 57 68 65 74 68 65 72 20 70 ean\fR.Whether p
5a80: 72 6f 74 6f 63 6f 6c 20 72 65 6e 65 67 6f 74 69 rotocol renegoti
5a90: 61 74 69 6f 6e 20 69 73 20 73 75 70 70 6f 72 74 ation is support
5aa0: 65 64 20 6f 72 20 6e 6f 74 5c 26 2e 0a 2e 54 50 ed or not\&...TP
5ab0: 0a 5c 66 42 73 65 63 75 72 69 74 79 5f 6c 65 76 .\fBsecurity_lev
5ac0: 65 6c 5c 66 52 20 5c 66 49 6c 65 76 65 6c 5c 66 el\fR \fIlevel\f
5ad0: 52 0a 54 68 65 20 73 65 63 75 72 69 74 79 20 6c R.The security l
5ae0: 65 76 65 6c 20 75 73 65 64 20 66 6f 72 20 73 65 evel used for se
5af0: 6c 65 63 74 69 6f 6e 20 6f 66 20 63 69 70 68 65 lection of ciphe
5b00: 72 73 2c 20 6b 65 79 20 73 69 7a 65 2c 20 65 74 rs, key size, et
5b10: 63 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 73 73 c\&...TP.\fBsess
5b20: 69 6f 6e 5f 72 65 75 73 65 64 5c 66 52 20 5c 66 ion_reused\fR \f
5b30: 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a 57 68 65 74 Iboolean\fR.Whet
5b40: 68 65 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 her the session
5b50: 68 61 73 20 62 65 65 6e 20 72 65 75 73 65 64 20 has been reused
5b60: 6f 72 20 6e 6f 74 5c 26 2e 0a 2e 54 50 0a 5c 66 or not\&...TP.\f
5b70: 42 69 73 5f 73 65 72 76 65 72 5c 66 52 20 5c 66 Bis_server\fR \f
5b80: 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a 57 68 65 74 Iboolean\fR.Whet
5b90: 68 65 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 her the connecti
5ba0: 6f 6e 20 69 73 20 63 6f 6e 66 69 67 75 72 65 64 on is configured
5bb0: 20 61 73 20 61 20 73 65 72 76 65 72 20 28 31 29 as a server (1)
5bc0: 20 6f 72 20 63 6c 69 65 6e 74 20 28 30 29 5c 26 or client (0)\&
5bd0: 2e 0a 2e 54 50 0a 5c 66 42 63 6f 6d 70 72 65 73 ...TP.\fBcompres
5be0: 73 69 6f 6e 5c 66 52 20 5c 66 49 6d 6f 64 65 5c sion\fR \fImode\
5bf0: 66 52 0a 43 6f 6d 70 72 65 73 73 69 6f 6e 20 6d fR.Compression m
5c00: 65 74 68 6f 64 5c 26 2e 0a 2e 54 50 0a 5c 66 42 ethod\&...TP.\fB
5c10: 65 78 70 61 6e 73 69 6f 6e 5c 66 52 20 5c 66 49 expansion\fR \fI
5c20: 6d 6f 64 65 5c 66 52 0a 45 78 70 61 6e 73 69 6f mode\fR.Expansio
5c30: 6e 20 6d 65 74 68 6f 64 5c 26 2e 0a 2e 54 50 0a n method\&...TP.
5c40: 5c 66 42 63 61 4c 69 73 74 5c 66 52 20 5c 66 49 \fBcaList\fR \fI
5c50: 6c 69 73 74 5c 66 52 0a 4c 69 73 74 20 6f 66 20 list\fR.List of
5c60: 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 Certificate Auth
5c70: 6f 72 69 74 69 65 73 20 28 43 41 29 20 66 6f 72 orities (CA) for
5c80: 20 58 5c 26 2e 35 30 39 20 63 65 72 74 69 66 69 X\&.509 certifi
5c90: 63 61 74 65 5c 26 2e 0a 2e 52 45 0a 2e 49 50 0a cate\&...RE..IP.
5ca0: 43 69 70 68 65 72 20 49 6e 66 6f 0a 2e 52 53 0a Cipher Info..RS.
5cb0: 2e 54 50 0a 5c 66 42 63 69 70 68 65 72 5c 66 52 .TP.\fBcipher\fR
5cc0: 20 5c 66 49 63 69 70 68 65 72 5c 66 52 0a 54 68 \fIcipher\fR.Th
5cd0: 65 20 63 75 72 72 65 6e 74 20 63 69 70 68 65 72 e current cipher
5ce0: 20 69 6e 20 75 73 65 20 66 6f 72 20 74 68 65 20 in use for the
5cf0: 63 6f 6e 6e 65 63 74 69 6f 6e 5c 26 2e 0a 2e 54 connection\&...T
5d00: 50 0a 5c 66 42 73 74 61 6e 64 61 72 64 5f 6e 61 P.\fBstandard_na
5d10: 6d 65 5c 66 52 20 5c 66 49 6e 61 6d 65 5c 66 52 me\fR \fIname\fR
5d20: 0a 54 68 65 20 73 74 61 6e 64 61 72 64 20 52 46 .The standard RF
5d30: 43 20 6e 61 6d 65 20 6f 66 20 63 69 70 68 65 72 C name of cipher
5d40: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 61 6c 67 6f 72 \&...TP.\fBalgor
5d50: 69 74 68 6d 5f 62 69 74 73 5c 66 52 20 5c 66 49 ithm_bits\fR \fI
5d60: 6e 5c 66 52 0a 54 68 65 20 6e 75 6d 62 65 72 20 n\fR.The number
5d70: 6f 66 20 70 72 6f 63 65 73 73 65 64 20 62 69 74 of processed bit
5d80: 73 20 75 73 65 64 20 66 6f 72 20 63 69 70 68 65 s used for ciphe
5d90: 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 63 72 r\&...TP.\fBsecr
5da0: 65 74 5f 62 69 74 73 5c 66 52 20 5c 66 49 6e 5c et_bits\fR \fIn\
5db0: 66 52 0a 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 fR.The number of
5dc0: 20 73 65 63 72 65 74 20 62 69 74 73 20 75 73 65 secret bits use
5dd0: 64 20 66 6f 72 20 63 69 70 68 65 72 5c 26 2e 0a d for cipher\&..
5de0: 2e 54 50 0a 5c 66 42 6d 69 6e 5f 76 65 72 73 69 .TP.\fBmin_versi
5df0: 6f 6e 5c 66 52 20 5c 66 49 76 65 72 73 69 6f 6e on\fR \fIversion
5e00: 5c 66 52 0a 54 68 65 20 6d 69 6e 69 6d 75 6d 20 \fR.The minimum
5e10: 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e protocol version
5e20: 20 66 6f 72 20 63 69 70 68 65 72 5c 26 2e 0a 2e for cipher\&...
5e30: 54 50 0a 5c 66 42 63 69 70 68 65 72 5f 69 73 5f TP.\fBcipher_is_
5e40: 61 65 61 64 5c 66 52 20 5c 66 49 62 6f 6f 6c 65 aead\fR \fIboole
5e50: 61 6e 5c 66 52 0a 57 68 65 74 68 65 72 20 74 68 an\fR.Whether th
5e60: 65 20 63 69 70 68 65 72 20 69 73 20 41 75 74 68 e cipher is Auth
5e70: 65 6e 74 69 63 61 74 65 64 20 45 6e 63 72 79 70 enticated Encryp
5e80: 74 69 6f 6e 20 77 69 74 68 20 41 73 73 6f 63 69 tion with Associ
5e90: 61 74 65 64 20 44 61 74 61 20 28 41 45 41 44 29 ated Data (AEAD)
5ea0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 63 69 70 68 65 \&...TP.\fBciphe
5eb0: 72 5f 69 64 5c 66 52 20 5c 66 49 69 64 5c 66 52 r_id\fR \fIid\fR
5ec0: 0a 54 68 65 20 4f 70 65 6e 53 53 4c 20 63 69 70 .The OpenSSL cip
5ed0: 68 65 72 20 69 64 5c 26 2e 0a 2e 54 50 0a 5c 66 her id\&...TP.\f
5ee0: 42 64 65 73 63 72 69 70 74 69 6f 6e 5c 66 52 20 Bdescription\fR
5ef0: 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 41 20 74 \fIstring\fR.A t
5f00: 65 78 74 20 64 65 73 63 72 69 70 74 69 6f 6e 20 ext description
5f10: 6f 66 20 74 68 65 20 63 69 70 68 65 72 5c 26 2e of the cipher\&.
5f20: 0a 2e 54 50 0a 5c 66 42 68 61 6e 64 73 68 61 6b ..TP.\fBhandshak
5f30: 65 5f 64 69 67 65 73 74 5c 66 52 20 5c 66 49 62 e_digest\fR \fIb
5f40: 6f 6f 6c 65 61 6e 5c 66 52 0a 44 69 67 65 73 74 oolean\fR.Digest
5f50: 20 75 73 65 64 20 64 75 72 69 6e 67 20 68 61 6e used during han
5f60: 64 73 68 61 6b 65 5c 26 2e 0a 2e 52 45 0a 2e 49 dshake\&...RE..I
5f70: 50 0a 53 65 73 73 69 6f 6e 20 49 6e 66 6f 0a 2e P.Session Info..
5f80: 52 53 0a 2e 54 50 0a 5c 66 42 61 6c 70 6e 5c 66 RS..TP.\fBalpn\f
5f90: 52 20 5c 66 49 70 72 6f 74 6f 63 6f 6c 5c 66 52 R \fIprotocol\fR
5fa0: 0a 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 73 65 .The protocol se
5fb0: 6c 65 63 74 65 64 20 61 66 74 65 72 20 41 70 70 lected after App
5fc0: 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50 lication-Layer P
5fd0: 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74 rotocol Negotiat
5fe0: 69 6f 6e 20 28 41 4c 50 4e 29 5c 26 2e 0a 2e 54 ion (ALPN)\&...T
5ff0: 50 0a 5c 66 42 72 65 73 75 6d 61 62 6c 65 5c 66 P.\fBresumable\f
6000: 52 20 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a R \fIboolean\fR.
6010: 57 68 65 74 68 65 72 20 74 68 65 20 73 65 73 73 Whether the sess
6020: 69 6f 6e 20 63 61 6e 20 62 65 20 72 65 73 75 6d ion can be resum
6030: 65 64 20 6f 72 20 6e 6f 74 5c 26 2e 0a 2e 54 50 ed or not\&...TP
6040: 0a 5c 66 42 73 74 61 72 74 5f 74 69 6d 65 5c 66 .\fBstart_time\f
6050: 52 20 5c 66 49 73 65 63 6f 6e 64 73 5c 66 52 0a R \fIseconds\fR.
6060: 54 69 6d 65 20 73 69 6e 63 65 20 73 65 73 73 69 Time since sessi
6070: 6f 6e 20 73 74 61 72 74 65 64 20 69 6e 20 73 65 on started in se
6080: 63 6f 6e 64 73 20 73 69 6e 63 65 20 65 70 6f 63 conds since epoc
6090: 68 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 69 6d 65 h\&...TP.\fBtime
60a0: 6f 75 74 5c 66 52 20 5c 66 49 73 65 63 6f 6e 64 out\fR \fIsecond
60b0: 73 5c 66 52 0a 4d 61 78 20 64 75 72 61 74 69 6f s\fR.Max duratio
60c0: 6e 20 6f 66 20 73 65 73 73 69 6f 6e 20 69 6e 20 n of session in
60d0: 73 65 63 6f 6e 64 73 20 62 65 66 6f 72 65 20 74 seconds before t
60e0: 69 6d 65 2d 6f 75 74 5c 26 2e 0a 2e 54 50 0a 5c ime-out\&...TP.\
60f0: 66 42 6c 69 66 65 74 69 6d 65 5c 66 52 20 5c 66 fBlifetime\fR \f
6100: 49 73 65 63 6f 6e 64 73 5c 66 52 0a 53 65 73 73 Iseconds\fR.Sess
6110: 69 6f 6e 20 74 69 63 6b 65 74 20 6c 69 66 65 74 ion ticket lifet
6120: 69 6d 65 20 68 69 6e 74 20 69 6e 20 73 65 63 6f ime hint in seco
6130: 6e 64 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 nds\&...TP.\fBse
6140: 73 73 69 6f 6e 5f 69 64 5c 66 52 20 5c 66 49 62 ssion_id\fR \fIb
6150: 69 6e 61 72 79 5f 73 74 72 69 6e 67 5c 66 52 0a inary_string\fR.
6160: 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 69 Unique session i
6170: 64 20 66 6f 72 20 75 73 65 20 69 6e 20 72 65 73 d for use in res
6180: 75 6d 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f uming the sessio
6190: 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 73 73 n\&...TP.\fBsess
61a0: 69 6f 6e 5f 74 69 63 6b 65 74 5c 66 52 20 5c 66 ion_ticket\fR \f
61b0: 49 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 5c 66 Ibinary_string\f
61c0: 52 0a 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e R.Unique session
61d0: 20 74 69 63 6b 65 74 20 66 6f 72 20 75 73 65 20 ticket for use
61e0: 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65 20 in resuming the
61f0: 73 65 73 73 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c session\&...TP.\
6200: 66 42 74 69 63 6b 65 74 5f 61 70 70 5f 64 61 74 fBticket_app_dat
6210: 61 5c 66 52 20 5c 66 49 62 69 6e 61 72 79 5f 73 a\fR \fIbinary_s
6220: 74 72 69 6e 67 5c 66 52 0a 55 6e 69 71 75 65 20 tring\fR.Unique
6230: 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 61 session ticket a
6240: 70 70 6c 69 63 61 74 69 6f 6e 20 64 61 74 61 5c pplication data\
6250: 26 2e 0a 2e 54 50 0a 5c 66 42 6d 61 73 74 65 72 &...TP.\fBmaster
6260: 5f 6b 65 79 5c 66 52 20 5c 66 49 62 69 6e 61 72 _key\fR \fIbinar
6270: 79 5f 73 74 72 69 6e 67 5c 66 52 0a 55 6e 69 71 y_string\fR.Uniq
6280: 75 65 20 73 65 73 73 69 6f 6e 20 6d 61 73 74 65 ue session maste
6290: 72 20 6b 65 79 5c 26 2e 0a 2e 54 50 0a 5c 66 42 r key\&...TP.\fB
62a0: 73 65 73 73 69 6f 6e 5f 63 61 63 68 65 5f 6d 6f session_cache_mo
62b0: 64 65 5c 66 52 20 5c 66 49 6d 6f 64 65 5c 66 52 de\fR \fImode\fR
62c0: 0a 53 65 72 76 65 72 20 63 61 63 68 65 20 6d 6f .Server cache mo
62d0: 64 65 20 28 63 6c 69 65 6e 74 2c 20 73 65 72 76 de (client, serv
62e0: 65 72 2c 20 6f 72 20 62 6f 74 68 29 5c 26 2e 0a er, or both)\&..
62f0: 2e 52 45 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a .RE..TP.\fBtls::
6300: 63 69 70 68 65 72 73 5c 66 52 20 3f 5c 66 49 70 ciphers\fR ?\fIp
6310: 72 6f 74 6f 63 6f 6c 5c 66 52 3f 20 3f 5c 66 49 rotocol\fR? ?\fI
6320: 76 65 72 62 6f 73 65 5c 66 52 3f 20 3f 5c 66 49 verbose\fR? ?\fI
6330: 73 75 70 70 6f 72 74 65 64 5c 66 52 3f 0a 57 69 supported\fR?.Wi
6340: 74 68 6f 75 74 20 61 6e 79 20 6f 70 74 69 6f 6e thout any option
6350: 73 2c 20 69 74 20 72 65 74 75 72 6e 73 20 61 20 s, it returns a
6360: 6c 69 73 74 20 6f 66 20 61 6c 6c 20 73 79 6d 6d list of all symm
6370: 65 74 72 69 63 20 63 69 70 68 65 72 73 20 66 6f etric ciphers fo
6380: 72 20 75 73 65 20 77 69 74 68 20 74 68 65 0a 5c r use with the.\
6390: 66 49 2d 63 69 70 68 65 72 5c 66 52 20 6f 70 74 fI-cipher\fR opt
63a0: 69 6f 6e 5c 26 2e 20 57 69 74 68 20 5c 66 49 70 ion\&. With \fIp
63b0: 72 6f 74 6f 63 6f 6c 5c 66 52 2c 20 6f 6e 6c 79 rotocol\fR, only
63c0: 20 74 68 65 20 63 69 70 68 65 72 73 20 73 75 70 the ciphers sup
63d0: 70 6f 72 74 65 64 20 66 6f 72 20 74 68 61 74 0a ported for that.
63e0: 70 72 6f 74 6f 63 6f 6c 20 61 72 65 20 72 65 74 protocol are ret
63f0: 75 72 6e 65 64 5c 26 2e 20 53 65 65 20 74 68 65 urned\&. See the
6400: 20 5c 66 42 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f \fBtls::protoco
6410: 6c 73 5c 66 52 20 63 6f 6d 6d 61 6e 64 20 66 6f ls\fR command fo
6420: 72 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 0a r the supported.
6430: 70 72 6f 74 6f 63 6f 6c 73 5c 26 2e 20 49 66 20 protocols\&. If
6440: 5c 66 49 76 65 72 62 6f 73 65 5c 66 52 20 69 73 \fIverbose\fR is
6450: 20 73 70 65 63 69 66 69 65 64 20 61 73 20 74 72 specified as tr
6460: 75 65 20 74 68 65 6e 20 61 20 76 65 72 62 6f 73 ue then a verbos
6470: 65 2c 20 68 75 6d 61 6e 20 72 65 61 64 61 62 6c e, human readabl
6480: 65 0a 6c 69 73 74 20 69 73 20 72 65 74 75 72 6e e.list is return
6490: 65 64 20 77 69 74 68 20 61 64 64 69 74 69 6f 6e ed with addition
64a0: 61 6c 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f al information o
64b0: 6e 20 74 68 65 20 63 69 70 68 65 72 5c 26 2e 20 n the cipher\&.
64c0: 49 66 20 5c 66 49 73 75 70 70 6f 72 74 65 64 5c If \fIsupported\
64d0: 66 52 0a 69 73 20 73 70 65 63 69 66 69 65 64 20 fR.is specified
64e0: 61 73 20 74 72 75 65 2c 20 74 68 65 6e 20 6f 6e as true, then on
64f0: 6c 79 20 74 68 65 20 63 69 70 68 65 72 73 20 73 ly the ciphers s
6500: 75 70 70 6f 72 74 65 64 20 66 6f 72 20 70 72 6f upported for pro
6510: 74 6f 63 6f 6c 20 77 69 6c 6c 20 62 65 20 6c 69 tocol will be li
6520: 73 74 65 64 5c 26 2e 0a 54 68 65 20 5c 66 49 73 sted\&..The \fIs
6530: 75 70 70 6f 72 74 65 64 5c 66 52 20 61 72 67 20 upported\fR arg
6540: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c is new for TclTL
6550: 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c S 1\&.8\&...TP.\
6560: 66 42 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 fBtls::protocols
6570: 5c 66 52 0a 52 65 74 75 72 6e 73 20 61 20 6c 69 \fR.Returns a li
6580: 73 74 20 6f 66 20 74 68 65 20 73 75 70 70 6f 72 st of the suppor
6590: 74 65 64 20 53 53 4c 2f 54 4c 53 20 70 72 6f 74 ted SSL/TLS prot
65a0: 6f 63 6f 6c 73 5c 26 2e 20 56 61 6c 69 64 20 76 ocols\&. Valid v
65b0: 61 6c 75 65 73 20 61 72 65 3a 0a 5c 66 42 73 73 alues are:.\fBss
65c0: 6c 32 5c 66 52 2c 20 5c 66 42 73 73 6c 33 5c 66 l2\fR, \fBssl3\f
65d0: 52 2c 20 5c 66 42 74 6c 73 31 5c 66 52 2c 20 5c R, \fBtls1\fR, \
65e0: 66 42 74 6c 73 31 5c 26 2e 31 5c 66 52 2c 20 5c fBtls1\&.1\fR, \
65f0: 66 42 74 6c 73 31 5c 26 2e 32 5c 66 52 2c 20 61 fBtls1\&.2\fR, a
6600: 6e 64 0a 5c 66 42 74 6c 73 31 5c 26 2e 33 5c 66 nd.\fBtls1\&.3\f
6610: 52 5c 26 2e 20 45 78 61 63 74 20 6c 69 73 74 20 R\&. Exact list
6620: 64 65 70 65 6e 64 73 20 6f 6e 20 4f 70 65 6e 53 depends on OpenS
6630: 53 4c 20 76 65 72 73 69 6f 6e 20 61 6e 64 20 63 SL version and c
6640: 6f 6d 70 69 6c 65 20 74 69 6d 65 20 66 6c 61 67 ompile time flag
6650: 73 5c 26 2e 0a 54 68 69 73 20 63 6f 6d 6d 61 6e s\&..This comman
6660: 64 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c d is new for Tcl
6670: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 TLS 1\&.8\&...TP
6680: 0a 5c 66 42 74 6c 73 3a 3a 76 65 72 73 69 6f 6e .\fBtls::version
6690: 5c 66 52 0a 52 65 74 75 72 6e 73 20 74 68 65 20 \fR.Returns the
66a0: 4f 70 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 OpenSSL version
66b0: 73 74 72 69 6e 67 5c 26 2e 0a 2e 50 50 0a 2e 53 string\&...PP..S
66c0: 48 20 22 43 45 52 54 49 46 49 43 41 54 45 20 56 H "CERTIFICATE V
66d0: 41 4c 49 44 41 54 49 4f 4e 22 0a 2e 53 53 20 22 ALIDATION"..SS "
66e0: 50 4b 49 20 41 4e 44 20 43 45 52 54 49 46 49 43 PKI AND CERTIFIC
66f0: 41 54 45 53 22 0a 55 73 69 6e 67 20 74 68 65 20 ATES".Using the
6700: 50 75 62 6c 69 63 20 4b 65 79 20 49 6e 66 72 61 Public Key Infra
6710: 73 74 72 75 63 74 75 72 65 20 28 50 4b 49 29 2c structure (PKI),
6720: 20 65 61 63 68 20 75 73 65 72 20 63 72 65 61 74 each user creat
6730: 65 73 20 61 20 70 72 69 76 61 74 65 20 6b 65 79 es a private key
6740: 20 74 68 61 74 0a 6f 6e 6c 79 20 74 68 65 79 20 that.only they
6750: 6b 6e 6f 77 20 61 62 6f 75 74 20 61 6e 64 20 61 know about and a
6760: 20 70 75 62 6c 69 63 20 6b 65 79 20 74 68 65 79 public key they
6770: 20 63 61 6e 20 65 78 63 68 61 6e 67 65 20 77 69 can exchange wi
6780: 74 68 20 6f 74 68 65 72 73 20 66 6f 72 20 75 73 th others for us
6790: 65 20 69 6e 0a 65 6e 63 72 79 70 74 69 6e 67 20 e in.encrypting
67a0: 61 6e 64 20 64 65 63 72 79 70 74 69 6e 67 20 64 and decrypting d
67b0: 61 74 61 5c 26 2e 20 54 68 65 20 70 72 6f 63 65 ata\&. The proce
67c0: 73 73 20 69 73 20 74 68 65 20 73 65 6e 64 65 72 ss is the sender
67d0: 20 65 6e 63 72 79 70 74 73 20 74 68 65 69 72 20 encrypts their
67e0: 64 61 74 61 0a 75 73 69 6e 67 20 74 68 65 69 72 data.using their
67f0: 20 70 72 69 76 61 74 65 20 6b 65 79 20 61 6e 64 private key and
6800: 20 74 68 65 20 72 65 63 65 69 76 65 72 27 73 20 the receiver's
6810: 70 75 62 6c 69 63 20 6b 65 79 5c 26 2e 20 54 68 public key\&. Th
6820: 65 20 64 61 74 61 20 69 73 20 74 68 65 6e 20 73 e data is then s
6830: 65 6e 74 0a 74 6f 20 74 68 65 20 72 65 63 65 69 ent.to the recei
6840: 76 65 72 5c 26 2e 20 49 6e 20 61 20 73 69 6d 69 ver\&. In a simi
6850: 6c 61 72 20 6d 61 6e 6e 65 72 2c 20 74 68 65 20 lar manner, the
6860: 72 65 63 65 69 76 65 72 20 75 73 65 73 20 74 68 receiver uses th
6870: 65 69 72 20 70 72 69 76 61 74 65 20 6b 65 79 20 eir private key
6880: 61 6e 64 0a 74 68 65 20 73 65 6e 64 65 72 27 73 and.the sender's
6890: 20 70 75 62 6c 69 63 20 6b 65 79 20 74 6f 20 64 public key to d
68a0: 65 63 72 79 70 74 20 74 68 65 20 64 61 74 61 5c ecrypt the data\
68b0: 26 2e 20 54 68 69 73 20 70 72 6f 76 69 64 65 73 &. This provides
68c0: 20 64 61 74 61 20 69 6e 74 65 67 72 69 74 79 2c data integrity,
68d0: 20 74 6f 0a 65 6e 73 75 72 65 20 74 68 65 20 64 to.ensure the d
68e0: 61 74 61 20 63 61 6e 27 74 20 62 65 20 76 69 65 ata can't be vie
68f0: 77 65 64 20 6f 72 20 61 6c 74 65 72 65 64 20 64 wed or altered d
6900: 75 72 69 6e 67 20 74 72 61 6e 73 70 6f 72 74 5c uring transport\
6910: 26 2e 20 53 65 65 20 74 68 65 0a 5c 66 42 2d 6b &. See the.\fB-k
6920: 65 79 5c 66 52 20 61 6e 64 20 5c 66 42 2d 6b 65 ey\fR and \fB-ke
6930: 79 66 69 6c 65 5c 66 52 20 6f 70 74 69 6f 6e 73 yfile\fR options
6940: 20 66 6f 72 20 68 6f 77 20 74 6f 20 73 70 65 63 for how to spec
6950: 69 66 79 20 74 68 65 20 70 72 69 76 61 74 65 20 ify the private
6960: 6b 65 79 5c 26 2e 0a 41 6c 73 6f 20 73 65 65 20 key\&..Also see
6970: 74 68 65 20 5c 66 42 2d 70 61 73 73 77 6f 72 64 the \fB-password
6980: 5c 66 52 20 6f 70 74 69 6f 6e 20 66 6f 72 20 68 \fR option for h
6990: 6f 77 20 74 6f 20 70 72 6f 76 69 64 65 20 74 68 ow to provide th
69a0: 65 20 70 61 73 73 77 6f 72 64 5c 26 2e 0a 2e 50 e password\&...P
69b0: 50 0a 49 6e 20 6f 72 64 65 72 20 74 6f 20 70 72 P.In order to pr
69c0: 6f 76 69 64 65 20 61 75 74 68 65 6e 74 69 63 61 ovide authentica
69d0: 74 69 6f 6e 2c 20 69 5c 26 2e 65 5c 26 2e 20 65 tion, i\&.e\&. e
69e0: 6e 73 75 72 69 6e 67 20 73 6f 6d 65 6f 6e 65 20 nsuring someone
69f0: 69 73 20 77 68 6f 20 74 68 65 79 20 73 61 79 20 is who they say
6a00: 74 68 65 79 0a 61 72 65 2c 20 74 68 65 20 70 75 they.are, the pu
6a10: 62 6c 69 63 20 6b 65 79 20 61 6e 64 20 75 73 65 blic key and use
6a20: 72 20 69 64 65 6e 74 69 66 69 63 61 74 69 6f 6e r identification
6a30: 20 69 6e 66 6f 20 69 73 20 73 74 6f 72 65 64 20 info is stored
6a40: 69 6e 20 61 20 58 5c 26 2e 35 30 39 0a 63 65 72 in a X\&.509.cer
6a50: 74 69 66 69 63 61 74 65 20 61 6e 64 20 74 68 61 tificate and tha
6a60: 74 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 t certificate is
6a70: 20 61 75 74 68 65 6e 74 69 63 61 74 65 64 20 28 authenticated (
6a80: 69 5c 26 2e 65 5c 26 2e 20 73 69 67 6e 65 64 29 i\&.e\&. signed)
6a90: 20 62 79 20 61 20 43 65 72 74 69 66 69 63 61 74 by a Certificat
6aa0: 65 0a 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 e.Authority (CA)
6ab0: 5c 26 2e 20 55 73 65 72 73 20 63 61 6e 20 74 68 \&. Users can th
6ac0: 65 6e 20 65 78 63 68 61 6e 67 65 20 74 68 65 73 en exchange thes
6ad0: 65 20 63 65 72 74 69 66 69 63 61 74 65 73 20 64 e certificates d
6ae0: 75 72 69 6e 67 20 74 68 65 20 54 4c 53 0a 69 6e uring the TLS.in
6af0: 69 74 69 61 6c 69 7a 61 74 69 6f 6e 20 70 72 6f itialization pro
6b00: 63 65 73 73 20 61 6e 64 20 63 68 65 63 6b 20 74 cess and check t
6b10: 68 65 6d 20 61 67 61 69 6e 73 74 20 74 68 65 20 hem against the
6b20: 72 6f 6f 74 20 43 41 20 63 65 72 74 69 66 69 63 root CA certific
6b30: 61 74 65 73 20 74 6f 20 65 6e 73 75 72 65 0a 74 ates to ensure.t
6b40: 68 65 79 20 61 72 65 20 76 61 6c 69 64 5c 26 2e hey are valid\&.
6b50: 20 54 68 69 73 20 69 73 20 68 61 6e 64 6c 65 64 This is handled
6b60: 20 62 79 20 4f 70 65 6e 53 53 4c 20 76 69 61 20 by OpenSSL via
6b70: 74 68 65 20 5c 66 42 2d 72 65 71 75 65 73 74 5c the \fB-request\
6b80: 66 52 20 61 6e 64 0a 5c 66 42 2d 72 65 71 75 69 fR and.\fB-requi
6b90: 72 65 5c 66 52 20 6f 70 74 69 6f 6e 73 5c 26 2e re\fR options\&.
6ba0: 20 53 65 65 20 74 68 65 20 5c 66 42 2d 63 61 64 See the \fB-cad
6bb0: 69 72 5c 66 52 2c 20 5c 66 42 2d 63 61 64 69 72 ir\fR, \fB-cadir
6bc0: 5c 66 52 2c 20 61 6e 64 0a 5c 66 42 2d 63 61 73 \fR, and.\fB-cas
6bd0: 74 6f 72 65 5c 66 52 20 6f 70 74 69 6f 6e 73 20 tore\fR options
6be0: 66 6f 72 20 68 6f 77 20 74 70 20 73 70 65 63 69 for how tp speci
6bf0: 66 79 20 77 68 65 72 65 20 74 6f 20 66 69 6e 64 fy where to find
6c00: 20 74 68 65 20 43 41 20 63 65 72 74 69 66 69 63 the CA certific
6c10: 61 74 65 73 5c 26 2e 0a 4f 70 74 69 6f 6e 61 6c ates\&..Optional
6c20: 6c 79 2c 20 69 6e 20 61 20 66 75 74 75 72 65 20 ly, in a future
6c30: 72 65 6c 65 61 73 65 2c 20 74 68 65 79 20 63 61 release, they ca
6c40: 6e 20 61 6c 73 6f 20 62 65 20 63 68 65 63 6b 65 n also be checke
6c50: 64 20 61 67 61 69 6e 73 74 20 74 68 65 20 43 65 d against the Ce
6c60: 72 74 69 66 69 63 61 74 65 0a 52 65 76 6f 63 61 rtificate.Revoca
6c70: 74 69 6f 6e 20 4c 69 73 74 20 28 43 52 4c 29 20 tion List (CRL)
6c80: 6f 66 20 72 65 76 6f 6b 65 64 20 63 65 72 74 69 of revoked certi
6c90: 66 69 63 61 74 65 73 5c 26 2e 20 43 65 72 74 69 ficates\&. Certi
6ca0: 66 69 63 61 74 65 73 20 63 61 6e 20 61 6c 73 6f ficates can also
6cb0: 20 62 65 0a 73 65 6c 66 2d 73 69 67 6e 65 64 2c be.self-signed,
6cc0: 20 62 75 74 20 74 68 65 79 20 61 72 65 20 62 79 but they are by
6cd0: 20 64 65 66 61 75 6c 74 20 6e 6f 74 20 74 72 75 default not tru
6ce0: 73 74 65 64 20 75 6e 6c 65 73 73 20 79 6f 75 20 sted unless you
6cf0: 61 64 64 20 74 68 65 6d 20 74 6f 20 79 6f 75 72 add them to your
6d00: 0a 63 65 72 74 69 66 69 63 61 74 65 20 73 74 6f .certificate sto
6d10: 72 65 5c 26 2e 0a 2e 50 50 0a 54 79 70 69 63 61 re\&...PP.Typica
6d20: 6c 6c 79 20 77 68 65 6e 20 76 69 73 69 74 69 6e lly when visitin
6d30: 67 20 77 65 62 20 73 69 74 65 73 2c 20 6f 6e 6c g web sites, onl
6d40: 79 20 74 68 65 20 63 6c 69 65 6e 74 20 6e 65 65 y the client nee
6d50: 64 73 20 74 6f 20 63 68 65 63 6b 20 74 68 65 20 ds to check the
6d60: 73 65 72 76 65 72 27 73 0a 63 65 72 74 69 66 69 server's.certifi
6d70: 63 61 74 65 20 74 6f 20 65 6e 73 75 72 65 20 69 cate to ensure i
6d80: 74 20 69 73 20 76 61 6c 69 64 5c 26 2e 20 54 68 t is valid\&. Th
6d90: 65 20 73 65 72 76 65 72 20 64 6f 65 73 6e 27 74 e server doesn't
6da0: 20 6e 65 65 64 20 74 6f 20 63 68 65 63 6b 20 74 need to check t
6db0: 68 65 20 63 6c 69 65 6e 74 0a 63 65 72 74 69 66 he client.certif
6dc0: 69 63 61 74 65 20 75 6e 6c 65 73 73 20 79 6f 75 icate unless you
6dd0: 20 6e 65 65 64 20 74 6f 20 61 75 74 68 65 6e 74 need to authent
6de0: 69 63 61 74 65 20 77 69 74 68 20 74 68 65 6d 20 icate with them
6df0: 74 6f 20 6c 6f 67 69 6e 2c 20 65 74 63 5c 26 2e to login, etc\&.
6e00: 20 53 65 65 20 74 68 65 0a 5c 66 42 2d 63 65 72 See the.\fB-cer
6e10: 74 5c 66 52 20 61 6e 64 20 5c 66 42 2d 63 65 72 t\fR and \fB-cer
6e20: 74 66 69 6c 65 5c 66 52 20 6f 70 74 69 6f 6e 73 tfile\fR options
6e30: 20 69 66 20 79 6f 75 20 6e 65 65 64 20 74 6f 20 if you need to
6e40: 70 72 6f 76 69 64 65 20 61 20 63 65 72 74 69 66 provide a certif
6e50: 69 63 61 74 65 5c 26 2e 0a 2e 53 53 20 22 53 55 icate\&...SS "SU
6e60: 4d 4d 41 52 59 20 4f 46 20 43 4f 4d 4d 41 4e 44 MMARY OF COMMAND
6e70: 20 4c 49 4e 45 20 4f 50 54 49 4f 4e 53 22 0a 54 LINE OPTIONS".T
6e80: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6f 70 74 he following opt
6e90: 69 6f 6e 73 20 61 72 65 20 75 73 65 64 20 66 6f ions are used fo
6ea0: 72 20 70 65 65 72 20 63 65 72 74 69 66 69 63 61 r peer certifica
6eb0: 74 65 20 76 61 6c 69 64 61 74 69 6f 6e 3a 0a 2e te validation:..
6ec0: 54 50 0a 5c 66 42 2d 63 61 64 69 72 5c 66 52 20 TP.\fB-cadir\fR
6ed0: 5c 66 49 64 69 72 65 63 74 6f 72 79 5c 66 52 0a \fIdirectory\fR.
6ee0: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 64 69 Specifies the di
6ef0: 72 65 63 74 6f 72 79 20 77 68 65 72 65 20 74 68 rectory where th
6f00: 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 e Certificate Au
6f10: 74 68 6f 72 69 74 79 20 28 43 41 29 20 63 65 72 thority (CA) cer
6f20: 74 69 66 69 63 61 74 65 73 20 61 72 65 0a 73 74 tificates are.st
6f30: 6f 72 65 64 5c 26 2e 20 54 68 65 20 64 65 66 61 ored\&. The defa
6f40: 75 6c 74 20 69 73 20 70 6c 61 74 66 6f 72 6d 20 ult is platform
6f50: 73 70 65 63 69 66 69 63 2c 20 62 75 74 20 69 73 specific, but is
6f60: 20 75 73 75 61 6c 6c 79 20 22 5c 66 49 2f 65 74 usually "\fI/et
6f70: 63 2f 73 73 6c 2f 63 65 72 74 73 5c 66 52 22 20 c/ssl/certs\fR"
6f80: 6f 6e 0a 4c 69 6e 75 78 2f 55 6e 69 78 20 73 79 on.Linux/Unix sy
6f90: 73 74 65 6d 73 5c 26 2e 20 54 68 65 20 64 65 66 stems\&. The def
6fa0: 61 75 6c 74 20 6c 6f 63 61 74 69 6f 6e 20 63 61 ault location ca
6fb0: 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e 20 n be overridden
6fc0: 62 79 20 74 68 65 0a 5c 66 42 53 53 4c 5f 43 45 by the.\fBSSL_CE
6fd0: 52 54 5f 44 49 52 5c 66 52 20 65 6e 76 69 72 6f RT_DIR\fR enviro
6fe0: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 5c 26 nment variable\&
6ff0: 2e 0a 2e 54 50 0a 5c 66 42 2d 63 61 66 69 6c 65 ...TP.\fB-cafile
7000: 5c 66 52 20 5c 66 49 66 69 6c 65 6e 61 6d 65 5c \fR \fIfilename\
7010: 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 fR.Specifies the
7020: 20 66 69 6c 65 20 77 69 74 68 20 74 68 65 20 43 file with the C
7030: 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f ertificate Autho
7040: 72 69 74 79 20 28 43 41 29 20 63 65 72 74 69 66 rity (CA) certif
7050: 69 63 61 74 65 73 20 74 6f 20 75 73 65 20 69 6e icates to use in
7060: 0a 5c 66 42 50 45 4d 5c 66 52 20 66 69 6c 65 20 .\fBPEM\fR file
7070: 66 6f 72 6d 61 74 5c 26 2e 20 54 68 65 20 64 65 format\&. The de
7080: 66 61 75 6c 74 20 69 73 20 22 5c 66 49 63 65 72 fault is "\fIcer
7090: 74 5c 26 2e 70 65 6d 5c 66 52 22 2c 20 69 6e 20 t\&.pem\fR", in
70a0: 74 68 65 20 4f 70 65 6e 53 53 4c 0a 64 69 72 65 the OpenSSL.dire
70b0: 63 74 6f 72 79 5c 26 2e 20 4f 6e 20 4c 69 6e 75 ctory\&. On Linu
70c0: 78 2f 55 6e 69 78 20 73 79 73 74 65 6d 73 2c 20 x/Unix systems,
70d0: 74 68 69 73 20 69 73 20 75 73 75 61 6c 6c 79 20 this is usually
70e0: 22 5c 66 49 2f 65 74 63 2f 73 73 6c 2f 63 61 2d "\fI/etc/ssl/ca-
70f0: 62 75 6e 64 6c 65 5c 26 2e 70 65 6d 5c 66 52 22 bundle\&.pem\fR"
7100: 5c 26 2e 0a 54 68 65 20 64 65 66 61 75 6c 74 20 \&..The default
7110: 66 69 6c 65 20 63 61 6e 20 62 65 20 6f 76 65 72 file can be over
7120: 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 5c 66 ridden by the \f
7130: 42 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 5c 66 BSSL_CERT_FILE\f
7140: 52 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 61 R environment.va
7150: 72 69 61 62 6c 65 5c 26 2e 0a 2e 54 50 0a 5c 66 riable\&...TP.\f
7160: 42 2d 63 61 73 74 6f 72 65 5c 66 52 20 5c 66 49 B-castore\fR \fI
7170: 55 52 49 5c 66 52 0a 53 70 65 63 69 66 69 65 73 URI\fR.Specifies
7180: 20 74 68 65 20 55 6e 69 66 6f 72 6d 20 52 65 73 the Uniform Res
7190: 6f 75 72 63 65 20 49 64 65 6e 74 69 66 69 65 72 ource Identifier
71a0: 20 28 55 52 49 29 20 66 6f 72 20 74 68 65 20 43 (URI) for the C
71b0: 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f ertificate Autho
71c0: 72 69 74 79 0a 28 43 41 29 20 73 74 6f 72 65 2c rity.(CA) store,
71d0: 20 77 68 69 63 68 20 6d 61 79 20 62 65 20 61 20 which may be a
71e0: 73 69 6e 67 6c 65 20 63 6f 6e 74 61 69 6e 65 72 single container
71f0: 20 6f 72 20 61 20 63 61 74 61 6c 6f 67 20 6f 66 or a catalog of
7200: 20 63 6f 6e 74 61 69 6e 65 72 73 5c 26 2e 0a 53 containers\&..S
7210: 74 61 72 74 69 6e 67 20 77 69 74 68 20 4f 70 65 tarting with Ope
7220: 6e 53 53 4c 20 33 5c 26 2e 32 20 6f 6e 20 4d 53 nSSL 3\&.2 on MS
7230: 20 57 69 6e 64 6f 77 73 2c 20 73 65 74 20 74 6f Windows, set to
7240: 20 22 5c 66 42 6f 72 67 5c 26 2e 6f 70 65 6e 73 "\fBorg\&.opens
7250: 73 6c 5c 26 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f sl\&.winstore://
7260: 5c 66 52 22 0a 74 6f 20 75 73 65 20 74 68 65 20 \fR".to use the
7270: 62 75 69 6c 74 2d 69 6e 20 4d 53 20 57 69 6e 64 built-in MS Wind
7280: 6f 77 73 20 43 65 72 74 69 66 69 63 61 74 65 20 ows Certificate
7290: 53 74 6f 72 65 5c 26 2e 20 53 74 61 72 74 69 6e Store\&. Startin
72a0: 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 2e g in TclTLS 2\&.
72b0: 30 2c 20 74 68 69 73 0a 69 73 20 74 68 65 20 64 0, this.is the d
72c0: 65 66 61 75 6c 74 20 69 66 20 5c 66 42 2d 63 61 efault if \fB-ca
72d0: 64 69 72 5c 66 52 2c 20 5c 66 42 2d 63 61 64 69 dir\fR, \fB-cadi
72e0: 72 5c 66 52 2c 20 61 6e 64 20 5c 66 42 2d 63 61 r\fR, and \fB-ca
72f0: 73 74 6f 72 65 5c 66 52 20 61 72 65 0a 6e 6f 74 store\fR are.not
7300: 20 73 70 65 63 69 66 69 65 64 5c 26 2e 20 54 68 specified\&. Th
7310: 69 73 20 73 74 6f 72 65 20 6f 6e 6c 79 20 73 75 is store only su
7320: 70 70 6f 72 74 73 20 72 6f 6f 74 20 63 65 72 74 pports root cert
7330: 69 66 69 63 61 74 65 20 73 74 6f 72 65 73 5c 26 ificate stores\&
7340: 2e 20 53 65 65 0a 5c 66 42 43 65 72 74 69 66 69 . See.\fBCertifi
7350: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 5c cate Validation\
7360: 66 52 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 fR for more deta
7370: 69 6c 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 72 ils\&...TP.\fB-r
7380: 65 71 75 65 73 74 5c 66 52 20 5c 66 49 62 6f 6f equest\fR \fIboo
7390: 6c 5c 66 52 0a 52 65 71 75 65 73 74 20 61 20 63 l\fR.Request a c
73a0: 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20 ertificate from
73b0: 74 68 65 20 70 65 65 72 20 64 75 72 69 6e 67 20 the peer during
73c0: 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b the SSL handshak
73d0: 65 5c 26 2e 20 54 68 69 73 20 69 73 20 6e 65 65 e\&. This is nee
73e0: 64 65 64 0a 74 6f 20 64 6f 20 43 65 72 74 69 66 ded.to do Certif
73f0: 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e icate Validation
7400: 5c 26 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 \&. Starting in
7410: 54 63 6c 54 4c 53 20 31 5c 26 2e 38 2c 20 74 68 TclTLS 1\&.8, th
7420: 65 20 64 65 66 61 75 6c 74 20 69 73 0a 5c 66 42 e default is.\fB
7430: 74 72 75 65 5c 66 52 5c 26 2e 20 53 74 61 72 74 true\fR\&. Start
7440: 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c ing in TclTLS 2\
7450: 26 2e 30 2c 20 49 66 20 73 65 74 20 74 6f 20 5c &.0, If set to \
7460: 66 42 66 61 6c 73 65 5c 66 52 20 61 6e 64 0a 5c fBfalse\fR and.\
7470: 66 42 2d 72 65 71 75 69 72 65 5c 66 52 20 69 73 fB-require\fR is
7480: 20 5c 66 42 74 72 75 65 5c 66 52 2c 20 74 68 65 \fBtrue\fR, the
7490: 6e 20 74 68 69 73 20 77 69 6c 6c 20 62 65 20 6f n this will be o
74a0: 76 65 72 72 69 64 64 65 6e 20 74 6f 20 5c 66 42 verridden to \fB
74b0: 74 72 75 65 5c 66 52 5c 26 2e 0a 49 6e 20 61 64 true\fR\&..In ad
74c0: 64 69 74 69 6f 6e 2c 20 74 68 65 20 63 6c 69 65 dition, the clie
74d0: 6e 74 20 63 61 6e 20 6d 61 6e 75 61 6c 6c 79 20 nt can manually
74e0: 69 6e 73 70 65 63 74 20 61 6e 64 20 61 63 63 65 inspect and acce
74f0: 70 74 20 6f 72 20 72 65 6a 65 63 74 0a 65 61 63 pt or reject.eac
7500: 68 20 63 65 72 74 69 66 69 63 61 74 65 20 75 73 h certificate us
7510: 69 6e 67 20 74 68 65 20 5c 66 49 2d 76 61 6c 69 ing the \fI-vali
7520: 64 61 74 65 63 6f 6d 6d 61 6e 64 5c 66 52 20 6f datecommand\fR o
7530: 70 74 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 ption\&...TP.\fB
7540: 2d 72 65 71 75 69 72 65 5c 66 52 20 5c 66 49 62 -require\fR \fIb
7550: 6f 6f 6c 5c 66 52 0a 52 65 71 75 69 72 65 20 61 ool\fR.Require a
7560: 20 76 61 6c 69 64 20 63 65 72 74 69 66 69 63 61 valid certifica
7570: 74 65 20 66 72 6f 6d 20 74 68 65 20 70 65 65 72 te from the peer
7580: 20 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c 20 during the SSL
7590: 68 61 6e 64 73 68 61 6b 65 5c 26 2e 20 49 66 20 handshake\&. If
75a0: 74 68 69 73 20 69 73 0a 73 65 74 20 74 6f 20 74 this is.set to t
75b0: 72 75 65 2c 20 74 68 65 6e 20 5c 66 42 2d 72 65 rue, then \fB-re
75c0: 71 75 65 73 74 5c 66 52 20 6d 75 73 74 20 61 6c quest\fR must al
75d0: 73 6f 20 62 65 20 73 65 74 20 74 6f 20 74 72 75 so be set to tru
75e0: 65 20 61 6e 64 20 61 20 65 69 74 68 65 72 0a 5c e and a either.\
75f0: 66 42 2d 63 61 64 69 72 5c 66 52 2c 20 5c 66 42 fB-cadir\fR, \fB
7600: 2d 63 61 66 69 6c 65 5c 66 52 2c 20 5c 66 42 2d -cafile\fR, \fB-
7610: 63 61 73 74 6f 72 65 5c 66 52 2c 20 6f 72 20 61 castore\fR, or a
7620: 20 70 6c 61 74 66 6f 72 6d 20 64 65 66 61 75 6c platform defaul
7630: 74 0a 6d 75 73 74 20 62 65 20 70 72 6f 76 69 64 t.must be provid
7640: 65 64 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 76 ed in order to v
7650: 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74 5c alidate against\
7660: 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 &. The default i
7670: 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 20 61 n TclTLS 1\&.8 a
7680: 6e 64 0a 65 61 72 6c 69 65 72 20 76 65 72 73 69 nd.earlier versi
7690: 6f 6e 73 20 69 73 20 5c 66 42 66 61 6c 73 65 5c ons is \fBfalse\
76a0: 66 52 20 73 69 6e 63 65 20 6e 6f 74 20 61 6c 6c fR since not all
76b0: 20 70 6c 61 74 66 6f 72 6d 73 20 68 61 76 65 20 platforms have
76c0: 63 65 72 74 69 66 69 63 61 74 65 73 20 74 6f 0a certificates to.
76d0: 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74 validate against
76e0: 20 69 6e 20 61 20 66 6f 72 6d 20 63 6f 6d 70 61 in a form compa
76f0: 74 69 62 6c 65 20 77 69 74 68 20 4f 70 65 6e 53 tible with OpenS
7700: 53 4c 5c 26 2e 20 53 74 61 72 74 69 6e 67 20 69 SL\&. Starting i
7710: 6e 20 54 63 6c 54 4c 53 20 32 5c 26 2e 30 2c 0a n TclTLS 2\&.0,.
7720: 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 5c the default is \
7730: 66 42 74 72 75 65 5c 66 52 5c 26 2e 0a 2e 50 50 fBtrue\fR\&...PP
7740: 0a 2e 53 53 20 22 57 48 45 4e 20 41 52 45 20 43 ..SS "WHEN ARE C
7750: 4f 4d 4d 41 4e 44 20 4c 49 4e 45 20 4f 50 54 49 OMMAND LINE OPTI
7760: 4f 4e 53 20 4e 45 45 44 45 44 3f 22 0a 49 6e 20 ONS NEEDED?".In
7770: 54 63 6c 54 4c 53 20 31 5c 26 2e 38 20 61 6e 64 TclTLS 1\&.8 and
7780: 20 65 61 72 6c 69 65 72 20 76 65 72 73 69 6f 6e earlier version
7790: 73 2c 20 63 65 72 74 69 66 69 63 61 74 65 20 76 s, certificate v
77a0: 61 6c 69 64 61 74 69 6f 6e 20 69 73 0a 5c 66 49 alidation is.\fI
77b0: 4e 4f 54 5c 66 52 20 65 6e 61 62 6c 65 64 20 62 NOT\fR enabled b
77c0: 79 20 64 65 66 61 75 6c 74 5c 26 2e 20 54 68 69 y default\&. Thi
77d0: 73 20 6c 69 6d 69 74 61 74 69 6f 6e 20 69 73 20 s limitation is
77e0: 64 75 65 20 74 6f 20 74 68 65 20 6c 61 63 6b 20 due to the lack
77f0: 6f 66 20 61 20 63 6f 6d 6d 6f 6e 0a 63 72 6f 73 of a common.cros
7800: 73 20 70 6c 61 74 66 6f 72 6d 20 64 61 74 61 62 s platform datab
7810: 61 73 65 20 6f 66 20 43 65 72 74 69 66 69 63 61 ase of Certifica
7820: 74 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 te Authority (CA
7830: 29 20 70 72 6f 76 69 64 65 64 20 63 65 72 74 69 ) provided certi
7840: 66 69 63 61 74 65 73 20 74 6f 0a 76 61 6c 69 64 ficates to.valid
7850: 61 74 65 20 61 67 61 69 6e 73 74 5c 26 2e 20 4d ate against\&. M
7860: 61 6e 79 20 4c 69 6e 75 78 20 73 79 73 74 65 6d any Linux system
7870: 73 20 6e 61 74 69 76 65 6c 79 20 73 75 70 70 6f s natively suppo
7880: 72 74 20 4f 70 65 6e 53 53 4c 20 61 6e 64 20 74 rt OpenSSL and t
7890: 68 75 73 20 68 61 76 65 0a 74 68 65 73 65 20 63 hus have.these c
78a0: 65 72 74 69 66 69 63 61 74 65 73 20 69 6e 73 74 ertificates inst
78b0: 61 6c 6c 65 64 20 61 73 20 70 61 72 74 20 6f 66 alled as part of
78c0: 20 74 68 65 20 4f 53 2c 20 62 75 74 20 4d 61 63 the OS, but Mac
78d0: 4f 53 20 61 6e 64 20 4d 53 20 57 69 6e 64 6f 77 OS and MS Window
78e0: 73 20 64 6f 20 6e 6f 74 5c 26 2e 0a 53 74 61 72 s do not\&..Star
78f0: 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c ing in TclTLS 2\
7900: 26 2e 30 2c 20 74 68 69 73 20 68 61 73 20 62 65 &.0, this has be
7910: 65 6e 20 63 68 61 6e 67 65 64 20 74 6f 20 72 65 en changed to re
7920: 71 75 69 72 65 20 63 65 72 74 69 66 69 63 61 74 quire certificat
7930: 65 20 76 61 6c 69 64 61 74 69 6f 6e 0a 62 79 20 e validation.by
7940: 64 65 66 61 75 6c 74 5c 26 2e 20 49 6e 20 6f 72 default\&. In or
7950: 64 65 72 20 74 6f 20 75 73 65 20 74 68 65 20 5c der to use the \
7960: 66 42 2d 72 65 71 75 69 72 65 5c 66 52 20 6f 70 fB-require\fR op
7970: 74 69 6f 6e 2c 20 6f 6e 65 20 6f 66 20 74 68 65 tion, one of the
7980: 20 66 6f 6c 6c 6f 77 69 6e 67 0a 6d 75 73 74 20 following.must
7990: 62 65 20 74 72 75 65 3a 0a 2e 49 50 20 5c 28 62 be true:..IP \(b
79a0: 75 0a 4f 6e 20 4c 69 6e 75 78 20 61 6e 64 20 55 u.On Linux and U
79b0: 6e 69 78 20 73 79 73 74 65 6d 73 20 77 69 74 68 nix systems with
79c0: 20 4f 70 65 6e 53 53 4c 20 61 6c 72 65 61 64 79 OpenSSL already
79d0: 20 69 6e 73 74 61 6c 6c 65 64 20 6f 72 20 69 66 installed or if
79e0: 20 74 68 65 20 43 41 0a 63 65 72 74 69 66 69 63 the CA.certific
79f0: 61 74 65 73 20 61 72 65 20 61 76 61 69 6c 61 62 ates are availab
7a00: 6c 65 20 69 6e 20 50 45 4d 20 66 6f 72 6d 61 74 le in PEM format
7a10: 2c 20 61 6e 64 20 69 66 20 74 68 65 79 20 61 72 , and if they ar
7a20: 65 20 73 74 6f 72 65 64 20 69 6e 20 74 68 65 0a e stored in the.
7a30: 73 74 61 6e 64 61 72 64 20 6c 6f 63 61 74 69 6f standard locatio
7a40: 6e 73 2c 20 6f 72 20 69 66 20 74 68 65 20 5c 66 ns, or if the \f
7a50: 42 53 53 4c 5f 43 45 52 54 5f 44 49 52 5c 66 52 BSSL_CERT_DIR\fR
7a60: 20 6f 72 20 5c 66 42 53 53 4c 5f 43 45 52 54 5f or \fBSSL_CERT_
7a70: 46 49 4c 45 5c 66 52 0a 65 6e 76 69 72 6f 6e 6d FILE\fR.environm
7a80: 65 6e 74 20 76 61 72 69 61 62 6c 65 73 20 61 72 ent variables ar
7a90: 65 20 73 65 74 2c 20 74 68 65 6e 20 5c 66 42 2d e set, then \fB-
7aa0: 63 61 64 69 72 5c 66 52 2c 20 5c 66 42 2d 63 61 cadir\fR, \fB-ca
7ab0: 64 69 72 5c 66 52 2c 0a 61 6e 64 20 5c 66 42 2d dir\fR,.and \fB-
7ac0: 63 61 73 74 6f 72 65 5c 66 52 20 61 72 65 6e 27 castore\fR aren'
7ad0: 74 20 6e 65 65 64 65 64 5c 26 2e 0a 2e 49 50 20 t needed\&...IP
7ae0: 5c 28 62 75 0a 49 66 20 4f 70 65 6e 53 53 4c 20 \(bu.If OpenSSL
7af0: 69 73 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 65 64 is not installed
7b00: 20 69 6e 20 74 68 65 20 64 65 66 61 75 6c 74 20 in the default
7b10: 6c 6f 63 61 74 69 6f 6e 2c 20 6f 72 20 77 68 65 location, or whe
7b20: 6e 20 75 73 69 6e 67 20 4d 61 63 20 4f 53 0a 6f n using Mac OS.o
7b30: 72 20 4d 53 20 57 69 6e 64 6f 77 73 20 61 6e 64 r MS Windows and
7b40: 20 4f 70 65 6e 53 53 4c 20 69 73 20 69 6e 73 74 OpenSSL is inst
7b50: 61 6c 6c 65 64 2c 20 74 68 65 20 5c 66 42 53 53 alled, the \fBSS
7b60: 4c 5f 43 45 52 54 5f 44 49 52 5c 66 52 20 61 6e L_CERT_DIR\fR an
7b70: 64 2f 6f 72 0a 5c 66 42 53 53 4c 5f 43 45 52 54 d/or.\fBSSL_CERT
7b80: 5f 46 49 4c 45 5c 66 52 20 65 6e 76 69 72 6f 6e _FILE\fR environ
7b90: 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 73 20 6f ment variables o
7ba0: 72 20 74 68 65 20 6f 6e 65 20 6f 66 20 74 68 65 r the one of the
7bb0: 20 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c 0a 5c \fB-cadir\fR,.\
7bc0: 66 42 2d 63 61 64 69 72 5c 66 52 2c 20 6f 72 20 fB-cadir\fR, or
7bd0: 5c 66 42 2d 63 61 73 74 6f 72 65 5c 66 52 20 6f \fB-castore\fR o
7be0: 70 74 69 6f 6e 73 20 6d 75 73 74 20 62 65 20 64 ptions must be d
7bf0: 65 66 69 6e 65 64 5c 26 2e 0a 2e 49 50 20 5c 28 efined\&...IP \(
7c00: 62 75 0a 4f 6e 20 4d 53 20 57 69 6e 64 6f 77 73 bu.On MS Windows
7c10: 2c 20 73 74 61 72 74 69 6e 67 20 69 6e 20 4f 70 , starting in Op
7c20: 65 6e 53 53 4c 20 33 5c 26 2e 32 2c 20 69 74 20 enSSL 3\&.2, it
7c30: 69 73 20 6e 6f 77 20 70 6f 73 73 69 62 6c 65 20 is now possible
7c40: 74 6f 20 61 63 63 65 73 73 20 74 68 65 0a 62 75 to access the.bu
7c50: 69 6c 74 2d 69 6e 20 57 69 6e 64 6f 77 73 20 43 ilt-in Windows C
7c60: 65 72 74 69 66 69 63 61 74 65 20 53 74 6f 72 65 ertificate Store
7c70: 20 66 72 6f 6d 20 4f 70 65 6e 53 53 4c 5c 26 2e from OpenSSL\&.
7c80: 20 54 68 69 73 20 63 61 6e 20 75 74 69 6c 69 7a This can utiliz
7c90: 65 64 20 62 79 0a 73 65 74 74 69 6e 67 20 74 68 ed by.setting th
7ca0: 65 20 5c 66 42 2d 63 61 73 74 6f 72 65 5c 66 52 e \fB-castore\fR
7cb0: 20 6f 70 74 69 6f 6e 20 74 6f 20 22 5c 66 42 6f option to "\fBo
7cc0: 72 67 5c 26 2e 6f 70 65 6e 73 73 6c 5c 26 2e 77 rg\&.openssl\&.w
7cd0: 69 6e 73 74 6f 72 65 3a 2f 2f 5c 66 52 22 5c 26 instore://\fR"\&
7ce0: 2e 0a 49 6e 20 54 63 6c 54 4c 53 20 32 5c 26 2e ..In TclTLS 2\&.
7cf0: 30 2c 20 74 68 69 73 20 69 73 20 74 68 65 20 64 0, this is the d
7d00: 65 66 61 75 6c 74 20 76 61 6c 75 65 20 69 66 20 efault value if
7d10: 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c 0a 5c 66 \fB-cadir\fR,.\f
7d20: 42 2d 63 61 64 69 72 5c 66 52 2c 20 61 6e 64 20 B-cadir\fR, and
7d30: 5c 66 42 2d 63 61 73 74 6f 72 65 5c 66 52 20 61 \fB-castore\fR a
7d40: 72 65 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64 re not specified
7d50: 5c 26 2e 0a 2e 49 50 20 5c 28 62 75 0a 49 66 20 \&...IP \(bu.If
7d60: 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f 74 20 69 OpenSSL is not i
7d70: 6e 73 74 61 6c 6c 65 64 20 6f 72 20 74 68 65 20 nstalled or the
7d80: 43 41 20 63 65 72 74 69 66 69 63 61 74 65 73 20 CA certificates
7d90: 61 72 65 20 6e 6f 74 20 61 76 61 69 6c 61 62 6c are not availabl
7da0: 65 20 69 6e 20 50 45 4d 0a 66 6f 72 6d 61 74 2c e in PEM.format,
7db0: 20 74 68 65 20 43 41 20 63 65 72 74 69 66 69 63 the CA certific
7dc0: 61 74 65 73 20 6d 75 73 74 20 62 65 20 64 6f 77 ates must be dow
7dd0: 6e 6c 6f 61 64 65 64 20 61 6e 64 20 69 6e 73 74 nloaded and inst
7de0: 61 6c 6c 65 64 20 77 69 74 68 20 74 68 65 20 75 alled with the u
7df0: 73 65 72 0a 73 6f 66 74 77 61 72 65 5c 26 2e 20 ser.software\&.
7e00: 54 68 65 20 43 55 52 4c 20 74 65 61 6d 20 6d 61 The CURL team ma
7e10: 6b 65 73 20 74 68 65 6d 20 61 76 61 69 6c 61 62 kes them availab
7e20: 6c 65 20 61 74 0a 5c 66 49 43 41 20 63 65 72 74 le at.\fICA cert
7e30: 69 66 69 63 61 74 65 73 20 65 78 74 72 61 63 74 ificates extract
7e40: 65 64 0a 66 72 6f 6d 20 4d 6f 7a 69 6c 6c 61 5c ed.from Mozilla\
7e50: 66 52 20 5b 68 74 74 70 73 3a 2f 2f 63 75 72 6c fR [https://curl
7e60: 5c 26 2e 73 65 2f 64 6f 63 73 2f 63 61 65 78 74 \&.se/docs/caext
7e70: 72 61 63 74 5c 26 2e 68 74 6d 6c 5d 20 69 6e 20 ract\&.html] in
7e80: 74 68 65 20 22 5c 66 49 63 61 63 65 72 74 5c 26 the "\fIcacert\&
7e90: 2e 70 65 6d 5c 66 52 22 20 66 69 6c 65 5c 26 2e .pem\fR" file\&.
7ea0: 20 59 6f 75 20 6d 75 73 74 20 74 68 65 6e 20 65 You must then e
7eb0: 69 74 68 65 72 20 73 65 74 20 74 68 65 0a 5c 66 ither set the.\f
7ec0: 42 53 53 4c 5f 43 45 52 54 5f 44 49 52 5c 66 52 BSSL_CERT_DIR\fR
7ed0: 20 61 6e 64 2f 6f 72 20 5c 66 42 53 53 4c 5f 43 and/or \fBSSL_C
7ee0: 45 52 54 5f 46 49 4c 45 5c 66 52 20 65 6e 76 69 ERT_FILE\fR envi
7ef0: 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 ronment variable
7f00: 73 20 6f 72 20 74 68 65 0a 5c 66 42 2d 63 61 64 s or the.\fB-cad
7f10: 69 72 5c 66 52 20 6f 72 20 5c 66 42 2d 63 61 66 ir\fR or \fB-caf
7f20: 69 6c 65 5c 66 52 20 6f 70 74 69 6f 6e 73 20 74 ile\fR options t
7f30: 6f 20 74 68 65 20 43 41 20 63 65 72 74 20 66 69 o the CA cert fi
7f40: 6c 65 27 73 20 69 6e 73 74 61 6c 6c 0a 6c 6f 63 le's install.loc
7f50: 61 74 69 6f 6e 5c 26 2e 20 49 74 20 69 73 20 79 ation\&. It is y
7f60: 6f 75 72 20 72 65 73 70 6f 6e 73 69 62 69 6c 69 our responsibili
7f70: 74 79 20 74 6f 20 6b 65 65 70 20 74 68 69 73 20 ty to keep this
7f80: 66 69 6c 65 20 75 70 20 74 6f 20 64 61 74 65 5c file up to date\
7f90: 26 2e 0a 2e 50 50 0a 2e 53 48 20 22 43 41 4c 4c &...PP..SH "CALL
7fa0: 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 0a 41 73 BACK OPTIONS".As
7fb0: 20 70 72 65 76 69 6f 75 73 6c 79 20 64 65 73 63 previously desc
7fc0: 72 69 62 65 64 2c 20 65 61 63 68 20 63 68 61 6e ribed, each chan
7fd0: 6e 65 6c 20 63 61 6e 20 62 65 20 67 69 76 65 6e nel can be given
7fe0: 20 74 68 65 69 72 20 6f 77 6e 20 63 61 6c 6c 62 their own callb
7ff0: 61 63 6b 73 0a 74 6f 20 68 61 6e 64 6c 65 20 69 acks.to handle i
8000: 6e 74 65 72 6d 65 64 69 61 74 65 20 70 72 6f 63 ntermediate proc
8010: 65 73 73 69 6e 67 20 62 79 20 74 68 65 20 4f 70 essing by the Op
8020: 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 2c 20 75 enSSL library, u
8030: 73 69 6e 67 20 74 68 65 0a 5c 66 42 2d 63 6f 6d sing the.\fB-com
8040: 6d 61 6e 64 5c 66 52 2c 20 5c 66 42 2d 70 61 73 mand\fR, \fB-pas
8050: 73 77 6f 72 64 5c 66 52 2c 20 61 6e 64 20 5c 66 sword\fR, and \f
8060: 42 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 B-validate_comma
8070: 6e 64 5c 66 52 20 6f 70 74 69 6f 6e 73 0a 70 61 nd\fR options.pa
8080: 73 73 65 64 20 74 6f 20 65 69 74 68 65 72 20 6f ssed to either o
8090: 66 20 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 f \fBtls::socket
80a0: 5c 66 52 20 6f 72 20 5c 66 42 74 6c 73 3a 3a 69 \fR or \fBtls::i
80b0: 6d 70 6f 72 74 5c 66 52 5c 26 2e 0a 55 6e 6c 69 mport\fR\&..Unli
80c0: 6b 65 20 70 72 65 76 69 6f 75 73 20 76 65 72 73 ke previous vers
80d0: 69 6f 6e 73 20 6f 66 20 54 63 6c 54 4c 53 2c 20 ions of TclTLS,
80e0: 6f 6e 6c 79 20 69 66 20 74 68 65 20 63 61 6c 6c only if the call
80f0: 62 61 63 6b 20 67 65 6e 65 72 61 74 65 73 20 61 back generates a
8100: 6e 20 65 72 72 6f 72 2c 0a 77 69 6c 6c 20 74 68 n error,.will th
8110: 65 20 5c 66 42 62 67 65 72 72 6f 72 5c 66 52 20 e \fBbgerror\fR
8120: 63 6f 6d 6d 61 6e 64 20 62 65 20 69 6e 76 6f 6b command be invok
8130: 65 64 20 77 69 74 68 20 74 68 65 20 65 72 72 6f ed with the erro
8140: 72 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 5c 26 2e r information\&.
8150: 0a 2e 53 53 20 22 56 41 4c 55 45 53 20 46 4f 52 ..SS "VALUES FOR
8160: 20 43 4f 4d 4d 41 4e 44 20 43 41 4c 4c 42 41 43 COMMAND CALLBAC
8170: 4b 22 0a 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 K".The callback
8180: 66 6f 72 20 74 68 65 20 5c 66 42 2d 63 6f 6d 6d for the \fB-comm
8190: 61 6e 64 5c 66 52 20 6f 70 74 69 6f 6e 20 69 73 and\fR option is
81a0: 20 69 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 65 invoked at seve
81b0: 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 69 6e ral points durin
81c0: 67 20 74 68 65 0a 4f 70 65 6e 53 53 4c 20 68 61 g the.OpenSSL ha
81d0: 6e 64 73 68 61 6b 65 20 61 6e 64 20 64 75 72 69 ndshake and duri
81e0: 6e 67 20 72 6f 75 74 69 6e 65 20 6f 70 65 72 61 ng routine opera
81f0: 74 69 6f 6e 73 5c 26 2e 20 53 65 65 20 62 65 6c tions\&. See bel
8200: 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69 ow for the possi
8210: 62 6c 65 0a 61 72 67 75 6d 65 6e 74 73 20 70 61 ble.arguments pa
8220: 73 73 65 64 20 74 6f 20 74 68 65 20 63 61 6c 6c ssed to the call
8230: 62 61 63 6b 20 73 63 72 69 70 74 5c 26 2e 20 56 back script\&. V
8240: 61 6c 75 65 73 20 72 65 74 75 72 6e 65 64 20 66 alues returned f
8250: 72 6f 6d 20 74 68 65 20 63 61 6c 6c 62 61 63 6b rom the callback
8260: 20 61 72 65 0a 69 67 6e 6f 72 65 64 5c 26 2e 0a are.ignored\&..
8270: 2e 54 50 0a 5c 66 42 65 72 72 6f 72 5c 66 52 20 .TP.\fBerror\fR
8280: 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 6d 65 73 \fIchannelId mes
8290: 73 61 67 65 5c 66 52 0a 54 68 69 73 20 66 6f 72 sage\fR.This for
82a0: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 m of callback is
82b0: 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 65 76 65 invoked wheneve
82c0: 72 20 61 6e 20 65 72 72 6f 72 20 6f 63 63 75 72 r an error occur
82d0: 73 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e 69 s during the ini
82e0: 74 69 61 6c 0a 63 6f 6e 6e 65 63 74 69 6f 6e 2c tial.connection,
82f0: 20 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49 handshake, or I
8300: 2f 4f 20 6f 70 65 72 61 74 69 6f 6e 73 5c 26 2e /O operations\&.
8310: 20 54 68 65 20 5c 66 49 6d 65 73 73 61 67 65 5c The \fImessage\
8320: 66 52 20 61 72 67 75 6d 65 6e 74 20 63 61 6e 20 fR argument can
8330: 62 65 0a 66 72 6f 6d 20 74 68 65 20 54 63 6c 5f be.from the Tcl_
8340: 45 72 72 6e 6f 4d 73 67 2c 20 4f 70 65 6e 53 53 ErrnoMsg, OpenSS
8350: 4c 20 66 75 6e 63 74 69 6f 6e 20 5c 66 42 45 52 L function \fBER
8360: 52 5f 72 65 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 R_reason_error_s
8370: 74 72 69 6e 67 28 29 5c 66 52 2c 0a 6f 72 20 61 tring()\fR,.or a
8380: 20 63 75 73 74 6f 6d 20 6d 65 73 73 61 67 65 5c custom message\
8390: 26 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b &. This callback
83a0: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
83b0: 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a LS 1\&.8\&...TP.
83c0: 5c 66 42 69 6e 66 6f 5c 66 52 20 5c 66 49 63 68 \fBinfo\fR \fIch
83d0: 61 6e 6e 65 6c 49 64 20 6d 61 6a 6f 72 20 6d 69 annelId major mi
83e0: 6e 6f 72 20 6d 65 73 73 61 67 65 20 74 79 70 65 nor message type
83f0: 5c 66 52 0a 54 68 69 73 20 66 6f 72 6d 20 6f 66 \fR.This form of
8400: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 callback is inv
8410: 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e oked by the Open
8420: 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 5c 66 42 SSL function.\fB
8430: 53 53 4c 5f 73 65 74 5f 69 6e 66 6f 5f 63 61 6c SSL_set_info_cal
8440: 6c 62 61 63 6b 28 29 5c 66 52 20 64 75 72 69 6e lback()\fR durin
8450: 67 20 74 68 65 20 69 6e 69 74 69 61 6c 20 63 6f g the initial co
8460: 6e 6e 65 63 74 69 6f 6e 20 61 6e 64 20 68 61 6e nnection and han
8470: 64 73 68 61 6b 65 0a 6f 70 65 72 61 74 69 6f 6e dshake.operation
8480: 73 5c 26 2e 20 54 68 65 20 61 72 67 75 6d 65 6e s\&. The argumen
8490: 74 73 20 61 72 65 3a 0a 2e 52 53 0a 2e 54 50 0a ts are:..RS..TP.
84a0: 5c 66 49 6d 61 6a 6f 72 5c 66 52 0a 4d 61 6a 6f \fImajor\fR.Majo
84b0: 72 20 63 61 74 65 67 6f 72 79 20 66 6f 72 20 65 r category for e
84c0: 72 72 6f 72 5c 26 2e 20 56 61 6c 69 64 20 65 6e rror\&. Valid en
84d0: 75 6d 73 20 61 72 65 3a 20 5c 66 42 68 61 6e 64 ums are: \fBhand
84e0: 73 68 61 6b 65 5c 66 52 2c 20 5c 66 42 61 6c 65 shake\fR, \fBale
84f0: 72 74 5c 66 52 2c 0a 5c 66 42 63 6f 6e 6e 65 63 rt\fR,.\fBconnec
8500: 74 5c 66 52 2c 20 5c 66 42 61 63 63 65 70 74 5c t\fR, \fBaccept\
8510: 66 52 5c 26 2e 0a 2e 54 50 0a 5c 66 49 6d 69 6e fR\&...TP.\fImin
8520: 6f 72 5c 66 52 0a 4d 69 6e 6f 72 20 63 61 74 65 or\fR.Minor cate
8530: 67 6f 72 79 20 66 6f 72 20 65 72 72 6f 72 5c 26 gory for error\&
8540: 2e 20 56 61 6c 69 64 20 65 6e 75 6d 73 20 61 72 . Valid enums ar
8550: 65 3a 20 5c 66 42 73 74 61 72 74 5c 66 52 2c 20 e: \fBstart\fR,
8560: 5c 66 42 64 6f 6e 65 5c 66 52 2c 20 5c 66 42 72 \fBdone\fR, \fBr
8570: 65 61 64 5c 66 52 2c 0a 5c 66 42 77 72 69 74 65 ead\fR,.\fBwrite
8580: 5c 66 52 2c 20 5c 66 42 6c 6f 6f 70 5c 66 52 2c \fR, \fBloop\fR,
8590: 20 5c 66 42 65 78 69 74 5c 66 52 5c 26 2e 0a 2e \fBexit\fR\&...
85a0: 54 50 0a 5c 66 49 6d 65 73 73 61 67 65 5c 66 52 TP.\fImessage\fR
85b0: 0a 44 65 73 63 72 69 70 74 69 76 65 20 6d 65 73 .Descriptive mes
85c0: 73 61 67 65 20 73 74 72 69 6e 67 20 77 68 69 63 sage string whic
85d0: 68 20 6d 61 79 20 62 65 20 67 65 6e 65 72 61 74 h may be generat
85e0: 65 64 20 65 69 74 68 65 72 20 62 79 0a 5c 66 42 ed either by.\fB
85f0: 53 53 4c 5f 73 74 61 74 65 5f 73 74 72 69 6e 67 SSL_state_string
8600: 5f 6c 6f 6e 67 28 29 5c 66 52 20 6f 72 20 5c 66 _long()\fR or \f
8610: 42 53 53 4c 5f 61 6c 65 72 74 5f 64 65 73 63 5f BSSL_alert_desc_
8620: 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 5c 66 52 string_long()\fR
8630: 2c 0a 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 74 ,.depending on t
8640: 68 65 20 63 6f 6e 74 65 78 74 5c 26 2e 0a 2e 54 he context\&...T
8650: 50 0a 5c 66 49 74 79 70 65 5c 66 52 0a 46 6f 72 P.\fItype\fR.For
8660: 20 61 6c 65 72 74 73 2c 20 74 68 65 20 70 6f 73 alerts, the pos
8670: 73 69 62 6c 65 20 76 61 6c 75 65 73 20 61 72 65 sible values are
8680: 3a 20 5c 66 42 77 61 72 6e 69 6e 67 5c 66 52 2c : \fBwarning\fR,
8690: 0a 5c 66 42 66 61 74 61 6c 5c 66 52 2c 20 61 6e .\fBfatal\fR, an
86a0: 64 20 5c 66 42 75 6e 6b 6e 6f 77 6e 5c 66 52 5c d \fBunknown\fR\
86b0: 26 2e 20 46 6f 72 20 6f 74 68 65 72 73 2c 20 5c &. For others, \
86c0: 66 42 69 6e 66 6f 5c 66 52 20 69 73 20 75 73 65 fBinfo\fR is use
86d0: 64 5c 26 2e 0a 54 68 69 73 20 61 72 67 75 6d 65 d\&..This argume
86e0: 6e 74 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 nt is new for Tc
86f0: 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 52 lTLS 1\&.8\&...R
8700: 45 0a 2e 54 50 0a 5c 66 42 6d 65 73 73 61 67 65 E..TP.\fBmessage
8710: 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 \fR \fIchannelId
8720: 20 64 69 72 65 63 74 69 6f 6e 20 76 65 72 73 69 direction versi
8730: 6f 6e 20 63 6f 6e 74 65 6e 74 5f 74 79 70 65 20 on content_type
8740: 6d 65 73 73 61 67 65 5c 66 52 0a 54 68 69 73 20 message\fR.This
8750: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b form of callback
8760: 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 is invoked by t
8770: 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 he OpenSSL funct
8780: 69 6f 6e 0a 5c 66 42 53 53 4c 5f 73 65 74 5f 6d ion.\fBSSL_set_m
8790: 73 67 5f 63 61 6c 6c 62 61 63 6b 28 29 5c 66 52 sg_callback()\fR
87a0: 20 77 68 65 6e 65 76 65 72 20 61 20 6d 65 73 73 whenever a mess
87b0: 61 67 65 20 69 73 20 73 65 6e 74 20 6f 72 20 72 age is sent or r
87c0: 65 63 65 69 76 65 64 20 64 75 72 69 6e 67 20 74 eceived during t
87d0: 68 65 0a 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 he.initial conne
87e0: 63 74 69 6f 6e 2c 20 68 61 6e 64 73 68 61 6b 65 ction, handshake
87f0: 2c 20 6f 72 20 49 2f 4f 20 6f 70 65 72 61 74 69 , or I/O operati
8800: 6f 6e 73 5c 26 2e 20 49 74 20 69 73 20 6f 6e 6c ons\&. It is onl
8810: 79 20 61 76 61 69 6c 61 62 6c 65 20 77 68 65 6e y available when
8820: 0a 4f 70 65 6e 53 53 4c 20 69 73 20 63 6f 6d 70 .OpenSSL is comp
8830: 6c 69 65 64 20 77 69 74 68 20 74 68 65 20 5c 66 lied with the \f
8840: 42 65 6e 61 62 6c 65 2d 73 73 6c 2d 74 72 61 63 Benable-ssl-trac
8850: 65 5c 66 52 20 6f 70 74 69 6f 6e 5c 26 2e 20 54 e\fR option\&. T
8860: 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 0a his callback is.
8870: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
8880: 5c 26 2e 38 5c 26 2e 20 54 68 65 20 61 72 67 75 \&.8\&. The argu
8890: 6d 65 6e 74 73 20 61 72 65 3a 0a 2e 52 53 0a 2e ments are:..RS..
88a0: 54 50 0a 5c 66 49 64 69 72 65 63 74 69 6f 6e 5c TP.\fIdirection\
88b0: 66 52 0a 44 69 72 65 63 74 69 6f 6e 20 69 73 20 fR.Direction is
88c0: 65 69 74 68 65 72 20 5c 66 42 53 65 6e 74 5c 66 either \fBSent\f
88d0: 52 20 6f 72 20 5c 66 42 52 65 63 65 69 76 65 64 R or \fBReceived
88e0: 5c 66 52 5c 26 2e 0a 2e 54 50 0a 5c 66 49 76 65 \fR\&...TP.\fIve
88f0: 72 73 69 6f 6e 5c 66 52 0a 56 65 72 73 69 6f 6e rsion\fR.Version
8900: 20 69 73 20 74 68 65 20 70 72 6f 74 6f 63 6f 6c is the protocol
8910: 20 76 65 72 73 69 6f 6e 5c 26 2e 0a 2e 54 50 0a version\&...TP.
8920: 5c 66 49 63 6f 6e 74 65 6e 74 5f 74 79 70 65 5c \fIcontent_type\
8930: 66 52 0a 43 6f 6e 74 65 6e 74 20 74 79 70 65 20 fR.Content type
8940: 69 73 20 74 68 65 20 6d 65 73 73 61 67 65 20 63 is the message c
8950: 6f 6e 74 65 6e 74 20 74 79 70 65 5c 26 2e 0a 2e ontent type\&...
8960: 54 50 0a 5c 66 49 6d 65 73 73 61 67 65 5c 66 52 TP.\fImessage\fR
8970: 0a 4d 65 73 73 61 67 65 20 69 73 20 6d 6f 72 65 .Message is more
8980: 20 69 6e 66 6f 20 66 72 6f 6d 20 74 68 65 20 5c info from the \
8990: 66 42 53 53 4c 5f 74 72 61 63 65 5c 66 52 20 41 fBSSL_trace\fR A
89a0: 50 49 5c 26 2e 0a 2e 52 45 0a 2e 54 50 0a 5c 66 PI\&...RE..TP.\f
89b0: 42 73 65 73 73 69 6f 6e 5c 66 52 20 5c 66 49 63 Bsession\fR \fIc
89c0: 68 61 6e 6e 65 6c 49 64 20 73 65 73 73 69 6f 6e hannelId session
89d0: 5f 69 64 20 73 65 73 73 69 6f 6e 5f 74 69 63 6b _id session_tick
89e0: 65 74 20 6c 69 66 65 74 69 6d 65 5c 66 52 0a 54 et lifetime\fR.T
89f0: 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c his form of call
8a00: 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 back is invoked
8a10: 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 by the OpenSSL f
8a20: 75 6e 63 74 69 6f 6e 0a 5c 66 42 53 53 4c 5f 43 unction.\fBSSL_C
8a30: 54 58 5f 73 65 73 73 5f 73 65 74 5f 6e 65 77 5f TX_sess_set_new_
8a40: 63 62 28 29 5c 66 52 20 77 68 65 6e 65 76 65 72 cb()\fR whenever
8a50: 20 61 20 6e 65 77 20 73 65 73 73 69 6f 6e 20 69 a new session i
8a60: 64 20 69 73 20 73 65 6e 74 20 62 79 20 74 68 65 d is sent by the
8a70: 0a 73 65 72 76 65 72 20 64 75 72 69 6e 67 20 74 .server during t
8a80: 68 65 20 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 he initial conne
8a90: 63 74 69 6f 6e 20 61 6e 64 20 68 61 6e 64 73 68 ction and handsh
8aa0: 61 6b 65 20 61 6e 64 20 61 6c 73 6f 20 64 75 72 ake and also dur
8ab0: 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e 0a ing the session.
8ac0: 69 66 20 74 68 65 20 5c 66 42 2d 70 6f 73 74 5f if the \fB-post_
8ad0: 68 61 6e 64 73 68 61 6b 65 5c 66 52 20 6f 70 74 handshake\fR opt
8ae0: 69 6f 6e 20 69 73 20 73 65 74 20 74 6f 20 74 72 ion is set to tr
8af0: 75 65 5c 26 2e 20 54 68 69 73 20 63 61 6c 6c 62 ue\&. This callb
8b00: 61 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 0a 54 ack is new for.T
8b10: 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 20 54 clTLS 1\&.8\&. T
8b20: 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 he arguments are
8b30: 3a 0a 2e 52 53 0a 2e 54 50 0a 5c 66 49 73 65 73 :..RS..TP.\fIses
8b40: 73 69 6f 6e 5f 69 64 5c 66 52 0a 53 65 73 73 69 sion_id\fR.Sessi
8b50: 6f 6e 20 49 64 20 69 73 20 74 68 65 20 63 75 72 on Id is the cur
8b60: 72 65 6e 74 20 73 65 73 73 69 6f 6e 20 69 64 65 rent session ide
8b70: 6e 74 69 66 69 65 72 0a 2e 54 50 0a 5c 66 49 73 ntifier..TP.\fIs
8b80: 65 73 73 69 6f 6e 5f 74 69 63 6b 65 74 5c 66 52 ession_ticket\fR
8b90: 0a 54 69 63 6b 65 74 20 69 73 20 74 68 65 20 73 .Ticket is the s
8ba0: 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 69 6e ession ticket in
8bb0: 66 6f 0a 2e 54 50 0a 5c 66 49 6c 69 66 65 74 69 fo..TP.\fIlifeti
8bc0: 6d 65 5c 66 52 0a 4c 69 66 65 74 69 6d 65 20 69 me\fR.Lifetime i
8bd0: 73 20 74 68 65 20 74 69 63 6b 65 74 20 6c 69 66 s the ticket lif
8be0: 65 74 69 6d 65 20 69 6e 20 73 65 63 6f 6e 64 73 etime in seconds
8bf0: 5c 26 2e 0a 2e 52 45 0a 2e 54 50 0a 5c 66 42 76 \&...RE..TP.\fBv
8c00: 65 72 69 66 79 5c 66 52 20 5c 66 49 63 68 61 6e erify\fR \fIchan
8c10: 6e 65 6c 49 64 20 64 65 70 74 68 20 63 65 72 74 nelId depth cert
8c20: 20 73 74 61 74 75 73 20 65 72 72 6f 72 5c 66 52 status error\fR
8c30: 0a 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 77 .This callback w
8c40: 61 73 20 6d 6f 76 65 64 20 74 6f 20 5c 66 42 2d as moved to \fB-
8c50: 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 5c validatecommand\
8c60: 66 52 20 69 6e 20 54 63 6c 54 4c 53 20 31 5c 26 fR in TclTLS 1\&
8c70: 2e 38 5c 26 2e 0a 2e 50 50 0a 2e 53 53 20 22 56 .8\&...PP..SS "V
8c80: 41 4c 55 45 53 20 46 4f 52 20 50 41 53 53 57 4f ALUES FOR PASSWO
8c90: 52 44 20 43 41 4c 4c 42 41 43 4b 22 0a 54 68 65 RD CALLBACK".The
8ca0: 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 callback for th
8cb0: 65 20 5c 66 42 2d 70 61 73 73 77 6f 72 64 5c 66 e \fB-password\f
8cc0: 52 20 6f 70 74 69 6f 6e 20 69 73 20 69 6e 76 6f R option is invo
8cd0: 6b 65 64 20 62 79 20 54 63 6c 54 4c 53 20 77 68 ked by TclTLS wh
8ce0: 65 6e 65 76 65 72 20 4f 70 65 6e 53 53 4c 20 6e enever OpenSSL n
8cf0: 65 65 64 73 0a 74 6f 20 6f 62 74 61 69 6e 20 61 eeds.to obtain a
8d00: 20 70 61 73 73 77 6f 72 64 5c 26 2e 20 53 65 65 password\&. See
8d10: 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 below for the p
8d20: 6f 73 73 69 62 6c 65 20 61 72 67 75 6d 65 6e 74 ossible argument
8d30: 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 0a s passed to the.
8d40: 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 5c callback script\
8d50: 26 2e 20 54 68 65 20 75 73 65 72 20 70 72 6f 76 &. The user prov
8d60: 69 64 65 64 20 70 61 73 73 77 6f 72 64 20 69 73 ided password is
8d70: 20 65 78 70 65 63 74 65 64 20 74 6f 20 62 65 20 expected to be
8d80: 72 65 74 75 72 6e 65 64 20 62 79 20 74 68 65 0a returned by the.
8d90: 63 61 6c 6c 62 61 63 6b 5c 26 2e 0a 2e 54 50 0a callback\&...TP.
8da0: 5c 66 42 70 61 73 73 77 6f 72 64 5c 66 52 20 5c \fBpassword\fR \
8db0: 66 49 72 77 66 6c 61 67 20 73 69 7a 65 5c 66 52 fIrwflag size\fR
8dc0: 0a 49 6e 76 6f 6b 65 64 20 77 68 65 6e 20 6c 6f .Invoked when lo
8dd0: 61 64 69 6e 67 20 6f 72 20 73 74 6f 72 69 6e 67 ading or storing
8de0: 20 61 6e 20 65 6e 63 72 79 70 74 65 64 20 50 45 an encrypted PE
8df0: 4d 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 2e M certificate\&.
8e00: 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61 The arguments a
8e10: 72 65 3a 0a 2e 52 53 0a 2e 54 50 0a 5c 66 49 72 re:..RS..TP.\fIr
8e20: 77 66 6c 61 67 5c 66 52 0a 54 68 65 20 72 65 61 wflag\fR.The rea
8e30: 64 2f 77 72 69 74 65 20 66 6c 61 67 20 69 73 20 d/write flag is
8e40: 30 20 66 6f 72 20 72 65 61 64 69 6e 67 2f 64 65 0 for reading/de
8e50: 63 72 79 70 74 69 6f 6e 20 6f 72 20 31 20 66 6f cryption or 1 fo
8e60: 72 20 77 72 69 74 69 6e 67 2f 65 6e 63 72 79 70 r writing/encryp
8e70: 74 69 6f 6e 5c 26 2e 0a 54 68 65 20 6c 61 74 74 tion\&..The latt
8e80: 65 72 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 er can be used t
8e90: 6f 20 64 65 74 65 72 6d 69 6e 65 20 77 68 65 6e o determine when
8ea0: 20 74 6f 20 70 72 6f 6d 70 74 20 74 68 65 20 75 to prompt the u
8eb0: 73 65 72 20 74 6f 20 63 6f 6e 66 69 72 6d 5c 26 ser to confirm\&
8ec0: 2e 0a 54 68 69 73 20 61 72 67 75 6d 65 6e 74 20 ..This argument
8ed0: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c is new for TclTL
8ee0: 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c S 1\&.8\&...TP.\
8ef0: 66 49 73 69 7a 65 5c 66 52 0a 54 68 65 20 73 69 fIsize\fR.The si
8f00: 7a 65 20 69 73 20 74 68 65 20 6d 61 78 69 6d 75 ze is the maximu
8f10: 6d 20 6c 65 6e 67 74 68 20 6f 66 20 74 68 65 20 m length of the
8f20: 70 61 73 73 77 6f 72 64 20 69 6e 20 62 79 74 65 password in byte
8f30: 73 5c 26 2e 0a 54 68 69 73 20 61 72 67 75 6d 65 s\&..This argume
8f40: 6e 74 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 nt is new for Tc
8f50: 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 52 lTLS 1\&.8\&...R
8f60: 45 0a 2e 50 50 0a 2e 53 53 20 22 56 41 4c 55 45 E..PP..SS "VALUE
8f70: 53 20 46 4f 52 20 56 41 4c 49 44 41 54 45 20 43 S FOR VALIDATE C
8f80: 4f 4d 4d 41 4e 44 20 43 41 4c 4c 42 41 43 4b 22 OMMAND CALLBACK"
8f90: 0a 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 66 6f .The callback fo
8fa0: 72 20 74 68 65 20 5c 66 42 2d 76 61 6c 69 64 61 r the \fB-valida
8fb0: 74 65 63 6f 6d 6d 61 6e 64 5c 66 52 20 6f 70 74 tecommand\fR opt
8fc0: 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20 64 ion is invoked d
8fd0: 75 72 69 6e 67 20 74 68 65 20 68 61 6e 64 73 68 uring the handsh
8fe0: 61 6b 65 0a 70 72 6f 63 65 73 73 20 69 6e 20 6f ake.process in o
8ff0: 72 64 65 72 20 66 6f 72 20 74 68 65 20 61 70 70 rder for the app
9000: 6c 69 63 61 74 69 6f 6e 20 74 6f 20 76 61 6c 69 lication to vali
9010: 64 61 74 65 20 74 68 65 20 70 72 6f 76 69 64 65 date the provide
9020: 64 20 76 61 6c 75 65 28 73 29 5c 26 2e 20 53 65 d value(s)\&. Se
9030: 65 0a 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 e.below for the
9040: 70 6f 73 73 69 62 6c 65 20 61 72 67 75 6d 65 6e possible argumen
9050: 74 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 ts passed to the
9060: 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 callback script
9070: 5c 26 2e 20 49 66 20 6e 6f 74 0a 73 70 65 63 69 \&. If not.speci
9080: 66 69 65 64 2c 20 4f 70 65 6e 53 53 4c 20 77 69 fied, OpenSSL wi
9090: 6c 6c 20 61 63 63 65 70 74 20 61 6c 6c 20 76 61 ll accept all va
90a0: 6c 69 64 20 63 65 72 74 69 66 69 63 61 74 65 73 lid certificates
90b0: 20 61 6e 64 20 65 78 74 65 6e 73 69 6f 6e 73 5c and extensions\
90c0: 26 2e 20 54 6f 20 72 65 6a 65 63 74 0a 74 68 65 &. To reject.the
90d0: 20 76 61 6c 75 65 20 61 6e 64 20 61 62 6f 72 74 value and abort
90e0: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c the connection,
90f0: 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 68 the callback sh
9100: 6f 75 6c 64 20 72 65 74 75 72 6e 20 30 5c 26 2e ould return 0\&.
9110: 20 54 6f 20 61 63 63 65 70 74 20 74 68 65 0a 76 To accept the.v
9120: 61 6c 75 65 20 61 6e 64 20 63 6f 6e 74 69 6e 75 alue and continu
9130: 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e e the connection
9140: 2c 20 69 74 20 73 68 6f 75 6c 64 20 72 65 74 75 , it should retu
9150: 72 6e 20 31 5c 26 2e 20 54 6f 20 72 65 6a 65 63 rn 1\&. To rejec
9160: 74 20 74 68 65 20 76 61 6c 75 65 2c 20 62 75 74 t the value, but
9170: 0a 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 6f .continue the co
9180: 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73 68 6f nnection, it sho
9190: 75 6c 64 20 72 65 74 75 72 6e 20 32 5c 26 2e 20 uld return 2\&.
91a0: 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 This callback is
91b0: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
91c0: 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 1\&.8\&...TP.\fB
91d0: 61 6c 70 6e 5c 66 52 20 5c 66 49 63 68 61 6e 6e alpn\fR \fIchann
91e0: 65 6c 49 64 20 70 72 6f 74 6f 63 6f 6c 20 6d 61 elId protocol ma
91f0: 74 63 68 5c 66 52 0a 46 6f 72 20 73 65 72 76 65 tch\fR.For serve
9200: 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 rs, this form of
9210: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 callback is inv
9220: 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20 63 6c oked when the cl
9230: 69 65 6e 74 20 41 4c 50 4e 20 65 78 74 65 6e 73 ient ALPN extens
9240: 69 6f 6e 20 69 73 0a 72 65 63 65 69 76 65 64 5c ion is.received\
9250: 26 2e 20 49 66 20 5c 66 49 6d 61 74 63 68 5c 66 &. If \fImatch\f
9260: 52 20 69 73 20 74 72 75 65 2c 20 74 68 65 6e 20 R is true, then
9270: 5c 66 49 70 72 6f 74 6f 63 6f 6c 5c 66 52 20 69 \fIprotocol\fR i
9280: 73 20 74 68 65 20 66 69 72 73 74 0a 5c 66 42 2d s the first.\fB-
9290: 61 6c 70 6e 5c 66 52 20 70 72 6f 74 6f 63 6f 6c alpn\fR protocol
92a0: 20 6f 70 74 69 6f 6e 20 69 6e 20 63 6f 6d 6d 6f option in commo
92b0: 6e 20 74 6f 20 62 6f 74 68 20 74 68 65 20 63 6c n to both the cl
92c0: 69 65 6e 74 20 61 6e 64 20 73 65 72 76 65 72 5c ient and server\
92d0: 26 2e 0a 49 66 20 6e 6f 74 2c 20 74 68 65 20 66 &..If not, the f
92e0: 69 72 73 74 20 63 6c 69 65 6e 74 20 73 70 65 63 irst client spec
92f0: 69 66 69 65 64 20 70 72 6f 74 6f 63 6f 6c 20 69 ified protocol i
9300: 73 20 75 73 65 64 5c 26 2e 20 54 68 69 73 20 63 s used\&. This c
9310: 61 6c 6c 62 61 63 6b 20 69 73 20 63 61 6c 6c 65 allback is calle
9320: 64 0a 61 66 74 65 72 20 74 68 65 20 48 65 6c 6c d.after the Hell
9330: 6f 20 61 6e 64 20 41 4c 50 4e 20 63 61 6c 6c 62 o and ALPN callb
9340: 61 63 6b 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 68 acks\&...TP.\fBh
9350: 65 6c 6c 6f 5c 66 52 20 5c 66 49 63 68 61 6e 6e ello\fR \fIchann
9360: 65 6c 49 64 20 73 65 72 76 65 72 6e 61 6d 65 5c elId servername\
9370: 66 52 0a 46 6f 72 20 73 65 72 76 65 72 73 2c 20 fR.For servers,
9380: 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c this form of cal
9390: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 lback is invoked
93a0: 20 64 75 72 69 6e 67 20 63 6c 69 65 6e 74 20 68 during client h
93b0: 65 6c 6c 6f 20 6d 65 73 73 61 67 65 0a 70 72 6f ello message.pro
93c0: 63 65 73 73 69 6e 67 5c 26 2e 20 54 68 65 20 70 cessing\&. The p
93d0: 75 72 70 6f 73 65 20 69 73 20 73 6f 20 74 68 65 urpose is so the
93e0: 20 73 65 72 76 65 72 20 63 61 6e 20 73 65 6c 65 server can sele
93f0: 63 74 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 ct the appropria
9400: 74 65 20 63 65 72 74 69 66 69 63 61 74 65 0a 74 te certificate.t
9410: 6f 20 70 72 65 73 65 6e 74 20 74 6f 20 74 68 65 o present to the
9420: 20 63 6c 69 65 6e 74 2c 20 61 6e 64 20 74 6f 20 client, and to
9430: 6d 61 6b 65 20 6f 74 68 65 72 20 63 6f 6e 66 69 make other confi
9440: 67 75 72 61 74 69 6f 6e 20 61 64 6a 75 73 74 6d guration adjustm
9450: 65 6e 74 73 20 72 65 6c 65 76 61 6e 74 0a 74 6f ents relevant.to
9460: 20 74 68 61 74 20 73 65 72 76 65 72 20 6e 61 6d that server nam
9470: 65 20 61 6e 64 20 69 74 73 20 63 6f 6e 66 69 67 e and its config
9480: 75 72 61 74 69 6f 6e 5c 26 2e 20 49 74 20 69 73 uration\&. It is
9490: 20 63 61 6c 6c 65 64 20 62 65 66 6f 72 65 20 74 called before t
94a0: 68 65 20 53 4e 49 20 61 6e 64 20 41 4c 50 4e 0a he SNI and ALPN.
94b0: 63 61 6c 6c 62 61 63 6b 73 5c 26 2e 0a 2e 54 50 callbacks\&...TP
94c0: 0a 5c 66 42 73 6e 69 5c 66 52 20 5c 66 49 63 68 .\fBsni\fR \fIch
94d0: 61 6e 6e 65 6c 49 64 20 73 65 72 76 65 72 6e 61 annelId serverna
94e0: 6d 65 5c 66 52 0a 46 6f 72 20 73 65 72 76 65 72 me\fR.For server
94f0: 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 s, this form of
9500: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f callback is invo
9510: 6b 65 64 20 77 68 65 6e 20 74 68 65 20 53 65 72 ked when the Ser
9520: 76 65 72 20 4e 61 6d 65 20 49 6e 64 69 63 61 74 ver Name Indicat
9530: 69 6f 6e 0a 28 53 4e 49 29 20 65 78 74 65 6e 73 ion.(SNI) extens
9540: 69 6f 6e 20 69 73 20 72 65 63 65 69 76 65 64 5c ion is received\
9550: 26 2e 20 54 68 65 20 5c 66 49 73 65 72 76 65 72 &. The \fIserver
9560: 6e 61 6d 65 5c 66 52 20 61 72 67 75 6d 65 6e 74 name\fR argument
9570: 20 69 73 20 74 68 65 20 63 6c 69 65 6e 74 0a 70 is the client.p
9580: 72 6f 76 69 64 65 64 20 73 65 72 76 65 72 20 6e rovided server n
9590: 61 6d 65 20 73 70 65 63 69 66 69 65 64 20 69 6e ame specified in
95a0: 20 74 68 65 20 5c 66 42 2d 73 65 72 76 65 72 6e the \fB-servern
95b0: 61 6d 65 3c 2f 62 3e 5c 66 52 20 6f 70 74 69 6f ame</b>\fR optio
95c0: 6e 5c 26 2e 20 54 68 65 0a 70 75 72 70 6f 73 65 n\&. The.purpose
95d0: 20 69 73 20 73 6f 20 77 68 65 6e 20 61 20 73 65 is so when a se
95e0: 72 76 65 72 20 73 75 70 70 6f 72 74 73 20 6d 75 rver supports mu
95f0: 6c 74 69 70 6c 65 20 6e 61 6d 65 73 2c 20 74 68 ltiple names, th
9600: 65 20 72 69 67 68 74 20 63 65 72 74 69 66 69 63 e right certific
9610: 61 74 65 0a 63 61 6e 20 62 65 20 75 73 65 64 5c ate.can be used\
9620: 26 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 64 20 &. It is called
9630: 61 66 74 65 72 20 74 68 65 20 68 65 6c 6c 6f 20 after the hello
9640: 63 61 6c 6c 62 61 63 6b 20 62 75 74 20 62 65 66 callback but bef
9650: 6f 72 65 20 74 68 65 20 41 4c 50 4e 0a 63 61 6c ore the ALPN.cal
9660: 6c 62 61 63 6b 5c 26 2e 0a 2e 54 50 0a 5c 66 42 lback\&...TP.\fB
9670: 76 65 72 69 66 79 5c 66 52 20 5c 66 49 63 68 61 verify\fR \fIcha
9680: 6e 6e 65 6c 49 64 20 64 65 70 74 68 20 63 65 72 nnelId depth cer
9690: 74 20 73 74 61 74 75 73 20 65 72 72 6f 72 5c 66 t status error\f
96a0: 52 0a 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 R.This form of c
96b0: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b allback is invok
96c0: 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 20 77 68 ed by OpenSSL wh
96d0: 65 6e 20 61 20 6e 65 77 20 63 65 72 74 69 66 69 en a new certifi
96e0: 63 61 74 65 20 69 73 20 72 65 63 65 69 76 65 64 cate is received
96f0: 0a 66 72 6f 6d 20 74 68 65 20 70 65 65 72 5c 26 .from the peer\&
9700: 2e 20 49 74 20 61 6c 6c 6f 77 73 20 74 68 65 20 . It allows the
9710: 63 6c 69 65 6e 74 20 74 6f 20 63 68 65 63 6b 20 client to check
9720: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
9730: 76 65 72 69 66 69 63 61 74 69 6f 6e 0a 72 65 73 verification.res
9740: 75 6c 74 73 20 61 6e 64 20 63 68 6f 6f 73 65 20 ults and choose
9750: 77 68 65 74 68 65 72 20 74 6f 20 63 6f 6e 74 69 whether to conti
9760: 6e 75 65 20 6f 72 20 6e 6f 74 5c 26 2e 20 49 74 nue or not\&. It
9770: 20 69 73 20 63 61 6c 6c 65 64 20 66 6f 72 20 65 is called for e
9780: 61 63 68 0a 63 65 72 74 69 66 69 63 61 74 65 20 ach.certificate
9790: 69 6e 20 74 68 65 20 63 65 72 74 69 66 69 63 61 in the certifica
97a0: 74 65 20 63 68 61 69 6e 5c 26 2e 20 54 68 69 73 te chain\&. This
97b0: 20 63 61 6c 6c 62 61 63 6b 20 77 61 73 20 6d 6f callback was mo
97c0: 76 65 64 20 66 72 6f 6d 0a 5c 66 42 2d 63 6f 6d ved from.\fB-com
97d0: 6d 61 6e 64 5c 66 52 20 69 6e 20 54 63 6c 54 4c mand\fR in TclTL
97e0: 53 20 31 5c 26 2e 38 5c 26 2e 20 54 68 65 20 61 S 1\&.8\&. The a
97f0: 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 0a 2e 52 rguments are:..R
9800: 53 0a 2e 54 50 0a 5c 66 49 64 65 70 74 68 5c 66 S..TP.\fIdepth\f
9810: 52 0a 54 68 65 20 64 65 70 74 68 20 69 73 20 74 R.The depth is t
9820: 68 65 20 69 6e 74 65 67 65 72 20 64 65 70 74 68 he integer depth
9830: 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 of the certific
9840: 61 74 65 20 69 6e 20 74 68 65 20 63 65 72 74 69 ate in the certi
9850: 66 69 63 61 74 65 20 63 68 61 69 6e 2c 0a 77 68 ficate chain,.wh
9860: 65 72 65 20 30 20 69 73 20 74 68 65 20 70 65 65 ere 0 is the pee
9870: 72 20 63 65 72 74 69 66 69 63 61 74 65 20 61 6e r certificate an
9880: 64 20 68 69 67 68 65 72 20 76 61 6c 75 65 73 20 d higher values
9890: 67 6f 69 6e 67 20 75 70 20 74 6f 20 74 68 65 20 going up to the
98a0: 43 65 72 74 69 66 69 63 61 74 65 0a 41 75 74 68 Certificate.Auth
98b0: 6f 72 69 74 79 20 28 43 41 29 5c 26 2e 0a 2e 54 ority (CA)\&...T
98c0: 50 0a 5c 66 49 63 65 72 74 5c 66 52 0a 54 68 65 P.\fIcert\fR.The
98d0: 20 63 65 72 74 20 61 72 67 75 6d 65 6e 74 20 69 cert argument i
98e0: 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d s a list of key-
98f0: 76 61 6c 75 65 20 70 61 69 72 73 20 73 69 6d 69 value pairs simi
9900: 6c 61 72 20 74 6f 20 74 68 6f 73 65 20 72 65 74 lar to those ret
9910: 75 72 6e 65 64 20 62 79 0a 5c 66 42 74 6c 73 3a urned by.\fBtls:
9920: 3a 73 74 61 74 75 73 5c 66 52 5c 26 2e 0a 2e 54 :status\fR\&...T
9930: 50 0a 5c 66 49 73 74 61 74 75 73 5c 66 52 0a 54 P.\fIstatus\fR.T
9940: 68 65 20 73 74 61 74 75 73 20 61 72 67 75 6d 65 he status argume
9950: 6e 74 20 69 73 20 74 68 65 20 62 6f 6f 6c 65 61 nt is the boolea
9960: 6e 20 76 61 6c 69 64 69 74 79 20 6f 66 20 74 68 n validity of th
9970: 65 20 63 75 72 72 65 6e 74 20 63 65 72 74 69 66 e current certif
9980: 69 63 61 74 65 20 77 68 65 72 65 20 30 0a 69 73 icate where 0.is
9990: 20 69 6e 76 61 6c 69 64 20 61 6e 64 20 31 20 69 invalid and 1 i
99a0: 73 20 76 61 6c 69 64 5c 26 2e 0a 2e 54 50 0a 5c s valid\&...TP.\
99b0: 66 49 65 72 72 6f 72 5c 66 52 0a 54 68 65 20 65 fIerror\fR.The e
99c0: 72 72 6f 72 20 61 72 67 75 6d 65 6e 74 20 69 73 rror argument is
99d0: 20 74 68 65 20 65 72 72 6f 72 20 6d 65 73 73 61 the error messa
99e0: 67 65 2c 20 69 66 20 61 6e 79 2c 20 67 65 6e 65 ge, if any, gene
99f0: 72 61 74 65 64 20 62 79 0a 5c 66 42 58 35 30 39 rated by.\fBX509
9a00: 5f 53 54 4f 52 45 5f 43 54 58 5f 67 65 74 5f 65 _STORE_CTX_get_e
9a10: 72 72 6f 72 28 29 5c 66 52 5c 26 2e 0a 2e 52 45 rror()\fR\&...RE
9a20: 0a 2e 50 50 0a 52 65 66 65 72 65 6e 63 65 20 69 ..PP.Reference i
9a30: 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20 6f mplementations o
9a40: 66 20 74 68 65 73 65 20 63 61 6c 6c 62 61 63 6b f these callback
9a50: 73 20 61 72 65 20 70 72 6f 76 69 64 65 64 20 69 s are provided i
9a60: 6e 20 22 5c 66 49 74 6c 73 5c 26 2e 74 63 6c 5c n "\fItls\&.tcl\
9a70: 66 52 22 0a 61 73 20 5c 66 42 74 6c 73 3a 3a 63 fR".as \fBtls::c
9a80: 61 6c 6c 62 61 63 6b 5c 66 52 2c 20 5c 66 42 74 allback\fR, \fBt
9a90: 6c 73 3a 3a 70 61 73 73 77 6f 72 64 5c 66 52 2c ls::password\fR,
9aa0: 20 61 6e 64 20 5c 66 42 74 6c 73 3a 3a 76 61 6c and \fBtls::val
9ab0: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 52 idate_command\fR
9ac0: 0a 72 65 73 70 65 63 74 69 76 65 6c 79 5c 26 2e .respectively\&.
9ad0: 20 4e 6f 74 65 20 74 68 61 74 20 74 68 65 73 65 Note that these
9ae0: 20 61 72 65 20 6f 6e 6c 79 20 5c 66 49 73 61 6d are only \fIsam
9af0: 70 6c 65 5c 66 52 20 69 6d 70 6c 65 6d 65 6e 74 ple\fR implement
9b00: 61 74 69 6f 6e 73 5c 26 2e 20 49 6e 20 61 20 6d ations\&. In a m
9b10: 6f 72 65 0a 72 65 61 6c 69 73 74 69 63 20 64 65 ore.realistic de
9b20: 70 6c 6f 79 6d 65 6e 74 20 79 6f 75 20 77 6f 75 ployment you wou
9b30: 6c 64 20 73 70 65 63 69 66 79 20 79 6f 75 72 20 ld specify your
9b40: 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 own callback scr
9b50: 69 70 74 73 20 6f 6e 20 65 61 63 68 20 54 4c 53 ipts on each TLS
9b60: 0a 63 68 61 6e 6e 65 6c 20 75 73 69 6e 67 20 74 .channel using t
9b70: 68 65 20 5c 66 42 2d 63 6f 6d 6d 61 6e 64 5c 66 he \fB-command\f
9b80: 52 2c 20 5c 66 42 2d 70 61 73 73 77 6f 72 64 5c R, \fB-password\
9b90: 66 52 2c 20 61 6e 64 0a 5c 66 42 2d 76 61 6c 69 fR, and.\fB-vali
9ba0: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 52 20 date_command\fR
9bb0: 6f 70 74 69 6f 6e 73 5c 26 2e 0a 2e 50 50 0a 54 options\&...PP.T
9bc0: 68 65 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 he default behav
9bd0: 69 6f 72 20 77 68 65 6e 20 74 68 65 20 5c 66 42 ior when the \fB
9be0: 2d 63 6f 6d 6d 61 6e 64 5c 66 52 20 61 6e 64 20 -command\fR and
9bf0: 5c 66 42 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d \fB-validate_com
9c00: 6d 61 6e 64 5c 66 52 0a 6f 70 74 69 6f 6e 73 20 mand\fR.options
9c10: 61 72 65 20 6e 6f 74 20 73 70 65 63 69 66 69 65 are not specifie
9c20: 64 2c 20 69 73 20 66 6f 72 20 54 63 6c 54 4c 53 d, is for TclTLS
9c30: 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 to process the
9c40: 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 associated libra
9c50: 72 79 0a 63 61 6c 6c 62 61 63 6b 73 20 69 6e 74 ry.callbacks int
9c60: 65 72 6e 61 6c 6c 79 5c 26 2e 20 54 68 65 20 64 ernally\&. The d
9c70: 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20 efault behavior
9c80: 77 68 65 6e 20 74 68 65 20 5c 66 42 2d 70 61 73 when the \fB-pas
9c90: 73 77 6f 72 64 5c 66 52 20 6f 70 74 69 6f 6e 0a sword\fR option.
9ca0: 69 73 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64 is not specified
9cb0: 20 69 73 20 66 6f 72 20 54 63 6c 54 4c 53 20 74 is for TclTLS t
9cc0: 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 61 73 o process the as
9cd0: 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72 79 sociated library
9ce0: 20 63 61 6c 6c 62 61 63 6b 73 20 62 79 0a 61 74 callbacks by.at
9cf0: 74 65 6d 70 74 69 6e 67 20 74 6f 20 63 61 6c 6c tempting to call
9d00: 20 5c 66 42 74 6c 73 3a 3a 70 61 73 73 77 6f 72 \fBtls::passwor
9d10: 64 5c 66 52 5c 26 2e 20 54 68 65 20 64 69 66 66 d\fR\&. The diff
9d20: 65 72 65 6e 63 65 20 62 65 74 77 65 65 6e 20 74 erence between t
9d30: 68 65 73 65 20 74 77 6f 0a 62 65 68 61 76 69 6f hese two.behavio
9d40: 72 73 20 69 73 20 61 20 63 6f 6e 73 65 71 75 65 rs is a conseque
9d50: 6e 63 65 20 6f 66 20 6d 61 69 6e 74 61 69 6e 69 nce of maintaini
9d60: 6e 67 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 ng compatibility
9d70: 20 77 69 74 68 20 65 61 72 6c 69 65 72 0a 69 6d with earlier.im
9d80: 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 5c 26 2e plementations\&.
9d90: 0a 2e 50 50 0a 5c 66 49 54 68 65 20 75 73 65 20 ..PP.\fIThe use
9da0: 6f 66 20 74 68 65 20 72 65 66 65 72 65 6e 63 65 of the reference
9db0: 20 63 61 6c 6c 62 61 63 6b 73 20 5c 66 42 74 6c callbacks \fBtl
9dc0: 73 3a 3a 63 61 6c 6c 62 61 63 6b 5c 66 52 2c 20 s::callback\fR,
9dd0: 5c 66 42 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 \fBtls::password
9de0: 5c 66 52 2c 0a 61 6e 64 20 5c 66 42 74 6c 73 3a \fR,.and \fBtls:
9df0: 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e :validate_comman
9e00: 64 5c 66 52 20 69 73 20 6e 6f 74 20 72 65 63 6f d\fR is not reco
9e10: 6d 6d 65 6e 64 65 64 5c 26 2e 20 54 68 65 79 20 mmended\&. They
9e20: 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 20 66 may be removed f
9e30: 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65 61 rom future relea
9e40: 73 65 73 5c 26 2e 5c 66 52 0a 2e 53 48 20 44 45 ses\&.\fR..SH DE
9e50: 42 55 47 0a 46 6f 72 20 6d 6f 73 74 20 64 65 62 BUG.For most deb
9e60: 75 67 67 69 6e 67 20 6e 65 65 64 73 2c 20 74 68 ugging needs, th
9e70: 65 20 5c 66 42 2d 63 61 6c 6c 62 61 63 6b 5c 66 e \fB-callback\f
9e80: 52 20 6f 70 74 69 6f 6e 20 63 61 6e 20 62 65 20 R option can be
9e90: 75 73 65 64 20 74 6f 20 70 72 6f 76 69 64 65 0a used to provide.
9ea0: 73 75 66 66 69 63 69 65 6e 74 20 69 6e 73 69 67 sufficient insig
9eb0: 68 74 20 61 6e 64 20 69 6e 66 6f 72 6d 61 74 69 ht and informati
9ec0: 6f 6e 20 6f 6e 20 74 68 65 20 54 4c 53 20 68 61 on on the TLS ha
9ed0: 6e 64 73 68 61 6b 65 20 61 6e 64 20 70 72 6f 67 ndshake and prog
9ee0: 72 65 73 73 5c 26 2e 20 49 66 0a 66 75 72 74 68 ress\&. If.furth
9ef0: 65 72 20 74 72 6f 75 62 6c 65 73 68 6f 6f 74 69 er troubleshooti
9f00: 6e 67 20 69 6e 73 69 67 68 74 20 69 73 20 6e 65 ng insight is ne
9f10: 65 64 65 64 2c 20 74 68 65 20 63 6f 6d 70 69 6c eded, the compil
9f20: 65 20 74 69 6d 65 20 6f 70 74 69 6f 6e 0a 5c 66 e time option.\f
9f30: 42 2d 2d 65 6e 61 62 6c 65 2d 64 65 62 75 67 5c B--enable-debug\
9f40: 66 52 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 fR can be used t
9f50: 6f 20 67 65 74 20 64 65 74 61 69 6c 65 64 20 65 o get detailed e
9f60: 78 65 63 75 74 69 6f 6e 20 66 6c 6f 77 20 73 74 xecution flow st
9f70: 61 74 75 73 5c 26 2e 0a 2e 50 50 0a 54 4c 53 20 atus\&...PP.TLS
9f80: 6b 65 79 20 6c 6f 67 67 69 6e 67 20 63 61 6e 20 key logging can
9f90: 62 65 20 65 6e 61 62 6c 65 64 20 62 79 20 73 65 be enabled by se
9fa0: 74 74 69 6e 67 20 74 68 65 20 65 6e 76 69 72 6f tting the enviro
9fb0: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 0a 5c nment variable.\
9fc0: 66 42 53 53 4c 4b 45 59 4c 4f 47 46 49 4c 45 5c fBSSLKEYLOGFILE\
9fd0: 66 52 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 6f fR to the name o
9fe0: 66 20 74 68 65 20 66 69 6c 65 20 74 6f 20 6c 6f f the file to lo
9ff0: 67 20 74 6f 5c 26 2e 20 54 68 65 6e 20 77 68 65 g to\&. Then whe
a000: 6e 65 76 65 72 20 54 4c 53 20 6b 65 79 0a 6d 61 never TLS key.ma
a010: 74 65 72 69 61 6c 20 69 73 20 67 65 6e 65 72 61 terial is genera
a020: 74 65 64 20 6f 72 20 72 65 63 65 69 76 65 64 20 ted or received
a030: 69 74 20 77 69 6c 6c 20 62 65 20 6c 6f 67 67 65 it will be logge
a040: 64 20 74 6f 20 74 68 65 20 66 69 6c 65 5c 26 2e d to the file\&.
a050: 20 54 68 69 73 20 69 73 20 75 73 65 66 75 6c 0a This is useful.
a060: 66 6f 72 20 6c 6f 67 67 69 6e 67 20 6b 65 79 20 for logging key
a070: 64 61 74 61 20 66 6f 72 20 6e 65 74 77 6f 72 6b data for network
a080: 20 6c 6f 67 67 69 6e 67 20 74 6f 6f 6c 73 20 74 logging tools t
a090: 6f 20 75 73 65 20 74 6f 20 64 65 63 72 79 70 74 o use to decrypt
a0a0: 20 74 68 65 20 64 61 74 61 5c 26 2e 0a 2e 50 50 the data\&...PP
a0b0: 0a 54 68 65 20 5c 66 42 74 6c 73 3a 3a 64 65 62 .The \fBtls::deb
a0c0: 75 67 5c 66 52 20 76 61 72 69 61 62 6c 65 20 70 ug\fR variable p
a0d0: 72 6f 76 69 64 65 73 20 73 6f 6d 65 20 61 64 64 rovides some add
a0e0: 69 74 69 6f 6e 61 6c 20 63 6f 6e 74 72 6f 6c 20 itional control
a0f0: 6f 76 65 72 20 74 68 65 0a 64 65 62 75 67 20 6c over the.debug l
a100: 6f 67 67 69 6e 67 20 69 6e 20 74 68 65 20 5c 66 ogging in the \f
a110: 42 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 5c 66 Btls::callback\f
a120: 52 2c 20 5c 66 42 74 6c 73 3a 3a 70 61 73 73 77 R, \fBtls::passw
a130: 6f 72 64 5c 66 52 2c 20 61 6e 64 0a 5c 66 42 74 ord\fR, and.\fBt
a140: 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d ls::validate_com
a150: 6d 61 6e 64 5c 66 52 20 64 65 66 61 75 6c 74 20 mand\fR default
a160: 68 61 6e 64 6c 65 72 73 20 69 6e 20 22 5c 66 49 handlers in "\fI
a170: 74 6c 73 5c 26 2e 74 63 6c 5c 66 52 22 5c 26 2e tls\&.tcl\fR"\&.
a180: 0a 54 68 65 20 64 65 66 61 75 6c 74 20 76 61 6c .The default val
a190: 75 65 20 69 73 20 30 20 77 69 74 68 20 68 69 67 ue is 0 with hig
a1a0: 68 65 72 20 76 61 6c 75 65 73 20 70 72 6f 64 75 her values produ
a1b0: 63 69 6e 67 20 6d 6f 72 65 20 64 69 61 67 6e 6f cing more diagno
a1c0: 73 74 69 63 20 6f 75 74 70 75 74 2c 0a 61 6e 64 stic output,.and
a1d0: 20 77 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 63 65 will also force
a1e0: 20 74 68 65 20 76 65 72 69 66 79 20 6d 65 74 68 the verify meth
a1f0: 6f 64 20 69 6e 20 5c 66 42 74 6c 73 3a 3a 63 61 od in \fBtls::ca
a200: 6c 6c 62 61 63 6b 5c 66 52 20 74 6f 20 61 63 63 llback\fR to acc
a210: 65 70 74 20 74 68 65 0a 63 65 72 74 69 66 69 63 ept the.certific
a220: 61 74 65 2c 20 65 76 65 6e 20 69 66 20 69 74 20 ate, even if it
a230: 69 73 20 69 6e 76 61 6c 69 64 20 77 68 65 6e 20 is invalid when
a240: 74 68 65 20 5c 66 42 2d 76 61 6c 69 64 61 74 65 the \fB-validate
a250: 63 6f 6d 6d 61 6e 64 5c 66 52 0a 6f 70 74 69 6f command\fR.optio
a260: 6e 20 69 73 20 73 65 74 20 74 6f 20 5c 66 42 74 n is set to \fBt
a270: 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d ls::validate_com
a280: 6d 61 6e 64 5c 66 52 5c 26 2e 0a 2e 50 50 0a 5c mand\fR\&...PP.\
a290: 66 49 54 68 65 20 75 73 65 20 6f 66 20 74 68 65 fIThe use of the
a2a0: 20 76 61 72 69 61 62 6c 65 20 5c 66 42 74 6c 73 variable \fBtls
a2b0: 3a 3a 64 65 62 75 67 5c 66 52 20 69 73 20 6e 6f ::debug\fR is no
a2c0: 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 5c 26 2e t recommended\&.
a2d0: 0a 49 74 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 .It may be remov
a2e0: 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65 20 72 ed from future r
a2f0: 65 6c 65 61 73 65 73 5c 26 2e 5c 66 52 0a 2e 53 eleases\&.\fR..S
a300: 48 20 45 58 41 4d 50 4c 45 53 0a 54 68 65 20 66 H EXAMPLES.The f
a310: 6f 6c 6c 6f 77 69 6e 67 20 61 72 65 20 65 78 61 ollowing are exa
a320: 6d 70 6c 65 20 73 63 72 69 70 74 73 20 74 6f 20 mple scripts to
a330: 64 6f 77 6e 6c 6f 61 64 20 61 20 77 65 62 70 61 download a webpa
a340: 67 65 20 61 6e 64 20 66 69 6c 65 20 75 73 69 6e ge and file usin
a350: 67 20 74 68 65 0a 68 74 74 70 20 70 61 63 6b 61 g the.http packa
a360: 67 65 5c 26 2e 20 53 65 65 20 5c 66 42 43 65 72 ge\&. See \fBCer
a370: 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 tificate Validat
a380: 69 6f 6e 5c 66 52 20 66 6f 72 20 77 68 65 6e 20 ion\fR for when
a390: 74 68 65 0a 5c 66 42 2d 63 61 64 69 72 5c 66 52 the.\fB-cadir\fR
a3a0: 2c 20 5c 66 42 2d 63 61 66 69 6c 65 5c 66 52 2c , \fB-cafile\fR,
a3b0: 20 61 6e 64 20 5c 66 42 2d 63 61 73 74 6f 72 65 and \fB-castore
a3c0: 5c 66 52 20 6f 70 74 69 6f 6e 73 20 61 72 65 20 \fR options are
a3d0: 61 6c 73 6f 0a 6e 65 65 64 65 64 5c 26 2e 20 53 also.needed\&. S
a3e0: 65 65 20 74 68 65 20 22 5c 66 49 64 65 6d 6f 73 ee the "\fIdemos
a3f0: 5c 66 52 22 20 64 69 72 65 63 74 6f 72 79 20 66 \fR" directory f
a400: 6f 72 20 6d 6f 72 65 20 65 78 61 6d 70 6c 65 20 or more example
a410: 73 63 72 69 70 74 73 5c 26 2e 0a 2e 50 50 0a 45 scripts\&...PP.E
a420: 78 61 6d 70 6c 65 20 23 31 3a 20 44 6f 77 6e 6c xample #1: Downl
a430: 6f 61 64 20 61 20 77 65 62 20 70 61 67 65 0a 2e oad a web page..
a440: 43 53 0a 0a 0a 0a 70 61 63 6b 61 67 65 20 72 65 CS....package re
a450: 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61 quire http.packa
a460: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a 0a ge require tls..
a470: 73 65 74 20 75 72 6c 20 22 68 74 74 70 73 3a 2f set url "https:/
a480: 2f 77 77 77 5c 26 2e 74 63 6c 5c 26 2e 74 6b 2f /www\&.tcl\&.tk/
a490: 22 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 65 72 ".http::register
a4a0: 20 68 74 74 70 73 20 34 34 33 20 5b 6c 69 73 74 https 443 [list
a4b0: 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d ::tls::socket -
a4c0: 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 31 autoservername 1
a4d0: 20 2d 72 65 71 75 69 72 65 20 31 5d 0a 0a 23 20 -require 1]..#
a4e0: 47 65 74 20 55 52 4c 0a 73 65 74 20 74 6f 6b 65 Get URL.set toke
a4f0: 6e 20 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 n [http::geturl
a500: 24 75 72 6c 5d 0a 0a 23 20 43 68 65 63 6b 20 66 $url]..# Check f
a510: 6f 72 20 65 72 72 6f 72 0a 69 66 20 7b 5b 68 74 or error.if {[ht
a520: 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 tp::status $toke
a530: 6e 5d 20 6e 65 20 22 6f 6b 22 7d 20 7b 0a 20 20 n] ne "ok"} {.
a540: 20 20 70 75 74 73 20 5b 66 6f 72 6d 61 74 20 22 puts [format "
a550: 45 72 72 6f 72 20 25 73 22 20 5b 68 74 74 70 3a Error %s" [http:
a560: 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d 5d :status $token]]
a570: 0a 7d 0a 0a 23 20 53 61 76 65 20 77 65 62 20 70 .}..# Save web p
a580: 61 67 65 20 74 6f 20 66 69 6c 65 0a 73 65 74 20 age to file.set
a590: 63 68 20 5b 6f 70 65 6e 20 65 78 61 6d 70 6c 65 ch [open example
a5a0: 5c 26 2e 68 74 6d 6c 20 77 62 5d 0a 70 75 74 73 \&.html wb].puts
a5b0: 20 24 63 68 20 5b 68 74 74 70 3a 3a 64 61 74 61 $ch [http::data
a5c0: 20 24 74 6f 6b 65 6e 5d 0a 63 6c 6f 73 65 20 24 $token].close $
a5d0: 63 68 0a 0a 23 20 43 6c 65 61 6e 75 70 0a 3a 3a ch..# Cleanup.::
a5e0: 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 24 74 http::cleanup $t
a5f0: 6f 6b 65 6e 0a 0a 2e 43 45 0a 45 78 61 6d 70 6c oken...CE.Exampl
a600: 65 20 23 32 3a 20 44 6f 77 6e 6c 6f 61 64 20 61 e #2: Download a
a610: 20 66 69 6c 65 0a 2e 43 53 0a 0a 0a 0a 70 61 63 file..CS....pac
a620: 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 74 74 kage require htt
a630: 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 p.package requir
a640: 65 20 74 6c 73 0a 0a 73 65 74 20 75 72 6c 20 22 e tls..set url "
a650: 68 74 74 70 73 3a 2f 2f 77 69 6b 69 5c 26 2e 74 https://wiki\&.t
a660: 63 6c 2d 6c 61 6e 67 5c 26 2e 6f 72 67 2f 73 69 cl-lang\&.org/si
a670: 74 65 6d 61 70 5c 26 2e 78 6d 6c 22 0a 68 74 74 temap\&.xml".htt
a680: 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 74 70 p::register http
a690: 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c s 443 [list ::tl
a6a0: 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73 s::socket -autos
a6b0: 65 72 76 65 72 6e 61 6d 65 20 31 20 2d 72 65 71 ervername 1 -req
a6c0: 75 69 72 65 20 31 5d 0a 0a 23 20 4f 70 65 6e 20 uire 1]..# Open
a6d0: 6f 75 74 70 75 74 20 66 69 6c 65 0a 73 65 74 20 output file.set
a6e0: 66 69 6c 65 6e 61 6d 65 20 5b 66 69 6c 65 20 74 filename [file t
a6f0: 61 69 6c 20 24 75 72 6c 5d 0a 73 65 74 20 63 68 ail $url].set ch
a700: 20 5b 6f 70 65 6e 20 24 66 69 6c 65 6e 61 6d 65 [open $filename
a710: 20 77 62 5d 0a 0a 23 20 47 65 74 20 66 69 6c 65 wb]..# Get file
a720: 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 3a 3a 68 74 .set token [::ht
a730: 74 70 3a 3a 67 65 74 75 72 6c 20 24 75 72 6c 20 tp::geturl $url
a740: 2d 62 6c 6f 63 6b 73 69 7a 65 20 36 35 35 33 36 -blocksize 65536
a750: 20 2d 63 68 61 6e 6e 65 6c 20 24 63 68 5d 0a 0a -channel $ch]..
a760: 23 20 43 68 65 63 6b 20 66 6f 72 20 65 72 72 6f # Check for erro
a770: 72 0a 69 66 20 7b 5b 68 74 74 70 3a 3a 73 74 61 r.if {[http::sta
a780: 74 75 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 20 22 tus $token] ne "
a790: 6f 6b 22 7d 20 7b 0a 20 20 20 20 70 75 74 73 20 ok"} {. puts
a7a0: 5b 66 6f 72 6d 61 74 20 22 45 72 72 6f 72 20 25 [format "Error %
a7b0: 73 22 20 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 s" [http::status
a7c0: 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 0a 23 20 43 $token]].}..# C
a7d0: 6c 65 61 6e 75 70 0a 63 6c 6f 73 65 20 24 63 68 leanup.close $ch
a7e0: 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 .::http::cleanup
a7f0: 20 24 74 6f 6b 65 6e 0a 0a 2e 43 45 0a 2e 53 48 $token...CE..SH
a800: 20 22 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 "SPECIAL CONSID
a810: 45 52 41 54 49 4f 4e 53 22 0a 54 68 65 20 63 61 ERATIONS".The ca
a820: 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20 74 68 pabilities of th
a830: 69 73 20 70 61 63 6b 61 67 65 20 63 61 6e 20 76 is package can v
a840: 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c 79 20 62 ary enormously b
a850: 61 73 65 64 20 75 70 6f 6e 20 68 6f 77 20 74 68 ased upon how th
a860: 65 0a 6c 69 6e 6b 65 64 20 74 6f 20 4f 70 65 6e e.linked to Open
a870: 53 53 4c 20 6c 69 62 72 61 72 79 20 77 61 73 20 SSL library was
a880: 63 6f 6e 66 69 67 75 72 65 64 20 61 6e 64 20 62 configured and b
a890: 75 69 6c 74 5c 26 2e 20 4e 65 77 20 76 65 72 73 uilt\&. New vers
a8a0: 69 6f 6e 73 20 6d 61 79 20 6f 62 73 6f 6c 65 74 ions may obsolet
a8b0: 65 0a 6f 6c 64 65 72 20 70 72 6f 74 6f 63 6f 6c e.older protocol
a8c0: 20 76 65 72 73 69 6f 6e 73 2c 20 61 64 64 20 6f versions, add o
a8d0: 72 20 72 65 6d 6f 76 65 20 63 69 70 68 65 72 73 r remove ciphers
a8e0: 2c 20 63 68 61 6e 67 65 20 64 65 66 61 75 6c 74 , change default
a8f0: 20 76 61 6c 75 65 73 2c 20 65 74 63 5c 26 2e 0a values, etc\&..
a900: 55 73 65 20 74 68 65 20 5c 66 42 74 6c 73 3a 3a Use the \fBtls::
a910: 70 72 6f 74 6f 63 6f 6c 73 5c 66 52 20 63 6f 6d protocols\fR com
a920: 6d 61 6e 64 73 20 74 6f 20 6f 62 74 61 69 6e 20 mands to obtain
a930: 74 68 65 20 73 75 70 70 6f 72 74 65 64 0a 70 72 the supported.pr
a940: 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73 5c otocol versions\
a950: 26 2e 0a 2e 53 48 20 22 53 45 45 20 41 4c 53 4f &...SH "SEE ALSO
a960: 22 0a 5c 66 49 4f 70 65 6e 53 53 4c 5c 66 52 20 ".\fIOpenSSL\fR
a970: 5b 68 74 74 70 73 3a 2f 2f 77 77 77 5c 26 2e 6f [https://www\&.o
a980: 70 65 6e 73 73 6c 5c 26 2e 6f 72 67 2f 5d 2c 20 penssl\&.org/],
a990: 68 74 74 70 2c 20 73 6f 63 6b 65 74 0a 2e 53 48 http, socket..SH
a9a0: 20 4b 45 59 57 4f 52 44 53 0a 49 2f 4f 2c 20 49 KEYWORDS.I/O, I
a9b0: 50 20 41 64 64 72 65 73 73 2c 20 4f 70 65 6e 53 P Address, OpenS
a9c0: 53 4c 2c 20 53 53 4c 2c 20 54 43 50 2c 20 54 4c SL, SSL, TCP, TL
a9d0: 53 2c 20 54 63 6c 54 4c 53 2c 20 61 73 79 6e 63 S, TclTLS, async
a9e0: 68 72 6f 6e 6f 75 73 20 49 2f 4f 2c 20 62 69 6e hronous I/O, bin
a9f0: 64 2c 20 63 65 72 74 69 66 69 63 61 74 65 2c 20 d, certificate,
aa00: 63 68 61 6e 6e 65 6c 2c 20 63 6f 6e 6e 65 63 74 channel, connect
aa10: 69 6f 6e 2c 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 ion, domain name
aa20: 2c 20 68 6f 73 74 2c 20 68 74 74 70 73 2c 20 6e , host, https, n
aa30: 65 74 77 6f 72 6b 2c 20 6e 65 74 77 6f 72 6b 20 etwork, network
aa40: 61 64 64 72 65 73 73 2c 20 73 6f 63 6b 65 74 2c address, socket,
aa50: 20 74 6c 73 0a 2e 53 48 20 43 41 54 45 47 4f 52 tls..SH CATEGOR
aa60: 59 0a 74 6c 73 0a 2e 53 48 20 43 4f 50 59 52 49 Y.tls..SH COPYRI
aa70: 47 48 54 0a 2e 6e 66 0a 43 6f 70 79 72 69 67 68 GHT..nf.Copyrigh
aa80: 74 20 28 63 29 20 31 39 39 39 20 4d 61 74 74 20 t (c) 1999 Matt
aa90: 4e 65 77 6d 61 6e 0a 43 6f 70 79 72 69 67 68 74 Newman.Copyright
aaa0: 20 28 63 29 20 32 30 30 34 20 53 74 61 72 66 69 (c) 2004 Starfi
aab0: 73 68 20 53 79 73 74 65 6d 73 0a 43 6f 70 79 72 sh Systems.Copyr
aac0: 69 67 68 74 20 28 63 29 20 32 30 32 34 20 42 72 ight (c) 2024 Br
aad0: 69 61 6e 20 4f 27 48 61 67 61 6e 0a 0a 2e 66 69 ian O'Hagan...fi
aae0: 0a .