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 53 65 63 75 t access to Secu
1b60: 72 65 20 53 6f 63 6b 65 74 20 4c 61 79 65 72 20 re Socket Layer
1b70: 28 53 53 4c 29 0a 63 6f 6d 6d 75 6e 69 63 61 74 (SSL).communicat
1b80: 69 6f 6e 73 20 75 73 69 6e 67 20 74 68 65 20 54 ions using the T
1b90: 72 61 6e 73 70 6f 72 74 20 4c 61 79 65 72 20 53 ransport Layer S
1ba0: 65 63 75 72 69 74 79 20 28 54 4c 53 29 20 70 72 ecurity (TLS) pr
1bb0: 6f 74 6f 63 6f 6c 5c 26 2e 20 49 74 20 70 72 6f otocol\&. It pro
1bc0: 76 69 64 65 73 20 61 0a 67 65 6e 65 72 69 63 20 vides a.generic
1bd0: 62 69 6e 64 69 6e 67 20 74 6f 20 5c 66 49 4f 70 binding to \fIOp
1be0: 65 6e 53 53 4c 5c 66 52 20 5b 68 74 74 70 73 3a enSSL\fR [https:
1bf0: 2f 2f 77 77 77 5c 26 2e 6f 70 65 6e 73 73 6c 5c //www\&.openssl\
1c00: 26 2e 6f 72 67 2f 5d 2c 20 75 74 69 6c 69 7a 69 &.org/], utilizi
1c10: 6e 67 20 74 68 65 0a 5c 66 42 54 63 6c 5f 53 74 ng the.\fBTcl_St
1c20: 61 63 6b 43 68 61 6e 6e 65 6c 5c 66 52 20 41 50 ackChannel\fR AP
1c30: 49 20 69 6e 20 54 43 4c 20 38 5c 26 2e 34 20 6f I in TCL 8\&.4 o
1c40: 72 20 6c 61 74 65 72 5c 26 2e 20 54 68 65 73 65 r later\&. These
1c50: 20 73 6f 63 6b 65 74 73 20 62 65 68 61 76 65 20 sockets behave
1c60: 65 78 61 63 74 6c 79 0a 74 68 65 20 73 61 6d 65 exactly.the same
1c70: 20 61 73 20 63 68 61 6e 6e 65 6c 73 20 63 72 65 as channels cre
1c80: 61 74 65 64 20 75 73 69 6e 67 20 74 68 65 20 62 ated using the b
1c90: 75 69 6c 74 2d 69 6e 20 5c 66 42 73 6f 63 6b 65 uilt-in \fBsocke
1ca0: 74 5c 66 52 20 63 6f 6d 6d 61 6e 64 2c 20 62 75 t\fR command, bu
1cb0: 74 0a 70 72 6f 76 69 64 65 20 61 64 64 69 74 69 t.provide additi
1cc0: 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72 onal options for
1cd0: 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 20 74 68 65 controlling the
1ce0: 20 53 53 4c 2f 54 4c 53 20 73 65 73 73 69 6f 6e SSL/TLS session
1cf0: 5c 26 2e 0a 2e 53 48 20 43 4f 4d 50 41 54 49 42 \&...SH COMPATIB
1d00: 49 4c 49 54 59 0a 54 68 69 73 20 65 78 74 65 6e ILITY.This exten
1d10: 73 69 6f 6e 20 69 73 20 63 6f 6d 70 61 74 69 62 sion is compatib
1d20: 6c 65 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 le with OpenSSL
1d30: 31 5c 26 2e 31 5c 26 2e 31 20 6f 72 20 6c 61 74 1\&.1\&.1 or lat
1d40: 65 72 5c 26 2e 20 49 74 20 72 65 71 75 69 72 65 er\&. It require
1d50: 73 20 54 63 6c 0a 76 65 72 73 69 6f 6e 20 38 5c s Tcl.version 8\
1d60: 26 2e 35 20 6f 72 20 6c 61 74 65 72 20 61 6e 64 &.5 or later and
1d70: 20 77 69 6c 6c 20 77 6f 72 6b 20 77 69 74 68 20 will work with
1d80: 54 63 6c 20 39 5c 26 2e 30 5c 26 2e 0a 2e 53 48 Tcl 9\&.0\&...SH
1d90: 20 43 4f 4d 4d 41 4e 44 53 0a 54 68 65 20 66 6f COMMANDS.The fo
1da0: 6c 6c 6f 77 69 6e 67 20 61 72 65 20 74 68 65 20 llowing are the
1db0: 63 6f 6d 6d 61 6e 64 73 20 70 72 6f 76 69 64 65 commands provide
1dc0: 64 20 62 79 20 74 68 65 20 54 63 4c 54 4c 53 20 d by the TcLTLS
1dd0: 70 61 63 6b 61 67 65 5c 26 2e 20 53 65 65 0a 5c package\&. See.\
1de0: 66 42 45 78 61 6d 70 6c 65 73 5c 66 52 20 66 6f fBExamples\fR fo
1df0: 72 20 65 78 61 6d 70 6c 65 20 75 73 61 67 65 20 r example usage
1e00: 61 6e 64 20 74 68 65 20 22 5c 66 49 64 65 6d 6f and the "\fIdemo
1e10: 73 5c 66 52 22 20 64 69 72 65 63 74 6f 72 79 20 s\fR" directory
1e20: 66 6f 72 0a 6d 6f 72 65 20 65 78 61 6d 70 6c 65 for.more example
1e30: 20 75 73 61 67 65 5c 26 2e 0a 2e 54 50 0a 5c 66 usage\&...TP.\f
1e40: 42 74 6c 73 3a 3a 69 6e 69 74 5c 66 52 20 3f 5c Btls::init\fR ?\
1e50: 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 3f 20 3f 5c fI-option\fR? ?\
1e60: 66 49 76 61 6c 75 65 5c 66 52 3f 20 3f 5c 66 49 fIvalue\fR? ?\fI
1e70: 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 5c 26 -option value \&
1e80: 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 0a 4f 70 74 69 .\&.\&.\fR?.Opti
1e90: 6f 6e 61 6c 20 66 75 6e 63 74 69 6f 6e 20 74 6f onal function to
1ea0: 20 73 65 74 20 74 68 65 20 64 65 66 61 75 6c 74 set the default
1eb0: 20 6f 70 74 69 6f 6e 73 20 75 73 65 64 20 62 79 options used by
1ec0: 20 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 5c \fBtls::socket\
1ed0: 66 52 5c 26 2e 20 49 66 20 79 6f 75 0a 63 61 6c fR\&. If you.cal
1ee0: 6c 20 5c 66 42 74 6c 73 3a 3a 69 6d 70 6f 72 74 l \fBtls::import
1ef0: 5c 66 52 20 64 69 72 65 63 74 6c 79 2c 20 74 68 \fR directly, th
1f00: 65 20 76 61 6c 75 65 73 20 73 65 74 20 62 79 20 e values set by
1f10: 74 68 69 73 20 63 6f 6d 6d 61 6e 64 20 68 61 76 this command hav
1f20: 65 20 6e 6f 20 65 66 66 65 63 74 5c 26 2e 0a 54 e no effect\&..T
1f30: 68 69 73 20 63 6f 6d 6d 61 6e 64 20 73 75 70 70 his command supp
1f40: 6f 72 74 73 20 61 6c 6c 20 6f 66 20 74 68 65 20 orts all of the
1f50: 73 61 6d 65 20 6f 70 74 69 6f 6e 73 20 61 73 20 same options as
1f60: 74 68 65 20 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b the \fBtls::sock
1f70: 65 74 5c 66 52 20 63 6f 6d 6d 61 6e 64 2c 0a 74 et\fR command,.t
1f80: 68 6f 75 67 68 20 79 6f 75 20 73 68 6f 75 6c 64 hough you should
1f90: 20 6c 69 6d 69 74 20 79 6f 75 72 20 6f 70 74 69 limit your opti
1fa0: 6f 6e 73 20 74 6f 20 6f 6e 6c 79 20 74 68 65 20 ons to only the
1fb0: 54 4c 53 20 72 65 6c 61 74 65 64 20 6f 6e 65 73 TLS related ones
1fc0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a \&...TP.\fBtls::
1fd0: 73 6f 63 6b 65 74 5c 66 52 20 3f 5c 66 49 2d 6f socket\fR ?\fI-o
1fe0: 70 74 69 6f 6e 5c 66 52 3f 20 3f 5c 66 49 76 61 ption\fR? ?\fIva
1ff0: 6c 75 65 5c 66 52 3f 20 3f 5c 66 49 2d 6f 70 74 lue\fR? ?\fI-opt
2000: 69 6f 6e 20 76 61 6c 75 65 20 5c 26 2e 5c 26 2e ion value \&.\&.
2010: 5c 26 2e 5c 66 52 3f 20 5c 66 49 68 6f 73 74 5c \&.\fR? \fIhost\
2020: 66 52 20 5c 66 49 70 6f 72 74 5c 66 52 0a 54 68 fR \fIport\fR.Th
2030: 69 73 20 69 73 20 61 20 68 65 6c 70 65 72 20 66 is is a helper f
2040: 75 6e 63 74 69 6f 6e 20 74 68 61 74 20 75 74 69 unction that uti
2050: 6c 69 7a 65 73 20 74 68 65 20 75 6e 64 65 72 6c lizes the underl
2060: 79 69 6e 67 20 63 6f 6d 6d 61 6e 64 73 20 5c 66 ying commands \f
2070: 42 73 6f 63 6b 65 74 5c 66 52 0a 61 6e 64 20 5c Bsocket\fR.and \
2080: 66 42 74 6c 73 3a 3a 69 6d 70 6f 72 74 5c 66 52 fBtls::import\fR
2090: 20 74 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 to create the c
20a0: 6f 6e 6e 65 63 74 69 6f 6e 5c 26 2e 20 49 74 20 onnection\&. It
20b0: 62 65 68 61 76 65 73 20 74 68 65 20 73 61 6d 65 behaves the same
20c0: 20 61 73 20 74 68 65 0a 6e 61 74 69 76 65 20 54 as the.native T
20d0: 43 4c 20 5c 66 42 73 6f 63 6b 65 74 5c 66 52 20 CL \fBsocket\fR
20e0: 63 6f 6d 6d 61 6e 64 2c 20 62 75 74 20 61 6c 73 command, but als
20f0: 6f 20 73 75 70 70 6f 72 74 73 20 74 68 65 20 5c o supports the \
2100: 66 42 74 6c 73 3a 3a 69 6d 70 6f 72 74 5c 66 52 fBtls::import\fR
2110: 0a 63 6f 6d 6d 61 6e 64 20 6f 70 74 69 6f 6e 73 .command options
2120: 20 77 69 74 68 20 6f 6e 65 20 61 64 64 69 74 69 with one additi
2130: 6f 6e 61 6c 20 6f 70 74 69 6f 6e 5c 26 2e 20 49 onal option\&. I
2140: 74 20 72 65 74 75 72 6e 73 20 74 68 65 20 63 68 t returns the ch
2150: 61 6e 6e 65 6c 20 68 61 6e 64 6c 65 20 69 64 0a annel handle id.
2160: 66 6f 72 20 74 68 65 20 6e 65 77 20 73 6f 63 6b for the new sock
2170: 65 74 5c 26 2e 20 41 64 64 69 74 69 6f 6e 61 6c et\&. Additional
2180: 20 6f 70 74 69 6f 6e 73 20 61 72 65 3a 0a 2e 52 options are:..R
2190: 53 0a 2e 54 50 0a 5c 66 42 2d 61 75 74 6f 73 65 S..TP.\fB-autose
21a0: 72 76 65 72 6e 61 6d 65 5c 66 52 20 5c 66 49 62 rvername\fR \fIb
21b0: 6f 6f 6c 5c 66 52 0a 49 66 20 5c 66 42 74 72 75 ool\fR.If \fBtru
21c0: 65 5c 66 52 2c 20 61 75 74 6f 6d 61 74 69 63 61 e\fR, automatica
21d0: 6c 6c 79 20 73 65 74 20 74 68 65 20 5c 66 42 2d lly set the \fB-
21e0: 73 65 72 76 65 72 6e 61 6d 65 5c 66 52 20 61 72 servername\fR ar
21f0: 67 75 6d 65 6e 74 20 74 6f 20 74 68 65 0a 5c 66 gument to the.\f
2200: 49 68 6f 73 74 5c 66 52 20 61 72 67 75 6d 65 6e Ihost\fR argumen
2210: 74 5c 26 2e 20 50 72 69 6f 72 20 74 6f 20 54 63 t\&. Prior to Tc
2220: 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 74 68 65 20 lTLS 2\&.0, the
2230: 64 65 66 61 75 6c 74 20 69 73 20 5c 66 42 66 61 default is \fBfa
2240: 6c 73 65 5c 66 52 5c 26 2e 0a 53 74 61 72 74 69 lse\fR\&..Starti
2250: 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 ng in TclTLS 2\&
2260: 2e 30 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20 .0, the default
2270: 69 73 20 5c 66 42 74 72 75 65 5c 66 52 20 75 6e is \fBtrue\fR un
2280: 6c 65 73 73 20 5c 66 42 2d 73 65 72 76 65 72 6e less \fB-servern
2290: 61 6d 65 5c 66 52 0a 69 73 20 61 6c 73 6f 20 73 ame\fR.is also s
22a0: 70 65 63 69 66 69 65 64 5c 26 2e 0a 2e 52 45 0a pecified\&...RE.
22b0: 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b .TP.\fBtls::sock
22c0: 65 74 5c 66 52 20 5c 66 42 2d 73 65 72 76 65 72 et\fR \fB-server
22d0: 5c 66 52 20 5c 66 49 63 6f 6d 6d 61 6e 64 5c 66 \fR \fIcommand\f
22e0: 52 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 R ?\fI-option\fR
22f0: 3f 20 3f 5c 66 49 76 61 6c 75 65 5c 66 52 3f 20 ? ?\fIvalue\fR?
2300: 3f 5c 66 49 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 ?\fI-option valu
2310: 65 20 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 20 e \&.\&.\&.\fR?
2320: 5c 66 49 70 6f 72 74 5c 66 52 0a 53 61 6d 65 20 \fIport\fR.Same
2330: 61 73 20 70 72 65 76 69 6f 75 73 20 63 6f 6d 6d as previous comm
2340: 61 6e 64 2c 20 62 75 74 20 69 6e 73 74 65 61 64 and, but instead
2350: 20 63 72 65 61 74 65 73 20 61 20 73 65 72 76 65 creates a serve
2360: 72 20 73 6f 63 6b 65 74 20 66 6f 72 20 63 6c 69 r socket for cli
2370: 65 6e 74 73 20 74 6f 0a 63 6f 6e 6e 65 63 74 20 ents to.connect
2380: 74 6f 20 6a 75 73 74 20 6c 69 6b 65 20 74 68 65 to just like the
2390: 20 54 63 6c 20 5c 66 42 73 6f 63 6b 65 74 20 2d Tcl \fBsocket -
23a0: 73 65 72 76 65 72 5c 66 52 20 63 6f 6d 6d 61 6e server\fR comman
23b0: 64 5c 26 2e 20 49 74 20 72 65 74 75 72 6e 73 20 d\&. It returns
23c0: 74 68 65 0a 63 68 61 6e 6e 65 6c 20 68 61 6e 64 the.channel hand
23d0: 6c 65 20 69 64 20 66 6f 72 20 74 68 65 20 6e 65 le id for the ne
23e0: 77 20 73 6f 63 6b 65 74 5c 26 2e 0a 2e 54 50 0a w socket\&...TP.
23f0: 5c 66 42 74 6c 73 3a 3a 69 6d 70 6f 72 74 5c 66 \fBtls::import\f
2400: 52 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 20 R \fIchannel\fR
2410: 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 3f 20 ?\fI-option\fR?
2420: 3f 5c 66 49 76 61 6c 75 65 5c 66 52 3f 20 3f 5c ?\fIvalue\fR? ?\
2430: 66 49 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 fI-option value
2440: 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 0a 53 74 \&.\&.\&.\fR?.St
2450: 61 72 74 20 54 4c 53 20 65 6e 63 72 79 70 74 69 art TLS encrypti
2460: 6f 6e 20 6f 6e 20 54 43 4c 20 63 68 61 6e 6e 65 on on TCL channe
2470: 6c 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 20 l \fIchannel\fR
2480: 76 69 61 20 61 20 73 74 61 63 6b 65 64 20 63 68 via a stacked ch
2490: 61 6e 6e 65 6c 5c 26 2e 20 49 74 0a 6e 65 65 64 annel\&. It.need
24a0: 20 6e 6f 74 20 62 65 20 61 20 73 6f 63 6b 65 74 not be a socket
24b0: 2c 20 62 75 74 20 6d 75 73 74 20 70 72 6f 76 69 , but must provi
24c0: 64 65 20 62 69 2d 64 69 72 65 63 74 69 6f 6e 61 de bi-directiona
24d0: 6c 20 66 6c 6f 77 5c 26 2e 20 41 6c 73 6f 20 73 l flow\&. Also s
24e0: 65 74 73 20 73 65 73 73 69 6f 6e 0a 70 61 72 61 ets session.para
24f0: 6d 65 74 65 72 73 20 66 6f 72 20 53 53 4c 20 68 meters for SSL h
2500: 61 6e 64 73 68 61 6b 65 5c 26 2e 20 56 61 6c 69 andshake\&. Vali
2510: 64 20 6f 70 74 69 6f 6e 73 20 61 72 65 3a 0a 2e d options are:..
2520: 52 53 0a 2e 54 50 0a 5c 66 42 2d 61 6c 70 6e 5c RS..TP.\fB-alpn\
2530: 66 52 20 5c 66 49 6c 69 73 74 5c 66 52 0a 4c 69 fR \fIlist\fR.Li
2540: 73 74 20 6f 66 20 70 72 6f 74 6f 63 6f 6c 73 20 st of protocols
2550: 74 6f 20 6f 66 66 65 72 20 64 75 72 69 6e 67 20 to offer during
2560: 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 Application-Laye
2570: 72 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 r Protocol Negot
2580: 69 61 74 69 6f 6e 0a 28 41 4c 50 4e 29 5c 26 2e iation.(ALPN)\&.
2590: 20 46 6f 72 20 65 78 61 6d 70 6c 65 3a 20 5c 66 For example: \f
25a0: 42 68 32 5c 66 52 20 61 6e 64 20 5c 66 42 68 74 Bh2\fR and \fBht
25b0: 74 70 2f 31 5c 26 2e 31 5c 66 52 2c 20 62 75 74 tp/1\&.1\fR, but
25c0: 20 6e 6f 74 20 5c 66 42 68 33 5c 66 52 20 6f 72 not \fBh3\fR or
25d0: 0a 5c 66 42 71 75 69 63 5c 66 52 5c 26 2e 20 54 .\fBquic\fR\&. T
25e0: 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 his option is ne
25f0: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 w for TclTLS 1\&
2600: 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 61 .8\&...TP.\fB-ca
2610: 64 69 72 5c 66 52 20 5c 66 49 64 69 72 65 63 74 dir\fR \fIdirect
2620: 6f 72 79 5c 66 52 0a 53 70 65 63 69 66 69 65 73 ory\fR.Specifies
2630: 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 20 77 the directory w
2640: 68 65 72 65 20 74 68 65 20 43 65 72 74 69 66 69 here the Certifi
2650: 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20 28 cate Authority (
2660: 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65 73 CA) certificates
2670: 20 61 72 65 0a 73 74 6f 72 65 64 5c 26 2e 20 54 are.stored\&. T
2680: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 70 6c he default is pl
2690: 61 74 66 6f 72 6d 20 73 70 65 63 69 66 69 63 20 atform specific
26a0: 61 6e 64 20 63 61 6e 20 62 65 20 73 65 74 20 61 and can be set a
26b0: 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 5c 26 t compile time\&
26c0: 2e 20 54 68 65 0a 64 65 66 61 75 6c 74 20 6c 6f . The.default lo
26d0: 63 61 74 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76 cation can be ov
26e0: 65 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 erridden by the
26f0: 5c 66 42 53 53 4c 5f 43 45 52 54 5f 44 49 52 5c \fBSSL_CERT_DIR\
2700: 66 52 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 fR environment.v
2710: 61 72 69 61 62 6c 65 5c 26 2e 20 53 65 65 20 5c ariable\&. See \
2720: 66 42 43 65 72 74 69 66 69 63 61 74 65 20 56 61 fBCertificate Va
2730: 6c 69 64 61 74 69 6f 6e 5c 66 52 20 66 6f 72 20 lidation\fR for
2740: 6d 6f 72 65 20 64 65 74 61 69 6c 73 5c 26 2e 0a more details\&..
2750: 2e 54 50 0a 5c 66 42 2d 63 61 66 69 6c 65 5c 66 .TP.\fB-cafile\f
2760: 52 20 5c 66 49 66 69 6c 65 6e 61 6d 65 5c 66 52 R \fIfilename\fR
2770: 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 20 66 .Specifies the f
2780: 69 6c 65 20 77 69 74 68 20 74 68 65 20 43 65 72 ile with the Cer
2790: 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 tificate Authori
27a0: 74 79 20 28 43 41 29 20 63 65 72 74 69 66 69 63 ty (CA) certific
27b0: 61 74 65 73 20 74 6f 20 75 73 65 20 69 6e 0a 5c ates to use in.\
27c0: 66 42 50 45 4d 5c 66 52 20 66 69 6c 65 20 66 6f fBPEM\fR file fo
27d0: 72 6d 61 74 5c 26 2e 20 54 68 65 20 64 65 66 61 rmat\&. The defa
27e0: 75 6c 74 20 69 73 20 22 5c 66 49 63 65 72 74 5c ult is "\fIcert\
27f0: 26 2e 70 65 6d 5c 66 52 22 2c 20 69 6e 20 74 68 &.pem\fR", in th
2800: 65 20 4f 70 65 6e 53 53 4c 0a 64 69 72 65 63 74 e OpenSSL.direct
2810: 6f 72 79 5c 26 2e 20 54 68 65 20 64 65 66 61 75 ory\&. The defau
2820: 6c 74 20 66 69 6c 65 20 63 61 6e 20 62 65 20 6f lt file can be o
2830: 76 65 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 verridden by the
2840: 20 5c 66 42 53 53 4c 5f 43 45 52 54 5f 46 49 4c \fBSSL_CERT_FIL
2850: 45 5c 66 52 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 E\fR environment
2860: 0a 76 61 72 69 61 62 6c 65 5c 26 2e 20 53 65 65 .variable\&. See
2870: 20 5c 66 42 43 65 72 74 69 66 69 63 61 74 65 20 \fBCertificate
2880: 56 61 6c 69 64 61 74 69 6f 6e 5c 66 52 20 66 6f Validation\fR fo
2890: 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 5c 26 r more details\&
28a0: 2e 0a 2e 54 50 0a 5c 66 42 2d 63 61 73 74 6f 72 ...TP.\fB-castor
28b0: 65 5c 66 52 20 5c 66 49 55 52 49 5c 66 52 0a 53 e\fR \fIURI\fR.S
28c0: 70 65 63 69 66 69 65 73 20 74 68 65 20 55 6e 69 pecifies the Uni
28d0: 66 6f 72 6d 20 52 65 73 6f 75 72 63 65 20 49 64 form Resource Id
28e0: 65 6e 74 69 66 69 65 72 20 28 55 52 49 29 20 66 entifier (URI) f
28f0: 6f 72 20 74 68 65 20 43 65 72 74 69 66 69 63 61 or the Certifica
2900: 74 65 20 41 75 74 68 6f 72 69 74 79 0a 28 43 41 te Authority.(CA
2910: 29 20 73 74 6f 72 65 2c 20 77 68 69 63 68 20 6d ) store, which m
2920: 61 79 20 62 65 20 61 20 73 69 6e 67 6c 65 20 63 ay be a single c
2930: 6f 6e 74 61 69 6e 65 72 20 6f 72 20 61 20 63 61 ontainer or a ca
2940: 74 61 6c 6f 67 20 6f 66 20 63 6f 6e 74 61 69 6e talog of contain
2950: 65 72 73 5c 26 2e 0a 53 74 61 72 74 69 6e 67 20 ers\&..Starting
2960: 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 33 5c 26 with OpenSSL 3\&
2970: 2e 32 20 6f 6e 20 4d 53 20 57 69 6e 64 6f 77 73 .2 on MS Windows
2980: 2c 20 73 65 74 20 74 6f 20 22 5c 66 42 6f 72 67 , set to "\fBorg
2990: 5c 26 2e 6f 70 65 6e 73 73 6c 5c 26 2e 77 69 6e \&.openssl\&.win
29a0: 73 74 6f 72 65 3a 2f 2f 5c 66 52 22 0a 74 6f 20 store://\fR".to
29b0: 75 73 65 20 74 68 65 20 62 75 69 6c 74 2d 69 6e use the built-in
29c0: 20 4d 53 20 57 69 6e 64 6f 77 73 20 43 65 72 74 MS Windows Cert
29d0: 69 66 69 63 61 74 65 20 53 74 6f 72 65 5c 26 2e ificate Store\&.
29e0: 0a 53 65 65 20 5c 66 42 43 65 72 74 69 66 69 63 .See \fBCertific
29f0: 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 5c 66 ate Validation\f
2a00: 52 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 R for more detai
2a10: 6c 73 5c 26 2e 0a 54 68 69 73 20 6f 70 74 69 6f ls\&..This optio
2a20: 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c n is new for Tcl
2a30: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 TLS 1\&.8\&...TP
2a40: 0a 5c 66 42 2d 63 65 72 74 66 69 6c 65 5c 66 52 .\fB-certfile\fR
2a50: 20 5c 66 49 66 69 6c 65 6e 61 6d 65 5c 66 52 0a \fIfilename\fR.
2a60: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 6e 61 Specifies the na
2a70: 6d 65 20 6f 66 20 74 68 65 20 66 69 6c 65 20 77 me of the file w
2a80: 69 74 68 20 74 68 65 20 63 65 72 74 69 66 69 63 ith the certific
2a90: 61 74 65 20 74 6f 20 75 73 65 20 69 6e 20 50 45 ate to use in PE
2aa0: 4d 20 66 6f 72 6d 61 74 0a 61 73 20 74 68 65 20 M format.as the
2ab0: 6c 6f 63 61 6c 20 28 63 6c 69 65 6e 74 20 6f 72 local (client or
2ac0: 20 73 65 72 76 65 72 29 20 63 65 72 74 69 66 69 server) certifi
2ad0: 63 61 74 65 5c 26 2e 20 49 74 20 61 6c 73 6f 20 cate\&. It also
2ae0: 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 70 75 62 contains the pub
2af0: 6c 69 63 20 6b 65 79 5c 26 2e 0a 2e 54 50 0a 5c lic key\&...TP.\
2b00: 66 42 2d 63 65 72 74 5c 66 52 20 5c 66 49 73 74 fB-cert\fR \fIst
2b10: 72 69 6e 67 5c 66 52 0a 53 70 65 63 69 66 69 65 ring\fR.Specifie
2b20: 73 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 s the certificat
2b30: 65 20 74 6f 20 75 73 65 20 61 73 20 61 20 44 45 e to use as a DE
2b40: 52 20 65 6e 63 6f 64 65 64 20 73 74 72 69 6e 67 R encoded string
2b50: 20 28 58 5c 26 2e 35 30 39 20 44 45 52 29 5c 26 (X\&.509 DER)\&
2b60: 2e 0a 2e 54 50 0a 5c 66 42 2d 63 69 70 68 65 72 ...TP.\fB-cipher
2b70: 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 \fR \fIstring\fR
2b80: 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 20 6c .Specifies the l
2b90: 69 73 74 20 6f 66 20 63 69 70 68 65 72 73 20 74 ist of ciphers t
2ba0: 6f 20 75 73 65 20 66 6f 72 20 54 4c 53 20 31 5c o use for TLS 1\
2bb0: 26 2e 32 20 61 6e 64 20 65 61 72 6c 69 65 72 20 &.2 and earlier
2bc0: 63 6f 6e 6e 65 63 74 69 6f 6e 73 5c 26 2e 0a 53 connections\&..S
2bd0: 74 72 69 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e tring is a colon
2be0: 20 22 5c 66 42 3a 5c 66 52 22 20 73 65 70 61 72 "\fB:\fR" separ
2bf0: 61 74 65 64 20 6c 69 73 74 20 6f 66 20 63 69 70 ated list of cip
2c00: 68 65 72 73 5c 26 2e 0a 43 69 70 68 65 72 73 20 hers\&..Ciphers
2c10: 63 61 6e 20 62 65 20 63 6f 6d 62 69 6e 65 64 20 can be combined
2c20: 75 73 69 6e 67 20 74 68 65 20 22 5c 66 42 2b 5c using the "\fB+\
2c30: 66 52 22 20 63 68 61 72 61 63 74 65 72 5c 26 2e fR" character\&.
2c40: 0a 50 72 65 66 69 78 65 73 20 63 61 6e 20 62 65 .Prefixes can be
2c50: 20 75 73 65 64 20 74 6f 20 70 65 72 6d 61 6e 65 used to permane
2c60: 6e 74 6c 79 20 72 65 6d 6f 76 65 20 22 5c 66 42 ntly remove "\fB
2c70: 21 5c 66 52 22 2c 20 64 65 6c 65 74 65 20 22 5c !\fR", delete "\
2c80: 66 42 2d 5c 66 52 22 2c 20 6f 72 0a 6d 6f 76 65 fB-\fR", or.move
2c90: 20 74 6f 20 74 68 65 20 65 6e 64 20 22 5c 66 42 to the end "\fB
2ca0: 2b 5c 66 52 22 20 61 20 73 70 65 63 69 66 69 65 +\fR" a specifie
2cb0: 64 20 63 69 70 68 65 72 5c 26 2e 0a 4b 65 79 77 d cipher\&..Keyw
2cc0: 6f 72 64 73 20 5c 66 42 40 53 54 52 45 4e 47 54 ords \fB@STRENGT
2cd0: 48 5c 66 52 20 28 73 6f 72 74 20 62 79 20 61 6c H\fR (sort by al
2ce0: 67 6f 72 69 74 68 6d 20 6b 65 79 20 6c 65 6e 67 gorithm key leng
2cf0: 74 68 29 2c 0a 5c 66 42 40 53 45 43 4c 45 56 45 th),.\fB@SECLEVE
2d00: 4c 3d 5c 66 52 5c 66 49 6e 5c 66 52 20 28 73 65 L=\fR\fIn\fR (se
2d10: 74 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c t security level
2d20: 20 74 6f 20 6e 29 2c 20 61 6e 64 0a 5c 66 42 44 to n), and.\fBD
2d30: 45 46 41 55 4c 54 5c 66 52 20 28 75 73 65 20 64 EFAULT\fR (use d
2d40: 65 66 61 75 6c 74 20 63 69 70 68 65 72 20 6c 69 efault cipher li
2d50: 73 74 2c 20 61 74 20 73 74 61 72 74 20 6f 6e 6c st, at start onl
2d60: 79 29 20 63 61 6e 20 61 6c 73 6f 20 62 65 20 73 y) can also be s
2d70: 70 65 63 69 66 69 65 64 5c 26 2e 0a 53 65 65 20 pecified\&..See
2d80: 74 68 65 20 5c 66 49 4f 70 65 6e 53 53 4c 5c 66 the \fIOpenSSL\f
2d90: 52 20 5b 68 74 74 70 73 3a 2f 2f 64 6f 63 73 5c R [https://docs\
2da0: 26 2e 6f 70 65 6e 73 73 6c 5c 26 2e 6f 72 67 2f &.openssl\&.org/
2db0: 6d 61 73 74 65 72 2f 6d 61 6e 31 2f 6f 70 65 6e master/man1/open
2dc0: 73 73 6c 2d 63 69 70 68 65 72 73 2f 23 6f 70 74 ssl-ciphers/#opt
2dd0: 69 6f 6e 73 5d 0a 64 6f 63 75 6d 65 6e 74 61 74 ions].documentat
2de0: 69 6f 6e 20 66 6f 72 20 74 68 65 20 66 75 6c 6c ion for the full
2df0: 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 64 20 76 list of valid v
2e00: 61 6c 75 65 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 alues\&...TP.\fB
2e10: 2d 63 69 70 68 65 72 73 75 69 74 65 73 5c 66 52 -ciphersuites\fR
2e20: 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 53 70 \fIstring\fR.Sp
2e30: 65 63 69 66 69 65 73 20 74 68 65 20 6c 69 73 74 ecifies the list
2e40: 20 6f 66 20 63 69 70 68 65 72 20 73 75 69 74 65 of cipher suite
2e50: 73 20 74 6f 20 75 73 65 20 66 6f 72 20 54 4c 53 s to use for TLS
2e60: 20 31 5c 26 2e 33 20 61 73 20 61 20 63 6f 6c 6f 1\&.3 as a colo
2e70: 6e 0a 22 5c 66 42 3a 5c 66 52 22 20 73 65 70 61 n."\fB:\fR" sepa
2e80: 72 61 74 65 64 20 6c 69 73 74 20 6f 66 20 63 69 rated list of ci
2e90: 70 68 65 72 20 73 75 69 74 65 20 6e 61 6d 65 73 pher suite names
2ea0: 5c 26 2e 20 53 65 65 20 74 68 65 0a 5c 66 49 4f \&. See the.\fIO
2eb0: 70 65 6e 53 53 4c 5c 66 52 20 5b 68 74 74 70 73 penSSL\fR [https
2ec0: 3a 2f 2f 64 6f 63 73 5c 26 2e 6f 70 65 6e 73 73 ://docs\&.openss
2ed0: 6c 5c 26 2e 6f 72 67 2f 6d 61 73 74 65 72 2f 6d l\&.org/master/m
2ee0: 61 6e 31 2f 6f 70 65 6e 73 73 6c 2d 63 69 70 68 an1/openssl-ciph
2ef0: 65 72 73 2f 23 6f 70 74 69 6f 6e 73 5d 0a 64 6f ers/#options].do
2f00: 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 cumentation for
2f10: 74 68 65 20 66 75 6c 6c 20 6c 69 73 74 20 6f 66 the full list of
2f20: 20 76 61 6c 69 64 20 76 61 6c 75 65 73 5c 26 2e valid values\&.
2f30: 0a 54 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 .This option is
2f40: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
2f50: 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d \&.8\&...TP.\fB-
2f60: 63 6f 6d 6d 61 6e 64 5c 66 52 20 5c 66 49 63 61 command\fR \fIca
2f70: 6c 6c 62 61 63 6b 5c 66 52 0a 53 70 65 63 69 66 llback\fR.Specif
2f80: 69 65 73 20 74 68 65 20 63 61 6c 6c 62 61 63 6b ies the callback
2f90: 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 62 65 20 69 command to be i
2fa0: 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 65 72 61 nvoked at severa
2fb0: 6c 20 70 6f 69 6e 74 73 20 64 75 72 69 6e 67 20 l points during
2fc0: 74 68 65 0a 68 61 6e 64 73 68 61 6b 65 20 74 6f the.handshake to
2fd0: 20 70 61 73 73 20 65 72 72 6f 72 73 2c 20 74 72 pass errors, tr
2fe0: 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61 74 69 6f acing informatio
2ff0: 6e 2c 20 61 6e 64 20 70 72 6f 74 6f 63 6f 6c 20 n, and protocol
3000: 6d 65 73 73 61 67 65 73 5c 26 2e 0a 53 65 65 20 messages\&..See
3010: 5c 66 42 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 \fBCallback Opti
3020: 6f 6e 73 5c 66 52 20 66 6f 72 20 6d 6f 72 65 20 ons\fR for more
3030: 69 6e 66 6f 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d info\&...TP.\fB-
3040: 64 68 70 61 72 61 6d 73 5c 66 52 20 5c 66 49 66 dhparams\fR \fIf
3050: 69 6c 65 6e 61 6d 65 5c 66 52 0a 53 70 65 63 69 ilename\fR.Speci
3060: 66 69 65 73 20 74 68 65 20 44 69 66 66 69 65 2d fies the Diffie-
3070: 48 65 6c 6c 6d 61 6e 20 28 44 48 29 20 70 61 72 Hellman (DH) par
3080: 61 6d 65 74 65 72 73 20 66 69 6c 65 5c 26 2e 0a ameters file\&..
3090: 2e 54 50 0a 5c 66 42 2d 6b 65 79 66 69 6c 65 5c .TP.\fB-keyfile\
30a0: 66 52 20 5c 66 49 66 69 6c 65 6e 61 6d 65 5c 66 fR \fIfilename\f
30b0: 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 20 R.Specifies the
30c0: 70 72 69 76 61 74 65 20 6b 65 79 20 66 69 6c 65 private key file
30d0: 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 \&. The default
30e0: 69 73 20 74 6f 20 75 73 65 20 74 68 65 20 66 69 is to use the fi
30f0: 6c 65 0a 73 70 65 63 69 66 69 65 64 20 62 79 20 le.specified by
3100: 74 68 65 20 5c 66 42 2d 63 65 72 74 66 69 6c 65 the \fB-certfile
3110: 5c 66 52 20 6f 70 74 69 6f 6e 5c 26 2e 0a 2e 54 \fR option\&...T
3120: 50 0a 5c 66 42 2d 6b 65 79 5c 66 52 20 5c 66 49 P.\fB-key\fR \fI
3130: 73 74 72 69 6e 67 5c 66 52 0a 53 70 65 63 69 66 string\fR.Specif
3140: 69 65 73 20 74 68 65 20 70 72 69 76 61 74 65 20 ies the private
3150: 6b 65 79 20 74 6f 20 75 73 65 20 61 73 20 61 20 key to use as a
3160: 44 45 52 20 65 6e 63 6f 64 65 64 20 73 74 72 69 DER encoded stri
3170: 6e 67 20 28 50 4b 43 53 23 31 20 44 45 52 29 5c ng (PKCS#1 DER)\
3180: 26 2e 0a 2e 54 50 0a 5c 66 42 2d 6d 6f 64 65 6c &...TP.\fB-model
3190: 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 \fR \fIchannel\f
31a0: 52 0a 46 6f 72 63 65 20 74 68 69 73 20 63 68 61 R.Force this cha
31b0: 6e 6e 65 6c 20 74 6f 20 73 68 61 72 65 20 74 68 nnel to share th
31c0: 65 20 73 61 6d 65 20 5c 66 49 53 53 4c 5f 43 54 e same \fISSL_CT
31d0: 58 5c 66 52 20 73 74 72 75 63 74 75 72 65 20 61 X\fR structure a
31e0: 73 20 74 68 65 0a 73 70 65 63 69 66 69 65 64 20 s the.specified
31f0: 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 2c 20 61 \fIchannel\fR, a
3200: 6e 64 20 74 68 65 72 65 66 6f 72 65 20 73 68 61 nd therefore sha
3210: 72 65 20 63 6f 6e 66 69 67 2c 20 63 61 6c 6c 62 re config, callb
3220: 61 63 6b 73 2c 20 65 74 63 5c 26 2e 0a 2e 54 50 acks, etc\&...TP
3230: 0a 5c 66 42 2d 70 61 73 73 77 6f 72 64 5c 66 52 .\fB-password\fR
3240: 20 5c 66 49 63 61 6c 6c 62 61 63 6b 5c 66 52 0a \fIcallback\fR.
3250: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 63 61 Specifies the ca
3260: 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 llback command t
3270: 6f 20 69 6e 76 6f 6b 65 20 77 68 65 6e 20 4f 70 o invoke when Op
3280: 65 6e 53 53 4c 20 6e 65 65 64 73 20 74 6f 20 6f enSSL needs to o
3290: 62 74 61 69 6e 20 61 0a 70 61 73 73 77 6f 72 64 btain a.password
32a0: 5c 26 2e 20 54 68 69 73 20 69 73 20 74 79 70 69 \&. This is typi
32b0: 63 61 6c 6c 79 20 75 73 65 64 20 74 6f 20 75 6e cally used to un
32c0: 6c 6f 63 6b 20 74 68 65 20 70 72 69 76 61 74 65 lock the private
32d0: 20 6b 65 79 20 6f 66 20 61 20 63 65 72 74 69 66 key of a certif
32e0: 69 63 61 74 65 5c 26 2e 0a 54 68 65 20 63 61 6c icate\&..The cal
32f0: 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 74 lback should ret
3300: 75 72 6e 20 61 20 70 61 73 73 77 6f 72 64 20 73 urn a password s
3310: 74 72 69 6e 67 5c 26 2e 20 54 68 69 73 20 6f 70 tring\&. This op
3320: 74 69 6f 6e 20 68 61 73 20 63 68 61 6e 67 65 64 tion has changed
3330: 20 66 6f 72 0a 54 63 6c 54 4c 53 20 31 5c 26 2e for.TclTLS 1\&.
3340: 38 5c 26 2e 20 53 65 65 20 5c 66 42 43 61 6c 6c 8\&. See \fBCall
3350: 62 61 63 6b 20 4f 70 74 69 6f 6e 73 5c 66 52 20 back Options\fR
3360: 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 5c 26 2e for more info\&.
3370: 0a 2e 54 50 0a 5c 66 42 2d 70 6f 73 74 5f 68 61 ..TP.\fB-post_ha
3380: 6e 64 73 68 61 6b 65 5c 66 52 20 5c 66 49 62 6f ndshake\fR \fIbo
3390: 6f 6c 5c 66 52 0a 41 6c 6c 6f 77 20 70 6f 73 74 ol\fR.Allow post
33a0: 2d 68 61 6e 64 73 68 61 6b 65 20 73 65 73 73 69 -handshake sessi
33b0: 6f 6e 20 74 69 63 6b 65 74 20 75 70 64 61 74 65 on ticket update
33c0: 73 5c 26 2e 20 54 68 69 73 20 6f 70 74 69 6f 6e s\&. This option
33d0: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
33e0: 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a LS 1\&.8\&...TP.
33f0: 5c 66 42 2d 72 65 71 75 65 73 74 5c 66 52 20 5c \fB-request\fR \
3400: 66 49 62 6f 6f 6c 5c 66 52 0a 52 65 71 75 65 73 fIbool\fR.Reques
3410: 74 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20 t a certificate
3420: 66 72 6f 6d 20 74 68 65 20 70 65 65 72 20 64 75 from the peer du
3430: 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e ring the SSL han
3440: 64 73 68 61 6b 65 5c 26 2e 20 54 68 69 73 20 69 dshake\&. This i
3450: 73 20 6e 65 65 64 65 64 0a 74 6f 20 64 6f 20 43 s needed.to do C
3460: 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 ertificate Valid
3470: 61 74 69 6f 6e 5c 26 2e 20 53 74 61 72 74 69 6e ation\&. Startin
3480: 67 20 69 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e g in TclTLS 1\&.
3490: 38 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20 69 8, the default i
34a0: 73 0a 5c 66 42 74 72 75 65 5c 66 52 20 66 6f 72 s.\fBtrue\fR for
34b0: 20 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74 69 client connecti
34c0: 6f 6e 73 5c 26 2e 20 53 74 61 72 74 69 6e 67 20 ons\&. Starting
34d0: 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 2e 30 2c in TclTLS 2\&.0,
34e0: 20 69 66 20 73 65 74 20 74 6f 0a 5c 66 42 66 61 if set to.\fBfa
34f0: 6c 73 65 5c 66 52 20 61 6e 64 20 5c 66 42 2d 72 lse\fR and \fB-r
3500: 65 71 75 69 72 65 5c 66 52 20 69 73 20 5c 66 42 equire\fR is \fB
3510: 74 72 75 65 5c 66 52 2c 20 74 68 65 6e 20 74 68 true\fR, then th
3520: 69 73 20 77 69 6c 6c 20 62 65 0a 6f 76 65 72 72 is will be.overr
3530: 69 64 64 65 6e 20 74 6f 20 5c 66 42 74 72 75 65 idden to \fBtrue
3540: 5c 66 52 5c 26 2e 20 53 65 65 20 5c 66 42 43 65 \fR\&. See \fBCe
3550: 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 rtificate Valida
3560: 74 69 6f 6e 5c 66 52 20 66 6f 72 0a 6d 6f 72 65 tion\fR for.more
3570: 20 64 65 74 61 69 6c 73 5c 26 2e 0a 2e 54 50 0a details\&...TP.
3580: 5c 66 42 2d 72 65 71 75 69 72 65 5c 66 52 20 5c \fB-require\fR \
3590: 66 49 62 6f 6f 6c 5c 66 52 0a 52 65 71 75 69 72 fIbool\fR.Requir
35a0: 65 20 61 20 76 61 6c 69 64 20 63 65 72 74 69 66 e a valid certif
35b0: 69 63 61 74 65 20 66 72 6f 6d 20 74 68 65 20 70 icate from the p
35c0: 65 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 53 eer during the S
35d0: 53 4c 20 68 61 6e 64 73 68 61 6b 65 5c 26 2e 20 SL handshake\&.
35e0: 49 66 20 74 68 69 73 20 69 73 0a 73 65 74 20 74 If this is.set t
35f0: 6f 20 74 72 75 65 2c 20 74 68 65 6e 20 5c 66 42 o true, then \fB
3600: 2d 72 65 71 75 65 73 74 5c 66 52 20 6d 75 73 74 -request\fR must
3610: 20 61 6c 73 6f 20 62 65 20 73 65 74 20 74 6f 20 also be set to
3620: 74 72 75 65 20 61 6e 64 20 61 20 65 69 74 68 65 true and a eithe
3630: 72 0a 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c 20 r.\fB-cadir\fR,
3640: 5c 66 42 2d 63 61 66 69 6c 65 5c 66 52 2c 20 5c \fB-cafile\fR, \
3650: 66 42 2d 63 61 73 74 6f 72 65 5c 66 52 2c 20 6f fB-castore\fR, o
3660: 72 20 61 20 70 6c 61 74 66 6f 72 6d 20 64 65 66 r a platform def
3670: 61 75 6c 74 0a 6d 75 73 74 20 62 65 20 70 72 6f ault.must be pro
3680: 76 69 64 65 64 20 69 6e 20 6f 72 64 65 72 20 74 vided in order t
3690: 6f 20 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e o validate again
36a0: 73 74 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c st\&. The defaul
36b0: 74 20 69 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e t in TclTLS 1\&.
36c0: 38 20 61 6e 64 0a 65 61 72 6c 69 65 72 20 76 65 8 and.earlier ve
36d0: 72 73 69 6f 6e 73 20 69 73 20 5c 66 42 66 61 6c rsions is \fBfal
36e0: 73 65 5c 66 52 20 73 69 6e 63 65 20 6e 6f 74 20 se\fR since not
36f0: 61 6c 6c 20 70 6c 61 74 66 6f 72 6d 73 20 68 61 all platforms ha
3700: 76 65 20 63 65 72 74 69 66 69 63 61 74 65 73 20 ve certificates
3710: 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 67 61 69 to.validate agai
3720: 6e 73 74 20 69 6e 20 61 20 66 6f 72 6d 20 63 6f nst in a form co
3730: 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 4f 70 mpatible with Op
3740: 65 6e 53 53 4c 5c 26 2e 20 53 74 61 72 74 69 6e enSSL\&. Startin
3750: 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 2e g in TclTLS 2\&.
3760: 30 2c 0a 74 68 65 20 64 65 66 61 75 6c 74 20 69 0,.the default i
3770: 73 20 5c 66 42 74 72 75 65 5c 66 52 20 66 6f 72 s \fBtrue\fR for
3780: 20 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74 69 client connecti
3790: 6f 6e 73 5c 26 2e 0a 53 65 65 20 5c 66 42 43 65 ons\&..See \fBCe
37a0: 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 rtificate Valida
37b0: 74 69 6f 6e 5c 66 52 20 66 6f 72 20 6d 6f 72 65 tion\fR for more
37c0: 20 64 65 74 61 69 6c 73 5c 26 2e 0a 2e 54 50 0a details\&...TP.
37d0: 5c 66 42 2d 73 65 63 75 72 69 74 79 5f 6c 65 76 \fB-security_lev
37e0: 65 6c 5c 66 52 20 5c 66 49 69 6e 74 65 67 65 72 el\fR \fIinteger
37f0: 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 \fR.Specifies th
3800: 65 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c e security level
3810: 20 28 76 61 6c 75 65 20 66 72 6f 6d 20 30 20 74 (value from 0 t
3820: 6f 20 35 29 5c 26 2e 20 54 68 65 20 73 65 63 75 o 5)\&. The secu
3830: 72 69 74 79 20 6c 65 76 65 6c 20 61 66 66 65 63 rity level affec
3840: 74 73 0a 74 68 65 20 61 6c 6c 6f 77 65 64 20 63 ts.the allowed c
3850: 69 70 68 65 72 20 73 75 69 74 65 20 65 6e 63 72 ipher suite encr
3860: 79 70 74 69 6f 6e 20 61 6c 67 6f 72 69 74 68 6d yption algorithm
3870: 73 2c 20 73 75 70 70 6f 72 74 65 64 20 45 43 43 s, supported ECC
3880: 20 63 75 72 76 65 73 2c 0a 73 75 70 70 6f 72 74 curves,.support
3890: 65 64 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 ed signature alg
38a0: 6f 72 69 74 68 6d 73 2c 20 44 48 20 70 61 72 61 orithms, DH para
38b0: 6d 65 74 65 72 20 73 69 7a 65 73 2c 20 63 65 72 meter sizes, cer
38c0: 74 69 66 69 63 61 74 65 20 6b 65 79 20 73 69 7a tificate key siz
38d0: 65 73 0a 61 6e 64 20 73 69 67 6e 61 74 75 72 65 es.and signature
38e0: 20 61 6c 67 6f 72 69 74 68 6d 73 5c 26 2e 20 54 algorithms\&. T
38f0: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 31 20 he default is 1
3900: 70 72 69 6f 72 20 74 6f 20 4f 70 65 6e 53 53 4c prior to OpenSSL
3910: 20 33 5c 26 2e 32 20 61 6e 64 20 32 0a 74 68 65 3\&.2 and 2.the
3920: 72 65 61 66 74 65 72 5c 26 2e 20 4c 65 76 65 6c reafter\&. Level
3930: 20 33 20 61 6e 64 20 68 69 67 68 65 72 20 64 69 3 and higher di
3940: 73 61 62 6c 65 20 73 75 70 70 6f 72 74 20 66 6f sable support fo
3950: 72 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 r session ticket
3960: 73 20 61 6e 64 0a 6f 6e 6c 79 20 61 63 63 65 70 s and.only accep
3970: 74 20 63 69 70 68 65 72 20 73 75 69 74 65 73 20 t cipher suites
3980: 74 68 61 74 20 70 72 6f 76 69 64 65 20 66 6f 72 that provide for
3990: 77 61 72 64 20 73 65 63 72 65 63 79 5c 26 2e 0a ward secrecy\&..
39a0: 54 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e This option is n
39b0: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c ew for TclTLS 1\
39c0: 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 73 &.8\&...TP.\fB-s
39d0: 65 72 76 65 72 5c 66 52 20 5c 66 49 62 6f 6f 6c erver\fR \fIbool
39e0: 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 77 68 \fR.Specifies wh
39f0: 65 74 68 65 72 20 74 6f 20 61 63 74 20 61 73 20 ether to act as
3a00: 61 20 73 65 72 76 65 72 20 61 6e 64 20 72 65 73 a server and res
3a10: 70 6f 6e 64 20 77 69 74 68 20 61 20 73 65 72 76 pond with a serv
3a20: 65 72 20 68 61 6e 64 73 68 61 6b 65 20 77 68 65 er handshake whe
3a30: 6e 20 61 0a 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 n a.client conne
3a40: 63 74 73 20 61 6e 64 20 70 72 6f 76 69 64 65 73 cts and provides
3a50: 20 61 20 63 6c 69 65 6e 74 20 68 61 6e 64 73 68 a client handsh
3a60: 61 6b 65 5c 26 2e 20 54 68 65 20 64 65 66 61 75 ake\&. The defau
3a70: 6c 74 20 69 73 20 5c 66 42 66 61 6c 73 65 5c 66 lt is \fBfalse\f
3a80: 52 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 73 65 72 R\&...TP.\fB-ser
3a90: 76 65 72 6e 61 6d 65 5c 66 52 20 5c 66 49 68 6f vername\fR \fIho
3aa0: 73 74 6e 61 6d 65 5c 66 52 0a 53 70 65 63 69 66 stname\fR.Specif
3ab0: 79 20 74 68 65 20 70 65 65 72 27 73 20 68 6f 73 y the peer's hos
3ac0: 74 6e 61 6d 65 5c 26 2e 20 54 68 69 73 20 69 73 tname\&. This is
3ad0: 20 75 73 65 64 20 74 6f 20 73 65 74 20 74 68 65 used to set the
3ae0: 20 54 4c 53 20 53 65 72 76 65 72 20 4e 61 6d 65 TLS Server Name
3af0: 20 49 6e 64 69 63 61 74 69 6f 6e 0a 28 53 4e 49 Indication.(SNI
3b00: 29 20 65 78 74 65 6e 73 69 6f 6e 5c 26 2e 20 53 ) extension\&. S
3b10: 65 74 20 74 68 69 73 20 74 6f 20 74 68 65 20 65 et this to the e
3b20: 78 70 65 63 74 65 64 20 73 65 72 76 65 72 6e 61 xpected serverna
3b30: 6d 65 20 69 6e 20 74 68 65 20 73 65 72 76 65 72 me in the server
3b40: 27 73 20 63 65 72 74 69 66 69 63 61 74 65 0a 6f 's certificate.o
3b50: 72 20 6f 6e 65 20 6f 66 20 74 68 65 20 53 75 62 r one of the Sub
3b60: 6a 65 63 74 20 41 6c 74 65 72 6e 61 74 65 20 4e ject Alternate N
3b70: 61 6d 65 73 20 28 53 41 4e 29 5c 26 2e 20 53 74 ames (SAN)\&. St
3b80: 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 arting in TclTLS
3b90: 20 32 5c 26 2e 30 2c 20 74 68 69 73 20 77 69 6c 2\&.0, this wil
3ba0: 6c 0a 64 65 66 61 75 6c 74 20 74 6f 20 74 68 65 l.default to the
3bb0: 20 68 6f 73 74 20 66 6f 72 20 74 68 65 20 5c 66 host for the \f
3bc0: 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 20 Btls::socket\fR
3bd0: 63 6f 6d 6d 61 6e 64 5c 26 2e 0a 2e 54 50 0a 5c command\&...TP.\
3be0: 66 42 2d 73 65 73 73 69 6f 6e 5f 69 64 5c 66 52 fB-session_id\fR
3bf0: 20 5c 66 49 62 69 6e 61 72 79 5f 73 74 72 69 6e \fIbinary_strin
3c00: 67 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 g\fR.Specifies t
3c10: 68 65 20 73 65 73 73 69 6f 6e 20 69 64 20 74 6f he session id to
3c20: 20 72 65 73 75 6d 65 20 61 20 73 65 73 73 69 6f resume a sessio
3c30: 6e 5c 26 2e 20 4e 6f 74 20 73 75 70 70 6f 72 74 n\&. Not support
3c40: 65 64 20 79 65 74 5c 26 2e 0a 54 68 69 73 20 6f ed yet\&..This o
3c50: 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 ption is new for
3c60: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
3c70: 0a 2e 54 50 0a 5c 66 42 2d 73 73 6c 32 5c 66 52 ..TP.\fB-ssl2\fR
3c80: 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 45 6e 61 62 \fIbool\fR.Enab
3c90: 6c 65 20 75 73 65 20 6f 66 20 53 53 4c 20 76 32 le use of SSL v2
3ca0: 5c 26 2e 54 68 65 20 64 65 66 61 75 6c 74 20 69 \&.The default i
3cb0: 73 20 5c 66 42 66 61 6c 73 65 5c 66 52 5c 26 2e s \fBfalse\fR\&.
3cc0: 0a 4f 70 65 6e 53 53 4c 20 31 5c 26 2e 31 2b 20 .OpenSSL 1\&.1+
3cd0: 6e 6f 20 6c 6f 6e 67 65 72 20 73 75 70 70 6f 72 no longer suppor
3ce0: 74 73 20 53 53 4c 20 76 32 2c 20 73 6f 20 74 68 ts SSL v2, so th
3cf0: 69 73 20 6d 61 79 20 6e 6f 74 20 68 61 76 65 20 is may not have
3d00: 61 6e 79 20 65 66 66 65 63 74 5c 26 2e 0a 53 65 any effect\&..Se
3d10: 65 20 74 68 65 20 5c 66 42 74 6c 73 3a 3a 70 72 e the \fBtls::pr
3d20: 6f 74 6f 63 6f 6c 73 5c 66 52 20 63 6f 6d 6d 61 otocols\fR comma
3d30: 6e 64 20 66 6f 72 20 73 75 70 70 6f 72 74 65 64 nd for supported
3d40: 20 70 72 6f 74 6f 63 6f 6c 73 5c 26 2e 0a 2e 54 protocols\&...T
3d50: 50 0a 5c 66 42 2d 73 73 6c 33 5c 66 52 20 5c 66 P.\fB-ssl3\fR \f
3d60: 49 62 6f 6f 6c 5c 66 52 0a 45 6e 61 62 6c 65 20 Ibool\fR.Enable
3d70: 75 73 65 20 6f 66 20 53 53 4c 20 76 33 5c 26 2e use of SSL v3\&.
3d80: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 The default is
3d90: 5c 66 42 66 61 6c 73 65 5c 66 52 5c 26 2e 20 53 \fBfalse\fR\&. S
3da0: 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c tarting in TclTL
3db0: 53 20 31 5c 26 2e 38 2c 0a 75 73 65 20 6f 66 20 S 1\&.8,.use of
3dc0: 53 53 4c 20 76 33 20 69 66 20 6f 6e 6c 79 20 61 SSL v3 if only a
3dd0: 76 61 69 6c 61 62 6c 65 20 76 69 61 20 61 20 63 vailable via a c
3de0: 6f 6d 70 69 6c 65 20 74 69 6d 65 20 6f 70 74 69 ompile time opti
3df0: 6f 6e 5c 26 2e 0a 53 65 65 20 74 68 65 20 5c 66 on\&..See the \f
3e00: 42 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 5c Btls::protocols\
3e10: 66 52 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 73 fR command for s
3e20: 75 70 70 6f 72 74 65 64 20 70 72 6f 74 6f 63 6f upported protoco
3e30: 6c 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 74 6c ls\&...TP.\fB-tl
3e40: 73 31 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 s1\fR \fIbool\fR
3e50: 0a 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 .Enable use of T
3e60: 4c 53 20 76 31 5c 26 2e 20 53 74 61 72 74 69 6e LS v1\&. Startin
3e70: 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 2e g in TclTLS 2\&.
3e80: 30 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20 69 0, the default i
3e90: 73 20 5c 66 42 66 61 6c 73 65 5c 66 52 5c 26 2e s \fBfalse\fR\&.
3ea0: 0a 4e 6f 74 65 3a 20 54 4c 53 20 31 5c 26 2e 30 .Note: TLS 1\&.0
3eb0: 20 6e 65 65 64 73 20 53 48 41 31 20 74 6f 20 6f needs SHA1 to o
3ec0: 70 65 72 61 74 65 2c 20 77 68 69 63 68 20 69 73 perate, which is
3ed0: 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 only available
3ee0: 69 6e 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 in security leve
3ef0: 6c 0a 30 20 66 6f 72 20 4f 70 65 6e 20 53 53 4c l.0 for Open SSL
3f00: 20 33 5c 26 2e 30 2b 5c 26 2e 20 53 65 65 20 74 3\&.0+\&. See t
3f10: 68 65 20 5c 66 42 2d 73 65 63 75 72 69 74 79 5f he \fB-security_
3f20: 6c 65 76 65 6c 5c 66 52 20 6f 70 74 69 6f 6e 5c level\fR option\
3f30: 26 2e 0a 2e 54 50 0a 5c 66 42 2d 74 6c 73 31 5c &...TP.\fB-tls1\
3f40: 26 2e 31 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 &.1\fR \fIbool\f
3f50: 52 0a 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 R.Enable use of
3f60: 54 4c 53 20 76 31 5c 26 2e 31 5c 26 2e 20 53 74 TLS v1\&.1\&. St
3f70: 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 arting in TclTLS
3f80: 20 32 5c 26 2e 30 2c 20 74 68 65 20 64 65 66 61 2\&.0, the defa
3f90: 75 6c 74 20 69 73 20 5c 66 42 66 61 6c 73 65 5c ult is \fBfalse\
3fa0: 66 52 5c 26 2e 0a 4e 6f 74 65 3a 20 54 4c 53 20 fR\&..Note: TLS
3fb0: 31 5c 26 2e 31 20 6e 65 65 64 73 20 53 48 41 31 1\&.1 needs SHA1
3fc0: 20 74 6f 20 6f 70 65 72 61 74 65 2c 20 77 68 69 to operate, whi
3fd0: 63 68 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c ch is only avail
3fe0: 61 62 6c 65 20 69 6e 20 73 65 63 75 72 69 74 79 able in security
3ff0: 20 6c 65 76 65 6c 0a 30 20 66 6f 72 20 4f 70 65 level.0 for Ope
4000: 6e 20 53 53 4c 20 33 5c 26 2e 30 2b 5c 26 2e 20 n SSL 3\&.0+\&.
4010: 53 65 65 20 74 68 65 20 5c 66 42 2d 73 65 63 75 See the \fB-secu
4020: 72 69 74 79 5f 6c 65 76 65 6c 5c 66 52 20 6f 70 rity_level\fR op
4030: 74 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d tion\&...TP.\fB-
4040: 74 6c 73 31 5c 26 2e 32 5c 66 52 20 5c 66 49 62 tls1\&.2\fR \fIb
4050: 6f 6f 6c 5c 66 52 0a 45 6e 61 62 6c 65 20 75 73 ool\fR.Enable us
4060: 65 20 6f 66 20 54 4c 53 20 76 31 5c 26 2e 32 5c e of TLS v1\&.2\
4070: 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 &. The default i
4080: 73 20 5c 66 42 74 72 75 65 5c 66 52 5c 26 2e 0a s \fBtrue\fR\&..
4090: 2e 54 50 0a 5c 66 42 2d 74 6c 73 31 5c 26 2e 33 .TP.\fB-tls1\&.3
40a0: 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 45 \fR \fIbool\fR.E
40b0: 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 nable use of TLS
40c0: 20 76 31 5c 26 2e 33 5c 26 2e 20 54 68 65 20 64 v1\&.3\&. The d
40d0: 65 66 61 75 6c 74 20 69 73 20 5c 66 42 74 72 75 efault is \fBtru
40e0: 65 5c 66 52 5c 26 2e 20 54 68 69 73 20 69 73 20 e\fR\&. This is
40f0: 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 0a 73 only available.s
4100: 74 61 72 74 69 6e 67 20 77 69 74 68 20 4f 70 65 tarting with Ope
4110: 6e 53 53 4c 20 31 5c 26 2e 31 5c 26 2e 31 20 61 nSSL 1\&.1\&.1 a
4120: 6e 64 20 54 63 6c 54 4c 53 20 31 5c 26 2e 37 5c nd TclTLS 1\&.7\
4130: 26 2e 0a 2e 54 50 0a 5c 66 42 2d 76 61 6c 69 64 &...TP.\fB-valid
4140: 61 74 65 63 6f 6d 6d 61 6e 64 5c 66 52 20 5c 66 atecommand\fR \f
4150: 49 63 61 6c 6c 62 61 63 6b 5c 66 52 0a 53 70 65 Icallback\fR.Spe
4160: 63 69 66 69 65 73 20 74 68 65 20 63 61 6c 6c 62 cifies the callb
4170: 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 69 ack command to i
4180: 6e 76 6f 6b 65 20 74 6f 20 76 61 6c 69 64 61 74 nvoke to validat
4190: 65 20 74 68 65 20 70 65 65 72 20 63 65 72 74 69 e the peer certi
41a0: 66 69 63 61 74 65 73 0a 61 6e 64 20 6f 74 68 65 ficates.and othe
41b0: 72 20 63 6f 6e 66 69 67 20 69 6e 66 6f 20 64 75 r config info du
41c0: 72 69 6e 67 20 74 68 65 20 70 72 6f 74 6f 63 6f ring the protoco
41d0: 6c 20 6e 65 67 6f 74 69 61 74 69 6f 6e 20 70 68 l negotiation ph
41e0: 61 73 65 5c 26 2e 20 54 68 69 73 20 63 61 6e 20 ase\&. This can
41f0: 62 65 20 75 73 65 64 0a 62 79 20 54 43 4c 20 73 be used.by TCL s
4200: 63 72 69 70 74 73 20 74 6f 20 70 65 72 66 6f 72 cripts to perfor
4210: 6d 20 74 68 65 69 72 20 6f 77 6e 20 43 65 72 74 m their own Cert
4220: 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 ificate Validati
4230: 6f 6e 20 74 6f 20 73 75 70 70 6c 65 6d 65 6e 74 on to supplement
4240: 20 74 68 65 0a 64 65 66 61 75 6c 74 20 76 61 6c the.default val
4250: 69 64 61 74 69 6f 6e 20 70 72 6f 76 69 64 65 64 idation provided
4260: 20 62 79 20 4f 70 65 6e 53 53 4c 5c 26 2e 20 54 by OpenSSL\&. T
4270: 68 65 20 73 63 72 69 70 74 20 6d 75 73 74 20 72 he script must r
4280: 65 74 75 72 6e 20 61 20 62 6f 6f 6c 65 61 6e 20 eturn a boolean
4290: 74 72 75 65 0a 74 6f 20 63 6f 6e 74 69 6e 75 65 true.to continue
42a0: 20 74 68 65 20 6e 65 67 6f 74 69 61 74 69 6f 6e the negotiation
42b0: 5c 26 2e 20 53 65 65 20 5c 66 42 43 61 6c 6c 62 \&. See \fBCallb
42c0: 61 63 6b 20 4f 70 74 69 6f 6e 73 5c 66 52 20 66 ack Options\fR f
42d0: 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 5c 26 2e 0a or more info\&..
42e0: 54 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e This option is n
42f0: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c ew for TclTLS 1\
4300: 26 2e 38 5c 26 2e 0a 2e 52 45 0a 2e 54 50 0a 5c &.8\&...RE..TP.\
4310: 66 42 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 5c fBtls::unimport\
4320: 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 fR \fIchannel\fR
4330: 0a 43 6f 6d 70 6c 69 6d 65 6e 74 20 74 6f 20 5c .Compliment to \
4340: 66 42 74 6c 73 3a 3a 69 6d 70 6f 72 74 5c 66 52 fBtls::import\fR
4350: 5c 26 2e 20 55 73 65 64 20 74 6f 20 72 65 6d 6f \&. Used to remo
4360: 76 65 20 74 68 65 20 74 6f 70 20 6c 65 76 65 6c ve the top level
4370: 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c stacked channel
4380: 0a 66 72 6f 6d 20 5c 66 49 63 68 61 6e 6e 65 6c .from \fIchannel
4390: 5c 66 52 5c 26 2e 20 54 68 69 73 20 75 6e 73 74 \fR\&. This unst
43a0: 61 63 6b 73 20 74 68 65 20 65 6e 63 72 79 70 74 acks the encrypt
43b0: 69 6f 6e 20 6f 66 20 61 20 72 65 67 75 6c 61 72 ion of a regular
43c0: 20 54 43 4c 20 63 68 61 6e 6e 65 6c 5c 26 2e 20 TCL channel\&.
43d0: 41 6e 0a 65 72 72 6f 72 20 69 73 20 74 68 72 6f An.error is thro
43e0: 77 6e 20 69 66 20 54 4c 53 20 69 73 20 6e 6f 74 wn if TLS is not
43f0: 20 74 68 65 20 74 6f 70 20 73 74 61 63 6b 65 64 the top stacked
4400: 20 63 68 61 6e 6e 65 6c 20 74 79 70 65 5c 26 2e channel type\&.
4410: 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 68 61 6e ..TP.\fBtls::han
4420: 64 73 68 61 6b 65 5c 66 52 20 5c 66 49 63 68 61 dshake\fR \fIcha
4430: 6e 6e 65 6c 5c 66 52 0a 46 6f 72 63 65 73 20 74 nnel\fR.Forces t
4440: 68 65 20 54 4c 53 20 6e 65 67 6f 74 69 61 74 69 he TLS negotiati
4450: 6f 6e 20 68 61 6e 64 73 68 61 6b 65 20 74 6f 20 on handshake to
4460: 74 61 6b 65 20 70 6c 61 63 65 20 69 6d 6d 65 64 take place immed
4470: 69 61 74 65 6c 79 2c 20 61 6e 64 20 72 65 74 75 iately, and retu
4480: 72 6e 73 20 30 0a 69 66 20 68 61 6e 64 73 68 61 rns 0.if handsha
4490: 6b 65 20 69 73 20 73 74 69 6c 6c 20 69 6e 20 70 ke is still in p
44a0: 72 6f 67 72 65 73 73 20 28 6e 6f 6e 2d 62 6c 6f rogress (non-blo
44b0: 63 6b 69 6e 67 29 2c 20 6f 72 20 31 20 69 66 20 cking), or 1 if
44c0: 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 77 61 the handshake wa
44d0: 73 0a 73 75 63 63 65 73 73 66 75 6c 5c 26 2e 20 s.successful\&.
44e0: 49 66 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 If the handshake
44f0: 20 66 61 69 6c 65 64 2c 20 61 6e 20 65 72 72 6f failed, an erro
4500: 72 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e r will be return
4510: 65 64 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 6c 73 ed\&...TP.\fBtls
4520: 3a 3a 73 74 61 74 75 73 5c 66 52 20 3f 5c 66 42 ::status\fR ?\fB
4530: 2d 6c 6f 63 61 6c 5c 66 52 3f 20 5c 66 49 63 68 -local\fR? \fIch
4540: 61 6e 6e 65 6c 5c 66 52 0a 52 65 74 75 72 6e 73 annel\fR.Returns
4550: 20 74 68 65 20 63 75 72 72 65 6e 74 20 73 74 61 the current sta
4560: 74 75 73 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 tus of an SSL ch
4570: 61 6e 6e 65 6c 5c 26 2e 20 54 68 65 20 72 65 73 annel\&. The res
4580: 75 6c 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 ult is a list of
4590: 20 6b 65 79 2d 76 61 6c 75 65 0a 70 61 69 72 73 key-value.pairs
45a0: 20 64 65 73 63 72 69 62 69 6e 67 20 74 68 65 20 describing the
45b0: 53 53 4c 2c 20 63 65 72 74 69 66 69 63 61 74 65 SSL, certificate
45c0: 2c 20 61 6e 64 20 63 65 72 74 69 66 69 63 61 74 , and certificat
45d0: 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 73 e verification s
45e0: 74 61 74 75 73 5c 26 2e 20 49 66 0a 74 68 65 20 tatus\&. If.the
45f0: 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 20 68 61 SSL handshake ha
4600: 73 20 6e 6f 74 20 79 65 74 20 63 6f 6d 70 6c 65 s not yet comple
4610: 74 65 64 2c 20 61 6e 20 65 6d 70 74 79 20 6c 69 ted, an empty li
4620: 73 74 20 69 73 20 72 65 74 75 72 6e 65 64 5c 26 st is returned\&
4630: 2e 20 49 66 20 74 68 65 0a 5c 66 42 2d 6c 6f 63 . If the.\fB-loc
4640: 61 6c 5c 66 52 20 6f 70 74 69 6f 6e 20 69 73 20 al\fR option is
4650: 73 70 65 63 69 66 69 65 64 2c 20 74 68 65 6e 20 specified, then
4660: 74 68 65 20 6c 6f 63 61 6c 20 63 65 72 74 69 66 the local certif
4670: 69 63 61 74 65 20 69 73 20 75 73 65 64 5c 26 2e icate is used\&.
4680: 20 52 65 74 75 72 6e 65 64 0a 76 61 6c 75 65 73 Returned.values
4690: 20 69 6e 63 6c 75 64 65 3a 0a 2e 73 70 0a 53 53 include:..sp.SS
46a0: 4c 20 53 74 61 74 75 73 0a 2e 52 53 0a 2e 54 50 L Status..RS..TP
46b0: 0a 5c 66 42 61 6c 70 6e 5c 66 52 20 5c 66 49 70 .\fBalpn\fR \fIp
46c0: 72 6f 74 6f 63 6f 6c 5c 66 52 0a 54 68 65 20 70 rotocol\fR.The p
46d0: 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 rotocol selected
46e0: 20 61 66 74 65 72 20 41 70 70 6c 69 63 61 74 69 after Applicati
46f0: 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f on-Layer Protoco
4700: 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 l Negotiation (A
4710: 4c 50 4e 29 5c 26 2e 0a 54 68 69 73 20 76 61 6c LPN)\&..This val
4720: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 ue is new for Tc
4730: 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 lTLS 1\&.8\&...T
4740: 50 0a 5c 66 42 63 69 70 68 65 72 5c 66 52 20 5c P.\fBcipher\fR \
4750: 66 49 63 69 70 68 65 72 5c 66 52 0a 54 68 65 20 fIcipher\fR.The
4760: 63 75 72 72 65 6e 74 20 63 69 70 68 65 72 20 69 current cipher i
4770: 6e 20 75 73 65 20 66 6f 72 20 74 68 65 20 73 65 n use for the se
4780: 73 73 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 ssion\&...TP.\fB
4790: 70 65 65 72 6e 61 6d 65 5c 66 52 20 5c 66 49 6e peername\fR \fIn
47a0: 61 6d 65 5c 66 52 0a 54 68 65 20 70 65 65 72 6e ame\fR.The peern
47b0: 61 6d 65 20 66 72 6f 6d 20 74 68 65 20 63 65 72 ame from the cer
47c0: 74 69 66 69 63 61 74 65 5c 26 2e 0a 54 68 69 73 tificate\&..This
47d0: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f value is new fo
47e0: 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 r TclTLS 1\&.8\&
47f0: 2e 0a 2e 54 50 0a 5c 66 42 70 72 6f 74 6f 63 6f ...TP.\fBprotoco
4800: 6c 5c 66 52 20 5c 66 49 76 65 72 73 69 6f 6e 5c l\fR \fIversion\
4810: 66 52 0a 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 fR.The protocol
4820: 76 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f 72 version used for
4830: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a the connection:
4840: 20 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 SSL2, SSL3, TLS
4850: 31 2c 20 54 4c 53 31 5c 26 2e 31 2c 20 54 4c 53 1, TLS1\&.1, TLS
4860: 31 5c 26 2e 32 2c 0a 54 4c 53 31 5c 26 2e 33 2c 1\&.2,.TLS1\&.3,
4870: 20 6f 72 20 75 6e 6b 6e 6f 77 6e 5c 26 2e 20 54 or unknown\&. T
4880: 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 his value is new
4890: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e for TclTLS 1\&.
48a0: 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 62 69 74 8\&...TP.\fBsbit
48b0: 73 5c 66 52 20 5c 66 49 6e 5c 66 52 0a 54 68 65 s\fR \fIn\fR.The
48c0: 20 6e 75 6d 62 65 72 20 6f 66 20 62 69 74 73 20 number of bits
48d0: 75 73 65 64 20 66 6f 72 20 74 68 65 20 73 65 73 used for the ses
48e0: 73 69 6f 6e 20 6b 65 79 5c 26 2e 0a 2e 54 50 0a sion key\&...TP.
48f0: 5c 66 42 73 69 67 6e 61 74 75 72 65 48 61 73 68 \fBsignatureHash
4900: 41 6c 67 6f 72 69 74 68 6d 5c 66 52 20 5c 66 49 Algorithm\fR \fI
4910: 61 6c 67 6f 72 69 74 68 6d 5c 66 52 0a 54 68 65 algorithm\fR.The
4920: 20 73 69 67 6e 61 74 75 72 65 20 68 61 73 68 20 signature hash
4930: 61 6c 67 6f 72 69 74 68 6d 5c 26 2e 0a 54 68 69 algorithm\&..Thi
4940: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 s value is new f
4950: 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c or TclTLS 1\&.8\
4960: 26 2e 0a 2e 54 50 0a 5c 66 42 73 69 67 6e 61 74 &...TP.\fBsignat
4970: 75 72 65 54 79 70 65 5c 66 52 20 5c 66 49 74 79 ureType\fR \fIty
4980: 70 65 5c 66 52 0a 54 68 65 20 73 69 67 6e 61 74 pe\fR.The signat
4990: 75 72 65 20 74 79 70 65 20 76 61 6c 75 65 5c 26 ure type value\&
49a0: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 ..This value is
49b0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
49c0: 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 76 \&.8\&...TP.\fBv
49d0: 65 72 69 66 79 44 65 70 74 68 5c 66 52 20 5c 66 erifyDepth\fR \f
49e0: 49 6e 5c 66 52 0a 4d 61 78 69 6d 75 6d 20 64 65 In\fR.Maximum de
49f0: 70 74 68 20 66 6f 72 20 74 68 65 20 63 65 72 74 pth for the cert
4a00: 69 66 69 63 61 74 65 20 63 68 61 69 6e 20 76 65 ificate chain ve
4a10: 72 69 66 69 63 61 74 69 6f 6e 5c 26 2e 20 44 65 rification\&. De
4a20: 66 61 75 6c 74 20 69 73 20 2d 31 2c 20 74 6f 20 fault is -1, to
4a30: 63 68 65 63 6b 20 61 6c 6c 5c 26 2e 0a 54 68 69 check all\&..Thi
4a40: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 s value is new f
4a50: 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c or TclTLS 1\&.8\
4a60: 26 2e 0a 2e 54 50 0a 5c 66 42 76 65 72 69 66 79 &...TP.\fBverify
4a70: 4d 6f 64 65 5c 66 52 20 5c 66 49 6c 69 73 74 5c Mode\fR \fIlist\
4a80: 66 52 0a 4c 69 73 74 20 6f 66 20 63 65 72 74 69 fR.List of certi
4a90: 66 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74 ficate verificat
4aa0: 69 6f 6e 20 6d 6f 64 65 73 5c 26 2e 0a 54 68 69 ion modes\&..Thi
4ab0: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 s value is new f
4ac0: 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c or TclTLS 1\&.8\
4ad0: 26 2e 0a 2e 54 50 0a 5c 66 42 76 65 72 69 66 79 &...TP.\fBverify
4ae0: 52 65 73 75 6c 74 5c 66 52 20 5c 66 49 72 65 73 Result\fR \fIres
4af0: 75 6c 74 5c 66 52 0a 43 65 72 74 69 66 69 63 61 ult\fR.Certifica
4b00: 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 te verification
4b10: 72 65 73 75 6c 74 5c 26 2e 0a 54 68 69 73 20 76 result\&..This v
4b20: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 alue is new for
4b30: 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a TclTLS 1\&.8\&..
4b40: 2e 54 50 0a 5c 66 42 63 61 5f 6e 61 6d 65 73 5c .TP.\fBca_names\
4b50: 66 52 20 5c 66 49 6c 69 73 74 5c 66 52 0a 4c 69 fR \fIlist\fR.Li
4b60: 73 74 20 6f 66 20 74 68 65 20 43 65 72 74 69 66 st of the Certif
4b70: 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 69 65 icate Authoritie
4b80: 73 20 75 73 65 64 20 74 6f 20 63 72 65 61 74 65 s used to create
4b90: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
4ba0: 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 \&..This value i
4bb0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
4bc0: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 52 45 0a 2e 49 1\&.8\&...RE..I
4bd0: 50 0a 43 65 72 74 69 66 69 63 61 74 65 20 53 74 P.Certificate St
4be0: 61 74 75 73 0a 2e 52 53 0a 2e 54 50 0a 5c 66 42 atus..RS..TP.\fB
4bf0: 61 6c 6c 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 all\fR \fIstring
4c00: 5c 66 52 0a 44 75 6d 70 20 6f 66 20 61 6c 6c 20 \fR.Dump of all
4c10: 63 65 72 74 69 66 69 63 61 74 65 20 69 6e 66 6f certificate info
4c20: 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 \&..This value i
4c30: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
4c40: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 1\&.8\&...TP.\f
4c50: 42 76 65 72 73 69 6f 6e 5c 66 52 20 5c 66 49 76 Bversion\fR \fIv
4c60: 61 6c 75 65 5c 66 52 0a 54 68 65 20 63 65 72 74 alue\fR.The cert
4c70: 69 66 69 63 61 74 65 20 76 65 72 73 69 6f 6e 5c ificate version\
4c80: 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 72 69 61 6c &...TP.\fBserial
4c90: 4e 75 6d 62 65 72 5c 66 52 20 5c 66 49 73 74 72 Number\fR \fIstr
4ca0: 69 6e 67 5c 66 52 0a 54 68 65 20 73 65 72 69 61 ing\fR.The seria
4cb0: 6c 20 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 l number of the
4cc0: 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 61 certificate as a
4cd0: 20 68 65 78 20 73 74 72 69 6e 67 5c 26 2e 0a 54 hex string\&..T
4ce0: 68 69 73 20 76 61 6c 75 65 20 77 61 73 20 63 68 his value was ch
4cf0: 61 6e 67 65 64 20 66 72 6f 6d 20 73 65 72 69 61 anged from seria
4d00: 6c 20 69 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e l in TclTLS 1\&.
4d10: 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 69 67 6e 8\&...TP.\fBsign
4d20: 61 74 75 72 65 5c 66 52 20 5c 66 49 61 6c 67 6f ature\fR \fIalgo
4d30: 72 69 74 68 6d 5c 66 52 0a 43 69 70 68 65 72 20 rithm\fR.Cipher
4d40: 61 6c 67 6f 72 69 74 68 6d 20 75 73 65 64 20 66 algorithm used f
4d50: 6f 72 20 63 65 72 74 69 66 69 63 61 74 65 20 73 or certificate s
4d60: 69 67 6e 61 74 75 72 65 5c 26 2e 0a 54 68 69 73 ignature\&..This
4d70: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f value is new fo
4d80: 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 r TclTLS 1\&.8\&
4d90: 2e 0a 2e 54 50 0a 5c 66 42 69 73 73 75 65 72 5c ...TP.\fBissuer\
4da0: 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a fR \fIstring\fR.
4db0: 54 68 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 The distinguishe
4dc0: 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 d name (DN) of t
4dd0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 69 he certificate i
4de0: 73 73 75 65 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 ssuer\&...TP.\fB
4df0: 6e 6f 74 42 65 66 6f 72 65 5c 66 52 20 5c 66 49 notBefore\fR \fI
4e00: 64 61 74 65 5c 66 52 0a 54 68 65 20 62 65 67 69 date\fR.The begi
4e10: 6e 6e 69 6e 67 20 64 61 74 65 20 6f 66 20 74 68 nning date of th
4e20: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61 e certificate va
4e30: 6c 69 64 69 74 79 5c 26 2e 0a 2e 54 50 0a 5c 66 lidity\&...TP.\f
4e40: 42 6e 6f 74 41 66 74 65 72 5c 66 52 20 5c 66 49 BnotAfter\fR \fI
4e50: 64 61 74 65 5c 66 52 0a 54 68 65 20 65 78 70 69 date\fR.The expi
4e60: 72 61 74 69 6f 6e 20 64 61 74 65 20 6f 66 20 74 ration date of t
4e70: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 76 he certificate v
4e80: 61 6c 69 64 69 74 79 5c 26 2e 0a 2e 54 50 0a 5c alidity\&...TP.\
4e90: 66 42 73 75 62 6a 65 63 74 5c 66 52 20 5c 66 49 fBsubject\fR \fI
4ea0: 73 74 72 69 6e 67 5c 66 52 0a 54 68 65 20 64 69 string\fR.The di
4eb0: 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 stinguished name
4ec0: 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63 65 72 (DN) of the cer
4ed0: 74 69 66 69 63 61 74 65 20 73 75 62 6a 65 63 74 tificate subject
4ee0: 5c 26 2e 20 46 69 65 6c 64 73 20 69 6e 63 6c 75 \&. Fields inclu
4ef0: 64 65 3a 20 43 6f 6d 6d 6f 6e 0a 4e 61 6d 65 20 de: Common.Name
4f00: 28 43 4e 29 2c 20 4f 72 67 61 6e 69 7a 61 74 69 (CN), Organizati
4f10: 6f 6e 20 28 4f 29 2c 20 4c 6f 63 61 6c 69 74 79 on (O), Locality
4f20: 20 6f 72 20 43 69 74 79 20 28 4c 29 2c 20 53 74 or City (L), St
4f30: 61 74 65 20 6f 72 20 50 72 6f 76 69 6e 63 65 20 ate or Province
4f40: 28 53 29 2c 20 61 6e 64 0a 43 6f 75 6e 74 72 79 (S), and.Country
4f50: 20 4e 61 6d 65 20 28 43 29 5c 26 2e 0a 2e 54 50 Name (C)\&...TP
4f60: 0a 5c 66 42 69 73 73 75 65 72 55 6e 69 71 75 65 .\fBissuerUnique
4f70: 49 44 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c ID\fR \fIstring\
4f80: 66 52 0a 54 68 65 20 69 73 73 75 65 72 20 75 6e fR.The issuer un
4f90: 69 71 75 65 20 69 64 5c 26 2e 0a 54 68 69 73 20 ique id\&..This
4fa0: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
4fb0: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
4fc0: 0a 2e 54 50 0a 5c 66 42 73 75 62 6a 65 63 74 55 ..TP.\fBsubjectU
4fd0: 6e 69 71 75 65 49 44 5c 66 52 20 5c 66 49 73 74 niqueID\fR \fIst
4fe0: 72 69 6e 67 5c 66 52 0a 54 68 65 20 73 75 62 6a ring\fR.The subj
4ff0: 65 63 74 20 75 6e 69 71 75 65 20 69 64 5c 26 2e ect unique id\&.
5000: 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e .This value is n
5010: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c ew for TclTLS 1\
5020: 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 6e 75 &.8\&...TP.\fBnu
5030: 6d 5f 65 78 74 65 6e 73 69 6f 6e 73 5c 66 52 20 m_extensions\fR
5040: 5c 66 49 6e 5c 66 52 0a 4e 75 6d 62 65 72 20 6f \fIn\fR.Number o
5050: 66 20 63 65 72 74 69 66 69 63 61 74 65 20 65 78 f certificate ex
5060: 74 65 6e 73 69 6f 6e 73 5c 26 2e 0a 54 68 69 73 tensions\&..This
5070: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f value is new fo
5080: 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 r TclTLS 1\&.8\&
5090: 2e 0a 2e 54 50 0a 5c 66 42 65 78 74 65 6e 73 69 ...TP.\fBextensi
50a0: 6f 6e 73 5c 66 52 20 5c 66 49 6c 69 73 74 5c 66 ons\fR \fIlist\f
50b0: 52 0a 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 R.List of certif
50c0: 69 63 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 20 icate extension
50d0: 6e 61 6d 65 73 5c 26 2e 0a 54 68 69 73 20 76 61 names\&..This va
50e0: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 lue is new for T
50f0: 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e clTLS 1\&.8\&...
5100: 54 50 0a 5c 66 42 61 75 74 68 6f 72 69 74 79 4b TP.\fBauthorityK
5110: 65 79 49 64 65 6e 74 69 66 69 65 72 5c 66 52 20 eyIdentifier\fR
5120: 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 41 75 74 \fIstring\fR.Aut
5130: 68 6f 72 69 74 79 20 4b 65 79 20 49 64 65 6e 74 hority Key Ident
5140: 69 66 69 65 72 20 28 41 4b 49 29 20 6f 66 20 74 ifier (AKI) of t
5150: 68 65 20 49 73 73 75 69 6e 67 20 43 41 20 63 65 he Issuing CA ce
5160: 72 74 69 66 69 63 61 74 65 20 74 68 61 74 20 73 rtificate that s
5170: 69 67 6e 65 64 20 74 68 65 0a 53 53 4c 20 63 65 igned the.SSL ce
5180: 72 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68 rtificate as a h
5190: 65 78 20 73 74 72 69 6e 67 5c 26 2e 20 54 68 69 ex string\&. Thi
51a0: 73 20 76 61 6c 75 65 20 6d 61 74 63 68 65 73 20 s value matches
51b0: 74 68 65 20 53 4b 49 20 76 61 6c 75 65 20 6f 66 the SKI value of
51c0: 20 74 68 65 0a 49 6e 74 65 72 6d 65 64 69 61 74 the.Intermediat
51d0: 65 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 e CA certificate
51e0: 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 \&..This value i
51f0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
5200: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 1\&.8\&...TP.\f
5210: 42 73 75 62 6a 65 63 74 4b 65 79 49 64 65 6e 74 BsubjectKeyIdent
5220: 69 66 69 65 72 5c 66 52 20 5c 66 49 73 74 72 69 ifier\fR \fIstri
5230: 6e 67 5c 66 52 0a 53 75 62 6a 65 63 74 20 4b 65 ng\fR.Subject Ke
5240: 79 20 49 64 65 6e 74 69 66 69 65 72 20 28 53 4b y Identifier (SK
5250: 49 29 20 68 61 73 68 20 6f 66 20 74 68 65 20 70 I) hash of the p
5260: 75 62 6c 69 63 20 6b 65 79 20 69 6e 73 69 64 65 ublic key inside
5270: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
5280: 20 61 73 20 61 0a 68 65 78 20 73 74 72 69 6e 67 as a.hex string
5290: 5c 26 2e 20 55 73 65 64 20 74 6f 20 69 64 65 6e \&. Used to iden
52a0: 74 69 66 79 20 63 65 72 74 69 66 69 63 61 74 65 tify certificate
52b0: 73 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 20 61 s that contain a
52c0: 20 70 61 72 74 69 63 75 6c 61 72 20 70 75 62 6c particular publ
52d0: 69 63 20 6b 65 79 5c 26 2e 0a 54 68 69 73 20 76 ic key\&..This v
52e0: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 alue is new for
52f0: 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a TclTLS 1\&.8\&..
5300: 2e 54 50 0a 5c 66 42 73 75 62 6a 65 63 74 41 6c .TP.\fBsubjectAl
5310: 74 4e 61 6d 65 5c 66 52 20 5c 66 49 6c 69 73 74 tName\fR \fIlist
5320: 5c 66 52 0a 4c 69 73 74 20 6f 66 20 61 6c 6c 20 \fR.List of all
5330: 6f 66 20 74 68 65 20 53 75 62 6a 65 63 74 20 41 of the Subject A
5340: 6c 74 65 72 6e 61 74 69 76 65 20 4e 61 6d 65 73 lternative Names
5350: 20 28 53 41 4e 29 20 69 6e 63 6c 75 64 69 6e 67 (SAN) including
5360: 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 73 2c 20 73 domain names, s
5370: 75 62 0a 64 6f 6d 61 69 6e 73 2c 20 61 6e 64 20 ub.domains, and
5380: 49 50 20 61 64 64 72 65 73 73 65 73 20 74 68 61 IP addresses tha
5390: 74 20 61 72 65 20 73 65 63 75 72 65 64 20 62 79 t are secured by
53a0: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
53b0: 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 \&..This value i
53c0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
53d0: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 1\&.8\&...TP.\f
53e0: 42 6f 63 73 70 5c 66 52 20 5c 66 49 6c 69 73 74 Bocsp\fR \fIlist
53f0: 5c 66 52 0a 4c 69 73 74 20 6f 66 20 61 6c 6c 20 \fR.List of all
5400: 4f 6e 6c 69 6e 65 20 43 65 72 74 69 66 69 63 61 Online Certifica
5410: 74 65 20 53 74 61 74 75 73 20 50 72 6f 74 6f 63 te Status Protoc
5420: 6f 6c 20 28 4f 43 53 50 29 20 55 52 4c 73 20 74 ol (OCSP) URLs t
5430: 68 61 74 20 63 61 6e 20 62 65 20 75 73 65 64 20 hat can be used
5440: 74 6f 0a 63 68 65 63 6b 20 74 68 65 20 76 61 6c to.check the val
5450: 69 64 69 74 79 20 6f 66 20 74 68 69 73 20 63 65 idity of this ce
5460: 72 74 69 66 69 63 61 74 65 5c 26 2e 0a 54 68 69 rtificate\&..Thi
5470: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 s value is new f
5480: 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c or TclTLS 1\&.8\
5490: 26 2e 0a 2e 54 50 0a 5c 66 42 63 65 72 74 69 66 &...TP.\fBcertif
54a0: 69 63 61 74 65 5c 66 52 20 5c 66 49 63 65 72 74 icate\fR \fIcert
54b0: 5c 66 52 0a 54 68 65 20 50 45 4d 20 65 6e 63 6f \fR.The PEM enco
54c0: 64 65 64 20 63 65 72 74 69 66 69 63 61 74 65 5c ded certificate\
54d0: 26 2e 0a 2e 54 50 0a 5c 66 42 73 69 67 6e 61 74 &...TP.\fBsignat
54e0: 75 72 65 41 6c 67 6f 72 69 74 68 6d 5c 66 52 20 ureAlgorithm\fR
54f0: 5c 66 49 61 6c 67 6f 72 69 74 68 6d 5c 66 52 0a \fIalgorithm\fR.
5500: 43 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d Cipher algorithm
5510: 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 65 used for the ce
5520: 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 rtificate signat
5530: 75 72 65 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 ure\&..This valu
5540: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
5550: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 TLS 1\&.8\&...TP
5560: 0a 5c 66 42 73 69 67 6e 61 74 75 72 65 56 61 6c .\fBsignatureVal
5570: 75 65 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c ue\fR \fIstring\
5580: 66 52 0a 43 65 72 74 69 66 69 63 61 74 65 20 73 fR.Certificate s
5590: 69 67 6e 61 74 75 72 65 20 61 73 20 61 20 68 65 ignature as a he
55a0: 78 20 73 74 72 69 6e 67 5c 26 2e 0a 54 68 69 73 x string\&..This
55b0: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f value is new fo
55c0: 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 r TclTLS 1\&.8\&
55d0: 2e 0a 2e 54 50 0a 5c 66 42 73 69 67 6e 61 74 75 ...TP.\fBsignatu
55e0: 72 65 44 69 67 65 73 74 5c 66 52 20 5c 66 49 76 reDigest\fR \fIv
55f0: 65 72 73 69 6f 6e 5c 66 52 0a 43 65 72 74 69 66 ersion\fR.Certif
5600: 69 63 61 74 65 20 73 69 67 6e 69 6e 67 20 64 69 icate signing di
5610: 67 65 73 74 20 61 73 20 61 20 68 65 78 20 73 74 gest as a hex st
5620: 72 69 6e 67 5c 26 2e 0a 54 68 69 73 20 76 61 6c ring\&..This val
5630: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 ue is new for Tc
5640: 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 lTLS 1\&.8\&...T
5650: 50 0a 5c 66 42 70 75 62 6c 69 63 4b 65 79 41 6c P.\fBpublicKeyAl
5660: 67 6f 72 69 74 68 6d 5c 66 52 20 5c 66 49 61 6c gorithm\fR \fIal
5670: 67 6f 72 69 74 68 6d 5c 66 52 0a 43 65 72 74 69 gorithm\fR.Certi
5680: 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 ficate signature
5690: 20 70 75 62 6c 69 63 20 6b 65 79 20 61 6c 67 6f public key algo
56a0: 72 69 74 68 6d 5c 26 2e 0a 54 68 69 73 20 76 61 rithm\&..This va
56b0: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 lue is new for T
56c0: 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e clTLS 1\&.8\&...
56d0: 54 50 0a 5c 66 42 70 75 62 6c 69 63 4b 65 79 5c TP.\fBpublicKey\
56e0: 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a fR \fIstring\fR.
56f0: 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e Certificate sign
5700: 61 74 75 72 65 20 70 75 62 6c 69 63 20 6b 65 79 ature public key
5710: 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 as a hex string
5720: 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 \&..This value i
5730: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
5740: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 1\&.8\&...TP.\f
5750: 42 62 69 74 73 5c 66 52 20 5c 66 49 6e 5c 66 52 Bbits\fR \fIn\fR
5760: 0a 4e 75 6d 62 65 72 20 6f 66 20 62 69 74 73 20 .Number of bits
5770: 75 73 65 64 20 66 6f 72 20 63 65 72 74 69 66 69 used for certifi
5780: 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 6b cate signature k
5790: 65 79 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 ey\&..This value
57a0: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
57b0: 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a LS 1\&.8\&...TP.
57c0: 5c 66 42 73 65 6c 66 5f 73 69 67 6e 65 64 5c 66 \fBself_signed\f
57d0: 52 20 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a R \fIboolean\fR.
57e0: 57 68 65 74 68 65 72 20 74 68 65 20 63 65 72 74 Whether the cert
57f0: 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 ificate signatur
5800: 65 20 69 73 20 73 65 6c 66 20 73 69 67 6e 65 64 e is self signed
5810: 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 \&..This value i
5820: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
5830: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 1\&.8\&...TP.\f
5840: 42 73 68 61 31 5f 68 61 73 68 5c 66 52 20 5c 66 Bsha1_hash\fR \f
5850: 49 68 61 73 68 5c 66 52 0a 54 68 65 20 53 48 41 Ihash\fR.The SHA
5860: 31 20 68 61 73 68 20 6f 66 20 74 68 65 20 63 65 1 hash of the ce
5870: 72 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68 rtificate as a h
5880: 65 78 20 73 74 72 69 6e 67 5c 26 2e 0a 54 68 69 ex string\&..Thi
5890: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 s value is new f
58a0: 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c or TclTLS 1\&.8\
58b0: 26 2e 0a 2e 54 50 0a 5c 66 42 73 68 61 32 35 36 &...TP.\fBsha256
58c0: 5f 68 61 73 68 5c 66 52 20 5c 66 49 68 61 73 68 _hash\fR \fIhash
58d0: 5c 66 52 0a 54 68 65 20 53 48 41 32 35 36 20 68 \fR.The SHA256 h
58e0: 61 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 ash of the certi
58f0: 66 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20 ficate as a hex
5900: 73 74 72 69 6e 67 5c 26 2e 0a 54 68 69 73 20 76 string\&..This v
5910: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 alue is new for
5920: 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a TclTLS 1\&.8\&..
5930: 2e 52 45 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a .RE..TP.\fBtls::
5940: 63 6f 6e 6e 65 63 74 69 6f 6e 5c 66 52 20 5c 66 connection\fR \f
5950: 49 63 68 61 6e 6e 65 6c 5c 66 52 0a 52 65 74 75 Ichannel\fR.Retu
5960: 72 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 rns the current
5970: 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 74 61 74 75 connection statu
5980: 73 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 6e s of an SSL chan
5990: 6e 65 6c 5c 26 2e 20 54 68 65 20 72 65 73 75 6c nel\&. The resul
59a0: 74 20 69 73 20 61 20 6c 69 73 74 0a 6f 66 20 6b t is a list.of k
59b0: 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 ey-value pairs d
59c0: 65 73 63 72 69 62 69 6e 67 20 74 68 65 20 63 6f escribing the co
59d0: 6e 6e 65 63 74 69 6f 6e 5c 26 2e 0a 54 68 69 73 nnection\&..This
59e0: 20 63 6f 6d 6d 61 6e 64 20 69 73 20 6e 65 77 20 command is new
59f0: 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 for TclTLS 1\&.8
5a00: 5c 26 2e 20 52 65 74 75 72 6e 65 64 20 76 61 6c \&. Returned val
5a10: 75 65 73 20 69 6e 63 6c 75 64 65 3a 0a 2e 73 70 ues include:..sp
5a20: 0a 53 53 4c 20 53 74 61 74 75 73 0a 2e 52 53 0a .SSL Status..RS.
5a30: 2e 54 50 0a 5c 66 42 73 74 61 74 65 5c 66 52 20 .TP.\fBstate\fR
5a40: 5c 66 49 73 74 61 74 65 5c 66 52 0a 53 74 61 74 \fIstate\fR.Stat
5a50: 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63 74 e of the connect
5a60: 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 ion\&...TP.\fBse
5a70: 72 76 65 72 6e 61 6d 65 5c 66 52 20 5c 66 49 6e rvername\fR \fIn
5a80: 61 6d 65 5c 66 52 0a 54 68 65 20 6e 61 6d 65 20 ame\fR.The name
5a90: 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63 74 65 64 of the connected
5aa0: 20 74 6f 20 73 65 72 76 65 72 5c 26 2e 0a 2e 54 to server\&...T
5ab0: 50 0a 5c 66 42 70 72 6f 74 6f 63 6f 6c 5c 66 52 P.\fBprotocol\fR
5ac0: 20 5c 66 49 76 65 72 73 69 6f 6e 5c 66 52 0a 54 \fIversion\fR.T
5ad0: 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 he protocol vers
5ae0: 69 6f 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65 ion used for the
5af0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a 20 53 53 4c connection: SSL
5b00: 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54 2, SSL3, TLS1, T
5b10: 4c 53 31 5c 26 2e 31 2c 20 54 4c 53 31 5c 26 2e LS1\&.1, TLS1\&.
5b20: 32 2c 20 54 4c 53 31 5c 26 2e 33 2c 20 6f 72 20 2, TLS1\&.3, or
5b30: 75 6e 6b 6e 6f 77 6e 5c 26 2e 0a 2e 54 50 0a 5c unknown\&...TP.\
5b40: 66 42 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 5f fBrenegotiation_
5b50: 61 6c 6c 6f 77 65 64 5c 66 52 20 5c 66 49 62 6f allowed\fR \fIbo
5b60: 6f 6c 65 61 6e 5c 66 52 0a 57 68 65 74 68 65 72 olean\fR.Whether
5b70: 20 70 72 6f 74 6f 63 6f 6c 20 72 65 6e 65 67 6f protocol renego
5b80: 74 69 61 74 69 6f 6e 20 69 73 20 73 75 70 70 6f tiation is suppo
5b90: 72 74 65 64 20 6f 72 20 6e 6f 74 5c 26 2e 0a 2e rted or not\&...
5ba0: 54 50 0a 5c 66 42 73 65 63 75 72 69 74 79 5f 6c TP.\fBsecurity_l
5bb0: 65 76 65 6c 5c 66 52 20 5c 66 49 6c 65 76 65 6c evel\fR \fIlevel
5bc0: 5c 66 52 0a 54 68 65 20 73 65 63 75 72 69 74 79 \fR.The security
5bd0: 20 6c 65 76 65 6c 20 75 73 65 64 20 66 6f 72 20 level used for
5be0: 73 65 6c 65 63 74 69 6f 6e 20 6f 66 20 63 69 70 selection of cip
5bf0: 68 65 72 73 2c 20 6b 65 79 20 73 69 7a 65 2c 20 hers, key size,
5c00: 65 74 63 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 etc\&...TP.\fBse
5c10: 73 73 69 6f 6e 5f 72 65 75 73 65 64 5c 66 52 20 ssion_reused\fR
5c20: 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a 57 68 \fIboolean\fR.Wh
5c30: 65 74 68 65 72 20 74 68 65 20 73 65 73 73 69 6f ether the sessio
5c40: 6e 20 68 61 73 20 62 65 65 6e 20 72 65 75 73 65 n has been reuse
5c50: 64 20 6f 72 20 6e 6f 74 5c 26 2e 0a 2e 54 50 0a d or not\&...TP.
5c60: 5c 66 42 69 73 5f 73 65 72 76 65 72 5c 66 52 20 \fBis_server\fR
5c70: 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a 57 68 \fIboolean\fR.Wh
5c80: 65 74 68 65 72 20 74 68 65 20 63 6f 6e 6e 65 63 ether the connec
5c90: 74 69 6f 6e 20 69 73 20 63 6f 6e 66 69 67 75 72 tion is configur
5ca0: 65 64 20 61 73 20 61 20 73 65 72 76 65 72 20 28 ed as a server (
5cb0: 31 29 20 6f 72 20 63 6c 69 65 6e 74 20 28 30 29 1) or client (0)
5cc0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 63 6f 6d 70 72 \&...TP.\fBcompr
5cd0: 65 73 73 69 6f 6e 5c 66 52 20 5c 66 49 6d 6f 64 ession\fR \fImod
5ce0: 65 5c 66 52 0a 43 6f 6d 70 72 65 73 73 69 6f 6e e\fR.Compression
5cf0: 20 6d 65 74 68 6f 64 5c 26 2e 0a 2e 54 50 0a 5c method\&...TP.\
5d00: 66 42 65 78 70 61 6e 73 69 6f 6e 5c 66 52 20 5c fBexpansion\fR \
5d10: 66 49 6d 6f 64 65 5c 66 52 0a 45 78 70 61 6e 73 fImode\fR.Expans
5d20: 69 6f 6e 20 6d 65 74 68 6f 64 5c 26 2e 0a 2e 54 ion method\&...T
5d30: 50 0a 5c 66 42 63 61 4c 69 73 74 5c 66 52 20 5c P.\fBcaList\fR \
5d40: 66 49 6c 69 73 74 5c 66 52 0a 4c 69 73 74 20 6f fIlist\fR.List o
5d50: 66 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 f Certificate Au
5d60: 74 68 6f 72 69 74 69 65 73 20 28 43 41 29 20 66 thorities (CA) f
5d70: 6f 72 20 58 5c 26 2e 35 30 39 20 63 65 72 74 69 or X\&.509 certi
5d80: 66 69 63 61 74 65 5c 26 2e 0a 2e 52 45 0a 2e 49 ficate\&...RE..I
5d90: 50 0a 43 69 70 68 65 72 20 49 6e 66 6f 0a 2e 52 P.Cipher Info..R
5da0: 53 0a 2e 54 50 0a 5c 66 42 63 69 70 68 65 72 5c S..TP.\fBcipher\
5db0: 66 52 20 5c 66 49 63 69 70 68 65 72 5c 66 52 0a fR \fIcipher\fR.
5dc0: 54 68 65 20 63 75 72 72 65 6e 74 20 63 69 70 68 The current ciph
5dd0: 65 72 20 69 6e 20 75 73 65 20 66 6f 72 20 74 68 er in use for th
5de0: 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 5c 26 2e 0a e connection\&..
5df0: 2e 54 50 0a 5c 66 42 73 74 61 6e 64 61 72 64 5f .TP.\fBstandard_
5e00: 6e 61 6d 65 5c 66 52 20 5c 66 49 6e 61 6d 65 5c name\fR \fIname\
5e10: 66 52 0a 54 68 65 20 73 74 61 6e 64 61 72 64 20 fR.The standard
5e20: 52 46 43 20 6e 61 6d 65 20 6f 66 20 63 69 70 68 RFC name of ciph
5e30: 65 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 61 6c 67 er\&...TP.\fBalg
5e40: 6f 72 69 74 68 6d 5f 62 69 74 73 5c 66 52 20 5c orithm_bits\fR \
5e50: 66 49 6e 5c 66 52 0a 54 68 65 20 6e 75 6d 62 65 fIn\fR.The numbe
5e60: 72 20 6f 66 20 70 72 6f 63 65 73 73 65 64 20 62 r of processed b
5e70: 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 69 70 its used for cip
5e80: 68 65 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 her\&...TP.\fBse
5e90: 63 72 65 74 5f 62 69 74 73 5c 66 52 20 5c 66 49 cret_bits\fR \fI
5ea0: 6e 5c 66 52 0a 54 68 65 20 6e 75 6d 62 65 72 20 n\fR.The number
5eb0: 6f 66 20 73 65 63 72 65 74 20 62 69 74 73 20 75 of secret bits u
5ec0: 73 65 64 20 66 6f 72 20 63 69 70 68 65 72 5c 26 sed for cipher\&
5ed0: 2e 0a 2e 54 50 0a 5c 66 42 6d 69 6e 5f 76 65 72 ...TP.\fBmin_ver
5ee0: 73 69 6f 6e 5c 66 52 20 5c 66 49 76 65 72 73 69 sion\fR \fIversi
5ef0: 6f 6e 5c 66 52 0a 54 68 65 20 6d 69 6e 69 6d 75 on\fR.The minimu
5f00: 6d 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 m protocol versi
5f10: 6f 6e 20 66 6f 72 20 63 69 70 68 65 72 5c 26 2e on for cipher\&.
5f20: 0a 2e 54 50 0a 5c 66 42 63 69 70 68 65 72 5f 69 ..TP.\fBcipher_i
5f30: 73 5f 61 65 61 64 5c 66 52 20 5c 66 49 62 6f 6f s_aead\fR \fIboo
5f40: 6c 65 61 6e 5c 66 52 0a 57 68 65 74 68 65 72 20 lean\fR.Whether
5f50: 74 68 65 20 63 69 70 68 65 72 20 69 73 20 41 75 the cipher is Au
5f60: 74 68 65 6e 74 69 63 61 74 65 64 20 45 6e 63 72 thenticated Encr
5f70: 79 70 74 69 6f 6e 20 77 69 74 68 20 41 73 73 6f yption with Asso
5f80: 63 69 61 74 65 64 20 44 61 74 61 20 28 41 45 41 ciated Data (AEA
5f90: 44 29 5c 26 2e 0a 2e 54 50 0a 5c 66 42 63 69 70 D)\&...TP.\fBcip
5fa0: 68 65 72 5f 69 64 5c 66 52 20 5c 66 49 69 64 5c her_id\fR \fIid\
5fb0: 66 52 0a 54 68 65 20 4f 70 65 6e 53 53 4c 20 63 fR.The OpenSSL c
5fc0: 69 70 68 65 72 20 69 64 5c 26 2e 0a 2e 54 50 0a ipher id\&...TP.
5fd0: 5c 66 42 64 65 73 63 72 69 70 74 69 6f 6e 5c 66 \fBdescription\f
5fe0: 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 41 R \fIstring\fR.A
5ff0: 20 74 65 78 74 20 64 65 73 63 72 69 70 74 69 6f text descriptio
6000: 6e 20 6f 66 20 74 68 65 20 63 69 70 68 65 72 5c n of the cipher\
6010: 26 2e 0a 2e 54 50 0a 5c 66 42 68 61 6e 64 73 68 &...TP.\fBhandsh
6020: 61 6b 65 5f 64 69 67 65 73 74 5c 66 52 20 5c 66 ake_digest\fR \f
6030: 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a 44 69 67 65 Iboolean\fR.Dige
6040: 73 74 20 75 73 65 64 20 64 75 72 69 6e 67 20 68 st used during h
6050: 61 6e 64 73 68 61 6b 65 5c 26 2e 0a 2e 52 45 0a andshake\&...RE.
6060: 2e 49 50 0a 53 65 73 73 69 6f 6e 20 49 6e 66 6f .IP.Session Info
6070: 0a 2e 52 53 0a 2e 54 50 0a 5c 66 42 61 6c 70 6e ..RS..TP.\fBalpn
6080: 5c 66 52 20 5c 66 49 70 72 6f 74 6f 63 6f 6c 5c \fR \fIprotocol\
6090: 66 52 0a 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 fR.The protocol
60a0: 73 65 6c 65 63 74 65 64 20 61 66 74 65 72 20 41 selected after A
60b0: 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 pplication-Layer
60c0: 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 Protocol Negoti
60d0: 61 74 69 6f 6e 20 28 41 4c 50 4e 29 5c 26 2e 0a ation (ALPN)\&..
60e0: 2e 54 50 0a 5c 66 42 72 65 73 75 6d 61 62 6c 65 .TP.\fBresumable
60f0: 5c 66 52 20 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 \fR \fIboolean\f
6100: 52 0a 57 68 65 74 68 65 72 20 74 68 65 20 73 65 R.Whether the se
6110: 73 73 69 6f 6e 20 63 61 6e 20 62 65 20 72 65 73 ssion can be res
6120: 75 6d 65 64 20 6f 72 20 6e 6f 74 5c 26 2e 0a 2e umed or not\&...
6130: 54 50 0a 5c 66 42 73 74 61 72 74 5f 74 69 6d 65 TP.\fBstart_time
6140: 5c 66 52 20 5c 66 49 73 65 63 6f 6e 64 73 5c 66 \fR \fIseconds\f
6150: 52 0a 54 69 6d 65 20 73 69 6e 63 65 20 73 65 73 R.Time since ses
6160: 73 69 6f 6e 20 73 74 61 72 74 65 64 20 69 6e 20 sion started in
6170: 73 65 63 6f 6e 64 73 20 73 69 6e 63 65 20 65 70 seconds since ep
6180: 6f 63 68 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 69 och\&...TP.\fBti
6190: 6d 65 6f 75 74 5c 66 52 20 5c 66 49 73 65 63 6f meout\fR \fIseco
61a0: 6e 64 73 5c 66 52 0a 4d 61 78 20 64 75 72 61 74 nds\fR.Max durat
61b0: 69 6f 6e 20 6f 66 20 73 65 73 73 69 6f 6e 20 69 ion of session i
61c0: 6e 20 73 65 63 6f 6e 64 73 20 62 65 66 6f 72 65 n seconds before
61d0: 20 74 69 6d 65 2d 6f 75 74 5c 26 2e 0a 2e 54 50 time-out\&...TP
61e0: 0a 5c 66 42 6c 69 66 65 74 69 6d 65 5c 66 52 20 .\fBlifetime\fR
61f0: 5c 66 49 73 65 63 6f 6e 64 73 5c 66 52 0a 53 65 \fIseconds\fR.Se
6200: 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 6c 69 66 ssion ticket lif
6210: 65 74 69 6d 65 20 68 69 6e 74 20 69 6e 20 73 65 etime hint in se
6220: 63 6f 6e 64 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 conds\&...TP.\fB
6230: 73 65 73 73 69 6f 6e 5f 69 64 5c 66 52 20 5c 66 session_id\fR \f
6240: 49 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 5c 66 Ibinary_string\f
6250: 52 0a 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e R.Unique session
6260: 20 69 64 20 66 6f 72 20 75 73 65 20 69 6e 20 72 id for use in r
6270: 65 73 75 6d 69 6e 67 20 74 68 65 20 73 65 73 73 esuming the sess
6280: 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 ion\&...TP.\fBse
6290: 73 73 69 6f 6e 5f 74 69 63 6b 65 74 5c 66 52 20 ssion_ticket\fR
62a0: 5c 66 49 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 \fIbinary_string
62b0: 5c 66 52 0a 55 6e 69 71 75 65 20 73 65 73 73 69 \fR.Unique sessi
62c0: 6f 6e 20 74 69 63 6b 65 74 20 66 6f 72 20 75 73 on ticket for us
62d0: 65 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 e in resuming th
62e0: 65 20 73 65 73 73 69 6f 6e 5c 26 2e 0a 2e 54 50 e session\&...TP
62f0: 0a 5c 66 42 74 69 63 6b 65 74 5f 61 70 70 5f 64 .\fBticket_app_d
6300: 61 74 61 5c 66 52 20 5c 66 49 62 69 6e 61 72 79 ata\fR \fIbinary
6310: 5f 73 74 72 69 6e 67 5c 66 52 0a 55 6e 69 71 75 _string\fR.Uniqu
6320: 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 e session ticket
6330: 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 64 61 74 application dat
6340: 61 5c 26 2e 0a 2e 54 50 0a 5c 66 42 6d 61 73 74 a\&...TP.\fBmast
6350: 65 72 5f 6b 65 79 5c 66 52 20 5c 66 49 62 69 6e er_key\fR \fIbin
6360: 61 72 79 5f 73 74 72 69 6e 67 5c 66 52 0a 55 6e ary_string\fR.Un
6370: 69 71 75 65 20 73 65 73 73 69 6f 6e 20 6d 61 73 ique session mas
6380: 74 65 72 20 6b 65 79 5c 26 2e 0a 2e 54 50 0a 5c ter key\&...TP.\
6390: 66 42 73 65 73 73 69 6f 6e 5f 63 61 63 68 65 5f fBsession_cache_
63a0: 6d 6f 64 65 5c 66 52 20 5c 66 49 6d 6f 64 65 5c mode\fR \fImode\
63b0: 66 52 0a 53 65 72 76 65 72 20 63 61 63 68 65 20 fR.Server cache
63c0: 6d 6f 64 65 20 28 63 6c 69 65 6e 74 2c 20 73 65 mode (client, se
63d0: 72 76 65 72 2c 20 6f 72 20 62 6f 74 68 29 5c 26 rver, or both)\&
63e0: 2e 0a 2e 52 45 0a 2e 54 50 0a 5c 66 42 74 6c 73 ...RE..TP.\fBtls
63f0: 3a 3a 63 69 70 68 65 72 73 5c 66 52 20 3f 5c 66 ::ciphers\fR ?\f
6400: 49 70 72 6f 74 6f 63 6f 6c 5c 66 52 3f 20 3f 5c Iprotocol\fR? ?\
6410: 66 49 76 65 72 62 6f 73 65 5c 66 52 3f 20 3f 5c fIverbose\fR? ?\
6420: 66 49 73 75 70 70 6f 72 74 65 64 5c 66 52 3f 0a fIsupported\fR?.
6430: 57 69 74 68 6f 75 74 20 61 6e 79 20 6f 70 74 69 Without any opti
6440: 6f 6e 73 2c 20 69 74 20 72 65 74 75 72 6e 73 20 ons, it returns
6450: 61 20 6c 69 73 74 20 6f 66 20 61 6c 6c 20 73 79 a list of all sy
6460: 6d 6d 65 74 72 69 63 20 63 69 70 68 65 72 73 20 mmetric ciphers
6470: 66 6f 72 20 75 73 65 20 77 69 74 68 20 74 68 65 for use with the
6480: 0a 5c 66 49 2d 63 69 70 68 65 72 5c 66 52 20 6f .\fI-cipher\fR o
6490: 70 74 69 6f 6e 5c 26 2e 20 57 69 74 68 20 5c 66 ption\&. With \f
64a0: 49 70 72 6f 74 6f 63 6f 6c 5c 66 52 2c 20 6f 6e Iprotocol\fR, on
64b0: 6c 79 20 74 68 65 20 63 69 70 68 65 72 73 20 73 ly the ciphers s
64c0: 75 70 70 6f 72 74 65 64 20 66 6f 72 20 74 68 61 upported for tha
64d0: 74 0a 70 72 6f 74 6f 63 6f 6c 20 61 72 65 20 72 t.protocol are r
64e0: 65 74 75 72 6e 65 64 5c 26 2e 20 53 65 65 20 74 eturned\&. See t
64f0: 68 65 20 5c 66 42 74 6c 73 3a 3a 70 72 6f 74 6f he \fBtls::proto
6500: 63 6f 6c 73 5c 66 52 20 63 6f 6d 6d 61 6e 64 20 cols\fR command
6510: 66 6f 72 20 74 68 65 20 73 75 70 70 6f 72 74 65 for the supporte
6520: 64 0a 70 72 6f 74 6f 63 6f 6c 73 5c 26 2e 20 49 d.protocols\&. I
6530: 66 20 5c 66 49 76 65 72 62 6f 73 65 5c 66 52 20 f \fIverbose\fR
6540: 69 73 20 73 70 65 63 69 66 69 65 64 20 61 73 20 is specified as
6550: 74 72 75 65 20 74 68 65 6e 20 61 20 76 65 72 62 true then a verb
6560: 6f 73 65 2c 20 68 75 6d 61 6e 20 72 65 61 64 61 ose, human reada
6570: 62 6c 65 0a 6c 69 73 74 20 69 73 20 72 65 74 75 ble.list is retu
6580: 72 6e 65 64 20 77 69 74 68 20 61 64 64 69 74 69 rned with additi
6590: 6f 6e 61 6c 20 69 6e 66 6f 72 6d 61 74 69 6f 6e onal information
65a0: 20 6f 6e 20 74 68 65 20 63 69 70 68 65 72 5c 26 on the cipher\&
65b0: 2e 20 49 66 20 5c 66 49 73 75 70 70 6f 72 74 65 . If \fIsupporte
65c0: 64 5c 66 52 0a 69 73 20 73 70 65 63 69 66 69 65 d\fR.is specifie
65d0: 64 20 61 73 20 74 72 75 65 2c 20 74 68 65 6e 20 d as true, then
65e0: 6f 6e 6c 79 20 74 68 65 20 63 69 70 68 65 72 73 only the ciphers
65f0: 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20 70 supported for p
6600: 72 6f 74 6f 63 6f 6c 20 77 69 6c 6c 20 62 65 20 rotocol will be
6610: 6c 69 73 74 65 64 5c 26 2e 0a 54 68 65 20 5c 66 listed\&..The \f
6620: 49 73 75 70 70 6f 72 74 65 64 5c 66 52 20 61 72 Isupported\fR ar
6630: 67 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c g is new for Tcl
6640: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 TLS 1\&.8\&...TP
6650: 0a 5c 66 42 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f .\fBtls::protoco
6660: 6c 73 5c 66 52 0a 52 65 74 75 72 6e 73 20 61 20 ls\fR.Returns a
6670: 6c 69 73 74 20 6f 66 20 74 68 65 20 73 75 70 70 list of the supp
6680: 6f 72 74 65 64 20 53 53 4c 2f 54 4c 53 20 70 72 orted SSL/TLS pr
6690: 6f 74 6f 63 6f 6c 73 5c 26 2e 20 56 61 6c 69 64 otocols\&. Valid
66a0: 20 76 61 6c 75 65 73 20 61 72 65 3a 0a 5c 66 42 values are:.\fB
66b0: 73 73 6c 32 5c 66 52 2c 20 5c 66 42 73 73 6c 33 ssl2\fR, \fBssl3
66c0: 5c 66 52 2c 20 5c 66 42 74 6c 73 31 5c 66 52 2c \fR, \fBtls1\fR,
66d0: 20 5c 66 42 74 6c 73 31 5c 26 2e 31 5c 66 52 2c \fBtls1\&.1\fR,
66e0: 20 5c 66 42 74 6c 73 31 5c 26 2e 32 5c 66 52 2c \fBtls1\&.2\fR,
66f0: 20 61 6e 64 0a 5c 66 42 74 6c 73 31 5c 26 2e 33 and.\fBtls1\&.3
6700: 5c 66 52 5c 26 2e 20 45 78 61 63 74 20 6c 69 73 \fR\&. Exact lis
6710: 74 20 64 65 70 65 6e 64 73 20 6f 6e 20 4f 70 65 t depends on Ope
6720: 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 61 6e 64 nSSL version and
6730: 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 66 6c compile time fl
6740: 61 67 73 5c 26 2e 0a 54 68 69 73 20 63 6f 6d 6d ags\&..This comm
6750: 61 6e 64 20 69 73 20 6e 65 77 20 66 6f 72 20 54 and is new for T
6760: 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e clTLS 1\&.8\&...
6770: 54 50 0a 5c 66 42 74 6c 73 3a 3a 76 65 72 73 69 TP.\fBtls::versi
6780: 6f 6e 5c 66 52 0a 52 65 74 75 72 6e 73 20 74 68 on\fR.Returns th
6790: 65 20 4f 70 65 6e 53 53 4c 20 76 65 72 73 69 6f e OpenSSL versio
67a0: 6e 20 73 74 72 69 6e 67 5c 26 2e 0a 2e 50 50 0a n string\&...PP.
67b0: 2e 53 48 20 22 43 45 52 54 49 46 49 43 41 54 45 .SH "CERTIFICATE
67c0: 20 56 41 4c 49 44 41 54 49 4f 4e 22 0a 2e 53 53 VALIDATION"..SS
67d0: 20 22 50 4b 49 20 41 4e 44 20 43 45 52 54 49 46 "PKI AND CERTIF
67e0: 49 43 41 54 45 53 22 0a 55 73 69 6e 67 20 74 68 ICATES".Using th
67f0: 65 20 50 75 62 6c 69 63 20 4b 65 79 20 49 6e 66 e Public Key Inf
6800: 72 61 73 74 72 75 63 74 75 72 65 20 28 50 4b 49 rastructure (PKI
6810: 29 2c 20 65 61 63 68 20 75 73 65 72 20 63 72 65 ), each user cre
6820: 61 74 65 73 20 61 20 70 72 69 76 61 74 65 20 6b ates a private k
6830: 65 79 20 74 68 61 74 0a 6f 6e 6c 79 20 74 68 65 ey that.only the
6840: 79 20 6b 6e 6f 77 20 61 62 6f 75 74 20 61 6e 64 y know about and
6850: 20 61 20 70 75 62 6c 69 63 20 6b 65 79 20 74 68 a public key th
6860: 65 79 20 63 61 6e 20 65 78 63 68 61 6e 67 65 20 ey can exchange
6870: 77 69 74 68 20 6f 74 68 65 72 73 20 66 6f 72 20 with others for
6880: 75 73 65 20 69 6e 0a 65 6e 63 72 79 70 74 69 6e use in.encryptin
6890: 67 20 61 6e 64 20 64 65 63 72 79 70 74 69 6e 67 g and decrypting
68a0: 20 64 61 74 61 5c 26 2e 20 54 68 65 20 70 72 6f data\&. The pro
68b0: 63 65 73 73 20 69 73 20 74 68 65 20 73 65 6e 64 cess is the send
68c0: 65 72 20 65 6e 63 72 79 70 74 73 20 74 68 65 69 er encrypts thei
68d0: 72 20 64 61 74 61 0a 75 73 69 6e 67 20 74 68 65 r data.using the
68e0: 69 72 20 70 72 69 76 61 74 65 20 6b 65 79 20 61 ir private key a
68f0: 6e 64 20 74 68 65 20 72 65 63 65 69 76 65 72 27 nd the receiver'
6900: 73 20 70 75 62 6c 69 63 20 6b 65 79 5c 26 2e 20 s public key\&.
6910: 54 68 65 20 64 61 74 61 20 69 73 20 74 68 65 6e The data is then
6920: 20 73 65 6e 74 0a 74 6f 20 74 68 65 20 72 65 63 sent.to the rec
6930: 65 69 76 65 72 5c 26 2e 20 49 6e 20 61 20 73 69 eiver\&. In a si
6940: 6d 69 6c 61 72 20 6d 61 6e 6e 65 72 2c 20 74 68 milar manner, th
6950: 65 20 72 65 63 65 69 76 65 72 20 75 73 65 73 20 e receiver uses
6960: 74 68 65 69 72 20 70 72 69 76 61 74 65 20 6b 65 their private ke
6970: 79 20 61 6e 64 0a 74 68 65 20 73 65 6e 64 65 72 y and.the sender
6980: 27 73 20 70 75 62 6c 69 63 20 6b 65 79 20 74 6f 's public key to
6990: 20 64 65 63 72 79 70 74 20 74 68 65 20 64 61 74 decrypt the dat
69a0: 61 5c 26 2e 20 54 68 69 73 20 70 72 6f 76 69 64 a\&. This provid
69b0: 65 73 20 64 61 74 61 20 69 6e 74 65 67 72 69 74 es data integrit
69c0: 79 2c 20 74 6f 0a 65 6e 73 75 72 65 20 74 68 65 y, to.ensure the
69d0: 20 64 61 74 61 20 63 61 6e 27 74 20 62 65 20 76 data can't be v
69e0: 69 65 77 65 64 20 6f 72 20 61 6c 74 65 72 65 64 iewed or altered
69f0: 20 64 75 72 69 6e 67 20 74 72 61 6e 73 70 6f 72 during transpor
6a00: 74 5c 26 2e 20 53 65 65 20 74 68 65 0a 5c 66 42 t\&. See the.\fB
6a10: 2d 6b 65 79 5c 66 52 20 61 6e 64 20 5c 66 42 2d -key\fR and \fB-
6a20: 6b 65 79 66 69 6c 65 5c 66 52 20 6f 70 74 69 6f keyfile\fR optio
6a30: 6e 73 20 66 6f 72 20 68 6f 77 20 74 6f 20 73 70 ns for how to sp
6a40: 65 63 69 66 79 20 74 68 65 20 70 72 69 76 61 74 ecify the privat
6a50: 65 20 6b 65 79 5c 26 2e 0a 41 6c 73 6f 20 73 65 e key\&..Also se
6a60: 65 20 74 68 65 20 5c 66 42 2d 70 61 73 73 77 6f e the \fB-passwo
6a70: 72 64 5c 66 52 20 6f 70 74 69 6f 6e 20 66 6f 72 rd\fR option for
6a80: 20 68 6f 77 20 74 6f 20 70 72 6f 76 69 64 65 20 how to provide
6a90: 74 68 65 20 70 61 73 73 77 6f 72 64 5c 26 2e 0a the password\&..
6aa0: 2e 50 50 0a 49 6e 20 6f 72 64 65 72 20 74 6f 20 .PP.In order to
6ab0: 70 72 6f 76 69 64 65 20 61 75 74 68 65 6e 74 69 provide authenti
6ac0: 63 61 74 69 6f 6e 2c 20 69 5c 26 2e 65 5c 26 2e cation, i\&.e\&.
6ad0: 20 65 6e 73 75 72 69 6e 67 20 73 6f 6d 65 6f 6e ensuring someon
6ae0: 65 20 69 73 20 77 68 6f 20 74 68 65 79 20 73 61 e is who they sa
6af0: 79 20 74 68 65 79 0a 61 72 65 2c 20 74 68 65 20 y they.are, the
6b00: 70 75 62 6c 69 63 20 6b 65 79 20 61 6e 64 20 75 public key and u
6b10: 73 65 72 20 69 64 65 6e 74 69 66 69 63 61 74 69 ser identificati
6b20: 6f 6e 20 69 6e 66 6f 20 69 73 20 73 74 6f 72 65 on info is store
6b30: 64 20 69 6e 20 61 20 58 5c 26 2e 35 30 39 0a 63 d in a X\&.509.c
6b40: 65 72 74 69 66 69 63 61 74 65 20 61 6e 64 20 74 ertificate and t
6b50: 68 61 74 20 63 65 72 74 69 66 69 63 61 74 65 20 hat certificate
6b60: 69 73 20 61 75 74 68 65 6e 74 69 63 61 74 65 64 is authenticated
6b70: 20 28 69 5c 26 2e 65 5c 26 2e 20 73 69 67 6e 65 (i\&.e\&. signe
6b80: 64 29 20 62 79 20 61 20 43 65 72 74 69 66 69 63 d) by a Certific
6b90: 61 74 65 0a 41 75 74 68 6f 72 69 74 79 20 28 43 ate.Authority (C
6ba0: 41 29 5c 26 2e 20 55 73 65 72 73 20 63 61 6e 20 A)\&. Users can
6bb0: 74 68 65 6e 20 65 78 63 68 61 6e 67 65 20 74 68 then exchange th
6bc0: 65 73 65 20 63 65 72 74 69 66 69 63 61 74 65 73 ese certificates
6bd0: 20 64 75 72 69 6e 67 20 74 68 65 20 54 4c 53 0a during the TLS.
6be0: 69 6e 69 74 69 61 6c 69 7a 61 74 69 6f 6e 20 70 initialization p
6bf0: 72 6f 63 65 73 73 20 61 6e 64 20 63 68 65 63 6b rocess and check
6c00: 20 74 68 65 6d 20 61 67 61 69 6e 73 74 20 74 68 them against th
6c10: 65 20 72 6f 6f 74 20 43 41 20 63 65 72 74 69 66 e root CA certif
6c20: 69 63 61 74 65 73 20 74 6f 20 65 6e 73 75 72 65 icates to ensure
6c30: 0a 74 68 65 79 20 61 72 65 20 76 61 6c 69 64 5c .they are valid\
6c40: 26 2e 20 54 68 69 73 20 69 73 20 68 61 6e 64 6c &. This is handl
6c50: 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 20 76 69 ed by OpenSSL vi
6c60: 61 20 74 68 65 20 5c 66 42 2d 72 65 71 75 65 73 a the \fB-reques
6c70: 74 5c 66 52 20 61 6e 64 0a 5c 66 42 2d 72 65 71 t\fR and.\fB-req
6c80: 75 69 72 65 5c 66 52 20 6f 70 74 69 6f 6e 73 5c uire\fR options\
6c90: 26 2e 20 53 65 65 20 74 68 65 20 5c 66 42 2d 63 &. See the \fB-c
6ca0: 61 64 69 72 5c 66 52 2c 20 5c 66 42 2d 63 61 64 adir\fR, \fB-cad
6cb0: 69 72 5c 66 52 2c 20 61 6e 64 0a 5c 66 42 2d 63 ir\fR, and.\fB-c
6cc0: 61 73 74 6f 72 65 5c 66 52 20 6f 70 74 69 6f 6e astore\fR option
6cd0: 73 20 66 6f 72 20 68 6f 77 20 74 6f 20 73 70 65 s for how to spe
6ce0: 63 69 66 79 20 77 68 65 72 65 20 74 6f 20 66 69 cify where to fi
6cf0: 6e 64 20 74 68 65 20 43 41 20 63 65 72 74 69 66 nd the CA certif
6d00: 69 63 61 74 65 73 5c 26 2e 0a 4f 70 74 69 6f 6e icates\&..Option
6d10: 61 6c 6c 79 2c 20 69 6e 20 61 20 66 75 74 75 72 ally, in a futur
6d20: 65 20 72 65 6c 65 61 73 65 2c 20 74 68 65 79 20 e release, they
6d30: 63 61 6e 20 61 6c 73 6f 20 62 65 20 63 68 65 63 can also be chec
6d40: 6b 65 64 20 61 67 61 69 6e 73 74 20 74 68 65 20 ked against the
6d50: 43 65 72 74 69 66 69 63 61 74 65 0a 52 65 76 6f Certificate.Revo
6d60: 63 61 74 69 6f 6e 20 4c 69 73 74 20 28 43 52 4c cation List (CRL
6d70: 29 20 6f 66 20 72 65 76 6f 6b 65 64 20 63 65 72 ) of revoked cer
6d80: 74 69 66 69 63 61 74 65 73 5c 26 2e 20 43 65 72 tificates\&. Cer
6d90: 74 69 66 69 63 61 74 65 73 20 63 61 6e 20 61 6c tificates can al
6da0: 73 6f 20 62 65 0a 73 65 6c 66 2d 73 69 67 6e 65 so be.self-signe
6db0: 64 2c 20 62 75 74 20 74 68 65 79 20 61 72 65 20 d, but they are
6dc0: 62 79 20 64 65 66 61 75 6c 74 20 6e 6f 74 20 74 by default not t
6dd0: 72 75 73 74 65 64 20 75 6e 6c 65 73 73 20 79 6f rusted unless yo
6de0: 75 20 61 64 64 20 74 68 65 6d 20 74 6f 20 79 6f u add them to yo
6df0: 75 72 0a 63 65 72 74 69 66 69 63 61 74 65 20 73 ur.certificate s
6e00: 74 6f 72 65 5c 26 2e 0a 2e 50 50 0a 54 79 70 69 tore\&...PP.Typi
6e10: 63 61 6c 6c 79 20 77 68 65 6e 20 76 69 73 69 74 cally when visit
6e20: 69 6e 67 20 77 65 62 20 73 69 74 65 73 2c 20 6f ing web sites, o
6e30: 6e 6c 79 20 74 68 65 20 63 6c 69 65 6e 74 20 6e nly the client n
6e40: 65 65 64 73 20 74 6f 20 63 68 65 63 6b 20 74 68 eeds to check th
6e50: 65 20 73 65 72 76 65 72 27 73 0a 63 65 72 74 69 e server's.certi
6e60: 66 69 63 61 74 65 20 74 6f 20 65 6e 73 75 72 65 ficate to ensure
6e70: 20 69 74 20 69 73 20 76 61 6c 69 64 5c 26 2e 20 it is valid\&.
6e80: 54 68 65 20 73 65 72 76 65 72 20 64 6f 65 73 6e The server doesn
6e90: 27 74 20 6e 65 65 64 20 74 6f 20 63 68 65 63 6b 't need to check
6ea0: 20 74 68 65 20 63 6c 69 65 6e 74 0a 63 65 72 74 the client.cert
6eb0: 69 66 69 63 61 74 65 20 75 6e 6c 65 73 73 20 79 ificate unless y
6ec0: 6f 75 20 6e 65 65 64 20 74 6f 20 61 75 74 68 65 ou need to authe
6ed0: 6e 74 69 63 61 74 65 20 77 69 74 68 20 74 68 65 nticate with the
6ee0: 6d 20 74 6f 20 6c 6f 67 69 6e 2c 20 65 74 63 5c m to login, etc\
6ef0: 26 2e 20 53 65 65 20 74 68 65 0a 5c 66 42 2d 63 &. See the.\fB-c
6f00: 65 72 74 5c 66 52 20 61 6e 64 20 5c 66 42 2d 63 ert\fR and \fB-c
6f10: 65 72 74 66 69 6c 65 5c 66 52 20 6f 70 74 69 6f ertfile\fR optio
6f20: 6e 73 20 69 66 20 79 6f 75 20 6e 65 65 64 20 74 ns if you need t
6f30: 6f 20 70 72 6f 76 69 64 65 20 61 20 63 65 72 74 o provide a cert
6f40: 69 66 69 63 61 74 65 5c 26 2e 0a 2e 53 53 20 22 ificate\&...SS "
6f50: 53 55 4d 4d 41 52 59 20 4f 46 20 43 4f 4d 4d 41 SUMMARY OF COMMA
6f60: 4e 44 20 4c 49 4e 45 20 4f 50 54 49 4f 4e 53 22 ND LINE OPTIONS"
6f70: 0a 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6f .The following o
6f80: 70 74 69 6f 6e 73 20 61 72 65 20 75 73 65 64 20 ptions are used
6f90: 66 6f 72 20 70 65 65 72 20 63 65 72 74 69 66 69 for peer certifi
6fa0: 63 61 74 65 20 76 61 6c 69 64 61 74 69 6f 6e 3a cate validation:
6fb0: 0a 2e 54 50 0a 5c 66 42 2d 63 61 64 69 72 5c 66 ..TP.\fB-cadir\f
6fc0: 52 20 5c 66 49 64 69 72 65 63 74 6f 72 79 5c 66 R \fIdirectory\f
6fd0: 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 20 R.Specifies the
6fe0: 64 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 20 directory where
6ff0: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 the Certificate
7000: 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63 Authority (CA) c
7010: 65 72 74 69 66 69 63 61 74 65 73 20 61 72 65 0a ertificates are.
7020: 73 74 6f 72 65 64 5c 26 2e 20 54 68 65 20 64 65 stored\&. The de
7030: 66 61 75 6c 74 20 69 73 20 70 6c 61 74 66 6f 72 fault is platfor
7040: 6d 20 73 70 65 63 69 66 69 63 2c 20 62 75 74 20 m specific, but
7050: 69 73 20 75 73 75 61 6c 6c 79 20 22 5c 66 49 2f is usually "\fI/
7060: 65 74 63 2f 73 73 6c 2f 63 65 72 74 73 5c 66 52 etc/ssl/certs\fR
7070: 22 20 6f 6e 0a 4c 69 6e 75 78 2f 55 6e 69 78 20 " on.Linux/Unix
7080: 73 79 73 74 65 6d 73 5c 26 2e 20 54 68 65 20 64 systems\&. The d
7090: 65 66 61 75 6c 74 20 6c 6f 63 61 74 69 6f 6e 20 efault location
70a0: 63 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 can be overridde
70b0: 6e 20 62 79 20 74 68 65 0a 5c 66 42 53 53 4c 5f n by the.\fBSSL_
70c0: 43 45 52 54 5f 44 49 52 5c 66 52 20 65 6e 76 69 CERT_DIR\fR envi
70d0: 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 ronment variable
70e0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 61 66 69 \&...TP.\fB-cafi
70f0: 6c 65 5c 66 52 20 5c 66 49 66 69 6c 65 6e 61 6d le\fR \fIfilenam
7100: 65 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 e\fR.Specifies t
7110: 68 65 20 66 69 6c 65 20 77 69 74 68 20 74 68 65 he file with the
7120: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 Certificate Aut
7130: 68 6f 72 69 74 79 20 28 43 41 29 20 63 65 72 74 hority (CA) cert
7140: 69 66 69 63 61 74 65 73 20 74 6f 20 75 73 65 20 ificates to use
7150: 69 6e 0a 5c 66 42 50 45 4d 5c 66 52 20 66 69 6c in.\fBPEM\fR fil
7160: 65 20 66 6f 72 6d 61 74 5c 26 2e 20 54 68 65 20 e format\&. The
7170: 64 65 66 61 75 6c 74 20 69 73 20 22 5c 66 49 63 default is "\fIc
7180: 65 72 74 5c 26 2e 70 65 6d 5c 66 52 22 2c 20 69 ert\&.pem\fR", i
7190: 6e 20 74 68 65 20 4f 70 65 6e 53 53 4c 0a 64 69 n the OpenSSL.di
71a0: 72 65 63 74 6f 72 79 5c 26 2e 20 4f 6e 20 4c 69 rectory\&. On Li
71b0: 6e 75 78 2f 55 6e 69 78 20 73 79 73 74 65 6d 73 nux/Unix systems
71c0: 2c 20 74 68 69 73 20 69 73 20 75 73 75 61 6c 6c , this is usuall
71d0: 79 20 22 5c 66 49 2f 65 74 63 2f 73 73 6c 2f 63 y "\fI/etc/ssl/c
71e0: 61 2d 62 75 6e 64 6c 65 5c 26 2e 70 65 6d 5c 66 a-bundle\&.pem\f
71f0: 52 22 5c 26 2e 0a 54 68 65 20 64 65 66 61 75 6c R"\&..The defaul
7200: 74 20 66 69 6c 65 20 63 61 6e 20 62 65 20 6f 76 t file can be ov
7210: 65 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 erridden by the
7220: 5c 66 42 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 \fBSSL_CERT_FILE
7230: 5c 66 52 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a \fR environment.
7240: 76 61 72 69 61 62 6c 65 5c 26 2e 0a 2e 54 50 0a variable\&...TP.
7250: 5c 66 42 2d 63 61 73 74 6f 72 65 5c 66 52 20 5c \fB-castore\fR \
7260: 66 49 55 52 49 5c 66 52 0a 53 70 65 63 69 66 69 fIURI\fR.Specifi
7270: 65 73 20 74 68 65 20 55 6e 69 66 6f 72 6d 20 52 es the Uniform R
7280: 65 73 6f 75 72 63 65 20 49 64 65 6e 74 69 66 69 esource Identifi
7290: 65 72 20 28 55 52 49 29 20 66 6f 72 20 74 68 65 er (URI) for the
72a0: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 Certificate Aut
72b0: 68 6f 72 69 74 79 0a 28 43 41 29 20 73 74 6f 72 hority.(CA) stor
72c0: 65 2c 20 77 68 69 63 68 20 6d 61 79 20 62 65 20 e, which may be
72d0: 61 20 73 69 6e 67 6c 65 20 63 6f 6e 74 61 69 6e a single contain
72e0: 65 72 20 6f 72 20 61 20 63 61 74 61 6c 6f 67 20 er or a catalog
72f0: 6f 66 20 63 6f 6e 74 61 69 6e 65 72 73 5c 26 2e of containers\&.
7300: 0a 53 74 61 72 74 69 6e 67 20 77 69 74 68 20 4f .Starting with O
7310: 70 65 6e 53 53 4c 20 33 5c 26 2e 32 20 6f 6e 20 penSSL 3\&.2 on
7320: 4d 53 20 57 69 6e 64 6f 77 73 2c 20 73 65 74 20 MS Windows, set
7330: 74 6f 20 22 5c 66 42 6f 72 67 5c 26 2e 6f 70 65 to "\fBorg\&.ope
7340: 6e 73 73 6c 5c 26 2e 77 69 6e 73 74 6f 72 65 3a nssl\&.winstore:
7350: 2f 2f 5c 66 52 22 0a 74 6f 20 75 73 65 20 74 68 //\fR".to use th
7360: 65 20 62 75 69 6c 74 2d 69 6e 20 4d 53 20 57 69 e built-in MS Wi
7370: 6e 64 6f 77 73 20 43 65 72 74 69 66 69 63 61 74 ndows Certificat
7380: 65 20 53 74 6f 72 65 5c 26 2e 20 53 74 61 72 74 e Store\&. Start
7390: 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c ing in TclTLS 2\
73a0: 26 2e 30 2c 20 74 68 69 73 0a 69 73 20 74 68 65 &.0, this.is the
73b0: 20 64 65 66 61 75 6c 74 20 69 66 20 5c 66 42 2d default if \fB-
73c0: 63 61 64 69 72 5c 66 52 2c 20 5c 66 42 2d 63 61 cadir\fR, \fB-ca
73d0: 64 69 72 5c 66 52 2c 20 61 6e 64 20 5c 66 42 2d dir\fR, and \fB-
73e0: 63 61 73 74 6f 72 65 5c 66 52 20 61 72 65 0a 6e castore\fR are.n
73f0: 6f 74 20 73 70 65 63 69 66 69 65 64 5c 26 2e 20 ot specified\&.
7400: 54 68 69 73 20 73 74 6f 72 65 20 6f 6e 6c 79 20 This store only
7410: 73 75 70 70 6f 72 74 73 20 72 6f 6f 74 20 63 65 supports root ce
7420: 72 74 69 66 69 63 61 74 65 20 73 74 6f 72 65 73 rtificate stores
7430: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 72 65 71 75 \&...TP.\fB-requ
7440: 65 73 74 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 est\fR \fIbool\f
7450: 52 0a 52 65 71 75 65 73 74 20 61 20 63 65 72 74 R.Request a cert
7460: 69 66 69 63 61 74 65 20 66 72 6f 6d 20 74 68 65 ificate from the
7470: 20 70 65 65 72 20 64 75 72 69 6e 67 20 74 68 65 peer during the
7480: 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 5c 26 SSL handshake\&
7490: 2e 20 54 68 69 73 20 69 73 20 6e 65 65 64 65 64 . This is needed
74a0: 0a 74 6f 20 64 6f 20 43 65 72 74 69 66 69 63 61 .to do Certifica
74b0: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 5c 26 2e te Validation\&.
74c0: 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c Starting in Tcl
74d0: 54 4c 53 20 31 5c 26 2e 38 2c 20 74 68 65 20 64 TLS 1\&.8, the d
74e0: 65 66 61 75 6c 74 20 69 73 0a 5c 66 42 74 72 75 efault is.\fBtru
74f0: 65 5c 66 52 20 66 6f 72 20 63 6c 69 65 6e 74 20 e\fR for client
7500: 63 6f 6e 6e 65 63 74 69 6f 6e 73 5c 26 2e 20 53 connections\&. S
7510: 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c tarting in TclTL
7520: 53 20 32 5c 26 2e 30 2c 20 69 66 20 73 65 74 20 S 2\&.0, if set
7530: 74 6f 0a 5c 66 42 66 61 6c 73 65 5c 66 52 20 61 to.\fBfalse\fR a
7540: 6e 64 20 5c 66 42 2d 72 65 71 75 69 72 65 5c 66 nd \fB-require\f
7550: 52 20 69 73 20 5c 66 42 74 72 75 65 5c 66 52 2c R is \fBtrue\fR,
7560: 20 74 68 65 6e 20 74 68 69 73 20 77 69 6c 6c 20 then this will
7570: 62 65 0a 6f 76 65 72 72 69 64 64 65 6e 20 74 6f be.overridden to
7580: 20 5c 66 42 74 72 75 65 5c 66 52 5c 26 2e 20 49 \fBtrue\fR\&. I
7590: 6e 20 61 64 64 69 74 69 6f 6e 2c 20 74 68 65 20 n addition, the
75a0: 63 6c 69 65 6e 74 20 63 61 6e 20 6d 61 6e 75 61 client can manua
75b0: 6c 6c 79 20 69 6e 73 70 65 63 74 20 61 6e 64 0a lly inspect and.
75c0: 61 63 63 65 70 74 20 6f 72 20 72 65 6a 65 63 74 accept or reject
75d0: 20 65 61 63 68 20 63 65 72 74 69 66 69 63 61 74 each certificat
75e0: 65 20 75 73 69 6e 67 20 74 68 65 20 5c 66 42 2d e using the \fB-
75f0: 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 5c validatecommand\
7600: 66 52 20 6f 70 74 69 6f 6e 5c 26 2e 0a 2e 54 50 fR option\&...TP
7610: 0a 5c 66 42 2d 72 65 71 75 69 72 65 5c 66 52 20 .\fB-require\fR
7620: 5c 66 49 62 6f 6f 6c 5c 66 52 0a 52 65 71 75 69 \fIbool\fR.Requi
7630: 72 65 20 61 20 76 61 6c 69 64 20 63 65 72 74 69 re a valid certi
7640: 66 69 63 61 74 65 20 66 72 6f 6d 20 74 68 65 20 ficate from the
7650: 70 65 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 peer during the
7660: 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 5c 26 2e SSL handshake\&.
7670: 20 49 66 20 74 68 69 73 20 69 73 0a 73 65 74 20 If this is.set
7680: 74 6f 20 74 72 75 65 2c 20 74 68 65 6e 20 5c 66 to true, then \f
7690: 42 2d 72 65 71 75 65 73 74 5c 66 52 20 6d 75 73 B-request\fR mus
76a0: 74 20 61 6c 73 6f 20 62 65 20 73 65 74 20 74 6f t also be set to
76b0: 20 74 72 75 65 20 61 6e 64 20 61 20 65 69 74 68 true and a eith
76c0: 65 72 0a 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c er.\fB-cadir\fR,
76d0: 20 5c 66 42 2d 63 61 66 69 6c 65 5c 66 52 2c 20 \fB-cafile\fR,
76e0: 5c 66 42 2d 63 61 73 74 6f 72 65 5c 66 52 2c 20 \fB-castore\fR,
76f0: 6f 72 20 61 20 70 6c 61 74 66 6f 72 6d 20 64 65 or a platform de
7700: 66 61 75 6c 74 0a 6d 75 73 74 20 62 65 20 70 72 fault.must be pr
7710: 6f 76 69 64 65 64 20 69 6e 20 6f 72 64 65 72 20 ovided in order
7720: 74 6f 20 76 61 6c 69 64 61 74 65 20 61 67 61 69 to validate agai
7730: 6e 73 74 5c 26 2e 20 54 68 65 20 64 65 66 61 75 nst\&. The defau
7740: 6c 74 20 69 6e 20 54 63 6c 54 4c 53 20 31 5c 26 lt in TclTLS 1\&
7750: 2e 38 20 61 6e 64 0a 65 61 72 6c 69 65 72 20 76 .8 and.earlier v
7760: 65 72 73 69 6f 6e 73 20 69 73 20 5c 66 42 66 61 ersions is \fBfa
7770: 6c 73 65 5c 66 52 20 73 69 6e 63 65 20 6e 6f 74 lse\fR since not
7780: 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d 73 20 68 all platforms h
7790: 61 76 65 20 63 65 72 74 69 66 69 63 61 74 65 73 ave certificates
77a0: 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 67 61 to.validate aga
77b0: 69 6e 73 74 20 69 6e 20 61 20 66 6f 72 6d 20 63 inst in a form c
77c0: 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 4f ompatible with O
77d0: 70 65 6e 53 53 4c 5c 26 2e 20 53 74 61 72 74 69 penSSL\&. Starti
77e0: 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 ng in TclTLS 2\&
77f0: 2e 30 2c 0a 74 68 65 20 64 65 66 61 75 6c 74 20 .0,.the default
7800: 69 73 20 5c 66 42 74 72 75 65 5c 66 52 20 66 6f is \fBtrue\fR fo
7810: 72 20 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74 r client connect
7820: 69 6f 6e 73 5c 26 2e 0a 2e 50 50 0a 2e 53 53 20 ions\&...PP..SS
7830: 22 57 48 45 4e 20 41 52 45 20 43 4f 4d 4d 41 4e "WHEN ARE COMMAN
7840: 44 20 4c 49 4e 45 20 4f 50 54 49 4f 4e 53 20 4e D LINE OPTIONS N
7850: 45 45 44 45 44 3f 22 0a 49 6e 20 54 63 6c 54 4c EEDED?".In TclTL
7860: 53 20 31 5c 26 2e 38 20 61 6e 64 20 65 61 72 6c S 1\&.8 and earl
7870: 69 65 72 20 76 65 72 73 69 6f 6e 73 2c 20 63 65 ier versions, ce
7880: 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 rtificate valida
7890: 74 69 6f 6e 20 69 73 0a 5c 66 49 4e 4f 54 5c 66 tion is.\fINOT\f
78a0: 52 20 65 6e 61 62 6c 65 64 20 62 79 20 64 65 66 R enabled by def
78b0: 61 75 6c 74 5c 26 2e 20 54 68 69 73 20 6c 69 6d ault\&. This lim
78c0: 69 74 61 74 69 6f 6e 20 69 73 20 64 75 65 20 74 itation is due t
78d0: 6f 20 74 68 65 20 6c 61 63 6b 20 6f 66 20 61 20 o the lack of a
78e0: 63 6f 6d 6d 6f 6e 0a 63 72 6f 73 73 20 70 6c 61 common.cross pla
78f0: 74 66 6f 72 6d 20 64 61 74 61 62 61 73 65 20 6f tform database o
7900: 66 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 f Certificate Au
7910: 74 68 6f 72 69 74 79 20 28 43 41 29 20 70 72 6f thority (CA) pro
7920: 76 69 64 65 64 20 63 65 72 74 69 66 69 63 61 74 vided certificat
7930: 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 es to.validate a
7940: 67 61 69 6e 73 74 5c 26 2e 20 4d 61 6e 79 20 4c gainst\&. Many L
7950: 69 6e 75 78 20 73 79 73 74 65 6d 73 20 6e 61 74 inux systems nat
7960: 69 76 65 6c 79 20 73 75 70 70 6f 72 74 20 4f 70 ively support Op
7970: 65 6e 53 53 4c 20 61 6e 64 20 74 68 75 73 20 68 enSSL and thus h
7980: 61 76 65 0a 74 68 65 73 65 20 63 65 72 74 69 66 ave.these certif
7990: 69 63 61 74 65 73 20 69 6e 73 74 61 6c 6c 65 64 icates installed
79a0: 20 61 73 20 70 61 72 74 20 6f 66 20 74 68 65 20 as part of the
79b0: 4f 53 2c 20 62 75 74 20 4d 61 63 4f 53 20 61 6e OS, but MacOS an
79c0: 64 20 4d 53 20 57 69 6e 64 6f 77 73 20 64 6f 20 d MS Windows do
79d0: 6e 6f 74 5c 26 2e 0a 53 74 61 72 69 6e 67 20 69 not\&..Staring i
79e0: 6e 20 54 63 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 n TclTLS 2\&.0,
79f0: 74 68 65 20 64 65 66 61 75 6c 74 20 66 6f 72 20 the default for
7a00: 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f client connectio
7a10: 6e 73 20 68 61 73 20 62 65 65 6e 20 63 68 61 6e ns has been chan
7a20: 67 65 64 20 74 6f 0a 72 65 71 75 69 72 65 20 63 ged to.require c
7a30: 65 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 ertificate valid
7a40: 61 74 69 6f 6e 20 62 79 20 64 65 66 61 75 6c 74 ation by default
7a50: 5c 26 2e 20 49 6e 20 6f 72 64 65 72 20 74 6f 20 \&. In order to
7a60: 75 73 65 20 74 68 65 20 5c 66 42 2d 72 65 71 75 use the \fB-requ
7a70: 69 72 65 5c 66 52 0a 6f 70 74 69 6f 6e 2c 20 6f ire\fR.option, o
7a80: 6e 65 20 6f 66 20 74 68 65 20 66 6f 6c 6c 6f 77 ne of the follow
7a90: 69 6e 67 20 6d 75 73 74 20 62 65 20 74 72 75 65 ing must be true
7aa0: 3a 0a 2e 49 50 20 5c 28 62 75 0a 4f 6e 20 4c 69 :..IP \(bu.On Li
7ab0: 6e 75 78 20 61 6e 64 20 55 6e 69 78 20 73 79 73 nux and Unix sys
7ac0: 74 65 6d 73 20 77 69 74 68 20 4f 70 65 6e 53 53 tems with OpenSS
7ad0: 4c 20 61 6c 72 65 61 64 79 20 69 6e 73 74 61 6c L already instal
7ae0: 6c 65 64 20 6f 72 20 69 66 20 74 68 65 20 43 41 led or if the CA
7af0: 0a 63 65 72 74 69 66 69 63 61 74 65 73 20 61 72 .certificates ar
7b00: 65 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 50 e available in P
7b10: 45 4d 20 66 6f 72 6d 61 74 2c 20 61 6e 64 20 69 EM format, and i
7b20: 66 20 74 68 65 79 20 61 72 65 20 73 74 6f 72 65 f they are store
7b30: 64 20 69 6e 20 74 68 65 0a 73 74 61 6e 64 61 72 d in the.standar
7b40: 64 20 6c 6f 63 61 74 69 6f 6e 73 2c 20 6f 72 20 d locations, or
7b50: 69 66 20 74 68 65 20 5c 66 42 53 53 4c 5f 43 45 if the \fBSSL_CE
7b60: 52 54 5f 44 49 52 5c 66 52 20 6f 72 20 5c 66 42 RT_DIR\fR or \fB
7b70: 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 5c 66 52 SSL_CERT_FILE\fR
7b80: 0a 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 .environment var
7b90: 69 61 62 6c 65 73 20 61 72 65 20 73 65 74 2c 20 iables are set,
7ba0: 74 68 65 6e 20 5c 66 42 2d 63 61 64 69 72 5c 66 then \fB-cadir\f
7bb0: 52 2c 20 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c R, \fB-cadir\fR,
7bc0: 0a 61 6e 64 20 5c 66 42 2d 63 61 73 74 6f 72 65 .and \fB-castore
7bd0: 5c 66 52 20 61 72 65 6e 27 74 20 6e 65 65 64 65 \fR aren't neede
7be0: 64 5c 26 2e 0a 2e 49 50 20 5c 28 62 75 0a 49 66 d\&...IP \(bu.If
7bf0: 20 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f 74 20 OpenSSL is not
7c00: 69 6e 73 74 61 6c 6c 65 64 20 69 6e 20 74 68 65 installed in the
7c10: 20 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 69 6f default locatio
7c20: 6e 2c 20 6f 72 20 77 68 65 6e 20 75 73 69 6e 67 n, or when using
7c30: 20 4d 61 63 20 4f 53 0a 6f 72 20 4d 53 20 57 69 Mac OS.or MS Wi
7c40: 6e 64 6f 77 73 20 61 6e 64 20 4f 70 65 6e 53 53 ndows and OpenSS
7c50: 4c 20 69 73 20 69 6e 73 74 61 6c 6c 65 64 2c 20 L is installed,
7c60: 74 68 65 20 5c 66 42 53 53 4c 5f 43 45 52 54 5f the \fBSSL_CERT_
7c70: 44 49 52 5c 66 52 20 61 6e 64 2f 6f 72 0a 5c 66 DIR\fR and/or.\f
7c80: 42 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 5c 66 BSSL_CERT_FILE\f
7c90: 52 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 R environment va
7ca0: 72 69 61 62 6c 65 73 20 6f 72 20 74 68 65 20 6f riables or the o
7cb0: 6e 65 20 6f 66 20 74 68 65 20 5c 66 42 2d 63 61 ne of the \fB-ca
7cc0: 64 69 72 5c 66 52 2c 0a 5c 66 42 2d 63 61 64 69 dir\fR,.\fB-cadi
7cd0: 72 5c 66 52 2c 20 6f 72 20 5c 66 42 2d 63 61 73 r\fR, or \fB-cas
7ce0: 74 6f 72 65 5c 66 52 20 6f 70 74 69 6f 6e 73 20 tore\fR options
7cf0: 6d 75 73 74 20 62 65 20 64 65 66 69 6e 65 64 5c must be defined\
7d00: 26 2e 0a 2e 49 50 20 5c 28 62 75 0a 4f 6e 20 4d &...IP \(bu.On M
7d10: 53 20 57 69 6e 64 6f 77 73 2c 20 73 74 61 72 74 S Windows, start
7d20: 69 6e 67 20 69 6e 20 4f 70 65 6e 53 53 4c 20 33 ing in OpenSSL 3
7d30: 5c 26 2e 32 2c 20 69 74 20 69 73 20 6e 6f 77 20 \&.2, it is now
7d40: 70 6f 73 73 69 62 6c 65 20 74 6f 20 61 63 63 65 possible to acce
7d50: 73 73 20 74 68 65 0a 62 75 69 6c 74 2d 69 6e 20 ss the.built-in
7d60: 57 69 6e 64 6f 77 73 20 43 65 72 74 69 66 69 63 Windows Certific
7d70: 61 74 65 20 53 74 6f 72 65 20 66 72 6f 6d 20 4f ate Store from O
7d80: 70 65 6e 53 53 4c 5c 26 2e 20 54 68 69 73 20 63 penSSL\&. This c
7d90: 61 6e 20 62 65 20 75 74 69 6c 69 7a 65 64 20 62 an be utilized b
7da0: 79 0a 73 65 74 74 69 6e 67 20 74 68 65 20 5c 66 y.setting the \f
7db0: 42 2d 63 61 73 74 6f 72 65 5c 66 52 20 6f 70 74 B-castore\fR opt
7dc0: 69 6f 6e 20 74 6f 20 22 5c 66 42 6f 72 67 5c 26 ion to "\fBorg\&
7dd0: 2e 6f 70 65 6e 73 73 6c 5c 26 2e 77 69 6e 73 74 .openssl\&.winst
7de0: 6f 72 65 3a 2f 2f 5c 66 52 22 5c 26 2e 0a 49 6e ore://\fR"\&..In
7df0: 20 54 63 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 74 TclTLS 2\&.0, t
7e00: 68 69 73 20 69 73 20 74 68 65 20 64 65 66 61 75 his is the defau
7e10: 6c 74 20 76 61 6c 75 65 20 69 66 20 5c 66 42 2d lt value if \fB-
7e20: 63 61 64 69 72 5c 66 52 2c 0a 5c 66 42 2d 63 61 cadir\fR,.\fB-ca
7e30: 64 69 72 5c 66 52 2c 20 61 6e 64 20 5c 66 42 2d dir\fR, and \fB-
7e40: 63 61 73 74 6f 72 65 5c 66 52 20 61 72 65 20 6e castore\fR are n
7e50: 6f 74 20 73 70 65 63 69 66 69 65 64 5c 26 2e 0a ot specified\&..
7e60: 2e 49 50 20 5c 28 62 75 0a 49 66 20 4f 70 65 6e .IP \(bu.If Open
7e70: 53 53 4c 20 69 73 20 6e 6f 74 20 69 6e 73 74 61 SSL is not insta
7e80: 6c 6c 65 64 20 6f 72 20 74 68 65 20 43 41 20 63 lled or the CA c
7e90: 65 72 74 69 66 69 63 61 74 65 73 20 61 72 65 20 ertificates are
7ea0: 6e 6f 74 20 61 76 61 69 6c 61 62 6c 65 20 69 6e not available in
7eb0: 20 50 45 4d 0a 66 6f 72 6d 61 74 2c 20 74 68 65 PEM.format, the
7ec0: 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 73 CA certificates
7ed0: 20 6d 75 73 74 20 62 65 20 64 6f 77 6e 6c 6f 61 must be downloa
7ee0: 64 65 64 20 61 6e 64 20 69 6e 73 74 61 6c 6c 65 ded and installe
7ef0: 64 20 77 69 74 68 20 74 68 65 20 75 73 65 72 0a d with the user.
7f00: 73 6f 66 74 77 61 72 65 5c 26 2e 20 54 68 65 20 software\&. The
7f10: 43 55 52 4c 20 74 65 61 6d 20 6d 61 6b 65 73 20 CURL team makes
7f20: 74 68 65 6d 20 61 76 61 69 6c 61 62 6c 65 20 61 them available a
7f30: 74 0a 5c 66 49 43 41 20 63 65 72 74 69 66 69 63 t.\fICA certific
7f40: 61 74 65 73 20 65 78 74 72 61 63 74 65 64 0a 66 ates extracted.f
7f50: 72 6f 6d 20 4d 6f 7a 69 6c 6c 61 5c 66 52 20 5b rom Mozilla\fR [
7f60: 68 74 74 70 73 3a 2f 2f 63 75 72 6c 5c 26 2e 73 https://curl\&.s
7f70: 65 2f 64 6f 63 73 2f 63 61 65 78 74 72 61 63 74 e/docs/caextract
7f80: 5c 26 2e 68 74 6d 6c 5d 20 69 6e 20 74 68 65 20 \&.html] in the
7f90: 22 5c 66 49 63 61 63 65 72 74 5c 26 2e 70 65 6d "\fIcacert\&.pem
7fa0: 5c 66 52 22 20 66 69 6c 65 5c 26 2e 20 59 6f 75 \fR" file\&. You
7fb0: 20 6d 75 73 74 20 74 68 65 6e 20 65 69 74 68 65 must then eithe
7fc0: 72 20 73 65 74 20 74 68 65 0a 5c 66 42 53 53 4c r set the.\fBSSL
7fd0: 5f 43 45 52 54 5f 44 49 52 5c 66 52 20 61 6e 64 _CERT_DIR\fR and
7fe0: 2f 6f 72 20 5c 66 42 53 53 4c 5f 43 45 52 54 5f /or \fBSSL_CERT_
7ff0: 46 49 4c 45 5c 66 52 20 65 6e 76 69 72 6f 6e 6d FILE\fR environm
8000: 65 6e 74 20 76 61 72 69 61 62 6c 65 73 20 6f 72 ent variables or
8010: 20 74 68 65 0a 5c 66 42 2d 63 61 64 69 72 5c 66 the.\fB-cadir\f
8020: 52 20 6f 72 20 5c 66 42 2d 63 61 66 69 6c 65 5c R or \fB-cafile\
8030: 66 52 20 6f 70 74 69 6f 6e 73 20 74 6f 20 74 68 fR options to th
8040: 65 20 43 41 20 63 65 72 74 20 66 69 6c 65 27 73 e CA cert file's
8050: 20 69 6e 73 74 61 6c 6c 0a 6c 6f 63 61 74 69 6f install.locatio
8060: 6e 5c 26 2e 20 49 74 20 69 73 20 79 6f 75 72 20 n\&. It is your
8070: 72 65 73 70 6f 6e 73 69 62 69 6c 69 74 79 20 74 responsibility t
8080: 6f 20 6b 65 65 70 20 74 68 69 73 20 66 69 6c 65 o keep this file
8090: 20 75 70 20 74 6f 20 64 61 74 65 5c 26 2e 0a 2e up to date\&...
80a0: 50 50 0a 2e 53 48 20 22 43 41 4c 4c 42 41 43 4b PP..SH "CALLBACK
80b0: 20 4f 50 54 49 4f 4e 53 22 0a 41 73 20 70 72 65 OPTIONS".As pre
80c0: 76 69 6f 75 73 6c 79 20 64 65 73 63 72 69 62 65 viously describe
80d0: 64 2c 20 65 61 63 68 20 63 68 61 6e 6e 65 6c 20 d, each channel
80e0: 63 61 6e 20 62 65 20 67 69 76 65 6e 20 74 68 65 can be given the
80f0: 69 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 73 ir own callbacks
8100: 0a 74 6f 20 68 61 6e 64 6c 65 20 69 6e 74 65 72 .to handle inter
8110: 6d 65 64 69 61 74 65 20 70 72 6f 63 65 73 73 69 mediate processi
8120: 6e 67 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 ng by the OpenSS
8130: 4c 20 6c 69 62 72 61 72 79 2c 20 75 73 69 6e 67 L library, using
8140: 20 74 68 65 0a 5c 66 42 2d 63 6f 6d 6d 61 6e 64 the.\fB-command
8150: 5c 66 52 2c 20 5c 66 42 2d 70 61 73 73 77 6f 72 \fR, \fB-passwor
8160: 64 5c 66 52 2c 20 61 6e 64 20 5c 66 42 2d 76 61 d\fR, and \fB-va
8170: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 lidate_command\f
8180: 52 20 6f 70 74 69 6f 6e 73 0a 70 61 73 73 65 64 R options.passed
8190: 20 74 6f 20 65 69 74 68 65 72 20 6f 66 20 5c 66 to either of \f
81a0: 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 20 Btls::socket\fR
81b0: 6f 72 20 5c 66 42 74 6c 73 3a 3a 69 6d 70 6f 72 or \fBtls::impor
81c0: 74 5c 66 52 5c 26 2e 0a 55 6e 6c 69 6b 65 20 70 t\fR\&..Unlike p
81d0: 72 65 76 69 6f 75 73 20 76 65 72 73 69 6f 6e 73 revious versions
81e0: 20 6f 66 20 54 63 6c 54 4c 53 2c 20 6f 6e 6c 79 of TclTLS, only
81f0: 20 69 66 20 74 68 65 20 63 61 6c 6c 62 61 63 6b if the callback
8200: 20 67 65 6e 65 72 61 74 65 73 20 61 6e 20 65 72 generates an er
8210: 72 6f 72 2c 0a 77 69 6c 6c 20 74 68 65 20 5c 66 ror,.will the \f
8220: 42 62 67 65 72 72 6f 72 5c 66 52 20 63 6f 6d 6d Bbgerror\fR comm
8230: 61 6e 64 20 62 65 20 69 6e 76 6f 6b 65 64 20 77 and be invoked w
8240: 69 74 68 20 74 68 65 20 65 72 72 6f 72 20 69 6e ith the error in
8250: 66 6f 72 6d 61 74 69 6f 6e 5c 26 2e 0a 2e 53 53 formation\&...SS
8260: 20 22 56 41 4c 55 45 53 20 46 4f 52 20 43 4f 4d "VALUES FOR COM
8270: 4d 41 4e 44 20 43 41 4c 4c 42 41 43 4b 22 0a 54 MAND CALLBACK".T
8280: 68 65 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 he callback for
8290: 74 68 65 20 5c 66 42 2d 63 6f 6d 6d 61 6e 64 5c the \fB-command\
82a0: 66 52 20 6f 70 74 69 6f 6e 20 69 73 20 69 6e 76 fR option is inv
82b0: 6f 6b 65 64 20 61 74 20 73 65 76 65 72 61 6c 20 oked at several
82c0: 70 6f 69 6e 74 73 20 64 75 72 69 6e 67 20 74 68 points during th
82d0: 65 0a 4f 70 65 6e 53 53 4c 20 68 61 6e 64 73 68 e.OpenSSL handsh
82e0: 61 6b 65 20 61 6e 64 20 64 75 72 69 6e 67 20 72 ake and during r
82f0: 6f 75 74 69 6e 65 20 6f 70 65 72 61 74 69 6f 6e outine operation
8300: 73 5c 26 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 s\&. See below f
8310: 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 0a or the possible.
8320: 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65 64 arguments passed
8330: 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 63 6b to the callback
8340: 20 73 63 72 69 70 74 5c 26 2e 20 56 61 6c 75 65 script\&. Value
8350: 73 20 72 65 74 75 72 6e 65 64 20 66 72 6f 6d 20 s returned from
8360: 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 61 72 65 the callback are
8370: 0a 69 67 6e 6f 72 65 64 5c 26 2e 0a 2e 54 50 0a .ignored\&...TP.
8380: 5c 66 42 65 72 72 6f 72 5c 66 52 20 5c 66 49 63 \fBerror\fR \fIc
8390: 68 61 6e 6e 65 6c 49 64 20 6d 65 73 73 61 67 65 hannelId message
83a0: 5c 66 52 0a 54 68 69 73 20 66 6f 72 6d 20 6f 66 \fR.This form of
83b0: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 callback is inv
83c0: 6f 6b 65 64 20 77 68 65 6e 65 76 65 72 20 61 6e oked whenever an
83d0: 20 65 72 72 6f 72 20 6f 63 63 75 72 73 20 64 75 error occurs du
83e0: 72 69 6e 67 20 74 68 65 20 69 6e 69 74 69 61 6c ring the initial
83f0: 0a 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 61 6e .connection, han
8400: 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f 4f 20 6f dshake, or I/O o
8410: 70 65 72 61 74 69 6f 6e 73 5c 26 2e 20 54 68 65 perations\&. The
8420: 20 5c 66 49 6d 65 73 73 61 67 65 5c 66 52 20 61 \fImessage\fR a
8430: 72 67 75 6d 65 6e 74 20 63 61 6e 20 62 65 0a 66 rgument can be.f
8440: 72 6f 6d 20 74 68 65 20 54 63 6c 5f 45 72 72 6e rom the Tcl_Errn
8450: 6f 4d 73 67 2c 20 4f 70 65 6e 53 53 4c 20 66 75 oMsg, OpenSSL fu
8460: 6e 63 74 69 6f 6e 20 5c 66 42 45 52 52 5f 72 65 nction \fBERR_re
8470: 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e ason_error_strin
8480: 67 28 29 5c 66 52 2c 0a 6f 72 20 61 20 63 75 73 g()\fR,.or a cus
8490: 74 6f 6d 20 6d 65 73 73 61 67 65 5c 26 2e 20 54 tom message\&. T
84a0: 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 his callback is
84b0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
84c0: 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 69 \&.8\&...TP.\fBi
84d0: 6e 66 6f 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 nfo\fR \fIchanne
84e0: 6c 49 64 20 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20 lId major minor
84f0: 6d 65 73 73 61 67 65 20 74 79 70 65 5c 66 52 0a message type\fR.
8500: 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c This form of cal
8510: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 lback is invoked
8520: 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 by the OpenSSL
8530: 66 75 6e 63 74 69 6f 6e 0a 5c 66 42 53 53 4c 5f function.\fBSSL_
8540: 73 65 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 set_info_callbac
8550: 6b 28 29 5c 66 52 20 64 75 72 69 6e 67 20 74 68 k()\fR during th
8560: 65 20 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 e initial connec
8570: 74 69 6f 6e 20 61 6e 64 20 68 61 6e 64 73 68 61 tion and handsha
8580: 6b 65 0a 6f 70 65 72 61 74 69 6f 6e 73 5c 26 2e ke.operations\&.
8590: 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61 The arguments a
85a0: 72 65 3a 0a 2e 52 53 0a 2e 54 50 0a 5c 66 49 6d re:..RS..TP.\fIm
85b0: 61 6a 6f 72 5c 66 52 0a 4d 61 6a 6f 72 20 63 61 ajor\fR.Major ca
85c0: 74 65 67 6f 72 79 20 66 6f 72 20 65 72 72 6f 72 tegory for error
85d0: 5c 26 2e 20 56 61 6c 69 64 20 65 6e 75 6d 73 20 \&. Valid enums
85e0: 61 72 65 3a 20 5c 66 42 68 61 6e 64 73 68 61 6b are: \fBhandshak
85f0: 65 5c 66 52 2c 20 5c 66 42 61 6c 65 72 74 5c 66 e\fR, \fBalert\f
8600: 52 2c 0a 5c 66 42 63 6f 6e 6e 65 63 74 5c 66 52 R,.\fBconnect\fR
8610: 2c 20 5c 66 42 61 63 63 65 70 74 5c 66 52 5c 26 , \fBaccept\fR\&
8620: 2e 0a 2e 54 50 0a 5c 66 49 6d 69 6e 6f 72 5c 66 ...TP.\fIminor\f
8630: 52 0a 4d 69 6e 6f 72 20 63 61 74 65 67 6f 72 79 R.Minor category
8640: 20 66 6f 72 20 65 72 72 6f 72 5c 26 2e 20 56 61 for error\&. Va
8650: 6c 69 64 20 65 6e 75 6d 73 20 61 72 65 3a 20 5c lid enums are: \
8660: 66 42 73 74 61 72 74 5c 66 52 2c 20 5c 66 42 64 fBstart\fR, \fBd
8670: 6f 6e 65 5c 66 52 2c 20 5c 66 42 72 65 61 64 5c one\fR, \fBread\
8680: 66 52 2c 0a 5c 66 42 77 72 69 74 65 5c 66 52 2c fR,.\fBwrite\fR,
8690: 20 5c 66 42 6c 6f 6f 70 5c 66 52 2c 20 5c 66 42 \fBloop\fR, \fB
86a0: 65 78 69 74 5c 66 52 5c 26 2e 0a 2e 54 50 0a 5c exit\fR\&...TP.\
86b0: 66 49 6d 65 73 73 61 67 65 5c 66 52 0a 44 65 73 fImessage\fR.Des
86c0: 63 72 69 70 74 69 76 65 20 6d 65 73 73 61 67 65 criptive message
86d0: 20 73 74 72 69 6e 67 20 77 68 69 63 68 20 6d 61 string which ma
86e0: 79 20 62 65 20 67 65 6e 65 72 61 74 65 64 20 65 y be generated e
86f0: 69 74 68 65 72 20 62 79 0a 5c 66 42 53 53 4c 5f ither by.\fBSSL_
8700: 73 74 61 74 65 5f 73 74 72 69 6e 67 5f 6c 6f 6e state_string_lon
8710: 67 28 29 5c 66 52 20 6f 72 20 5c 66 42 53 53 4c g()\fR or \fBSSL
8720: 5f 61 6c 65 72 74 5f 64 65 73 63 5f 73 74 72 69 _alert_desc_stri
8730: 6e 67 5f 6c 6f 6e 67 28 29 5c 66 52 2c 0a 64 65 ng_long()\fR,.de
8740: 70 65 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20 63 pending on the c
8750: 6f 6e 74 65 78 74 5c 26 2e 0a 2e 54 50 0a 5c 66 ontext\&...TP.\f
8760: 49 74 79 70 65 5c 66 52 0a 46 6f 72 20 61 6c 65 Itype\fR.For ale
8770: 72 74 73 2c 20 74 68 65 20 70 6f 73 73 69 62 6c rts, the possibl
8780: 65 20 76 61 6c 75 65 73 20 61 72 65 3a 20 5c 66 e values are: \f
8790: 42 77 61 72 6e 69 6e 67 5c 66 52 2c 0a 5c 66 42 Bwarning\fR,.\fB
87a0: 66 61 74 61 6c 5c 66 52 2c 20 61 6e 64 20 5c 66 fatal\fR, and \f
87b0: 42 75 6e 6b 6e 6f 77 6e 5c 66 52 5c 26 2e 20 46 Bunknown\fR\&. F
87c0: 6f 72 20 6f 74 68 65 72 73 2c 20 5c 66 42 69 6e or others, \fBin
87d0: 66 6f 5c 66 52 20 69 73 20 75 73 65 64 5c 26 2e fo\fR is used\&.
87e0: 0a 54 68 69 73 20 61 72 67 75 6d 65 6e 74 20 69 .This argument i
87f0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
8800: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 52 45 0a 2e 54 1\&.8\&...RE..T
8810: 50 0a 5c 66 42 6d 65 73 73 61 67 65 5c 66 52 20 P.\fBmessage\fR
8820: 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 64 69 72 \fIchannelId dir
8830: 65 63 74 69 6f 6e 20 76 65 72 73 69 6f 6e 20 63 ection version c
8840: 6f 6e 74 65 6e 74 5f 74 79 70 65 20 6d 65 73 73 ontent_type mess
8850: 61 67 65 5c 66 52 0a 54 68 69 73 20 66 6f 72 6d age\fR.This form
8860: 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 of callback is
8870: 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f invoked by the O
8880: 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a penSSL function.
8890: 5c 66 42 53 53 4c 5f 73 65 74 5f 6d 73 67 5f 63 \fBSSL_set_msg_c
88a0: 61 6c 6c 62 61 63 6b 28 29 5c 66 52 20 77 68 65 allback()\fR whe
88b0: 6e 65 76 65 72 20 61 20 6d 65 73 73 61 67 65 20 never a message
88c0: 69 73 20 73 65 6e 74 20 6f 72 20 72 65 63 65 69 is sent or recei
88d0: 76 65 64 20 64 75 72 69 6e 67 20 74 68 65 0a 69 ved during the.i
88e0: 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f nitial connectio
88f0: 6e 2c 20 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72 n, handshake, or
8900: 20 49 2f 4f 20 6f 70 65 72 61 74 69 6f 6e 73 5c I/O operations\
8910: 26 2e 20 49 74 20 69 73 20 6f 6e 6c 79 20 61 76 &. It is only av
8920: 61 69 6c 61 62 6c 65 20 77 68 65 6e 0a 4f 70 65 ailable when.Ope
8930: 6e 53 53 4c 20 69 73 20 63 6f 6d 70 6c 69 65 64 nSSL is complied
8940: 20 77 69 74 68 20 74 68 65 20 5c 66 42 65 6e 61 with the \fBena
8950: 62 6c 65 2d 73 73 6c 2d 74 72 61 63 65 5c 66 52 ble-ssl-trace\fR
8960: 20 6f 70 74 69 6f 6e 5c 26 2e 20 54 68 69 73 20 option\&. This
8970: 63 61 6c 6c 62 61 63 6b 20 69 73 0a 6e 65 77 20 callback is.new
8980: 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 for TclTLS 1\&.8
8990: 5c 26 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74 \&. The argument
89a0: 73 20 61 72 65 3a 0a 2e 52 53 0a 2e 54 50 0a 5c s are:..RS..TP.\
89b0: 66 49 64 69 72 65 63 74 69 6f 6e 5c 66 52 0a 44 fIdirection\fR.D
89c0: 69 72 65 63 74 69 6f 6e 20 69 73 20 65 69 74 68 irection is eith
89d0: 65 72 20 5c 66 42 53 65 6e 74 5c 66 52 20 6f 72 er \fBSent\fR or
89e0: 20 5c 66 42 52 65 63 65 69 76 65 64 5c 66 52 5c \fBReceived\fR\
89f0: 26 2e 0a 2e 54 50 0a 5c 66 49 76 65 72 73 69 6f &...TP.\fIversio
8a00: 6e 5c 66 52 0a 56 65 72 73 69 6f 6e 20 69 73 20 n\fR.Version is
8a10: 74 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 the protocol ver
8a20: 73 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 49 63 sion\&...TP.\fIc
8a30: 6f 6e 74 65 6e 74 5f 74 79 70 65 5c 66 52 0a 43 ontent_type\fR.C
8a40: 6f 6e 74 65 6e 74 20 74 79 70 65 20 69 73 20 74 ontent type is t
8a50: 68 65 20 6d 65 73 73 61 67 65 20 63 6f 6e 74 65 he message conte
8a60: 6e 74 20 74 79 70 65 5c 26 2e 0a 2e 54 50 0a 5c nt type\&...TP.\
8a70: 66 49 6d 65 73 73 61 67 65 5c 66 52 0a 4d 65 73 fImessage\fR.Mes
8a80: 73 61 67 65 20 69 73 20 6d 6f 72 65 20 69 6e 66 sage is more inf
8a90: 6f 20 66 72 6f 6d 20 74 68 65 20 5c 66 42 53 53 o from the \fBSS
8aa0: 4c 5f 74 72 61 63 65 5c 66 52 20 41 50 49 5c 26 L_trace\fR API\&
8ab0: 2e 0a 2e 52 45 0a 2e 54 50 0a 5c 66 42 73 65 73 ...RE..TP.\fBses
8ac0: 73 69 6f 6e 5c 66 52 20 5c 66 49 63 68 61 6e 6e sion\fR \fIchann
8ad0: 65 6c 49 64 20 73 65 73 73 69 6f 6e 5f 69 64 20 elId session_id
8ae0: 73 65 73 73 69 6f 6e 5f 74 69 63 6b 65 74 20 6c session_ticket l
8af0: 69 66 65 74 69 6d 65 5c 66 52 0a 54 68 69 73 20 ifetime\fR.This
8b00: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b form of callback
8b10: 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 is invoked by t
8b20: 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 he OpenSSL funct
8b30: 69 6f 6e 0a 5c 66 42 53 53 4c 5f 43 54 58 5f 73 ion.\fBSSL_CTX_s
8b40: 65 73 73 5f 73 65 74 5f 6e 65 77 5f 63 62 28 29 ess_set_new_cb()
8b50: 5c 66 52 20 77 68 65 6e 65 76 65 72 20 61 20 6e \fR whenever a n
8b60: 65 77 20 73 65 73 73 69 6f 6e 20 69 64 20 69 73 ew session id is
8b70: 20 73 65 6e 74 20 62 79 20 74 68 65 0a 73 65 72 sent by the.ser
8b80: 76 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 69 ver during the i
8b90: 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f nitial connectio
8ba0: 6e 20 61 6e 64 20 68 61 6e 64 73 68 61 6b 65 20 n and handshake
8bb0: 61 6e 64 20 61 6c 73 6f 20 64 75 72 69 6e 67 20 and also during
8bc0: 74 68 65 20 73 65 73 73 69 6f 6e 0a 69 66 20 74 the session.if t
8bd0: 68 65 20 5c 66 42 2d 70 6f 73 74 5f 68 61 6e 64 he \fB-post_hand
8be0: 73 68 61 6b 65 5c 66 52 20 6f 70 74 69 6f 6e 20 shake\fR option
8bf0: 69 73 20 73 65 74 20 74 6f 20 74 72 75 65 5c 26 is set to true\&
8c00: 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 . This callback
8c10: 69 73 20 6e 65 77 20 66 6f 72 0a 54 63 6c 54 4c is new for.TclTL
8c20: 53 20 31 5c 26 2e 38 5c 26 2e 20 54 68 65 20 61 S 1\&.8\&. The a
8c30: 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 0a 2e 52 rguments are:..R
8c40: 53 0a 2e 54 50 0a 5c 66 49 73 65 73 73 69 6f 6e S..TP.\fIsession
8c50: 5f 69 64 5c 66 52 0a 53 65 73 73 69 6f 6e 20 49 _id\fR.Session I
8c60: 64 20 69 73 20 74 68 65 20 63 75 72 72 65 6e 74 d is the current
8c70: 20 73 65 73 73 69 6f 6e 20 69 64 65 6e 74 69 66 session identif
8c80: 69 65 72 0a 2e 54 50 0a 5c 66 49 73 65 73 73 69 ier..TP.\fIsessi
8c90: 6f 6e 5f 74 69 63 6b 65 74 5c 66 52 0a 54 69 63 on_ticket\fR.Tic
8ca0: 6b 65 74 20 69 73 20 74 68 65 20 73 65 73 73 69 ket is the sessi
8cb0: 6f 6e 20 74 69 63 6b 65 74 20 69 6e 66 6f 0a 2e on ticket info..
8cc0: 54 50 0a 5c 66 49 6c 69 66 65 74 69 6d 65 5c 66 TP.\fIlifetime\f
8cd0: 52 0a 4c 69 66 65 74 69 6d 65 20 69 73 20 74 68 R.Lifetime is th
8ce0: 65 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d e ticket lifetim
8cf0: 65 20 69 6e 20 73 65 63 6f 6e 64 73 5c 26 2e 0a e in seconds\&..
8d00: 2e 52 45 0a 2e 54 50 0a 5c 66 42 76 65 72 69 66 .RE..TP.\fBverif
8d10: 79 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 y\fR \fIchannelI
8d20: 64 20 64 65 70 74 68 20 63 65 72 74 20 73 74 61 d depth cert sta
8d30: 74 75 73 20 65 72 72 6f 72 5c 66 52 0a 54 68 69 tus error\fR.Thi
8d40: 73 20 63 61 6c 6c 62 61 63 6b 20 77 61 73 20 6d s callback was m
8d50: 6f 76 65 64 20 74 6f 20 5c 66 42 2d 76 61 6c 69 oved to \fB-vali
8d60: 64 61 74 65 63 6f 6d 6d 61 6e 64 5c 66 52 20 69 datecommand\fR i
8d70: 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 n TclTLS 1\&.8\&
8d80: 2e 0a 2e 50 50 0a 2e 53 53 20 22 56 41 4c 55 45 ...PP..SS "VALUE
8d90: 53 20 46 4f 52 20 50 41 53 53 57 4f 52 44 20 43 S FOR PASSWORD C
8da0: 41 4c 4c 42 41 43 4b 22 0a 54 68 65 20 63 61 6c ALLBACK".The cal
8db0: 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20 5c 66 lback for the \f
8dc0: 42 2d 70 61 73 73 77 6f 72 64 5c 66 52 20 6f 70 B-password\fR op
8dd0: 74 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20 tion is invoked
8de0: 62 79 20 54 63 6c 54 4c 53 20 77 68 65 6e 65 76 by TclTLS whenev
8df0: 65 72 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73 er OpenSSL needs
8e00: 0a 74 6f 20 6f 62 74 61 69 6e 20 61 20 70 61 73 .to obtain a pas
8e10: 73 77 6f 72 64 5c 26 2e 20 53 65 65 20 62 65 6c sword\&. See bel
8e20: 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69 ow for the possi
8e30: 62 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70 61 ble arguments pa
8e40: 73 73 65 64 20 74 6f 20 74 68 65 0a 63 61 6c 6c ssed to the.call
8e50: 62 61 63 6b 20 73 63 72 69 70 74 5c 26 2e 20 54 back script\&. T
8e60: 68 65 20 75 73 65 72 20 70 72 6f 76 69 64 65 64 he user provided
8e70: 20 70 61 73 73 77 6f 72 64 20 69 73 20 65 78 70 password is exp
8e80: 65 63 74 65 64 20 74 6f 20 62 65 20 72 65 74 75 ected to be retu
8e90: 72 6e 65 64 20 62 79 20 74 68 65 0a 63 61 6c 6c rned by the.call
8ea0: 62 61 63 6b 5c 26 2e 0a 2e 54 50 0a 5c 66 42 70 back\&...TP.\fBp
8eb0: 61 73 73 77 6f 72 64 5c 66 52 20 5c 66 49 72 77 assword\fR \fIrw
8ec0: 66 6c 61 67 20 73 69 7a 65 5c 66 52 0a 49 6e 76 flag size\fR.Inv
8ed0: 6f 6b 65 64 20 77 68 65 6e 20 6c 6f 61 64 69 6e oked when loadin
8ee0: 67 20 6f 72 20 73 74 6f 72 69 6e 67 20 61 6e 20 g or storing an
8ef0: 65 6e 63 72 79 70 74 65 64 20 50 45 4d 20 63 65 encrypted PEM ce
8f00: 72 74 69 66 69 63 61 74 65 5c 26 2e 20 54 68 65 rtificate\&. The
8f10: 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 0a arguments are:.
8f20: 2e 52 53 0a 2e 54 50 0a 5c 66 49 72 77 66 6c 61 .RS..TP.\fIrwfla
8f30: 67 5c 66 52 0a 54 68 65 20 72 65 61 64 2f 77 72 g\fR.The read/wr
8f40: 69 74 65 20 66 6c 61 67 20 69 73 20 30 20 66 6f ite flag is 0 fo
8f50: 72 20 72 65 61 64 69 6e 67 2f 64 65 63 72 79 70 r reading/decryp
8f60: 74 69 6f 6e 20 6f 72 20 31 20 66 6f 72 20 77 72 tion or 1 for wr
8f70: 69 74 69 6e 67 2f 65 6e 63 72 79 70 74 69 6f 6e iting/encryption
8f80: 5c 26 2e 0a 54 68 65 20 6c 61 74 74 65 72 20 63 \&..The latter c
8f90: 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 64 65 an be used to de
8fa0: 74 65 72 6d 69 6e 65 20 77 68 65 6e 20 74 6f 20 termine when to
8fb0: 70 72 6f 6d 70 74 20 74 68 65 20 75 73 65 72 20 prompt the user
8fc0: 74 6f 20 63 6f 6e 66 69 72 6d 5c 26 2e 0a 54 68 to confirm\&..Th
8fd0: 69 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e is argument is n
8fe0: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c ew for TclTLS 1\
8ff0: 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 49 73 69 &.8\&...TP.\fIsi
9000: 7a 65 5c 66 52 0a 54 68 65 20 73 69 7a 65 20 69 ze\fR.The size i
9010: 73 20 74 68 65 20 6d 61 78 69 6d 75 6d 20 6c 65 s the maximum le
9020: 6e 67 74 68 20 6f 66 20 74 68 65 20 70 61 73 73 ngth of the pass
9030: 77 6f 72 64 20 69 6e 20 62 79 74 65 73 5c 26 2e word in bytes\&.
9040: 0a 54 68 69 73 20 61 72 67 75 6d 65 6e 74 20 69 .This argument i
9050: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
9060: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 52 45 0a 2e 50 1\&.8\&...RE..P
9070: 50 0a 2e 53 53 20 22 56 41 4c 55 45 53 20 46 4f P..SS "VALUES FO
9080: 52 20 56 41 4c 49 44 41 54 45 20 43 4f 4d 4d 41 R VALIDATE COMMA
9090: 4e 44 20 43 41 4c 4c 42 41 43 4b 22 0a 54 68 65 ND CALLBACK".The
90a0: 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 callback for th
90b0: 65 20 5c 66 42 2d 76 61 6c 69 64 61 74 65 63 6f e \fB-validateco
90c0: 6d 6d 61 6e 64 5c 66 52 20 6f 70 74 69 6f 6e 20 mmand\fR option
90d0: 69 73 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e is invoked durin
90e0: 67 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 0a g the handshake.
90f0: 70 72 6f 63 65 73 73 20 69 6e 20 6f 72 64 65 72 process in order
9100: 20 66 6f 72 20 74 68 65 20 61 70 70 6c 69 63 61 for the applica
9110: 74 69 6f 6e 20 74 6f 20 76 61 6c 69 64 61 74 65 tion to validate
9120: 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 76 61 the provided va
9130: 6c 75 65 28 73 29 5c 26 2e 20 53 65 65 0a 62 65 lue(s)\&. See.be
9140: 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 low for the poss
9150: 69 62 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70 ible arguments p
9160: 61 73 73 65 64 20 74 6f 20 74 68 65 20 63 61 6c assed to the cal
9170: 6c 62 61 63 6b 20 73 63 72 69 70 74 5c 26 2e 20 lback script\&.
9180: 49 66 20 6e 6f 74 0a 73 70 65 63 69 66 69 65 64 If not.specified
9190: 2c 20 4f 70 65 6e 53 53 4c 20 77 69 6c 6c 20 61 , OpenSSL will a
91a0: 63 63 65 70 74 20 61 6c 6c 20 76 61 6c 69 64 20 ccept all valid
91b0: 63 65 72 74 69 66 69 63 61 74 65 73 20 61 6e 64 certificates and
91c0: 20 65 78 74 65 6e 73 69 6f 6e 73 5c 26 2e 20 54 extensions\&. T
91d0: 6f 20 72 65 6a 65 63 74 0a 74 68 65 20 76 61 6c o reject.the val
91e0: 75 65 20 61 6e 64 20 61 62 6f 72 74 20 74 68 65 ue and abort the
91f0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 74 68 65 connection, the
9200: 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 callback should
9210: 20 72 65 74 75 72 6e 20 30 5c 26 2e 20 54 6f 20 return 0\&. To
9220: 61 63 63 65 70 74 20 74 68 65 0a 76 61 6c 75 65 accept the.value
9230: 20 61 6e 64 20 63 6f 6e 74 69 6e 75 65 20 74 68 and continue th
9240: 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 e connection, it
9250: 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 31 should return 1
9260: 5c 26 2e 20 54 6f 20 72 65 6a 65 63 74 20 74 68 \&. To reject th
9270: 65 20 76 61 6c 75 65 2c 20 62 75 74 0a 63 6f 6e e value, but.con
9280: 74 69 6e 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 tinue the connec
9290: 74 69 6f 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 tion, it should
92a0: 72 65 74 75 72 6e 20 32 5c 26 2e 20 54 68 69 73 return 2\&. This
92b0: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 callback is new
92c0: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e for TclTLS 1\&.
92d0: 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 61 6c 70 6e 8\&...TP.\fBalpn
92e0: 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 \fR \fIchannelId
92f0: 20 70 72 6f 74 6f 63 6f 6c 20 6d 61 74 63 68 5c protocol match\
9300: 66 52 0a 46 6f 72 20 73 65 72 76 65 72 73 2c 20 fR.For servers,
9310: 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c this form of cal
9320: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 lback is invoked
9330: 20 77 68 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 when the client
9340: 20 41 4c 50 4e 20 65 78 74 65 6e 73 69 6f 6e 20 ALPN extension
9350: 69 73 0a 72 65 63 65 69 76 65 64 5c 26 2e 20 49 is.received\&. I
9360: 66 20 5c 66 49 6d 61 74 63 68 5c 66 52 20 69 73 f \fImatch\fR is
9370: 20 74 72 75 65 2c 20 74 68 65 6e 20 5c 66 49 70 true, then \fIp
9380: 72 6f 74 6f 63 6f 6c 5c 66 52 20 69 73 20 74 68 rotocol\fR is th
9390: 65 20 66 69 72 73 74 0a 5c 66 42 2d 61 6c 70 6e e first.\fB-alpn
93a0: 5c 66 52 20 70 72 6f 74 6f 63 6f 6c 20 6f 70 74 \fR protocol opt
93b0: 69 6f 6e 20 69 6e 20 63 6f 6d 6d 6f 6e 20 74 6f ion in common to
93c0: 20 62 6f 74 68 20 74 68 65 20 63 6c 69 65 6e 74 both the client
93d0: 20 61 6e 64 20 73 65 72 76 65 72 5c 26 2e 0a 49 and server\&..I
93e0: 66 20 6e 6f 74 2c 20 74 68 65 20 66 69 72 73 74 f not, the first
93f0: 20 63 6c 69 65 6e 74 20 73 70 65 63 69 66 69 65 client specifie
9400: 64 20 70 72 6f 74 6f 63 6f 6c 20 69 73 20 75 73 d protocol is us
9410: 65 64 5c 26 2e 20 54 68 69 73 20 63 61 6c 6c 62 ed\&. This callb
9420: 61 63 6b 20 69 73 20 63 61 6c 6c 65 64 0a 61 66 ack is called.af
9430: 74 65 72 20 74 68 65 20 48 65 6c 6c 6f 20 61 6e ter the Hello an
9440: 64 20 53 4e 49 20 63 61 6c 6c 62 61 63 6b 73 5c d SNI callbacks\
9450: 26 2e 0a 2e 54 50 0a 5c 66 42 68 65 6c 6c 6f 5c &...TP.\fBhello\
9460: 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 fR \fIchannelId
9470: 73 65 72 76 65 72 6e 61 6d 65 20 73 65 73 73 69 servername sessi
9480: 6f 6e 5f 69 64 5c 66 52 0a 46 6f 72 20 73 65 72 on_id\fR.For ser
9490: 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 vers, this form
94a0: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 of callback is i
94b0: 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 63 6c nvoked during cl
94c0: 69 65 6e 74 20 68 65 6c 6c 6f 20 6d 65 73 73 61 ient hello messa
94d0: 67 65 0a 70 72 6f 63 65 73 73 69 6e 67 5c 26 2e ge.processing\&.
94e0: 20 54 68 65 20 70 75 72 70 6f 73 65 20 69 73 20 The purpose is
94f0: 73 6f 20 74 68 65 20 73 65 72 76 65 72 20 63 61 so the server ca
9500: 6e 20 73 65 6c 65 63 74 20 74 68 65 20 61 70 70 n select the app
9510: 72 6f 70 72 69 61 74 65 20 63 65 72 74 69 66 69 ropriate certifi
9520: 63 61 74 65 0a 74 6f 20 70 72 65 73 65 6e 74 20 cate.to present
9530: 74 6f 20 74 68 65 20 63 6c 69 65 6e 74 2c 20 61 to the client, a
9540: 6e 64 20 74 6f 20 6d 61 6b 65 20 6f 74 68 65 72 nd to make other
9550: 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 configuration a
9560: 64 6a 75 73 74 6d 65 6e 74 73 20 72 65 6c 65 76 djustments relev
9570: 61 6e 74 0a 74 6f 20 74 68 61 74 20 73 65 72 76 ant.to that serv
9580: 65 72 20 6e 61 6d 65 20 61 6e 64 20 69 74 73 20 er name and its
9590: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 5c 26 2e configuration\&.
95a0: 20 49 74 20 69 73 20 63 61 6c 6c 65 64 20 62 65 It is called be
95b0: 66 6f 72 65 20 74 68 65 20 53 4e 49 20 61 6e 64 fore the SNI and
95c0: 20 41 4c 50 4e 0a 63 61 6c 6c 62 61 63 6b 73 5c ALPN.callbacks\
95d0: 26 2e 0a 2e 54 50 0a 5c 66 42 73 6e 69 5c 66 52 &...TP.\fBsni\fR
95e0: 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 73 65 \fIchannelId se
95f0: 72 76 65 72 6e 61 6d 65 5c 66 52 0a 46 6f 72 20 rvername\fR.For
9600: 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f servers, this fo
9610: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 rm of callback i
9620: 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74 s invoked when t
9630: 68 65 20 53 65 72 76 65 72 20 4e 61 6d 65 20 49 he Server Name I
9640: 6e 64 69 63 61 74 69 6f 6e 0a 28 53 4e 49 29 20 ndication.(SNI)
9650: 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 72 65 63 extension is rec
9660: 65 69 76 65 64 5c 26 2e 20 54 68 65 20 5c 66 49 eived\&. The \fI
9670: 73 65 72 76 65 72 6e 61 6d 65 5c 66 52 20 61 72 servername\fR ar
9680: 67 75 6d 65 6e 74 20 69 73 20 74 68 65 20 63 6c gument is the cl
9690: 69 65 6e 74 0a 70 72 6f 76 69 64 65 64 20 73 65 ient.provided se
96a0: 72 76 65 72 20 6e 61 6d 65 20 73 70 65 63 69 66 rver name specif
96b0: 69 65 64 20 69 6e 20 74 68 65 20 5c 66 42 2d 73 ied in the \fB-s
96c0: 65 72 76 65 72 6e 61 6d 65 5c 66 52 20 6f 70 74 ervername\fR opt
96d0: 69 6f 6e 5c 26 2e 20 54 68 65 0a 70 75 72 70 6f ion\&. The.purpo
96e0: 73 65 20 69 73 20 73 6f 20 77 68 65 6e 20 61 20 se is so when a
96f0: 73 65 72 76 65 72 20 73 75 70 70 6f 72 74 73 20 server supports
9700: 6d 75 6c 74 69 70 6c 65 20 6e 61 6d 65 73 2c 20 multiple names,
9710: 74 68 65 20 72 69 67 68 74 20 63 65 72 74 69 66 the right certif
9720: 69 63 61 74 65 0a 63 61 6e 20 62 65 20 75 73 65 icate.can be use
9730: 64 5c 26 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 d\&. It is calle
9740: 64 20 61 66 74 65 72 20 74 68 65 20 48 65 6c 6c d after the Hell
9750: 6f 20 63 61 6c 6c 62 61 63 6b 20 62 75 74 20 62 o callback but b
9760: 65 66 6f 72 65 20 74 68 65 20 41 4c 50 4e 0a 63 efore the ALPN.c
9770: 61 6c 6c 62 61 63 6b 5c 26 2e 0a 2e 54 50 0a 5c allback\&...TP.\
9780: 66 42 76 65 72 69 66 79 5c 66 52 20 5c 66 49 63 fBverify\fR \fIc
9790: 68 61 6e 6e 65 6c 49 64 20 64 65 70 74 68 20 63 hannelId depth c
97a0: 65 72 74 20 73 74 61 74 75 73 20 65 72 72 6f 72 ert status error
97b0: 5c 66 52 0a 54 68 69 73 20 66 6f 72 6d 20 6f 66 \fR.This form of
97c0: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 callback is inv
97d0: 6f 6b 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 20 oked by OpenSSL
97e0: 77 68 65 6e 20 61 20 6e 65 77 20 63 65 72 74 69 when a new certi
97f0: 66 69 63 61 74 65 20 69 73 20 72 65 63 65 69 76 ficate is receiv
9800: 65 64 0a 66 72 6f 6d 20 74 68 65 20 70 65 65 72 ed.from the peer
9810: 5c 26 2e 20 49 74 20 61 6c 6c 6f 77 73 20 74 68 \&. It allows th
9820: 65 20 63 6c 69 65 6e 74 20 74 6f 20 63 68 65 63 e client to chec
9830: 6b 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 k the certificat
9840: 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e 0a 72 e verification.r
9850: 65 73 75 6c 74 73 20 61 6e 64 20 63 68 6f 6f 73 esults and choos
9860: 65 20 77 68 65 74 68 65 72 20 74 6f 20 63 6f 6e e whether to con
9870: 74 69 6e 75 65 20 6f 72 20 6e 6f 74 5c 26 2e 20 tinue or not\&.
9880: 49 74 20 69 73 20 63 61 6c 6c 65 64 20 66 6f 72 It is called for
9890: 20 65 61 63 68 0a 63 65 72 74 69 66 69 63 61 74 each.certificat
98a0: 65 20 69 6e 20 74 68 65 20 63 65 72 74 69 66 69 e in the certifi
98b0: 63 61 74 65 20 63 68 61 69 6e 5c 26 2e 20 54 68 cate chain\&. Th
98c0: 69 73 20 63 61 6c 6c 62 61 63 6b 20 77 61 73 20 is callback was
98d0: 6d 6f 76 65 64 20 66 72 6f 6d 0a 5c 66 42 2d 63 moved from.\fB-c
98e0: 6f 6d 6d 61 6e 64 5c 66 52 20 69 6e 20 54 63 6c ommand\fR in Tcl
98f0: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 20 54 68 65 TLS 1\&.8\&. The
9900: 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 0a arguments are:.
9910: 2e 52 53 0a 2e 54 50 0a 5c 66 49 64 65 70 74 68 .RS..TP.\fIdepth
9920: 5c 66 52 0a 54 68 65 20 64 65 70 74 68 20 69 73 \fR.The depth is
9930: 20 74 68 65 20 69 6e 74 65 67 65 72 20 64 65 70 the integer dep
9940: 74 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 th of the certif
9950: 69 63 61 74 65 20 69 6e 20 74 68 65 20 63 65 72 icate in the cer
9960: 74 69 66 69 63 61 74 65 20 63 68 61 69 6e 2c 0a tificate chain,.
9970: 77 68 65 72 65 20 30 20 69 73 20 74 68 65 20 70 where 0 is the p
9980: 65 65 72 20 63 65 72 74 69 66 69 63 61 74 65 20 eer certificate
9990: 61 6e 64 20 68 69 67 68 65 72 20 76 61 6c 75 65 and higher value
99a0: 73 20 67 6f 69 6e 67 20 75 70 20 74 6f 20 74 68 s going up to th
99b0: 65 20 43 65 72 74 69 66 69 63 61 74 65 0a 41 75 e Certificate.Au
99c0: 74 68 6f 72 69 74 79 20 28 43 41 29 5c 26 2e 0a thority (CA)\&..
99d0: 2e 54 50 0a 5c 66 49 63 65 72 74 5c 66 52 0a 54 .TP.\fIcert\fR.T
99e0: 68 65 20 63 65 72 74 20 61 72 67 75 6d 65 6e 74 he cert argument
99f0: 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 is a list of ke
9a00: 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 73 69 y-value pairs si
9a10: 6d 69 6c 61 72 20 74 6f 20 74 68 6f 73 65 20 72 milar to those r
9a20: 65 74 75 72 6e 65 64 20 62 79 0a 5c 66 42 74 6c eturned by.\fBtl
9a30: 73 3a 3a 73 74 61 74 75 73 5c 66 52 5c 26 2e 0a s::status\fR\&..
9a40: 2e 54 50 0a 5c 66 49 73 74 61 74 75 73 5c 66 52 .TP.\fIstatus\fR
9a50: 0a 54 68 65 20 73 74 61 74 75 73 20 61 72 67 75 .The status argu
9a60: 6d 65 6e 74 20 69 73 20 74 68 65 20 62 6f 6f 6c ment is the bool
9a70: 65 61 6e 20 76 61 6c 69 64 69 74 79 20 6f 66 20 ean validity of
9a80: 74 68 65 20 63 75 72 72 65 6e 74 20 63 65 72 74 the current cert
9a90: 69 66 69 63 61 74 65 20 77 68 65 72 65 20 30 0a ificate where 0.
9aa0: 69 73 20 69 6e 76 61 6c 69 64 20 61 6e 64 20 31 is invalid and 1
9ab0: 20 69 73 20 76 61 6c 69 64 5c 26 2e 0a 2e 54 50 is valid\&...TP
9ac0: 0a 5c 66 49 65 72 72 6f 72 5c 66 52 0a 54 68 65 .\fIerror\fR.The
9ad0: 20 65 72 72 6f 72 20 61 72 67 75 6d 65 6e 74 20 error argument
9ae0: 69 73 20 74 68 65 20 65 72 72 6f 72 20 6d 65 73 is the error mes
9af0: 73 61 67 65 2c 20 69 66 20 61 6e 79 2c 20 67 65 sage, if any, ge
9b00: 6e 65 72 61 74 65 64 20 62 79 0a 5c 66 42 58 35 nerated by.\fBX5
9b10: 30 39 5f 53 54 4f 52 45 5f 43 54 58 5f 67 65 74 09_STORE_CTX_get
9b20: 5f 65 72 72 6f 72 28 29 5c 66 52 5c 26 2e 0a 2e _error()\fR\&...
9b30: 52 45 0a 2e 50 50 0a 52 65 66 65 72 65 6e 63 65 RE..PP.Reference
9b40: 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 implementations
9b50: 20 6f 66 20 74 68 65 73 65 20 63 61 6c 6c 62 61 of these callba
9b60: 63 6b 73 20 61 72 65 20 70 72 6f 76 69 64 65 64 cks are provided
9b70: 20 69 6e 20 22 5c 66 49 74 6c 73 5c 26 2e 74 63 in "\fItls\&.tc
9b80: 6c 5c 66 52 22 0a 61 73 20 5c 66 42 74 6c 73 3a l\fR".as \fBtls:
9b90: 3a 63 61 6c 6c 62 61 63 6b 5c 66 52 2c 20 5c 66 :callback\fR, \f
9ba0: 42 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 5c 66 Btls::password\f
9bb0: 52 2c 20 61 6e 64 20 5c 66 42 74 6c 73 3a 3a 76 R, and \fBtls::v
9bc0: 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c alidate_command\
9bd0: 66 52 0a 72 65 73 70 65 63 74 69 76 65 6c 79 5c fR.respectively\
9be0: 26 2e 20 4e 6f 74 65 20 74 68 61 74 20 74 68 65 &. Note that the
9bf0: 73 65 20 61 72 65 20 6f 6e 6c 79 20 5c 66 49 73 se are only \fIs
9c00: 61 6d 70 6c 65 5c 66 52 20 69 6d 70 6c 65 6d 65 ample\fR impleme
9c10: 6e 74 61 74 69 6f 6e 73 5c 26 2e 20 49 6e 20 61 ntations\&. In a
9c20: 20 6d 6f 72 65 0a 72 65 61 6c 69 73 74 69 63 20 more.realistic
9c30: 64 65 70 6c 6f 79 6d 65 6e 74 20 79 6f 75 20 77 deployment you w
9c40: 6f 75 6c 64 20 73 70 65 63 69 66 79 20 79 6f 75 ould specify you
9c50: 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 20 73 r own callback s
9c60: 63 72 69 70 74 73 20 6f 6e 20 65 61 63 68 20 54 cripts on each T
9c70: 4c 53 0a 63 68 61 6e 6e 65 6c 20 75 73 69 6e 67 LS.channel using
9c80: 20 74 68 65 20 5c 66 42 2d 63 6f 6d 6d 61 6e 64 the \fB-command
9c90: 5c 66 52 2c 20 5c 66 42 2d 70 61 73 73 77 6f 72 \fR, \fB-passwor
9ca0: 64 5c 66 52 2c 20 61 6e 64 0a 5c 66 42 2d 76 61 d\fR, and.\fB-va
9cb0: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 lidate_command\f
9cc0: 52 20 6f 70 74 69 6f 6e 73 5c 26 2e 0a 2e 50 50 R options\&...PP
9cd0: 0a 54 68 65 20 64 65 66 61 75 6c 74 20 62 65 68 .The default beh
9ce0: 61 76 69 6f 72 20 77 68 65 6e 20 74 68 65 20 5c avior when the \
9cf0: 66 42 2d 63 6f 6d 6d 61 6e 64 5c 66 52 20 61 6e fB-command\fR an
9d00: 64 20 5c 66 42 2d 76 61 6c 69 64 61 74 65 5f 63 d \fB-validate_c
9d10: 6f 6d 6d 61 6e 64 5c 66 52 0a 6f 70 74 69 6f 6e ommand\fR.option
9d20: 73 20 61 72 65 20 6e 6f 74 20 73 70 65 63 69 66 s are not specif
9d30: 69 65 64 2c 20 69 73 20 66 6f 72 20 54 63 6c 54 ied, is for TclT
9d40: 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 LS to process th
9d50: 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 e associated lib
9d60: 72 61 72 79 0a 63 61 6c 6c 62 61 63 6b 73 20 69 rary.callbacks i
9d70: 6e 74 65 72 6e 61 6c 6c 79 5c 26 2e 20 54 68 65 nternally\&. The
9d80: 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f default behavio
9d90: 72 20 77 68 65 6e 20 74 68 65 20 5c 66 42 2d 70 r when the \fB-p
9da0: 61 73 73 77 6f 72 64 5c 66 52 20 6f 70 74 69 6f assword\fR optio
9db0: 6e 0a 69 73 20 6e 6f 74 20 73 70 65 63 69 66 69 n.is not specifi
9dc0: 65 64 20 69 73 20 66 6f 72 20 54 63 6c 54 4c 53 ed is for TclTLS
9dd0: 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 to process the
9de0: 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 associated libra
9df0: 72 79 20 63 61 6c 6c 62 61 63 6b 73 20 62 79 0a ry callbacks by.
9e00: 61 74 74 65 6d 70 74 69 6e 67 20 74 6f 20 63 61 attempting to ca
9e10: 6c 6c 20 5c 66 42 74 6c 73 3a 3a 70 61 73 73 77 ll \fBtls::passw
9e20: 6f 72 64 5c 66 52 5c 26 2e 20 54 68 65 20 64 69 ord\fR\&. The di
9e30: 66 66 65 72 65 6e 63 65 20 62 65 74 77 65 65 6e fference between
9e40: 20 74 68 65 73 65 20 74 77 6f 0a 62 65 68 61 76 these two.behav
9e50: 69 6f 72 73 20 69 73 20 61 20 63 6f 6e 73 65 71 iors is a conseq
9e60: 75 65 6e 63 65 20 6f 66 20 6d 61 69 6e 74 61 69 uence of maintai
9e70: 6e 69 6e 67 20 63 6f 6d 70 61 74 69 62 69 6c 69 ning compatibili
9e80: 74 79 20 77 69 74 68 20 65 61 72 6c 69 65 72 0a ty with earlier.
9e90: 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 5c implementations\
9ea0: 26 2e 0a 2e 50 50 0a 5c 66 49 54 68 65 20 75 73 &...PP.\fIThe us
9eb0: 65 20 6f 66 20 74 68 65 20 72 65 66 65 72 65 6e e of the referen
9ec0: 63 65 20 63 61 6c 6c 62 61 63 6b 73 20 5c 66 42 ce callbacks \fB
9ed0: 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 5c 66 52 tls::callback\fR
9ee0: 2c 20 5c 66 42 74 6c 73 3a 3a 70 61 73 73 77 6f , \fBtls::passwo
9ef0: 72 64 5c 66 52 2c 0a 61 6e 64 20 5c 66 42 74 6c rd\fR,.and \fBtl
9f00: 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d s::validate_comm
9f10: 61 6e 64 5c 66 52 20 69 73 20 6e 6f 74 20 72 65 and\fR is not re
9f20: 63 6f 6d 6d 65 6e 64 65 64 5c 26 2e 20 54 68 65 commended\&. The
9f30: 79 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 y may be removed
9f40: 20 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c from future rel
9f50: 65 61 73 65 73 5c 26 2e 5c 66 52 0a 2e 53 48 20 eases\&.\fR..SH
9f60: 44 45 42 55 47 0a 46 6f 72 20 6d 6f 73 74 20 64 DEBUG.For most d
9f70: 65 62 75 67 67 69 6e 67 20 6e 65 65 64 73 2c 20 ebugging needs,
9f80: 74 68 65 20 5c 66 42 2d 63 61 6c 6c 62 61 63 6b the \fB-callback
9f90: 5c 66 52 20 6f 70 74 69 6f 6e 20 63 61 6e 20 62 \fR option can b
9fa0: 65 20 75 73 65 64 20 74 6f 20 70 72 6f 76 69 64 e used to provid
9fb0: 65 0a 73 75 66 66 69 63 69 65 6e 74 20 69 6e 73 e.sufficient ins
9fc0: 69 67 68 74 20 61 6e 64 20 69 6e 66 6f 72 6d 61 ight and informa
9fd0: 74 69 6f 6e 20 6f 6e 20 74 68 65 20 54 4c 53 20 tion on the TLS
9fe0: 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 20 70 72 handshake and pr
9ff0: 6f 67 72 65 73 73 5c 26 2e 20 49 66 0a 66 75 72 ogress\&. If.fur
a000: 74 68 65 72 20 74 72 6f 75 62 6c 65 73 68 6f 6f ther troubleshoo
a010: 74 69 6e 67 20 69 6e 73 69 67 68 74 20 69 73 20 ting insight is
a020: 6e 65 65 64 65 64 2c 20 74 68 65 20 63 6f 6d 70 needed, the comp
a030: 69 6c 65 20 74 69 6d 65 20 6f 70 74 69 6f 6e 0a ile time option.
a040: 5c 66 42 2d 2d 65 6e 61 62 6c 65 2d 64 65 62 75 \fB--enable-debu
a050: 67 5c 66 52 20 63 61 6e 20 62 65 20 75 73 65 64 g\fR can be used
a060: 20 74 6f 20 67 65 74 20 64 65 74 61 69 6c 65 64 to get detailed
a070: 20 65 78 65 63 75 74 69 6f 6e 20 66 6c 6f 77 20 execution flow
a080: 73 74 61 74 75 73 5c 26 2e 0a 2e 50 50 0a 54 4c status\&...PP.TL
a090: 53 20 6b 65 79 20 6c 6f 67 67 69 6e 67 20 63 61 S key logging ca
a0a0: 6e 20 62 65 20 65 6e 61 62 6c 65 64 20 62 79 20 n be enabled by
a0b0: 73 65 74 74 69 6e 67 20 74 68 65 20 65 6e 76 69 setting the envi
a0c0: 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 ronment variable
a0d0: 0a 5c 66 42 53 53 4c 4b 45 59 4c 4f 47 46 49 4c .\fBSSLKEYLOGFIL
a0e0: 45 5c 66 52 20 74 6f 20 74 68 65 20 6e 61 6d 65 E\fR to the name
a0f0: 20 6f 66 20 74 68 65 20 66 69 6c 65 20 74 6f 20 of the file to
a100: 6c 6f 67 20 74 6f 5c 26 2e 20 54 68 65 6e 20 77 log to\&. Then w
a110: 68 65 6e 65 76 65 72 20 54 4c 53 20 6b 65 79 0a henever TLS key.
a120: 6d 61 74 65 72 69 61 6c 20 69 73 20 67 65 6e 65 material is gene
a130: 72 61 74 65 64 20 6f 72 20 72 65 63 65 69 76 65 rated or receive
a140: 64 20 69 74 20 77 69 6c 6c 20 62 65 20 6c 6f 67 d it will be log
a150: 67 65 64 20 74 6f 20 74 68 65 20 66 69 6c 65 5c ged to the file\
a160: 26 2e 20 54 68 69 73 20 69 73 20 75 73 65 66 75 &. This is usefu
a170: 6c 0a 66 6f 72 20 6c 6f 67 67 69 6e 67 20 6b 65 l.for logging ke
a180: 79 20 64 61 74 61 20 66 6f 72 20 6e 65 74 77 6f y data for netwo
a190: 72 6b 20 6c 6f 67 67 69 6e 67 20 74 6f 6f 6c 73 rk logging tools
a1a0: 20 74 6f 20 75 73 65 20 74 6f 20 64 65 63 72 79 to use to decry
a1b0: 70 74 20 74 68 65 20 64 61 74 61 5c 26 2e 0a 2e pt the data\&...
a1c0: 50 50 0a 54 68 65 20 5c 66 42 74 6c 73 3a 3a 64 PP.The \fBtls::d
a1d0: 65 62 75 67 5c 66 52 20 76 61 72 69 61 62 6c 65 ebug\fR variable
a1e0: 20 70 72 6f 76 69 64 65 73 20 73 6f 6d 65 20 61 provides some a
a1f0: 64 64 69 74 69 6f 6e 61 6c 20 63 6f 6e 74 72 6f dditional contro
a200: 6c 20 6f 76 65 72 20 74 68 65 0a 64 65 62 75 67 l over the.debug
a210: 20 6c 6f 67 67 69 6e 67 20 69 6e 20 74 68 65 20 logging in the
a220: 5c 66 42 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b \fBtls::callback
a230: 5c 66 52 2c 20 5c 66 42 74 6c 73 3a 3a 70 61 73 \fR, \fBtls::pas
a240: 73 77 6f 72 64 5c 66 52 2c 20 61 6e 64 0a 5c 66 sword\fR, and.\f
a250: 42 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 Btls::validate_c
a260: 6f 6d 6d 61 6e 64 5c 66 52 20 64 65 66 61 75 6c ommand\fR defaul
a270: 74 20 68 61 6e 64 6c 65 72 73 20 69 6e 20 22 5c t handlers in "\
a280: 66 49 74 6c 73 5c 26 2e 74 63 6c 5c 66 52 22 5c fItls\&.tcl\fR"\
a290: 26 2e 0a 54 68 65 20 64 65 66 61 75 6c 74 20 76 &..The default v
a2a0: 61 6c 75 65 20 69 73 20 30 20 77 69 74 68 20 68 alue is 0 with h
a2b0: 69 67 68 65 72 20 76 61 6c 75 65 73 20 70 72 6f igher values pro
a2c0: 64 75 63 69 6e 67 20 6d 6f 72 65 20 64 69 61 67 ducing more diag
a2d0: 6e 6f 73 74 69 63 20 6f 75 74 70 75 74 2c 0a 61 nostic output,.a
a2e0: 6e 64 20 77 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 nd will also for
a2f0: 63 65 20 74 68 65 20 76 65 72 69 66 79 20 6d 65 ce the verify me
a300: 74 68 6f 64 20 69 6e 20 5c 66 42 74 6c 73 3a 3a thod in \fBtls::
a310: 63 61 6c 6c 62 61 63 6b 5c 66 52 20 74 6f 20 61 callback\fR to a
a320: 63 63 65 70 74 20 74 68 65 0a 63 65 72 74 69 66 ccept the.certif
a330: 69 63 61 74 65 2c 20 65 76 65 6e 20 69 66 20 69 icate, even if i
a340: 74 20 69 73 20 69 6e 76 61 6c 69 64 20 77 68 65 t is invalid whe
a350: 6e 20 74 68 65 20 5c 66 42 2d 76 61 6c 69 64 61 n the \fB-valida
a360: 74 65 63 6f 6d 6d 61 6e 64 5c 66 52 0a 6f 70 74 tecommand\fR.opt
a370: 69 6f 6e 20 69 73 20 73 65 74 20 74 6f 20 5c 66 ion is set to \f
a380: 42 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 Btls::validate_c
a390: 6f 6d 6d 61 6e 64 5c 66 52 5c 26 2e 0a 2e 50 50 ommand\fR\&...PP
a3a0: 0a 5c 66 49 54 68 65 20 75 73 65 20 6f 66 20 74 .\fIThe use of t
a3b0: 68 65 20 76 61 72 69 61 62 6c 65 20 5c 66 42 74 he variable \fBt
a3c0: 6c 73 3a 3a 64 65 62 75 67 5c 66 52 20 69 73 20 ls::debug\fR is
a3d0: 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 5c not recommended\
a3e0: 26 2e 0a 49 74 20 6d 61 79 20 62 65 20 72 65 6d &..It may be rem
a3f0: 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65 oved from future
a400: 20 72 65 6c 65 61 73 65 73 5c 26 2e 5c 66 52 0a releases\&.\fR.
a410: 2e 53 48 20 45 58 41 4d 50 4c 45 53 0a 54 68 65 .SH EXAMPLES.The
a420: 20 66 6f 6c 6c 6f 77 69 6e 67 20 61 72 65 20 65 following are e
a430: 78 61 6d 70 6c 65 20 73 63 72 69 70 74 73 20 74 xample scripts t
a440: 6f 20 64 6f 77 6e 6c 6f 61 64 20 61 20 77 65 62 o download a web
a450: 70 61 67 65 20 61 6e 64 20 66 69 6c 65 20 75 73 page and file us
a460: 69 6e 67 20 74 68 65 0a 68 74 74 70 20 70 61 63 ing the.http pac
a470: 6b 61 67 65 5c 26 2e 20 53 65 65 20 5c 66 42 43 kage\&. See \fBC
a480: 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 ertificate Valid
a490: 61 74 69 6f 6e 5c 66 52 20 66 6f 72 20 77 68 65 ation\fR for whe
a4a0: 6e 20 74 68 65 0a 5c 66 42 2d 63 61 64 69 72 5c n the.\fB-cadir\
a4b0: 66 52 2c 20 5c 66 42 2d 63 61 66 69 6c 65 5c 66 fR, \fB-cafile\f
a4c0: 52 2c 20 61 6e 64 20 5c 66 42 2d 63 61 73 74 6f R, and \fB-casto
a4d0: 72 65 5c 66 52 20 6f 70 74 69 6f 6e 73 20 61 72 re\fR options ar
a4e0: 65 20 61 6c 73 6f 0a 6e 65 65 64 65 64 5c 26 2e e also.needed\&.
a4f0: 20 53 65 65 20 74 68 65 20 22 5c 66 49 64 65 6d See the "\fIdem
a500: 6f 73 5c 66 52 22 20 64 69 72 65 63 74 6f 72 79 os\fR" directory
a510: 20 66 6f 72 20 6d 6f 72 65 20 65 78 61 6d 70 6c for more exampl
a520: 65 20 73 63 72 69 70 74 73 5c 26 2e 0a 2e 50 50 e scripts\&...PP
a530: 0a 45 78 61 6d 70 6c 65 20 23 31 3a 20 44 6f 77 .Example #1: Dow
a540: 6e 6c 6f 61 64 20 61 20 77 65 62 20 70 61 67 65 nload a web page
a550: 0a 2e 43 53 0a 0a 0a 0a 70 61 63 6b 61 67 65 20 ..CS....package
a560: 72 65 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 require http.pac
a570: 6b 61 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 kage require tls
a580: 0a 0a 73 65 74 20 75 72 6c 20 22 68 74 74 70 73 ..set url "https
a590: 3a 2f 2f 77 77 77 5c 26 2e 74 63 6c 5c 26 2e 74 ://www\&.tcl\&.t
a5a0: 6b 2f 22 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 k/".http::regist
a5b0: 65 72 20 68 74 74 70 73 20 34 34 33 20 5b 6c 69 er https 443 [li
a5c0: 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 st ::tls::socket
a5d0: 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 -autoservername
a5e0: 20 31 20 2d 72 65 71 75 69 72 65 20 31 5d 0a 0a 1 -require 1]..
a5f0: 23 20 47 65 74 20 55 52 4c 0a 73 65 74 20 74 6f # Get URL.set to
a600: 6b 65 6e 20 5b 68 74 74 70 3a 3a 67 65 74 75 72 ken [http::getur
a610: 6c 20 24 75 72 6c 5d 0a 0a 23 20 43 68 65 63 6b l $url]..# Check
a620: 20 66 6f 72 20 65 72 72 6f 72 0a 69 66 20 7b 5b for error.if {[
a630: 68 74 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f http::status $to
a640: 6b 65 6e 5d 20 6e 65 20 22 6f 6b 22 7d 20 7b 0a ken] ne "ok"} {.
a650: 20 20 20 20 70 75 74 73 20 5b 66 6f 72 6d 61 74 puts [format
a660: 20 22 45 72 72 6f 72 20 25 73 22 20 5b 68 74 74 "Error %s" [htt
a670: 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e p::status $token
a680: 5d 5d 0a 7d 0a 0a 23 20 53 61 76 65 20 77 65 62 ]].}..# Save web
a690: 20 70 61 67 65 20 74 6f 20 66 69 6c 65 0a 73 65 page to file.se
a6a0: 74 20 63 68 20 5b 6f 70 65 6e 20 65 78 61 6d 70 t ch [open examp
a6b0: 6c 65 5c 26 2e 68 74 6d 6c 20 77 62 5d 0a 70 75 le\&.html wb].pu
a6c0: 74 73 20 24 63 68 20 5b 68 74 74 70 3a 3a 64 61 ts $ch [http::da
a6d0: 74 61 20 24 74 6f 6b 65 6e 5d 0a 63 6c 6f 73 65 ta $token].close
a6e0: 20 24 63 68 0a 0a 23 20 43 6c 65 61 6e 75 70 0a $ch..# Cleanup.
a6f0: 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 ::http::cleanup
a700: 24 74 6f 6b 65 6e 0a 0a 2e 43 45 0a 45 78 61 6d $token...CE.Exam
a710: 70 6c 65 20 23 32 3a 20 44 6f 77 6e 6c 6f 61 64 ple #2: Download
a720: 20 61 20 66 69 6c 65 0a 2e 43 53 0a 0a 0a 0a 70 a file..CS....p
a730: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 ackage require h
a740: 74 74 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 ttp.package requ
a750: 69 72 65 20 74 6c 73 0a 0a 73 65 74 20 75 72 6c ire tls..set url
a760: 20 22 68 74 74 70 73 3a 2f 2f 77 69 6b 69 5c 26 "https://wiki\&
a770: 2e 74 63 6c 2d 6c 61 6e 67 5c 26 2e 6f 72 67 2f .tcl-lang\&.org/
a780: 73 69 74 65 6d 61 70 5c 26 2e 78 6d 6c 22 0a 68 sitemap\&.xml".h
a790: 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 ttp::register ht
a7a0: 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a tps 443 [list ::
a7b0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 tls::socket -aut
a7c0: 6f 73 65 72 76 65 72 6e 61 6d 65 20 31 20 2d 72 oservername 1 -r
a7d0: 65 71 75 69 72 65 20 31 5d 0a 0a 23 20 4f 70 65 equire 1]..# Ope
a7e0: 6e 20 6f 75 74 70 75 74 20 66 69 6c 65 0a 73 65 n output file.se
a7f0: 74 20 66 69 6c 65 6e 61 6d 65 20 5b 66 69 6c 65 t filename [file
a800: 20 74 61 69 6c 20 24 75 72 6c 5d 0a 73 65 74 20 tail $url].set
a810: 63 68 20 5b 6f 70 65 6e 20 24 66 69 6c 65 6e 61 ch [open $filena
a820: 6d 65 20 77 62 5d 0a 0a 23 20 47 65 74 20 66 69 me wb]..# Get fi
a830: 6c 65 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 3a 3a le.set token [::
a840: 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 24 75 72 http::geturl $ur
a850: 6c 20 2d 62 6c 6f 63 6b 73 69 7a 65 20 36 35 35 l -blocksize 655
a860: 33 36 20 2d 63 68 61 6e 6e 65 6c 20 24 63 68 5d 36 -channel $ch]
a870: 0a 0a 23 20 43 68 65 63 6b 20 66 6f 72 20 65 72 ..# Check for er
a880: 72 6f 72 0a 69 66 20 7b 5b 68 74 74 70 3a 3a 73 ror.if {[http::s
a890: 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 tatus $token] ne
a8a0: 20 22 6f 6b 22 7d 20 7b 0a 20 20 20 20 70 75 74 "ok"} {. put
a8b0: 73 20 5b 66 6f 72 6d 61 74 20 22 45 72 72 6f 72 s [format "Error
a8c0: 20 25 73 22 20 5b 68 74 74 70 3a 3a 73 74 61 74 %s" [http::stat
a8d0: 75 73 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 0a 23 us $token]].}..#
a8e0: 20 43 6c 65 61 6e 75 70 0a 63 6c 6f 73 65 20 24 Cleanup.close $
a8f0: 63 68 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e ch.::http::clean
a900: 75 70 20 24 74 6f 6b 65 6e 0a 0a 2e 43 45 0a 2e up $token...CE..
a910: 53 48 20 22 53 50 45 43 49 41 4c 20 43 4f 4e 53 SH "SPECIAL CONS
a920: 49 44 45 52 41 54 49 4f 4e 53 22 0a 54 68 65 20 IDERATIONS".The
a930: 63 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20 capabilities of
a940: 74 68 69 73 20 70 61 63 6b 61 67 65 20 63 61 6e this package can
a950: 20 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c 79 vary enormously
a960: 20 62 61 73 65 64 20 75 70 6f 6e 20 68 6f 77 20 based upon how
a970: 74 68 65 0a 6c 69 6e 6b 65 64 20 74 6f 20 4f 70 the.linked to Op
a980: 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 20 77 61 enSSL library wa
a990: 73 20 63 6f 6e 66 69 67 75 72 65 64 20 61 6e 64 s configured and
a9a0: 20 62 75 69 6c 74 5c 26 2e 20 4e 65 77 20 76 65 built\&. New ve
a9b0: 72 73 69 6f 6e 73 20 6d 61 79 20 6f 62 73 6f 6c rsions may obsol
a9c0: 65 74 65 0a 6f 6c 64 65 72 20 70 72 6f 74 6f 63 ete.older protoc
a9d0: 6f 6c 20 76 65 72 73 69 6f 6e 73 2c 20 61 64 64 ol versions, add
a9e0: 20 6f 72 20 72 65 6d 6f 76 65 20 63 69 70 68 65 or remove ciphe
a9f0: 72 73 2c 20 63 68 61 6e 67 65 20 64 65 66 61 75 rs, change defau
aa00: 6c 74 20 76 61 6c 75 65 73 2c 20 65 74 63 5c 26 lt values, etc\&
aa10: 2e 0a 55 73 65 20 74 68 65 20 5c 66 42 74 6c 73 ..Use the \fBtls
aa20: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 5c 66 52 20 63 ::protocols\fR c
aa30: 6f 6d 6d 61 6e 64 20 74 6f 20 6f 62 74 61 69 6e ommand to obtain
aa40: 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 0a 70 the supported.p
aa50: 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73 rotocol versions
aa60: 5c 26 2e 0a 2e 53 48 20 22 45 52 52 4f 52 20 4d \&...SH "ERROR M
aa70: 45 53 53 41 47 45 53 22 0a 53 6f 6d 65 20 4f 70 ESSAGES".Some Op
aa80: 73 6e 53 53 6c 20 65 72 72 6f 72 20 6d 65 73 73 snSSl error mess
aa90: 61 67 65 73 20 68 61 76 65 20 63 72 79 70 74 69 ages have crypti
aaa0: 63 20 6d 65 61 6e 69 6e 67 73 5c 26 2e 20 54 68 c meanings\&. Th
aab0: 69 73 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 is is a list of
aac0: 6d 65 73 73 61 67 65 73 0a 61 6c 6f 6e 67 20 77 messages.along w
aad0: 69 74 68 20 74 68 65 69 72 20 74 72 75 65 20 6d ith their true m
aae0: 65 61 6e 69 6e 67 5c 26 2e 0a 2e 54 50 0a 5c 66 eaning\&...TP.\f
aaf0: 49 70 61 63 6b 65 74 20 6c 65 6e 67 74 68 20 74 Ipacket length t
ab00: 6f 6f 20 6c 6f 6e 67 5c 66 52 0a 43 6c 69 65 6e oo long\fR.Clien
ab10: 74 20 68 61 73 20 74 72 69 65 64 20 74 6f 20 63 t has tried to c
ab20: 6f 6e 6e 65 63 74 20 74 6f 20 61 20 48 54 54 50 onnect to a HTTP
ab30: 20 73 65 72 76 65 72 20 6f 6e 20 74 68 65 20 70 server on the p
ab40: 6c 61 69 6e 2d 74 65 78 74 20 70 6f 72 74 20 69 lain-text port i
ab50: 6e 73 74 65 61 64 20 6f 66 20 74 68 65 20 53 53 nstead of the SS
ab60: 4c 2f 54 4c 53 20 70 6f 72 74 5c 26 2e 0a 2e 54 L/TLS port\&...T
ab70: 50 0a 5c 66 49 75 6e 65 78 70 65 63 74 65 64 20 P.\fIunexpected
ab80: 65 6f 66 20 77 68 69 6c 65 20 72 65 61 64 69 6e eof while readin
ab90: 67 5c 66 52 0a 50 65 65 72 20 68 61 73 20 63 6c g\fR.Peer has cl
aba0: 6f 73 65 64 20 74 68 65 20 63 6f 6e 6e 65 63 74 osed the connect
abb0: 69 6f 6e 20 77 69 74 68 6f 75 74 20 73 65 6e 64 ion without send
abc0: 69 6e 67 20 74 68 65 20 22 63 6c 6f 73 65 20 6e ing the "close n
abd0: 6f 74 69 66 79 22 20 73 68 75 74 64 6f 77 6e 20 otify" shutdown
abe0: 61 6c 65 72 74 5c 26 2e 0a 2e 54 50 0a 5c 66 49 alert\&...TP.\fI
abf0: 77 72 6f 6e 67 20 76 65 72 73 69 6f 6e 20 6e 75 wrong version nu
ac00: 6d 62 65 72 5c 66 52 0a 43 6c 69 65 6e 74 20 68 mber\fR.Client h
ac10: 61 73 20 74 72 69 65 64 20 74 6f 20 63 6f 6e 6e as tried to conn
ac20: 65 63 74 20 74 6f 20 61 20 6e 6f 6e 2d 48 54 54 ect to a non-HTT
ac30: 50 20 73 65 72 76 65 72 20 6f 6e 20 61 20 6e 6f P server on a no
ac40: 6e 2d 54 4c 53 20 28 69 5c 26 2e 65 5c 26 2e 20 n-TLS (i\&.e\&.
ac50: 70 6c 61 69 6e 20 74 65 78 74 29 20 70 6f 72 74 plain text) port
ac60: 5c 26 2e 0a 2e 50 50 0a 2e 53 48 20 22 53 45 45 \&...PP..SH "SEE
ac70: 20 41 4c 53 4f 22 0a 5c 66 49 4f 70 65 6e 53 53 ALSO".\fIOpenSS
ac80: 4c 5c 66 52 20 5b 68 74 74 70 73 3a 2f 2f 77 77 L\fR [https://ww
ac90: 77 5c 26 2e 6f 70 65 6e 73 73 6c 5c 26 2e 6f 72 w\&.openssl\&.or
aca0: 67 2f 5d 2c 20 68 74 74 70 2c 20 73 6f 63 6b 65 g/], http, socke
acb0: 74 0a 2e 53 48 20 4b 45 59 57 4f 52 44 53 0a 49 t..SH KEYWORDS.I
acc0: 2f 4f 2c 20 49 50 20 41 64 64 72 65 73 73 2c 20 /O, IP Address,
acd0: 4f 70 65 6e 53 53 4c 2c 20 53 53 4c 2c 20 54 43 OpenSSL, SSL, TC
ace0: 50 2c 20 54 4c 53 2c 20 54 63 6c 54 4c 53 2c 20 P, TLS, TclTLS,
acf0: 61 73 79 6e 63 68 72 6f 6e 6f 75 73 20 49 2f 4f asynchronous I/O
ad00: 2c 20 62 69 6e 64 2c 20 63 65 72 74 69 66 69 63 , bind, certific
ad10: 61 74 65 2c 20 63 68 61 6e 6e 65 6c 2c 20 63 6f ate, channel, co
ad20: 6e 6e 65 63 74 69 6f 6e 2c 20 64 6f 6d 61 69 6e nnection, domain
ad30: 20 6e 61 6d 65 2c 20 68 6f 73 74 2c 20 68 74 74 name, host, htt
ad40: 70 73 2c 20 6e 65 74 77 6f 72 6b 2c 20 6e 65 74 ps, network, net
ad50: 77 6f 72 6b 20 61 64 64 72 65 73 73 2c 20 73 6f work address, so
ad60: 63 6b 65 74 2c 20 74 6c 73 0a 2e 53 48 20 43 41 cket, tls..SH CA
ad70: 54 45 47 4f 52 59 0a 74 6c 73 0a 2e 53 48 20 43 TEGORY.tls..SH C
ad80: 4f 50 59 52 49 47 48 54 0a 2e 6e 66 0a 43 6f 70 OPYRIGHT..nf.Cop
ad90: 79 72 69 67 68 74 20 28 63 29 20 31 39 39 39 20 yright (c) 1999
ada0: 4d 61 74 74 20 4e 65 77 6d 61 6e 0a 43 6f 70 79 Matt Newman.Copy
adb0: 72 69 67 68 74 20 28 63 29 20 32 30 30 34 20 53 right (c) 2004 S
adc0: 74 61 72 66 69 73 68 20 53 79 73 74 65 6d 73 0a tarfish Systems.
add0: 43 6f 70 79 72 69 67 68 74 20 28 63 29 20 32 30 Copyright (c) 20
ade0: 32 34 20 42 72 69 61 6e 20 4f 27 48 61 67 61 6e 24 Brian O'Hagan
adf0: 0a 0a 2e 66 69 0a ...fi.