0000: 27 5c 22 0a 27 5c 22 20 47 65 6e 65 72 61 74 65 '\".'\" Generate
0010: 64 20 66 72 6f 6d 20 66 69 6c 65 20 27 74 6c 73 d from file 'tls
0020: 5c 26 2e 6d 61 6e 27 20 62 79 20 74 63 6c 6c 69 \&.man' by tclli
0030: 62 2f 64 6f 63 74 6f 6f 6c 73 20 77 69 74 68 20 b/doctools with
0040: 66 6f 72 6d 61 74 20 27 6e 72 6f 66 66 27 0a 27 format 'nroff'.'
0050: 5c 22 20 43 6f 70 79 72 69 67 68 74 20 28 63 29 \" Copyright (c)
0060: 20 31 39 39 39 20 4d 61 74 74 20 4e 65 77 6d 61 1999 Matt Newma
0070: 6e 0a 27 5c 22 20 43 6f 70 79 72 69 67 68 74 20 n.'\" Copyright
0080: 28 63 29 20 32 30 30 34 20 53 74 61 72 66 69 73 (c) 2004 Starfis
0090: 68 20 53 79 73 74 65 6d 73 0a 27 5c 22 20 43 6f h Systems.'\" Co
00a0: 70 79 72 69 67 68 74 20 28 63 29 20 32 30 32 34 pyright (c) 2024
00b0: 20 42 72 69 61 6e 20 4f 27 48 61 67 61 6e 0a 27 Brian O'Hagan.'
00c0: 5c 22 0a 2e 54 48 20 22 74 6c 73 22 20 6e 20 32 \"..TH "tls" n 2
00d0: 5c 26 2e 30 62 31 20 74 6c 73 20 22 54 63 6c 20 \&.0b1 tls "Tcl
00e0: 54 4c 53 20 65 78 74 65 6e 73 69 6f 6e 22 0a 2e TLS extension"..
00f0: 5c 22 20 54 68 65 20 2d 2a 2d 20 6e 72 6f 66 66 \" The -*- nroff
0100: 20 2d 2a 2d 20 64 65 66 69 6e 69 74 69 6f 6e 73 -*- definitions
0110: 20 62 65 6c 6f 77 20 61 72 65 20 66 6f 72 20 73 below are for s
0120: 75 70 70 6c 65 6d 65 6e 74 61 6c 20 6d 61 63 72 upplemental macr
0130: 6f 73 20 75 73 65 64 0a 2e 5c 22 20 69 6e 20 54 os used..\" in T
0140: 63 6c 2f 54 6b 20 6d 61 6e 75 61 6c 20 65 6e 74 cl/Tk manual ent
0150: 72 69 65 73 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 41 ries...\"..\" .A
0160: 50 20 74 79 70 65 20 6e 61 6d 65 20 69 6e 2f 6f P type name in/o
0170: 75 74 20 3f 69 6e 64 65 6e 74 3f 0a 2e 5c 22 09 ut ?indent?..\".
0180: 53 74 61 72 74 20 70 61 72 61 67 72 61 70 68 20 Start paragraph
0190: 64 65 73 63 72 69 62 69 6e 67 20 61 6e 20 61 72 describing an ar
01a0: 67 75 6d 65 6e 74 20 74 6f 20 61 20 6c 69 62 72 gument to a libr
01b0: 61 72 79 20 70 72 6f 63 65 64 75 72 65 2e 0a 2e ary procedure...
01c0: 5c 22 09 74 79 70 65 20 69 73 20 74 79 70 65 20 \".type is type
01d0: 6f 66 20 61 72 67 75 6d 65 6e 74 20 28 69 6e 74 of argument (int
01e0: 2c 20 65 74 63 2e 29 2c 20 69 6e 2f 6f 75 74 20 , etc.), in/out
01f0: 69 73 20 65 69 74 68 65 72 20 22 69 6e 22 2c 20 is either "in",
0200: 22 6f 75 74 22 2c 0a 2e 5c 22 09 6f 72 20 22 69 "out",..\".or "i
0210: 6e 2f 6f 75 74 22 20 74 6f 20 64 65 73 63 72 69 n/out" to descri
0220: 62 65 20 77 68 65 74 68 65 72 20 70 72 6f 63 65 be whether proce
0230: 64 75 72 65 20 72 65 61 64 73 20 6f 72 20 6d 6f dure reads or mo
0240: 64 69 66 69 65 73 20 61 72 67 2c 0a 2e 5c 22 09 difies arg,..\".
0250: 61 6e 64 20 69 6e 64 65 6e 74 20 69 73 20 65 71 and indent is eq
0260: 75 69 76 61 6c 65 6e 74 20 74 6f 20 73 65 63 6f uivalent to seco
0270: 6e 64 20 61 72 67 20 6f 66 20 2e 49 50 20 28 73 nd arg of .IP (s
0280: 68 6f 75 6c 64 6e 27 74 20 65 76 65 72 20 62 65 houldn't ever be
0290: 0a 2e 5c 22 09 6e 65 65 64 65 64 3b 20 20 75 73 ..\".needed; us
02a0: 65 20 2e 41 53 20 62 65 6c 6f 77 20 69 6e 73 74 e .AS below inst
02b0: 65 61 64 29 0a 2e 5c 22 0a 2e 5c 22 20 2e 41 53 ead)..\"..\" .AS
02c0: 20 3f 74 79 70 65 3f 20 3f 6e 61 6d 65 3f 0a 2e ?type? ?name?..
02d0: 5c 22 09 47 69 76 65 20 6d 61 78 69 6d 75 6d 20 \".Give maximum
02e0: 73 69 7a 65 73 20 6f 66 20 61 72 67 75 6d 65 6e sizes of argumen
02f0: 74 73 20 66 6f 72 20 73 65 74 74 69 6e 67 20 74 ts for setting t
0300: 61 62 20 73 74 6f 70 73 2e 20 20 54 79 70 65 20 ab stops. Type
0310: 61 6e 64 0a 2e 5c 22 09 6e 61 6d 65 20 61 72 65 and..\".name are
0320: 20 65 78 61 6d 70 6c 65 73 20 6f 66 20 6c 61 72 examples of lar
0330: 67 65 73 74 20 70 6f 73 73 69 62 6c 65 20 61 72 gest possible ar
0340: 67 75 6d 65 6e 74 73 20 74 68 61 74 20 77 69 6c guments that wil
0350: 6c 20 62 65 20 70 61 73 73 65 64 0a 2e 5c 22 09 l be passed..\".
0360: 74 6f 20 2e 41 50 20 6c 61 74 65 72 2e 20 20 49 to .AP later. I
0370: 66 20 61 72 67 73 20 61 72 65 20 6f 6d 69 74 74 f args are omitt
0380: 65 64 2c 20 64 65 66 61 75 6c 74 20 74 61 62 20 ed, default tab
0390: 73 74 6f 70 73 20 61 72 65 20 75 73 65 64 2e 0a stops are used..
03a0: 2e 5c 22 0a 2e 5c 22 20 2e 42 53 0a 2e 5c 22 09 .\"..\" .BS..\".
03b0: 53 74 61 72 74 20 62 6f 78 20 65 6e 63 6c 6f 73 Start box enclos
03c0: 75 72 65 2e 20 20 46 72 6f 6d 20 68 65 72 65 20 ure. From here
03d0: 75 6e 74 69 6c 20 6e 65 78 74 20 2e 42 45 2c 20 until next .BE,
03e0: 65 76 65 72 79 74 68 69 6e 67 20 77 69 6c 6c 20 everything will
03f0: 62 65 0a 2e 5c 22 09 65 6e 63 6c 6f 73 65 64 20 be..\".enclosed
0400: 69 6e 20 6f 6e 65 20 6c 61 72 67 65 20 62 6f 78 in one large box
0410: 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 42 45 0a 2e 5c ...\"..\" .BE..\
0420: 22 09 45 6e 64 20 6f 66 20 62 6f 78 20 65 6e 63 ".End of box enc
0430: 6c 6f 73 75 72 65 2e 0a 2e 5c 22 0a 2e 5c 22 20 losure...\"..\"
0440: 2e 43 53 0a 2e 5c 22 09 42 65 67 69 6e 20 63 6f .CS..\".Begin co
0450: 64 65 20 65 78 63 65 72 70 74 2e 0a 2e 5c 22 0a de excerpt...\".
0460: 2e 5c 22 20 2e 43 45 0a 2e 5c 22 09 45 6e 64 20 .\" .CE..\".End
0470: 63 6f 64 65 20 65 78 63 65 72 70 74 2e 0a 2e 5c code excerpt...\
0480: 22 0a 2e 5c 22 20 2e 56 53 20 3f 76 65 72 73 69 "..\" .VS ?versi
0490: 6f 6e 3f 20 3f 62 72 3f 0a 2e 5c 22 09 42 65 67 on? ?br?..\".Beg
04a0: 69 6e 20 76 65 72 74 69 63 61 6c 20 73 69 64 65 in vertical side
04b0: 62 61 72 2c 20 66 6f 72 20 75 73 65 20 69 6e 20 bar, for use in
04c0: 6d 61 72 6b 69 6e 67 20 6e 65 77 6c 79 2d 63 68 marking newly-ch
04d0: 61 6e 67 65 64 20 70 61 72 74 73 0a 2e 5c 22 09 anged parts..\".
04e0: 6f 66 20 6d 61 6e 20 70 61 67 65 73 2e 20 20 54 of man pages. T
04f0: 68 65 20 66 69 72 73 74 20 61 72 67 75 6d 65 6e he first argumen
0500: 74 20 69 73 20 69 67 6e 6f 72 65 64 20 61 6e 64 t is ignored and
0510: 20 75 73 65 64 20 66 6f 72 20 72 65 63 6f 72 64 used for record
0520: 69 6e 67 0a 2e 5c 22 09 74 68 65 20 76 65 72 73 ing..\".the vers
0530: 69 6f 6e 20 77 68 65 6e 20 74 68 65 20 2e 56 53 ion when the .VS
0540: 20 77 61 73 20 61 64 64 65 64 2c 20 73 6f 20 74 was added, so t
0550: 68 61 74 20 74 68 65 20 73 69 64 65 62 61 72 73 hat the sidebars
0560: 20 63 61 6e 20 62 65 0a 2e 5c 22 09 66 6f 75 6e can be..\".foun
0570: 64 20 61 6e 64 20 72 65 6d 6f 76 65 64 20 77 68 d and removed wh
0580: 65 6e 20 74 68 65 79 20 72 65 61 63 68 20 61 20 en they reach a
0590: 63 65 72 74 61 69 6e 20 61 67 65 2e 20 20 49 66 certain age. If
05a0: 20 61 6e 6f 74 68 65 72 20 61 72 67 75 6d 65 6e another argumen
05b0: 74 0a 2e 5c 22 09 69 73 20 70 72 65 73 65 6e 74 t..\".is present
05c0: 2c 20 74 68 65 6e 20 61 20 6c 69 6e 65 20 62 72 , then a line br
05d0: 65 61 6b 20 69 73 20 66 6f 72 63 65 64 20 62 65 eak is forced be
05e0: 66 6f 72 65 20 73 74 61 72 74 69 6e 67 20 74 68 fore starting th
05f0: 65 20 73 69 64 65 62 61 72 2e 0a 2e 5c 22 0a 2e e sidebar...\"..
0600: 5c 22 20 2e 56 45 0a 2e 5c 22 09 45 6e 64 20 6f \" .VE..\".End o
0610: 66 20 76 65 72 74 69 63 61 6c 20 73 69 64 65 62 f vertical sideb
0620: 61 72 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 44 53 0a ar...\"..\" .DS.
0630: 2e 5c 22 09 42 65 67 69 6e 20 61 6e 20 69 6e 64 .\".Begin an ind
0640: 65 6e 74 65 64 20 75 6e 66 69 6c 6c 65 64 20 64 ented unfilled d
0650: 69 73 70 6c 61 79 2e 0a 2e 5c 22 0a 2e 5c 22 20 isplay...\"..\"
0660: 2e 44 45 0a 2e 5c 22 09 45 6e 64 20 6f 66 20 69 .DE..\".End of i
0670: 6e 64 65 6e 74 65 64 20 75 6e 66 69 6c 6c 65 64 ndented unfilled
0680: 20 64 69 73 70 6c 61 79 2e 0a 2e 5c 22 0a 2e 5c display...\"..\
0690: 22 20 2e 53 4f 20 3f 6d 61 6e 70 61 67 65 3f 0a " .SO ?manpage?.
06a0: 2e 5c 22 09 53 74 61 72 74 20 6f 66 20 6c 69 73 .\".Start of lis
06b0: 74 20 6f 66 20 73 74 61 6e 64 61 72 64 20 6f 70 t of standard op
06c0: 74 69 6f 6e 73 20 66 6f 72 20 61 20 54 6b 20 77 tions for a Tk w
06d0: 69 64 67 65 74 2e 20 54 68 65 20 6d 61 6e 70 61 idget. The manpa
06e0: 67 65 0a 2e 5c 22 09 61 72 67 75 6d 65 6e 74 20 ge..\".argument
06f0: 64 65 66 69 6e 65 73 20 77 68 65 72 65 20 74 6f defines where to
0700: 20 6c 6f 6f 6b 20 75 70 20 74 68 65 20 73 74 61 look up the sta
0710: 6e 64 61 72 64 20 6f 70 74 69 6f 6e 73 3b 20 69 ndard options; i
0720: 66 0a 2e 5c 22 09 6f 6d 69 74 74 65 64 2c 20 64 f..\".omitted, d
0730: 65 66 61 75 6c 74 73 20 74 6f 20 22 6f 70 74 69 efaults to "opti
0740: 6f 6e 73 22 2e 20 54 68 65 20 6f 70 74 69 6f 6e ons". The option
0750: 73 20 66 6f 6c 6c 6f 77 20 6f 6e 20 73 75 63 63 s follow on succ
0760: 65 73 73 69 76 65 0a 2e 5c 22 09 6c 69 6e 65 73 essive..\".lines
0770: 2c 20 69 6e 20 74 68 72 65 65 20 63 6f 6c 75 6d , in three colum
0780: 6e 73 20 73 65 70 61 72 61 74 65 64 20 62 79 20 ns separated by
0790: 74 61 62 73 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 53 tabs...\"..\" .S
07a0: 45 0a 2e 5c 22 09 45 6e 64 20 6f 66 20 6c 69 73 E..\".End of lis
07b0: 74 20 6f 66 20 73 74 61 6e 64 61 72 64 20 6f 70 t of standard op
07c0: 74 69 6f 6e 73 20 66 6f 72 20 61 20 54 6b 20 77 tions for a Tk w
07d0: 69 64 67 65 74 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e idget...\"..\" .
07e0: 4f 50 20 63 6d 64 4e 61 6d 65 20 64 62 4e 61 6d OP cmdName dbNam
07f0: 65 20 64 62 43 6c 61 73 73 0a 2e 5c 22 09 53 74 e dbClass..\".St
0800: 61 72 74 20 6f 66 20 64 65 73 63 72 69 70 74 69 art of descripti
0810: 6f 6e 20 6f 66 20 61 20 73 70 65 63 69 66 69 63 on of a specific
0820: 20 6f 70 74 69 6f 6e 2e 20 20 63 6d 64 4e 61 6d option. cmdNam
0830: 65 20 67 69 76 65 73 20 74 68 65 0a 2e 5c 22 09 e gives the..\".
0840: 6f 70 74 69 6f 6e 27 73 20 6e 61 6d 65 20 61 73 option's name as
0850: 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 specified in th
0860: 65 20 63 6c 61 73 73 20 63 6f 6d 6d 61 6e 64 2c e class command,
0870: 20 64 62 4e 61 6d 65 20 67 69 76 65 73 0a 2e 5c dbName gives..\
0880: 22 09 74 68 65 20 6f 70 74 69 6f 6e 27 73 20 6e ".the option's n
0890: 61 6d 65 20 69 6e 20 74 68 65 20 6f 70 74 69 6f ame in the optio
08a0: 6e 20 64 61 74 61 62 61 73 65 2c 20 61 6e 64 20 n database, and
08b0: 64 62 43 6c 61 73 73 20 67 69 76 65 73 0a 2e 5c dbClass gives..\
08c0: 22 09 74 68 65 20 6f 70 74 69 6f 6e 27 73 20 63 ".the option's c
08d0: 6c 61 73 73 20 69 6e 20 74 68 65 20 6f 70 74 69 lass in the opti
08e0: 6f 6e 20 64 61 74 61 62 61 73 65 2e 0a 2e 5c 22 on database...\"
08f0: 0a 2e 5c 22 20 2e 55 4c 20 61 72 67 31 20 61 72 ..\" .UL arg1 ar
0900: 67 32 0a 2e 5c 22 09 50 72 69 6e 74 20 61 72 67 g2..\".Print arg
0910: 31 20 75 6e 64 65 72 6c 69 6e 65 64 2c 20 74 68 1 underlined, th
0920: 65 6e 20 70 72 69 6e 74 20 61 72 67 32 20 6e 6f en print arg2 no
0930: 72 6d 61 6c 6c 79 2e 0a 2e 5c 22 0a 2e 5c 22 20 rmally...\"..\"
0940: 2e 51 57 20 61 72 67 31 20 3f 61 72 67 32 3f 0a .QW arg1 ?arg2?.
0950: 2e 5c 22 09 50 72 69 6e 74 20 61 72 67 31 20 69 .\".Print arg1 i
0960: 6e 20 71 75 6f 74 65 73 2c 20 74 68 65 6e 20 61 n quotes, then a
0970: 72 67 32 20 6e 6f 72 6d 61 6c 6c 79 20 28 66 6f rg2 normally (fo
0980: 72 20 74 72 61 69 6c 69 6e 67 20 70 75 6e 63 74 r trailing punct
0990: 75 61 74 69 6f 6e 29 2e 0a 2e 5c 22 0a 2e 5c 22 uation)...\"..\"
09a0: 20 2e 50 51 20 61 72 67 31 20 3f 61 72 67 32 3f .PQ arg1 ?arg2?
09b0: 0a 2e 5c 22 09 50 72 69 6e 74 20 61 6e 20 6f 70 ..\".Print an op
09c0: 65 6e 20 70 61 72 65 6e 74 68 65 73 69 73 2c 20 en parenthesis,
09d0: 61 72 67 31 20 69 6e 20 71 75 6f 74 65 73 2c 20 arg1 in quotes,
09e0: 74 68 65 6e 20 61 72 67 32 20 6e 6f 72 6d 61 6c then arg2 normal
09f0: 6c 79 0a 2e 5c 22 09 28 66 6f 72 20 74 72 61 69 ly..\".(for trai
0a00: 6c 69 6e 67 20 70 75 6e 63 74 75 61 74 69 6f 6e ling punctuation
0a10: 29 20 61 6e 64 20 74 68 65 6e 20 61 20 63 6c 6f ) and then a clo
0a20: 73 69 6e 67 20 70 61 72 65 6e 74 68 65 73 69 73 sing parenthesis
0a30: 2e 0a 2e 5c 22 0a 2e 5c 22 09 23 20 53 65 74 20 ...\"..\".# Set
0a40: 75 70 20 74 72 61 70 73 20 61 6e 64 20 6f 74 68 up traps and oth
0a50: 65 72 20 6d 69 73 63 65 6c 6c 61 6e 65 6f 75 73 er miscellaneous
0a60: 20 73 74 75 66 66 20 66 6f 72 20 54 63 6c 2f 54 stuff for Tcl/T
0a70: 6b 20 6d 61 6e 20 70 61 67 65 73 2e 0a 2e 69 66 k man pages...if
0a80: 20 74 20 2e 77 68 20 2d 31 2e 33 69 20 5e 42 0a t .wh -1.3i ^B.
0a90: 2e 6e 72 20 5e 6c 20 5c 6e 28 2e 6c 0a 2e 61 64 .nr ^l \n(.l..ad
0aa0: 20 62 0a 2e 5c 22 09 23 20 53 74 61 72 74 20 61 b..\".# Start a
0ab0: 6e 20 61 72 67 75 6d 65 6e 74 20 64 65 73 63 72 n argument descr
0ac0: 69 70 74 69 6f 6e 0a 2e 64 65 20 41 50 0a 2e 69 iption..de AP..i
0ad0: 65 20 21 22 5c 5c 24 34 22 22 20 2e 54 50 20 5c e !"\\$4"" .TP \
0ae0: 5c 24 34 0a 2e 65 6c 20 5c 7b 5c 0a 2e 20 20 20 \$4..el \{\..
0af0: 69 65 20 21 22 5c 5c 24 32 22 22 20 2e 54 50 20 ie !"\\$2"" .TP
0b00: 5c 5c 6e 28 29 43 75 0a 2e 20 20 20 65 6c 20 20 \\n()Cu.. el
0b10: 20 20 20 20 20 20 20 20 2e 54 50 20 31 35 0a 2e .TP 15..
0b20: 5c 7d 0a 2e 74 61 20 5c 5c 6e 28 29 41 75 20 5c \}..ta \\n()Au \
0b30: 5c 6e 28 29 42 75 0a 2e 69 65 20 21 22 5c 5c 24 \n()Bu..ie !"\\$
0b40: 33 22 22 20 5c 7b 5c 0a 5c 26 5c 5c 24 31 20 5c 3"" \{\.\&\\$1 \
0b50: 5c 66 49 5c 5c 24 32 5c 5c 66 50 20 28 5c 5c 24 \fI\\$2\\fP (\\$
0b60: 33 29 0a 2e 5c 22 2e 62 0a 2e 5c 7d 0a 2e 65 6c 3)..\".b..\}..el
0b70: 20 5c 7b 5c 0a 2e 62 72 0a 2e 69 65 20 21 22 5c \{\..br..ie !"\
0b80: 5c 24 32 22 22 20 5c 7b 5c 0a 5c 26 5c 5c 24 31 \$2"" \{\.\&\\$1
0b90: 09 5c 5c 66 49 5c 5c 24 32 5c 5c 66 50 0a 2e 5c .\\fI\\$2\\fP..\
0ba0: 7d 0a 2e 65 6c 20 5c 7b 5c 0a 5c 26 5c 5c 66 49 }..el \{\.\&\\fI
0bb0: 5c 5c 24 31 5c 5c 66 50 0a 2e 5c 7d 0a 2e 5c 7d \\$1\\fP..\}..\}
0bc0: 0a 2e 2e 0a 2e 5c 22 09 23 20 64 65 66 69 6e 65 .....\".# define
0bd0: 20 74 61 62 62 69 6e 67 20 76 61 6c 75 65 73 20 tabbing values
0be0: 66 6f 72 20 2e 41 50 0a 2e 64 65 20 41 53 0a 2e for .AP..de AS..
0bf0: 6e 72 20 29 41 20 31 30 6e 0a 2e 69 66 20 21 22 nr )A 10n..if !"
0c00: 5c 5c 24 31 22 22 20 2e 6e 72 20 29 41 20 5c 5c \\$1"" .nr )A \\
0c10: 77 27 5c 5c 24 31 27 75 2b 33 6e 0a 2e 6e 72 20 w'\\$1'u+3n..nr
0c20: 29 42 20 5c 5c 6e 28 29 41 75 2b 31 35 6e 0a 2e )B \\n()Au+15n..
0c30: 5c 22 0a 2e 69 66 20 21 22 5c 5c 24 32 22 22 20 \"..if !"\\$2""
0c40: 2e 6e 72 20 29 42 20 5c 5c 77 27 5c 5c 24 32 27 .nr )B \\w'\\$2'
0c50: 75 2b 5c 5c 6e 28 29 41 75 2b 33 6e 0a 2e 6e 72 u+\\n()Au+3n..nr
0c60: 20 29 43 20 5c 5c 6e 28 29 42 75 2b 5c 5c 77 27 )C \\n()Bu+\\w'
0c70: 28 69 6e 2f 6f 75 74 29 27 75 2b 32 6e 0a 2e 2e (in/out)'u+2n...
0c80: 0a 2e 41 53 20 54 63 6c 5f 49 6e 74 65 72 70 20 ..AS Tcl_Interp
0c90: 54 63 6c 5f 43 72 65 61 74 65 49 6e 74 65 72 70 Tcl_CreateInterp
0ca0: 20 69 6e 2f 6f 75 74 0a 2e 5c 22 09 23 20 42 53 in/out..\".# BS
0cb0: 20 2d 20 73 74 61 72 74 20 62 6f 78 65 64 20 74 - start boxed t
0cc0: 65 78 74 0a 2e 5c 22 09 23 20 5e 79 20 3d 20 73 ext..\".# ^y = s
0cd0: 74 61 72 74 69 6e 67 20 79 20 6c 6f 63 61 74 69 tarting y locati
0ce0: 6f 6e 0a 2e 5c 22 09 23 20 5e 62 20 3d 20 31 0a on..\".# ^b = 1.
0cf0: 2e 64 65 20 42 53 0a 2e 62 72 0a 2e 6d 6b 20 5e .de BS..br..mk ^
0d00: 79 0a 2e 6e 72 20 5e 62 20 31 75 0a 2e 69 66 20 y..nr ^b 1u..if
0d10: 6e 20 2e 6e 66 0a 2e 69 66 20 6e 20 2e 74 69 20 n .nf..if n .ti
0d20: 30 0a 2e 69 66 20 6e 20 5c 6c 27 5c 5c 6e 28 2e 0..if n \l'\\n(.
0d30: 6c 75 5c 28 75 6c 27 0a 2e 69 66 20 6e 20 2e 66 lu\(ul'..if n .f
0d40: 69 0a 2e 2e 0a 2e 5c 22 09 23 20 42 45 20 2d 20 i.....\".# BE -
0d50: 65 6e 64 20 62 6f 78 65 64 20 74 65 78 74 20 28 end boxed text (
0d60: 64 72 61 77 20 62 6f 78 20 6e 6f 77 29 0a 2e 64 draw box now)..d
0d70: 65 20 42 45 0a 2e 6e 66 0a 2e 74 69 20 30 0a 2e e BE..nf..ti 0..
0d80: 6d 6b 20 5e 74 0a 2e 69 65 20 6e 20 5c 6c 27 5c mk ^t..ie n \l'\
0d90: 5c 6e 28 5e 6c 75 5c 28 75 6c 27 0a 2e 65 6c 20 \n(^lu\(ul'..el
0da0: 5c 7b 5c 0a 2e 5c 22 09 44 72 61 77 20 66 6f 75 \{\..\".Draw fou
0db0: 72 2d 73 69 64 65 64 20 62 6f 78 20 6e 6f 72 6d r-sided box norm
0dc0: 61 6c 6c 79 2c 20 62 75 74 20 64 6f 6e 27 74 20 ally, but don't
0dd0: 64 72 61 77 20 74 6f 70 20 6f 66 0a 2e 5c 22 09 draw top of..\".
0de0: 62 6f 78 20 69 66 20 74 68 65 20 62 6f 78 20 73 box if the box s
0df0: 74 61 72 74 65 64 20 6f 6e 20 61 6e 20 65 61 72 tarted on an ear
0e00: 6c 69 65 72 20 70 61 67 65 2e 0a 2e 69 65 20 21 lier page...ie !
0e10: 5c 5c 6e 28 5e 62 2d 31 20 5c 7b 5c 0a 5c 68 27 \\n(^b-1 \{\.\h'
0e20: 2d 31 2e 35 6e 27 5c 4c 27 7c 5c 5c 6e 28 5e 79 -1.5n'\L'|\\n(^y
0e30: 75 2d 31 76 27 5c 6c 27 5c 5c 6e 28 5e 6c 75 2b u-1v'\l'\\n(^lu+
0e40: 33 6e 5c 28 75 6c 27 5c 4c 27 5c 5c 6e 28 5e 74 3n\(ul'\L'\\n(^t
0e50: 75 2b 31 76 2d 5c 5c 6e 28 5e 79 75 27 5c 6c 27 u+1v-\\n(^yu'\l'
0e60: 7c 30 75 2d 31 2e 35 6e 5c 28 75 6c 27 0a 2e 5c |0u-1.5n\(ul'..\
0e70: 7d 0a 2e 65 6c 20 5c 7d 5c 0a 5c 68 27 2d 31 2e }..el \}\.\h'-1.
0e80: 35 6e 27 5c 4c 27 7c 5c 5c 6e 28 5e 79 75 2d 31 5n'\L'|\\n(^yu-1
0e90: 76 27 5c 68 27 5c 5c 6e 28 5e 6c 75 2b 33 6e 27 v'\h'\\n(^lu+3n'
0ea0: 5c 4c 27 5c 5c 6e 28 5e 74 75 2b 31 76 2d 5c 5c \L'\\n(^tu+1v-\\
0eb0: 6e 28 5e 79 75 27 5c 6c 27 7c 30 75 2d 31 2e 35 n(^yu'\l'|0u-1.5
0ec0: 6e 5c 28 75 6c 27 0a 2e 5c 7d 0a 2e 5c 7d 0a 2e n\(ul'..\}..\}..
0ed0: 66 69 0a 2e 62 72 0a 2e 6e 72 20 5e 62 20 30 0a fi..br..nr ^b 0.
0ee0: 2e 2e 0a 2e 5c 22 09 23 20 56 53 20 2d 20 73 74 ....\".# VS - st
0ef0: 61 72 74 20 76 65 72 74 69 63 61 6c 20 73 69 64 art vertical sid
0f00: 65 62 61 72 0a 2e 5c 22 09 23 20 5e 59 20 3d 20 ebar..\".# ^Y =
0f10: 73 74 61 72 74 69 6e 67 20 79 20 6c 6f 63 61 74 starting y locat
0f20: 69 6f 6e 0a 2e 5c 22 09 23 20 5e 76 20 3d 20 31 ion..\".# ^v = 1
0f30: 20 28 66 6f 72 20 74 72 6f 66 66 3b 20 20 66 6f (for troff; fo
0f40: 72 20 6e 72 6f 66 66 20 74 68 69 73 20 64 6f 65 r nroff this doe
0f50: 73 6e 27 74 20 6d 61 74 74 65 72 29 0a 2e 64 65 sn't matter)..de
0f60: 20 56 53 0a 2e 69 66 20 21 22 5c 5c 24 32 22 22 VS..if !"\\$2""
0f70: 20 2e 62 72 0a 2e 6d 6b 20 5e 59 0a 2e 69 65 20 .br..mk ^Y..ie
0f80: 6e 20 27 6d 63 20 5c 73 31 32 5c 28 62 72 5c 73 n 'mc \s12\(br\s
0f90: 30 0a 2e 65 6c 20 2e 6e 72 20 5e 76 20 31 75 0a 0..el .nr ^v 1u.
0fa0: 2e 2e 0a 2e 5c 22 09 23 20 56 45 20 2d 20 65 6e ....\".# VE - en
0fb0: 64 20 6f 66 20 76 65 72 74 69 63 61 6c 20 73 69 d of vertical si
0fc0: 64 65 62 61 72 0a 2e 64 65 20 56 45 0a 2e 69 65 debar..de VE..ie
0fd0: 20 6e 20 27 6d 63 0a 2e 65 6c 20 5c 7b 5c 0a 2e n 'mc..el \{\..
0fe0: 65 76 20 32 0a 2e 6e 66 0a 2e 74 69 20 30 0a 2e ev 2..nf..ti 0..
0ff0: 6d 6b 20 5e 74 0a 5c 68 27 7c 5c 5c 6e 28 5e 6c mk ^t.\h'|\\n(^l
1000: 75 2b 33 6e 27 5c 4c 27 7c 5c 5c 6e 28 5e 59 75 u+3n'\L'|\\n(^Yu
1010: 2d 31 76 5c 28 62 76 27 5c 76 27 5c 5c 6e 28 5e -1v\(bv'\v'\\n(^
1020: 74 75 2b 31 76 2d 5c 5c 6e 28 5e 59 75 27 5c 68 tu+1v-\\n(^Yu'\h
1030: 27 2d 7c 5c 5c 6e 28 5e 6c 75 2b 33 6e 27 0a 2e '-|\\n(^lu+3n'..
1040: 73 70 20 2d 31 0a 2e 66 69 0a 2e 65 76 0a 2e 5c sp -1..fi..ev..\
1050: 7d 0a 2e 6e 72 20 5e 76 20 30 0a 2e 2e 0a 2e 5c }..nr ^v 0.....\
1060: 22 09 23 20 53 70 65 63 69 61 6c 20 6d 61 63 72 ".# Special macr
1070: 6f 20 74 6f 20 68 61 6e 64 6c 65 20 70 61 67 65 o to handle page
1080: 20 62 6f 74 74 6f 6d 3a 20 20 66 69 6e 69 73 68 bottom: finish
1090: 20 6f 66 66 20 63 75 72 72 65 6e 74 0a 2e 5c 22 off current..\"
10a0: 09 23 20 62 6f 78 2f 73 69 64 65 62 61 72 20 69 .# box/sidebar i
10b0: 66 20 69 6e 20 62 6f 78 2f 73 69 64 65 62 61 72 f in box/sidebar
10c0: 20 6d 6f 64 65 2c 20 74 68 65 6e 20 69 6e 76 6f mode, then invo
10d0: 6b 65 64 20 73 74 61 6e 64 61 72 64 0a 2e 5c 22 ked standard..\"
10e0: 09 23 20 70 61 67 65 20 62 6f 74 74 6f 6d 20 6d .# page bottom m
10f0: 61 63 72 6f 2e 0a 2e 64 65 20 5e 42 0a 2e 65 76 acro...de ^B..ev
1100: 20 32 0a 27 74 69 20 30 0a 27 6e 66 0a 2e 6d 6b 2.'ti 0.'nf..mk
1110: 20 5e 74 0a 2e 69 66 20 5c 5c 6e 28 5e 62 20 5c ^t..if \\n(^b \
1120: 7b 5c 0a 2e 5c 22 09 44 72 61 77 20 74 68 72 65 {\..\".Draw thre
1130: 65 2d 73 69 64 65 64 20 62 6f 78 20 69 66 20 74 e-sided box if t
1140: 68 69 73 20 69 73 20 74 68 65 20 62 6f 78 27 73 his is the box's
1150: 20 66 69 72 73 74 20 70 61 67 65 2c 0a 2e 5c 22 first page,..\"
1160: 09 64 72 61 77 20 74 77 6f 20 73 69 64 65 73 20 .draw two sides
1170: 62 75 74 20 6e 6f 20 74 6f 70 20 6f 74 68 65 72 but no top other
1180: 77 69 73 65 2e 0a 2e 69 65 20 21 5c 5c 6e 28 5e wise...ie !\\n(^
1190: 62 2d 31 20 5c 68 27 2d 31 2e 35 6e 27 5c 4c 27 b-1 \h'-1.5n'\L'
11a0: 7c 5c 5c 6e 28 5e 79 75 2d 31 76 27 5c 6c 27 5c |\\n(^yu-1v'\l'\
11b0: 5c 6e 28 5e 6c 75 2b 33 6e 5c 28 75 6c 27 5c 4c \n(^lu+3n\(ul'\L
11c0: 27 5c 5c 6e 28 5e 74 75 2b 31 76 2d 5c 5c 6e 28 '\\n(^tu+1v-\\n(
11d0: 5e 79 75 27 5c 68 27 7c 30 75 27 5c 63 0a 2e 65 ^yu'\h'|0u'\c..e
11e0: 6c 20 5c 68 27 2d 31 2e 35 6e 27 5c 4c 27 7c 5c l \h'-1.5n'\L'|\
11f0: 5c 6e 28 5e 79 75 2d 31 76 27 5c 68 27 5c 5c 6e \n(^yu-1v'\h'\\n
1200: 28 5e 6c 75 2b 33 6e 27 5c 4c 27 5c 5c 6e 28 5e (^lu+3n'\L'\\n(^
1210: 74 75 2b 31 76 2d 5c 5c 6e 28 5e 79 75 27 5c 68 tu+1v-\\n(^yu'\h
1220: 27 7c 30 75 27 5c 63 0a 2e 5c 7d 0a 2e 69 66 20 '|0u'\c..\}..if
1230: 5c 5c 6e 28 5e 76 20 5c 7b 5c 0a 2e 6e 72 20 5e \\n(^v \{\..nr ^
1240: 78 20 5c 5c 6e 28 5e 74 75 2b 31 76 2d 5c 5c 6e x \\n(^tu+1v-\\n
1250: 28 5e 59 75 0a 5c 6b 78 5c 68 27 2d 5c 5c 6e 78 (^Yu.\kx\h'-\\nx
1260: 75 27 5c 68 27 7c 5c 5c 6e 28 5e 6c 75 2b 33 6e u'\h'|\\n(^lu+3n
1270: 27 5c 6b 79 5c 4c 27 2d 5c 5c 6e 28 5e 78 75 27 '\ky\L'-\\n(^xu'
1280: 5c 76 27 5c 5c 6e 28 5e 78 75 27 5c 68 27 7c 30 \v'\\n(^xu'\h'|0
1290: 75 27 5c 63 0a 2e 5c 7d 0a 2e 62 70 0a 27 66 69 u'\c..\}..bp.'fi
12a0: 0a 2e 65 76 0a 2e 69 66 20 5c 5c 6e 28 5e 62 20 ..ev..if \\n(^b
12b0: 5c 7b 5c 0a 2e 6d 6b 20 5e 79 0a 2e 6e 72 20 5e \{\..mk ^y..nr ^
12c0: 62 20 32 0a 2e 5c 7d 0a 2e 69 66 20 5c 5c 6e 28 b 2..\}..if \\n(
12d0: 5e 76 20 5c 7b 5c 0a 2e 6d 6b 20 5e 59 0a 2e 5c ^v \{\..mk ^Y..\
12e0: 7d 0a 2e 2e 0a 2e 5c 22 09 23 20 44 53 20 2d 20 }.....\".# DS -
12f0: 62 65 67 69 6e 20 64 69 73 70 6c 61 79 0a 2e 64 begin display..d
1300: 65 20 44 53 0a 2e 52 53 0a 2e 6e 66 0a 2e 73 70 e DS..RS..nf..sp
1310: 0a 2e 2e 0a 2e 5c 22 09 23 20 44 45 20 2d 20 65 .....\".# DE - e
1320: 6e 64 20 64 69 73 70 6c 61 79 0a 2e 64 65 20 44 nd display..de D
1330: 45 0a 2e 66 69 0a 2e 52 45 0a 2e 73 70 0a 2e 2e E..fi..RE..sp...
1340: 0a 2e 5c 22 09 23 20 53 4f 20 2d 20 73 74 61 72 ..\".# SO - star
1350: 74 20 6f 66 20 6c 69 73 74 20 6f 66 20 73 74 61 t of list of sta
1360: 6e 64 61 72 64 20 6f 70 74 69 6f 6e 73 0a 2e 64 ndard options..d
1370: 65 20 53 4f 0a 27 69 65 20 27 5c 5c 24 31 27 27 e SO.'ie '\\$1''
1380: 20 2e 64 73 20 53 6f 20 5c 5c 66 42 6f 70 74 69 .ds So \\fBopti
1390: 6f 6e 73 5c 5c 66 52 0a 27 65 6c 20 2e 64 73 20 ons\\fR.'el .ds
13a0: 53 6f 20 5c 5c 66 42 5c 5c 24 31 5c 5c 66 52 0a So \\fB\\$1\\fR.
13b0: 2e 53 48 20 22 53 54 41 4e 44 41 52 44 20 4f 50 .SH "STANDARD OP
13c0: 54 49 4f 4e 53 22 0a 2e 4c 50 0a 2e 6e 66 0a 2e TIONS"..LP..nf..
13d0: 74 61 20 35 2e 35 63 20 31 31 63 0a 2e 66 74 20 ta 5.5c 11c..ft
13e0: 42 0a 2e 2e 0a 2e 5c 22 09 23 20 53 45 20 2d 20 B.....\".# SE -
13f0: 65 6e 64 20 6f 66 20 6c 69 73 74 20 6f 66 20 73 end of list of s
1400: 74 61 6e 64 61 72 64 20 6f 70 74 69 6f 6e 73 0a tandard options.
1410: 2e 64 65 20 53 45 0a 2e 66 69 0a 2e 66 74 20 52 .de SE..fi..ft R
1420: 0a 2e 4c 50 0a 53 65 65 20 74 68 65 20 5c 5c 2a ..LP.See the \\*
1430: 28 53 6f 20 6d 61 6e 75 61 6c 20 65 6e 74 72 79 (So manual entry
1440: 20 66 6f 72 20 64 65 74 61 69 6c 73 20 6f 6e 20 for details on
1450: 74 68 65 20 73 74 61 6e 64 61 72 64 20 6f 70 74 the standard opt
1460: 69 6f 6e 73 2e 0a 2e 2e 0a 2e 5c 22 09 23 20 4f ions......\".# O
1470: 50 20 2d 20 73 74 61 72 74 20 6f 66 20 66 75 6c P - start of ful
1480: 6c 20 64 65 73 63 72 69 70 74 69 6f 6e 20 66 6f l description fo
1490: 72 20 61 20 73 69 6e 67 6c 65 20 6f 70 74 69 6f r a single optio
14a0: 6e 0a 2e 64 65 20 4f 50 0a 2e 4c 50 0a 2e 6e 66 n..de OP..LP..nf
14b0: 0a 2e 74 61 20 34 63 0a 43 6f 6d 6d 61 6e 64 2d ..ta 4c.Command-
14c0: 4c 69 6e 65 20 4e 61 6d 65 3a 09 5c 5c 66 42 5c Line Name:.\\fB\
14d0: 5c 24 31 5c 5c 66 52 0a 44 61 74 61 62 61 73 65 \$1\\fR.Database
14e0: 20 4e 61 6d 65 3a 09 5c 5c 66 42 5c 5c 24 32 5c Name:.\\fB\\$2\
14f0: 5c 66 52 0a 44 61 74 61 62 61 73 65 20 43 6c 61 \fR.Database Cla
1500: 73 73 3a 09 5c 5c 66 42 5c 5c 24 33 5c 5c 66 52 ss:.\\fB\\$3\\fR
1510: 0a 2e 66 69 0a 2e 49 50 0a 2e 2e 0a 2e 5c 22 09 ..fi..IP.....\".
1520: 23 20 43 53 20 2d 20 62 65 67 69 6e 20 63 6f 64 # CS - begin cod
1530: 65 20 65 78 63 65 72 70 74 0a 2e 64 65 20 43 53 e excerpt..de CS
1540: 0a 2e 52 53 0a 2e 6e 66 0a 2e 74 61 20 2e 32 35 ..RS..nf..ta .25
1550: 69 20 2e 35 69 20 2e 37 35 69 20 31 69 0a 2e 2e i .5i .75i 1i...
1560: 0a 2e 5c 22 09 23 20 43 45 20 2d 20 65 6e 64 20 ..\".# CE - end
1570: 63 6f 64 65 20 65 78 63 65 72 70 74 0a 2e 64 65 code excerpt..de
1580: 20 43 45 0a 2e 66 69 0a 2e 52 45 0a 2e 2e 0a 2e CE..fi..RE.....
1590: 5c 22 09 23 20 55 4c 20 2d 20 75 6e 64 65 72 6c \".# UL - underl
15a0: 69 6e 65 20 77 6f 72 64 0a 2e 64 65 20 55 4c 0a ine word..de UL.
15b0: 5c 5c 24 31 5c 6c 27 7c 30 5c 28 75 6c 27 5c 5c \\$1\l'|0\(ul'\\
15c0: 24 32 0a 2e 2e 0a 2e 5c 22 09 23 20 51 57 20 2d $2.....\".# QW -
15d0: 20 61 70 70 6c 79 20 71 75 6f 74 61 74 69 6f 6e apply quotation
15e0: 20 6d 61 72 6b 73 20 74 6f 20 77 6f 72 64 0a 2e marks to word..
15f0: 64 65 20 51 57 0a 2e 69 65 20 27 5c 5c 2a 28 6c de QW..ie '\\*(l
1600: 71 27 22 27 20 60 60 5c 5c 24 31 27 27 5c 5c 24 q'"' ``\\$1''\\$
1610: 32 0a 2e 5c 22 22 20 66 69 78 20 65 6d 61 63 73 2..\"" fix emacs
1620: 20 68 69 67 68 6c 69 67 68 74 69 6e 67 0a 2e 65 highlighting..e
1630: 6c 20 5c 5c 2a 28 6c 71 5c 5c 24 31 5c 5c 2a 28 l \\*(lq\\$1\\*(
1640: 72 71 5c 5c 24 32 0a 2e 2e 0a 2e 5c 22 09 23 20 rq\\$2.....\".#
1650: 50 51 20 2d 20 61 70 70 6c 79 20 70 61 72 65 6e PQ - apply paren
1660: 73 20 61 6e 64 20 71 75 6f 74 61 74 69 6f 6e 20 s and quotation
1670: 6d 61 72 6b 73 20 74 6f 20 77 6f 72 64 0a 2e 64 marks to word..d
1680: 65 20 50 51 0a 2e 69 65 20 27 5c 5c 2a 28 6c 71 e PQ..ie '\\*(lq
1690: 27 22 27 20 28 60 60 5c 5c 24 31 27 27 5c 5c 24 '"' (``\\$1''\\$
16a0: 32 29 5c 5c 24 33 0a 2e 5c 22 22 20 66 69 78 20 2)\\$3..\"" fix
16b0: 65 6d 61 63 73 20 68 69 67 68 6c 69 67 68 74 69 emacs highlighti
16c0: 6e 67 0a 2e 65 6c 20 28 5c 5c 2a 28 6c 71 5c 5c ng..el (\\*(lq\\
16d0: 24 31 5c 5c 2a 28 72 71 5c 5c 24 32 29 5c 5c 24 $1\\*(rq\\$2)\\$
16e0: 33 0a 2e 2e 0a 2e 5c 22 09 23 20 51 52 20 2d 20 3.....\".# QR -
16f0: 71 75 6f 74 65 64 20 72 61 6e 67 65 0a 2e 64 65 quoted range..de
1700: 20 51 52 0a 2e 69 65 20 27 5c 5c 2a 28 6c 71 27 QR..ie '\\*(lq'
1710: 22 27 20 60 60 5c 5c 24 31 27 27 5c 5c 2d 60 60 "' ``\\$1''\\-``
1720: 5c 5c 24 32 27 27 5c 5c 24 33 0a 2e 5c 22 22 20 \\$2''\\$3..\""
1730: 66 69 78 20 65 6d 61 63 73 20 68 69 67 68 6c 69 fix emacs highli
1740: 67 68 74 69 6e 67 0a 2e 65 6c 20 5c 5c 2a 28 6c ghting..el \\*(l
1750: 71 5c 5c 24 31 5c 5c 2a 28 72 71 5c 5c 2d 5c 5c q\\$1\\*(rq\\-\\
1760: 2a 28 6c 71 5c 5c 24 32 5c 5c 2a 28 72 71 5c 5c *(lq\\$2\\*(rq\\
1770: 24 33 0a 2e 2e 0a 2e 5c 22 09 23 20 4d 54 20 2d $3.....\".# MT -
1780: 20 22 65 6d 70 74 79 22 20 73 74 72 69 6e 67 0a "empty" string.
1790: 2e 64 65 20 4d 54 0a 2e 51 57 20 22 22 0a 2e 2e .de MT..QW ""...
17a0: 0a 2e 42 53 0a 2e 53 48 20 4e 41 4d 45 0a 74 6c ..BS..SH NAME.tl
17b0: 73 20 5c 2d 20 62 69 6e 64 69 6e 67 20 74 6f 20 s \- binding to
17c0: 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 the OpenSSL libr
17d0: 61 72 79 20 66 6f 72 20 65 6e 63 72 79 70 74 65 ary for encrypte
17e0: 64 20 73 6f 63 6b 65 74 20 61 6e 64 20 49 2f 4f d socket and I/O
17f0: 20 63 68 61 6e 6e 65 6c 20 63 6f 6d 6d 75 6e 69 channel communi
1800: 63 61 74 69 6f 6e 73 0a 2e 53 48 20 53 59 4e 4f cations..SH SYNO
1810: 50 53 49 53 0a 70 61 63 6b 61 67 65 20 72 65 71 PSIS.package req
1820: 75 69 72 65 20 5c 66 42 54 63 6c 20 38 5c 26 2e uire \fBTcl 8\&.
1830: 35 2d 5c 66 52 0a 2e 73 70 0a 70 61 63 6b 61 67 5-\fR..sp.packag
1840: 65 20 72 65 71 75 69 72 65 20 5c 66 42 74 6c 73 e require \fBtls
1850: 20 32 5c 26 2e 30 62 31 5c 66 52 0a 2e 73 70 0a 2\&.0b1\fR..sp.
1860: 5c 66 42 74 6c 73 3a 3a 69 6e 69 74 5c 66 52 20 \fBtls::init\fR
1870: 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 3f 20 ?\fI-option\fR?
1880: 3f 5c 66 49 76 61 6c 75 65 5c 66 52 3f 20 3f 5c ?\fIvalue\fR? ?\
1890: 66 49 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 fI-option value
18a0: 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 0a 2e 73 \&.\&.\&.\fR?..s
18b0: 70 0a 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 p.\fBtls::socket
18c0: 5c 66 52 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c \fR ?\fI-option\
18d0: 66 52 3f 20 3f 5c 66 49 76 61 6c 75 65 5c 66 52 fR? ?\fIvalue\fR
18e0: 3f 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 20 76 61 ? ?\fI-option va
18f0: 6c 75 65 20 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 lue \&.\&.\&.\fR
1900: 3f 20 5c 66 49 68 6f 73 74 5c 66 52 20 5c 66 49 ? \fIhost\fR \fI
1910: 70 6f 72 74 5c 66 52 0a 2e 73 70 0a 5c 66 42 74 port\fR..sp.\fBt
1920: 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 20 5c 66 ls::socket\fR \f
1930: 42 2d 73 65 72 76 65 72 5c 66 52 20 5c 66 49 63 B-server\fR \fIc
1940: 6f 6d 6d 61 6e 64 5c 66 52 20 3f 5c 66 49 2d 6f ommand\fR ?\fI-o
1950: 70 74 69 6f 6e 5c 66 52 3f 20 3f 5c 66 49 76 61 ption\fR? ?\fIva
1960: 6c 75 65 5c 66 52 3f 20 3f 5c 66 49 2d 6f 70 74 lue\fR? ?\fI-opt
1970: 69 6f 6e 20 76 61 6c 75 65 20 5c 26 2e 5c 26 2e ion value \&.\&.
1980: 5c 26 2e 5c 66 52 3f 20 5c 66 49 70 6f 72 74 5c \&.\fR? \fIport\
1990: 66 52 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a 3a 69 fR..sp.\fBtls::i
19a0: 6d 70 6f 72 74 5c 66 52 20 5c 66 49 63 68 61 6e mport\fR \fIchan
19b0: 6e 65 6c 5c 66 52 20 3f 5c 66 49 2d 6f 70 74 69 nel\fR ?\fI-opti
19c0: 6f 6e 5c 66 52 3f 20 3f 5c 66 49 76 61 6c 75 65 on\fR? ?\fIvalue
19d0: 5c 66 52 3f 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e \fR? ?\fI-option
19e0: 20 76 61 6c 75 65 20 5c 26 2e 5c 26 2e 5c 26 2e value \&.\&.\&.
19f0: 5c 66 52 3f 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a \fR?..sp.\fBtls:
1a00: 3a 75 6e 69 6d 70 6f 72 74 5c 66 52 20 5c 66 49 :unimport\fR \fI
1a10: 63 68 61 6e 6e 65 6c 5c 66 52 0a 2e 73 70 0a 5c channel\fR..sp.\
1a20: 66 42 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 fBtls::handshake
1a30: 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 \fR \fIchannel\f
1a40: 52 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a 3a 73 74 R..sp.\fBtls::st
1a50: 61 74 75 73 5c 66 52 20 3f 5c 66 42 2d 6c 6f 63 atus\fR ?\fB-loc
1a60: 61 6c 5c 66 52 3f 20 5c 66 49 63 68 61 6e 6e 65 al\fR? \fIchanne
1a70: 6c 5c 66 52 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a l\fR..sp.\fBtls:
1a80: 3a 63 6f 6e 6e 65 63 74 69 6f 6e 5c 66 52 20 5c :connection\fR \
1a90: 66 49 63 68 61 6e 6e 65 6c 5c 66 52 0a 2e 73 70 fIchannel\fR..sp
1aa0: 0a 5c 66 42 74 6c 73 3a 3a 63 69 70 68 65 72 73 .\fBtls::ciphers
1ab0: 5c 66 52 20 3f 5c 66 49 70 72 6f 74 6f 63 6f 6c \fR ?\fIprotocol
1ac0: 5c 66 52 3f 20 3f 5c 66 49 76 65 72 62 6f 73 65 \fR? ?\fIverbose
1ad0: 5c 66 52 3f 20 3f 5c 66 49 73 75 70 70 6f 72 74 \fR? ?\fIsupport
1ae0: 65 64 5c 66 52 3f 0a 2e 73 70 0a 5c 66 42 74 6c ed\fR?..sp.\fBtl
1af0: 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 5c 66 52 0a s::protocols\fR.
1b00: 2e 73 70 0a 5c 66 42 74 6c 73 3a 3a 76 65 72 73 .sp.\fBtls::vers
1b10: 69 6f 6e 5c 66 52 0a 2e 73 70 0a 2e 42 45 0a 2e ion\fR..sp..BE..
1b20: 53 48 20 44 45 53 43 52 49 50 54 49 4f 4e 0a 54 SH DESCRIPTION.T
1b30: 68 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 his extension pr
1b40: 6f 76 69 64 65 73 20 54 43 4c 20 73 63 72 69 70 ovides TCL scrip
1b50: 74 20 61 63 63 65 73 73 20 74 6f 20 73 65 63 75 t access to secu
1b60: 72 65 20 73 6f 63 6b 65 74 20 63 6f 6d 6d 75 6e re socket commun
1b70: 69 63 61 74 69 6f 6e 73 0a 75 73 69 6e 67 20 74 ications.using t
1b80: 68 65 20 54 72 61 6e 73 70 6f 72 74 20 4c 61 79 he Transport Lay
1b90: 65 72 20 53 65 63 75 72 69 74 79 20 28 54 4c 53 er Security (TLS
1ba0: 29 20 70 72 6f 74 6f 63 6f 6c 5c 26 2e 20 49 74 ) protocol\&. It
1bb0: 20 70 72 6f 76 69 64 65 73 20 61 20 67 65 6e 65 provides a gene
1bc0: 72 69 63 0a 62 69 6e 64 69 6e 67 20 74 6f 20 5c ric.binding to \
1bd0: 66 49 4f 70 65 6e 53 53 4c 5c 66 52 20 5b 68 74 fIOpenSSL\fR [ht
1be0: 74 70 73 3a 2f 2f 77 77 77 5c 26 2e 6f 70 65 6e tps://www\&.open
1bf0: 73 73 6c 5c 26 2e 6f 72 67 2f 5d 2c 20 75 74 69 ssl\&.org/], uti
1c00: 6c 69 7a 69 6e 67 20 74 68 65 0a 5c 66 42 54 63 lizing the.\fBTc
1c10: 6c 5f 53 74 61 63 6b 43 68 61 6e 6e 65 6c 5c 66 l_StackChannel\f
1c20: 52 20 41 50 49 20 69 6e 20 54 43 4c 20 38 5c 26 R API in TCL 8\&
1c30: 2e 34 20 6f 72 20 6c 61 74 65 72 5c 26 2e 0a 54 .4 or later\&..T
1c40: 68 65 73 65 20 73 6f 63 6b 65 74 73 20 62 65 68 hese sockets beh
1c50: 61 76 65 20 65 78 61 63 74 6c 79 20 74 68 65 20 ave exactly the
1c60: 73 61 6d 65 20 61 73 20 63 68 61 6e 6e 65 6c 73 same as channels
1c70: 20 63 72 65 61 74 65 64 20 75 73 69 6e 67 20 74 created using t
1c80: 68 65 20 62 75 69 6c 74 2d 69 6e 0a 5c 66 42 73 he built-in.\fBs
1c90: 6f 63 6b 65 74 5c 66 52 20 63 6f 6d 6d 61 6e 64 ocket\fR command
1ca0: 2c 20 62 75 74 20 70 72 6f 76 69 64 65 20 61 64 , but provide ad
1cb0: 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 ditional options
1cc0: 20 66 6f 72 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 for controlling
1cd0: 0a 74 68 65 20 53 53 4c 2f 54 4c 53 20 73 65 73 .the SSL/TLS ses
1ce0: 73 69 6f 6e 5c 26 2e 0a 2e 53 48 20 43 4f 4d 50 sion\&...SH COMP
1cf0: 41 54 49 42 49 4c 49 54 59 0a 54 68 69 73 20 65 ATIBILITY.This e
1d00: 78 74 65 6e 73 69 6f 6e 20 69 73 20 63 6f 6d 70 xtension is comp
1d10: 61 74 69 62 6c 65 20 77 69 74 68 20 4f 70 65 6e atible with Open
1d20: 53 53 4c 20 31 5c 26 2e 31 5c 26 2e 31 20 6f 72 SSL 1\&.1\&.1 or
1d30: 20 6c 61 74 65 72 5c 26 2e 20 49 74 20 72 65 71 later\&. It req
1d40: 75 69 72 65 73 20 54 63 6c 0a 76 65 72 73 69 6f uires Tcl.versio
1d50: 6e 20 38 5c 26 2e 35 20 6f 72 20 6c 61 74 65 72 n 8\&.5 or later
1d60: 20 61 6e 64 20 77 69 6c 6c 20 77 6f 72 6b 20 77 and will work w
1d70: 69 74 68 20 54 63 6c 20 39 5c 26 2e 30 5c 26 2e ith Tcl 9\&.0\&.
1d80: 0a 2e 53 48 20 43 4f 4d 4d 41 4e 44 53 0a 54 68 ..SH COMMANDS.Th
1d90: 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 61 72 65 20 e following are
1da0: 74 68 65 20 63 6f 6d 6d 61 6e 64 73 20 70 72 6f the commands pro
1db0: 76 69 64 65 64 20 62 79 20 74 68 65 20 54 63 4c vided by the TcL
1dc0: 54 4c 53 20 70 61 63 6b 61 67 65 5c 26 2e 20 53 TLS package\&. S
1dd0: 65 65 20 74 68 65 0a 5c 66 42 45 78 61 6d 70 6c ee the.\fBExampl
1de0: 65 73 5c 66 52 20 66 6f 72 20 65 78 61 6d 70 6c es\fR for exampl
1df0: 65 20 75 73 61 67 65 20 61 6e 64 20 74 68 65 20 e usage and the
1e00: 22 5c 66 49 64 65 6d 6f 73 5c 66 52 22 20 64 69 "\fIdemos\fR" di
1e10: 72 65 63 74 6f 72 79 20 66 6f 72 0a 6d 6f 72 65 rectory for.more
1e20: 20 65 78 61 6d 70 6c 65 20 75 73 61 67 65 5c 26 example usage\&
1e30: 2e 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 69 6e ...TP.\fBtls::in
1e40: 69 74 5c 66 52 20 3f 5c 66 49 2d 6f 70 74 69 6f it\fR ?\fI-optio
1e50: 6e 5c 66 52 3f 20 3f 5c 66 49 76 61 6c 75 65 5c n\fR? ?\fIvalue\
1e60: 66 52 3f 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 20 fR? ?\fI-option
1e70: 76 61 6c 75 65 20 5c 26 2e 5c 26 2e 5c 26 2e 5c value \&.\&.\&.\
1e80: 66 52 3f 0a 4f 70 74 69 6f 6e 61 6c 20 66 75 6e fR?.Optional fun
1e90: 63 74 69 6f 6e 20 74 6f 20 73 65 74 20 74 68 65 ction to set the
1ea0: 20 64 65 66 61 75 6c 74 20 6f 70 74 69 6f 6e 73 default options
1eb0: 20 75 73 65 64 20 62 79 20 5c 66 42 74 6c 73 3a used by \fBtls:
1ec0: 3a 73 6f 63 6b 65 74 5c 66 52 5c 26 2e 20 49 66 :socket\fR\&. If
1ed0: 20 79 6f 75 0a 63 61 6c 6c 20 5c 66 42 74 6c 73 you.call \fBtls
1ee0: 3a 3a 69 6d 70 6f 72 74 5c 66 52 20 64 69 72 65 ::import\fR dire
1ef0: 63 74 6c 79 2c 20 74 68 65 20 76 61 6c 75 65 73 ctly, the values
1f00: 20 73 65 74 20 62 79 20 74 68 69 73 20 63 6f 6d set by this com
1f10: 6d 61 6e 64 20 68 61 76 65 20 6e 6f 20 65 66 66 mand have no eff
1f20: 65 63 74 5c 26 2e 0a 54 68 69 73 20 63 6f 6d 6d ect\&..This comm
1f30: 61 6e 64 20 73 75 70 70 6f 72 74 73 20 61 6c 6c and supports all
1f40: 20 6f 66 20 74 68 65 20 73 61 6d 65 20 6f 70 74 of the same opt
1f50: 69 6f 6e 73 20 61 73 20 74 68 65 20 5c 66 42 74 ions as the \fBt
1f60: 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 20 63 6f ls::socket\fR co
1f70: 6d 6d 61 6e 64 2c 0a 74 68 6f 75 67 68 20 79 6f mmand,.though yo
1f80: 75 20 73 68 6f 75 6c 64 20 6c 69 6d 69 74 20 79 u should limit y
1f90: 6f 75 72 20 6f 70 74 69 6f 6e 73 20 74 6f 20 6f our options to o
1fa0: 6e 6c 79 20 74 68 65 20 54 4c 53 20 72 65 6c 61 nly the TLS rela
1fb0: 74 65 64 20 6f 6e 65 73 5c 26 2e 0a 2e 54 50 0a ted ones\&...TP.
1fc0: 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 \fBtls::socket\f
1fd0: 52 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 R ?\fI-option\fR
1fe0: 3f 20 3f 5c 66 49 76 61 6c 75 65 5c 66 52 3f 20 ? ?\fIvalue\fR?
1ff0: 3f 5c 66 49 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 ?\fI-option valu
2000: 65 20 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 20 e \&.\&.\&.\fR?
2010: 5c 66 49 68 6f 73 74 5c 66 52 20 5c 66 49 70 6f \fIhost\fR \fIpo
2020: 72 74 5c 66 52 0a 54 68 69 73 20 69 73 20 61 20 rt\fR.This is a
2030: 68 65 6c 70 65 72 20 66 75 6e 63 74 69 6f 6e 20 helper function
2040: 74 68 61 74 20 75 74 69 6c 69 7a 65 73 20 74 68 that utilizes th
2050: 65 20 75 6e 64 65 72 6c 79 69 6e 67 20 63 6f 6d e underlying com
2060: 6d 61 6e 64 73 20 5c 66 42 73 6f 63 6b 65 74 5c mands \fBsocket\
2070: 66 52 0a 61 6e 64 20 5c 66 42 74 6c 73 3a 3a 69 fR.and \fBtls::i
2080: 6d 70 6f 72 74 5c 66 52 20 74 6f 20 63 72 65 61 mport\fR to crea
2090: 74 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f te the connectio
20a0: 6e 5c 26 2e 20 49 74 20 62 65 68 61 76 65 73 20 n\&. It behaves
20b0: 74 68 65 20 73 61 6d 65 20 61 73 20 74 68 65 0a the same as the.
20c0: 6e 61 74 69 76 65 20 54 43 4c 20 5c 66 42 73 6f native TCL \fBso
20d0: 63 6b 65 74 5c 66 52 20 63 6f 6d 6d 61 6e 64 2c cket\fR command,
20e0: 20 62 75 74 20 61 6c 73 6f 20 73 75 70 70 6f 72 but also suppor
20f0: 74 73 20 74 68 65 20 5c 66 42 74 6c 73 3a 3a 69 ts the \fBtls::i
2100: 6d 70 6f 72 74 5c 66 52 0a 63 6f 6d 6d 61 6e 64 mport\fR.command
2110: 20 6f 70 74 69 6f 6e 73 20 77 69 74 68 20 6f 6e options with on
2120: 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 6f 70 74 e additional opt
2130: 69 6f 6e 5c 26 2e 20 49 74 20 72 65 74 75 72 6e ion\&. It return
2140: 73 20 74 68 65 20 63 68 61 6e 6e 65 6c 20 68 61 s the channel ha
2150: 6e 64 6c 65 20 69 64 0a 66 6f 72 20 74 68 65 20 ndle id.for the
2160: 6e 65 77 20 73 6f 63 6b 65 74 5c 26 2e 0a 2e 52 new socket\&...R
2170: 53 0a 2e 54 50 0a 5c 66 42 2d 61 75 74 6f 73 65 S..TP.\fB-autose
2180: 72 76 65 72 6e 61 6d 65 5c 66 52 20 5c 66 49 62 rvername\fR \fIb
2190: 6f 6f 6c 5c 66 52 0a 49 66 20 5c 66 42 74 72 75 ool\fR.If \fBtru
21a0: 65 5c 66 52 2c 20 61 75 74 6f 6d 61 74 69 63 61 e\fR, automatica
21b0: 6c 6c 79 20 73 65 74 20 74 68 65 20 5c 66 42 2d lly set the \fB-
21c0: 73 65 72 76 65 72 6e 61 6d 65 5c 66 52 20 61 72 servername\fR ar
21d0: 67 75 6d 65 6e 74 20 74 6f 20 74 68 65 0a 5c 66 gument to the.\f
21e0: 49 68 6f 73 74 5c 66 52 20 61 72 67 75 6d 65 6e Ihost\fR argumen
21f0: 74 5c 26 2e 20 50 72 69 6f 72 20 74 6f 20 54 63 t\&. Prior to Tc
2200: 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 74 68 65 20 lTLS 2\&.0, the
2210: 64 65 66 61 75 6c 74 20 69 73 20 5c 66 42 66 61 default is \fBfa
2220: 6c 73 65 5c 66 52 5c 26 2e 0a 53 74 61 72 74 69 lse\fR\&..Starti
2230: 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 ng in TclTLS 2\&
2240: 2e 30 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20 .0, the default
2250: 69 73 20 5c 66 42 74 72 75 65 5c 66 52 20 75 6e is \fBtrue\fR un
2260: 6c 65 73 73 20 5c 66 42 2d 73 65 72 76 65 72 6e less \fB-servern
2270: 61 6d 65 5c 66 52 0a 69 73 20 61 6c 73 6f 20 73 ame\fR.is also s
2280: 70 65 63 69 66 69 65 64 5c 26 2e 0a 2e 52 45 0a pecified\&...RE.
2290: 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b .TP.\fBtls::sock
22a0: 65 74 5c 66 52 20 5c 66 42 2d 73 65 72 76 65 72 et\fR \fB-server
22b0: 5c 66 52 20 5c 66 49 63 6f 6d 6d 61 6e 64 5c 66 \fR \fIcommand\f
22c0: 52 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 R ?\fI-option\fR
22d0: 3f 20 3f 5c 66 49 76 61 6c 75 65 5c 66 52 3f 20 ? ?\fIvalue\fR?
22e0: 3f 5c 66 49 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 ?\fI-option valu
22f0: 65 20 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 20 e \&.\&.\&.\fR?
2300: 5c 66 49 70 6f 72 74 5c 66 52 0a 53 61 6d 65 20 \fIport\fR.Same
2310: 61 73 20 70 72 65 76 69 6f 75 73 2c 20 62 75 74 as previous, but
2320: 20 69 6e 73 74 65 61 64 20 63 72 65 61 74 65 73 instead creates
2330: 20 61 20 73 65 72 76 65 72 20 73 6f 63 6b 65 74 a server socket
2340: 20 66 6f 72 20 63 6c 69 65 6e 74 73 20 74 6f 20 for clients to
2350: 63 6f 6e 6e 65 63 74 20 74 6f 0a 6a 75 73 74 20 connect to.just
2360: 6c 69 6b 65 20 74 68 65 20 54 63 6c 20 5c 66 42 like the Tcl \fB
2370: 73 6f 63 6b 65 74 20 2d 73 65 72 76 65 72 5c 66 socket -server\f
2380: 52 20 63 6f 6d 6d 61 6e 64 5c 26 2e 20 49 74 20 R command\&. It
2390: 72 65 74 75 72 6e 73 20 74 68 65 20 63 68 61 6e returns the chan
23a0: 6e 65 6c 0a 68 61 6e 64 6c 65 20 69 64 20 66 6f nel.handle id fo
23b0: 72 20 74 68 65 20 6e 65 77 20 73 6f 63 6b 65 74 r the new socket
23c0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a \&...TP.\fBtls::
23d0: 69 6d 70 6f 72 74 5c 66 52 20 5c 66 49 63 68 61 import\fR \fIcha
23e0: 6e 6e 65 6c 5c 66 52 20 3f 5c 66 49 2d 6f 70 74 nnel\fR ?\fI-opt
23f0: 69 6f 6e 5c 66 52 3f 20 3f 5c 66 49 76 61 6c 75 ion\fR? ?\fIvalu
2400: 65 5c 66 52 3f 20 3f 5c 66 49 2d 6f 70 74 69 6f e\fR? ?\fI-optio
2410: 6e 20 76 61 6c 75 65 20 5c 26 2e 5c 26 2e 5c 26 n value \&.\&.\&
2420: 2e 5c 66 52 3f 0a 53 74 61 72 74 20 54 4c 53 20 .\fR?.Start TLS
2430: 65 6e 63 72 79 70 74 69 6f 6e 20 6f 6e 20 54 43 encryption on TC
2440: 4c 20 63 68 61 6e 6e 65 6c 20 5c 66 49 63 68 61 L channel \fIcha
2450: 6e 6e 65 6c 5c 66 52 20 76 69 61 20 61 20 73 74 nnel\fR via a st
2460: 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 5c 26 2e acked channel\&.
2470: 20 49 74 0a 6e 65 65 64 20 6e 6f 74 20 62 65 20 It.need not be
2480: 61 20 73 6f 63 6b 65 74 2c 20 62 75 74 20 6d 75 a socket, but mu
2490: 73 74 20 70 72 6f 76 69 64 65 20 62 69 2d 64 69 st provide bi-di
24a0: 72 65 63 74 69 6f 6e 61 6c 20 66 6c 6f 77 5c 26 rectional flow\&
24b0: 2e 20 41 6c 73 6f 20 73 65 74 73 20 73 65 73 73 . Also sets sess
24c0: 69 6f 6e 0a 70 61 72 61 6d 65 74 65 72 73 20 66 ion.parameters f
24d0: 6f 72 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 or SSL handshake
24e0: 5c 26 2e 20 56 61 6c 69 64 20 6f 70 74 69 6f 6e \&. Valid option
24f0: 73 20 61 72 65 3a 0a 2e 52 53 0a 2e 54 50 0a 5c s are:..RS..TP.\
2500: 66 42 2d 61 6c 70 6e 5c 66 52 20 5c 66 49 6c 69 fB-alpn\fR \fIli
2510: 73 74 5c 66 52 0a 4c 69 73 74 20 6f 66 20 70 72 st\fR.List of pr
2520: 6f 74 6f 63 6f 6c 73 20 74 6f 20 6f 66 66 65 72 otocols to offer
2530: 20 64 75 72 69 6e 67 20 41 70 70 6c 69 63 61 74 during Applicat
2540: 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 ion-Layer Protoc
2550: 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e 0a 28 ol Negotiation.(
2560: 41 4c 50 4e 29 5c 26 2e 20 46 6f 72 20 65 78 61 ALPN)\&. For exa
2570: 6d 70 6c 65 3a 20 5c 66 42 68 32 5c 66 52 20 61 mple: \fBh2\fR a
2580: 6e 64 20 5c 66 42 68 74 74 70 2f 31 5c 26 2e 31 nd \fBhttp/1\&.1
2590: 5c 66 52 2c 20 62 75 74 20 6e 6f 74 20 5c 66 42 \fR, but not \fB
25a0: 68 33 5c 66 52 20 6f 72 0a 5c 66 42 71 75 69 63 h3\fR or.\fBquic
25b0: 5c 66 52 5c 26 2e 20 54 68 69 73 20 6f 70 74 69 \fR\&. This opti
25c0: 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 on is new for Tc
25d0: 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 lTLS 1\&.8\&...T
25e0: 50 0a 5c 66 42 2d 63 61 64 69 72 5c 66 52 20 5c P.\fB-cadir\fR \
25f0: 66 49 64 69 72 65 63 74 6f 72 79 5c 66 52 0a 53 fIdirectory\fR.S
2600: 70 65 63 69 66 69 65 73 20 74 68 65 20 64 69 72 pecifies the dir
2610: 65 63 74 6f 72 79 20 77 68 65 72 65 20 74 68 65 ectory where the
2620: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 Certificate Aut
2630: 68 6f 72 69 74 79 20 28 43 41 29 20 63 65 72 74 hority (CA) cert
2640: 69 66 69 63 61 74 65 73 20 61 72 65 0a 73 74 6f ificates are.sto
2650: 72 65 64 5c 26 2e 20 54 68 65 20 64 65 66 61 75 red\&. The defau
2660: 6c 74 20 69 73 20 70 6c 61 74 66 6f 72 6d 20 73 lt is platform s
2670: 70 65 63 69 66 69 63 20 61 6e 64 20 63 61 6e 20 pecific and can
2680: 62 65 20 73 65 74 20 61 74 20 63 6f 6d 70 69 6c be set at compil
2690: 65 20 74 69 6d 65 5c 26 2e 20 54 68 65 0a 64 65 e time\&. The.de
26a0: 66 61 75 6c 74 20 6c 6f 63 61 74 69 6f 6e 20 63 fault location c
26b0: 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e an be overridden
26c0: 20 62 79 20 74 68 65 20 5c 66 42 53 53 4c 5f 43 by the \fBSSL_C
26d0: 45 52 54 5f 44 49 52 5c 66 52 20 65 6e 76 69 72 ERT_DIR\fR envir
26e0: 6f 6e 6d 65 6e 74 0a 76 61 72 69 61 62 6c 65 5c onment.variable\
26f0: 26 2e 20 53 65 65 20 5c 66 42 43 65 72 74 69 66 &. See \fBCertif
2700: 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e icate Validation
2710: 5c 66 52 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 \fR for more det
2720: 61 69 6c 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d ails\&...TP.\fB-
2730: 63 61 66 69 6c 65 5c 66 52 20 5c 66 49 66 69 6c cafile\fR \fIfil
2740: 65 6e 61 6d 65 5c 66 52 0a 53 70 65 63 69 66 69 ename\fR.Specifi
2750: 65 73 20 74 68 65 20 66 69 6c 65 20 77 69 74 68 es the file with
2760: 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 the Certificate
2770: 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 Authority (CA)
2780: 63 65 72 74 69 66 69 63 61 74 65 73 20 74 6f 20 certificates to
2790: 75 73 65 20 69 6e 0a 5c 66 42 50 45 4d 5c 66 52 use in.\fBPEM\fR
27a0: 20 66 69 6c 65 20 66 6f 72 6d 61 74 5c 26 2e 20 file format\&.
27b0: 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 22 The default is "
27c0: 5c 66 49 63 65 72 74 5c 26 2e 70 65 6d 5c 66 52 \fIcert\&.pem\fR
27d0: 22 2c 20 69 6e 20 74 68 65 20 4f 70 65 6e 53 53 ", in the OpenSS
27e0: 4c 0a 64 69 72 65 63 74 6f 72 79 5c 26 2e 20 54 L.directory\&. T
27f0: 68 65 20 64 65 66 61 75 6c 74 20 66 69 6c 65 20 he default file
2800: 63 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 can be overridde
2810: 6e 20 62 79 20 74 68 65 20 5c 66 42 53 53 4c 5f n by the \fBSSL_
2820: 43 45 52 54 5f 46 49 4c 45 5c 66 52 20 65 6e 76 CERT_FILE\fR env
2830: 69 72 6f 6e 6d 65 6e 74 0a 76 61 72 69 61 62 6c ironment.variabl
2840: 65 5c 26 2e 20 53 65 65 20 5c 66 42 43 65 72 74 e\&. See \fBCert
2850: 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 ificate Validati
2860: 6f 6e 5c 66 52 20 66 6f 72 20 6d 6f 72 65 20 64 on\fR for more d
2870: 65 74 61 69 6c 73 5c 26 2e 0a 2e 54 50 0a 5c 66 etails\&...TP.\f
2880: 42 2d 63 61 73 74 6f 72 65 5c 66 52 20 5c 66 49 B-castore\fR \fI
2890: 55 52 49 5c 66 52 0a 53 70 65 63 69 66 69 65 73 URI\fR.Specifies
28a0: 20 74 68 65 20 55 6e 69 66 6f 72 6d 20 52 65 73 the Uniform Res
28b0: 6f 75 72 63 65 20 49 64 65 6e 74 69 66 69 65 72 ource Identifier
28c0: 20 28 55 52 49 29 20 66 6f 72 20 74 68 65 20 43 (URI) for the C
28d0: 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f ertificate Autho
28e0: 72 69 74 79 0a 28 43 41 29 20 73 74 6f 72 65 2c rity.(CA) store,
28f0: 20 77 68 69 63 68 20 6d 61 79 20 62 65 20 61 20 which may be a
2900: 73 69 6e 67 6c 65 20 63 6f 6e 74 61 69 6e 65 72 single container
2910: 20 6f 72 20 61 20 63 61 74 61 6c 6f 67 20 6f 66 or a catalog of
2920: 20 63 6f 6e 74 61 69 6e 65 72 73 5c 26 2e 0a 53 containers\&..S
2930: 74 61 72 74 69 6e 67 20 77 69 74 68 20 4f 70 65 tarting with Ope
2940: 6e 53 53 4c 20 33 5c 26 2e 32 20 6f 6e 20 4d 53 nSSL 3\&.2 on MS
2950: 20 57 69 6e 64 6f 77 73 2c 20 73 65 74 20 74 6f Windows, set to
2960: 20 22 5c 66 42 6f 72 67 5c 26 2e 6f 70 65 6e 73 "\fBorg\&.opens
2970: 73 6c 5c 26 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f sl\&.winstore://
2980: 5c 66 52 22 0a 74 6f 20 75 73 65 20 74 68 65 20 \fR".to use the
2990: 62 75 69 6c 74 2d 69 6e 20 4d 53 20 57 69 6e 64 built-in MS Wind
29a0: 6f 77 73 20 43 65 72 74 69 66 69 63 61 74 65 20 ows Certificate
29b0: 53 74 6f 72 65 5c 26 2e 0a 53 65 65 20 5c 66 42 Store\&..See \fB
29c0: 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 Certificate Vali
29d0: 64 61 74 69 6f 6e 5c 66 52 20 66 6f 72 20 6d 6f dation\fR for mo
29e0: 72 65 20 64 65 74 61 69 6c 73 5c 26 2e 0a 54 68 re details\&..Th
29f0: 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 is option is new
2a00: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e for TclTLS 1\&.
2a10: 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 65 72 8\&...TP.\fB-cer
2a20: 74 66 69 6c 65 5c 66 52 20 5c 66 49 66 69 6c 65 tfile\fR \fIfile
2a30: 6e 61 6d 65 5c 66 52 0a 53 70 65 63 69 66 69 65 name\fR.Specifie
2a40: 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 s the name of th
2a50: 65 20 66 69 6c 65 20 77 69 74 68 20 74 68 65 20 e file with the
2a60: 63 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 certificate to u
2a70: 73 65 20 69 6e 20 50 45 4d 20 66 6f 72 6d 61 74 se in PEM format
2a80: 0a 61 73 20 74 68 65 20 6c 6f 63 61 6c 20 28 63 .as the local (c
2a90: 6c 69 65 6e 74 20 6f 72 20 73 65 72 76 65 72 29 lient or server)
2aa0: 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 2e 20 certificate\&.
2ab0: 49 74 20 61 6c 73 6f 20 63 6f 6e 74 61 69 6e 73 It also contains
2ac0: 20 74 68 65 20 70 75 62 6c 69 63 20 6b 65 79 5c the public key\
2ad0: 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 65 72 74 5c &...TP.\fB-cert\
2ae0: 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a fR \fIstring\fR.
2af0: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 63 65 Specifies the ce
2b00: 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 73 65 rtificate to use
2b10: 20 61 73 20 61 20 44 45 52 20 65 6e 63 6f 64 65 as a DER encode
2b20: 64 20 73 74 72 69 6e 67 20 28 58 5c 26 2e 35 30 d string (X\&.50
2b30: 39 20 44 45 52 29 5c 26 2e 0a 2e 54 50 0a 5c 66 9 DER)\&...TP.\f
2b40: 42 2d 63 69 70 68 65 72 5c 66 52 20 5c 66 49 73 B-cipher\fR \fIs
2b50: 74 72 69 6e 67 5c 66 52 0a 53 70 65 63 69 66 69 tring\fR.Specifi
2b60: 65 73 20 74 68 65 20 6c 69 73 74 20 6f 66 20 63 es the list of c
2b70: 69 70 68 65 72 73 20 74 6f 20 75 73 65 20 66 6f iphers to use fo
2b80: 72 20 54 4c 53 20 31 5c 26 2e 32 20 61 6e 64 20 r TLS 1\&.2 and
2b90: 65 61 72 6c 69 65 72 20 63 6f 6e 6e 65 63 74 69 earlier connecti
2ba0: 6f 6e 73 5c 26 2e 0a 53 74 72 69 6e 67 20 69 73 ons\&..String is
2bb0: 20 61 20 63 6f 6c 6f 6e 20 22 5c 66 42 3a 5c 66 a colon "\fB:\f
2bc0: 52 22 20 73 65 70 61 72 61 74 65 64 20 6c 69 73 R" separated lis
2bd0: 74 20 6f 66 20 63 69 70 68 65 72 73 5c 26 2e 0a t of ciphers\&..
2be0: 43 69 70 68 65 72 73 20 63 61 6e 20 62 65 20 63 Ciphers can be c
2bf0: 6f 6d 62 69 6e 65 64 20 75 73 69 6e 67 20 74 68 ombined using th
2c00: 65 20 22 5c 66 42 2b 5c 66 52 22 20 63 68 61 72 e "\fB+\fR" char
2c10: 61 63 74 65 72 5c 26 2e 0a 50 72 65 66 69 78 65 acter\&..Prefixe
2c20: 73 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f s can be used to
2c30: 20 70 65 72 6d 61 6e 65 6e 74 6c 79 20 72 65 6d permanently rem
2c40: 6f 76 65 20 22 5c 66 42 21 5c 66 52 22 2c 20 64 ove "\fB!\fR", d
2c50: 65 6c 65 74 65 20 22 5c 66 42 2d 5c 66 52 22 2c elete "\fB-\fR",
2c60: 20 6f 72 0a 6d 6f 76 65 20 74 6f 20 74 68 65 20 or.move to the
2c70: 65 6e 64 20 22 5c 66 42 2b 5c 66 52 22 20 61 20 end "\fB+\fR" a
2c80: 73 70 65 63 69 66 69 65 64 20 63 69 70 68 65 72 specified cipher
2c90: 5c 26 2e 0a 4b 65 79 77 6f 72 64 73 20 5c 66 42 \&..Keywords \fB
2ca0: 40 53 54 52 45 4e 47 54 48 5c 66 52 20 28 73 6f @STRENGTH\fR (so
2cb0: 72 74 20 62 79 20 61 6c 67 6f 72 69 74 68 6d 20 rt by algorithm
2cc0: 6b 65 79 20 6c 65 6e 67 74 68 29 2c 0a 5c 66 42 key length),.\fB
2cd0: 40 53 45 43 4c 45 56 45 4c 3d 5c 66 52 5c 66 49 @SECLEVEL=\fR\fI
2ce0: 6e 5c 66 52 20 28 73 65 74 20 73 65 63 75 72 69 n\fR (set securi
2cf0: 74 79 20 6c 65 76 65 6c 20 74 6f 20 6e 29 2c 20 ty level to n),
2d00: 61 6e 64 0a 5c 66 42 44 45 46 41 55 4c 54 5c 66 and.\fBDEFAULT\f
2d10: 52 20 28 75 73 65 20 64 65 66 61 75 6c 74 20 63 R (use default c
2d20: 69 70 68 65 72 20 6c 69 73 74 2c 20 61 74 20 73 ipher list, at s
2d30: 74 61 72 74 20 6f 6e 6c 79 29 20 63 61 6e 20 61 tart only) can a
2d40: 6c 73 6f 20 62 65 20 73 70 65 63 69 66 69 65 64 lso be specified
2d50: 5c 26 2e 0a 53 65 65 20 74 68 65 20 5c 66 49 4f \&..See the \fIO
2d60: 70 65 6e 53 53 4c 5c 66 52 20 5b 68 74 74 70 73 penSSL\fR [https
2d70: 3a 2f 2f 64 6f 63 73 5c 26 2e 6f 70 65 6e 73 73 ://docs\&.openss
2d80: 6c 5c 26 2e 6f 72 67 2f 6d 61 73 74 65 72 2f 6d l\&.org/master/m
2d90: 61 6e 31 2f 6f 70 65 6e 73 73 6c 2d 63 69 70 68 an1/openssl-ciph
2da0: 65 72 73 2f 23 6f 70 74 69 6f 6e 73 5d 0a 64 6f ers/#options].do
2db0: 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 cumentation for
2dc0: 74 68 65 20 66 75 6c 6c 20 6c 69 73 74 20 6f 66 the full list of
2dd0: 20 76 61 6c 69 64 20 76 61 6c 75 65 73 5c 26 2e valid values\&.
2de0: 0a 2e 54 50 0a 5c 66 42 2d 63 69 70 68 65 72 73 ..TP.\fB-ciphers
2df0: 75 69 74 65 73 5c 66 52 20 5c 66 49 73 74 72 69 uites\fR \fIstri
2e00: 6e 67 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 ng\fR.Specifies
2e10: 74 68 65 20 6c 69 73 74 20 6f 66 20 63 69 70 68 the list of ciph
2e20: 65 72 20 73 75 69 74 65 73 20 74 6f 20 75 73 65 er suites to use
2e30: 20 66 6f 72 20 54 4c 53 20 31 5c 26 2e 33 20 61 for TLS 1\&.3 a
2e40: 73 20 61 20 63 6f 6c 6f 6e 0a 22 5c 66 42 3a 5c s a colon."\fB:\
2e50: 66 52 22 20 73 65 70 61 72 61 74 65 64 20 6c 69 fR" separated li
2e60: 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 75 69 st of cipher sui
2e70: 74 65 20 6e 61 6d 65 73 5c 26 2e 20 53 65 65 20 te names\&. See
2e80: 74 68 65 0a 5c 66 49 4f 70 65 6e 53 53 4c 5c 66 the.\fIOpenSSL\f
2e90: 52 20 5b 68 74 74 70 73 3a 2f 2f 64 6f 63 73 5c R [https://docs\
2ea0: 26 2e 6f 70 65 6e 73 73 6c 5c 26 2e 6f 72 67 2f &.openssl\&.org/
2eb0: 6d 61 73 74 65 72 2f 6d 61 6e 31 2f 6f 70 65 6e master/man1/open
2ec0: 73 73 6c 2d 63 69 70 68 65 72 73 2f 23 6f 70 74 ssl-ciphers/#opt
2ed0: 69 6f 6e 73 5d 0a 64 6f 63 75 6d 65 6e 74 61 74 ions].documentat
2ee0: 69 6f 6e 20 66 6f 72 20 74 68 65 20 66 75 6c 6c ion for the full
2ef0: 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 64 20 76 list of valid v
2f00: 61 6c 75 65 73 5c 26 2e 0a 54 68 69 73 20 6f 70 alues\&..This op
2f10: 74 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 tion is new for
2f20: 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a TclTLS 1\&.8\&..
2f30: 2e 54 50 0a 5c 66 42 2d 63 6f 6d 6d 61 6e 64 5c .TP.\fB-command\
2f40: 66 52 20 5c 66 49 63 61 6c 6c 62 61 63 6b 5c 66 fR \fIcallback\f
2f50: 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 20 R.Specifies the
2f60: 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 callback command
2f70: 20 74 6f 20 62 65 20 69 6e 76 6f 6b 65 64 20 61 to be invoked a
2f80: 74 20 73 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 t several points
2f90: 20 64 75 72 69 6e 67 20 74 68 65 0a 68 61 6e 64 during the.hand
2fa0: 73 68 61 6b 65 20 74 6f 20 70 61 73 73 20 65 72 shake to pass er
2fb0: 72 6f 72 73 2c 20 74 72 61 63 69 6e 67 20 69 6e rors, tracing in
2fc0: 66 6f 72 6d 61 74 69 6f 6e 2c 20 61 6e 64 20 70 formation, and p
2fd0: 72 6f 74 6f 63 6f 6c 20 6d 65 73 73 61 67 65 73 rotocol messages
2fe0: 5c 26 2e 0a 53 65 65 20 5c 66 42 43 61 6c 6c 62 \&..See \fBCallb
2ff0: 61 63 6b 20 4f 70 74 69 6f 6e 73 5c 66 52 20 66 ack Options\fR f
3000: 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 5c 26 2e 0a or more info\&..
3010: 2e 54 50 0a 5c 66 42 2d 64 68 70 61 72 61 6d 73 .TP.\fB-dhparams
3020: 5c 66 52 20 5c 66 49 66 69 6c 65 6e 61 6d 65 5c \fR \fIfilename\
3030: 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 fR.Specifies the
3040: 20 44 69 66 66 69 65 2d 48 65 6c 6c 6d 61 6e 20 Diffie-Hellman
3050: 28 44 48 29 20 70 61 72 61 6d 65 74 65 72 73 20 (DH) parameters
3060: 66 69 6c 65 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d file\&...TP.\fB-
3070: 6b 65 79 66 69 6c 65 5c 66 52 20 5c 66 49 66 69 keyfile\fR \fIfi
3080: 6c 65 6e 61 6d 65 5c 66 52 0a 53 70 65 63 69 66 lename\fR.Specif
3090: 69 65 73 20 74 68 65 20 70 72 69 76 61 74 65 20 ies the private
30a0: 6b 65 79 20 66 69 6c 65 5c 26 2e 20 54 68 65 20 key file\&. The
30b0: 64 65 66 61 75 6c 74 20 69 73 20 74 6f 20 75 73 default is to us
30c0: 65 20 74 68 65 20 66 69 6c 65 0a 73 70 65 63 69 e the file.speci
30d0: 66 69 65 64 20 62 79 20 74 68 65 20 5c 66 42 2d fied by the \fB-
30e0: 63 65 72 74 66 69 6c 65 5c 66 52 20 6f 70 74 69 certfile\fR opti
30f0: 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 6b 65 on\&...TP.\fB-ke
3100: 79 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 y\fR \fIstring\f
3110: 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 20 R.Specifies the
3120: 70 72 69 76 61 74 65 20 6b 65 79 20 74 6f 20 75 private key to u
3130: 73 65 20 61 73 20 61 20 44 45 52 20 65 6e 63 6f se as a DER enco
3140: 64 65 64 20 73 74 72 69 6e 67 20 28 50 4b 43 53 ded string (PKCS
3150: 23 31 20 44 45 52 29 5c 26 2e 0a 2e 54 50 0a 5c #1 DER)\&...TP.\
3160: 66 42 2d 6d 6f 64 65 6c 5c 66 52 20 5c 66 49 63 fB-model\fR \fIc
3170: 68 61 6e 6e 65 6c 5c 66 52 0a 46 6f 72 63 65 20 hannel\fR.Force
3180: 74 68 69 73 20 63 68 61 6e 6e 65 6c 20 74 6f 20 this channel to
3190: 73 68 61 72 65 20 74 68 65 20 73 61 6d 65 20 5c share the same \
31a0: 66 49 53 53 4c 5f 43 54 58 5c 66 52 20 73 74 72 fISSL_CTX\fR str
31b0: 75 63 74 75 72 65 20 61 73 20 74 68 65 0a 73 70 ucture as the.sp
31c0: 65 63 69 66 69 65 64 20 5c 66 49 63 68 61 6e 6e ecified \fIchann
31d0: 65 6c 5c 66 52 2c 20 61 6e 64 20 74 68 65 72 65 el\fR, and there
31e0: 66 6f 72 65 20 73 68 61 72 65 20 63 6f 6e 66 69 fore share confi
31f0: 67 2c 20 63 61 6c 6c 62 61 63 6b 73 2c 20 65 74 g, callbacks, et
3200: 63 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 70 61 73 c\&...TP.\fB-pas
3210: 73 77 6f 72 64 5c 66 52 20 5c 66 49 63 61 6c 6c sword\fR \fIcall
3220: 62 61 63 6b 5c 66 52 0a 53 70 65 63 69 66 69 65 back\fR.Specifie
3230: 73 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 63 s the callback c
3240: 6f 6d 6d 61 6e 64 20 74 6f 20 69 6e 76 6f 6b 65 ommand to invoke
3250: 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 when OpenSSL ne
3260: 65 64 73 20 74 6f 20 6f 62 74 61 69 6e 20 61 0a eds to obtain a.
3270: 70 61 73 73 77 6f 72 64 5c 26 2e 20 54 68 69 73 password\&. This
3280: 20 69 73 20 74 79 70 69 63 61 6c 6c 79 20 75 73 is typically us
3290: 65 64 20 74 6f 20 75 6e 6c 6f 63 6b 20 74 68 65 ed to unlock the
32a0: 20 70 72 69 76 61 74 65 20 6b 65 79 20 6f 66 20 private key of
32b0: 61 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 2e a certificate\&.
32c0: 0a 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 68 .The callback sh
32d0: 6f 75 6c 64 20 72 65 74 75 72 6e 20 61 20 70 61 ould return a pa
32e0: 73 73 77 6f 72 64 20 73 74 72 69 6e 67 5c 26 2e ssword string\&.
32f0: 20 54 68 69 73 20 6f 70 74 69 6f 6e 20 68 61 73 This option has
3300: 20 63 68 61 6e 67 65 64 20 66 6f 72 0a 54 63 6c changed for.Tcl
3310: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 20 53 65 65 TLS 1\&.8\&. See
3320: 20 5c 66 42 43 61 6c 6c 62 61 63 6b 20 4f 70 74 \fBCallback Opt
3330: 69 6f 6e 73 5c 66 52 20 66 6f 72 20 6d 6f 72 65 ions\fR for more
3340: 20 69 6e 66 6f 5c 26 2e 0a 2e 54 50 0a 5c 66 42 info\&...TP.\fB
3350: 2d 70 6f 73 74 5f 68 61 6e 64 73 68 61 6b 65 5c -post_handshake\
3360: 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 41 6c fR \fIbool\fR.Al
3370: 6c 6f 77 20 70 6f 73 74 2d 68 61 6e 64 73 68 61 low post-handsha
3380: 6b 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 ke session ticke
3390: 74 20 75 70 64 61 74 65 73 5c 26 2e 20 54 68 69 t updates\&. Thi
33a0: 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 s option is new
33b0: 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 for TclTLS 1\&.8
33c0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 72 65 71 75 \&...TP.\fB-requ
33d0: 65 73 74 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 est\fR \fIbool\f
33e0: 52 0a 52 65 71 75 65 73 74 20 61 20 63 65 72 74 R.Request a cert
33f0: 69 66 69 63 61 74 65 20 66 72 6f 6d 20 74 68 65 ificate from the
3400: 20 70 65 65 72 20 64 75 72 69 6e 67 20 74 68 65 peer during the
3410: 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 5c 26 SSL handshake\&
3420: 2e 20 54 68 69 73 20 69 73 20 6e 65 65 64 65 64 . This is needed
3430: 0a 74 6f 20 64 6f 20 43 65 72 74 69 66 69 63 61 .to do Certifica
3440: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 5c 26 2e te Validation\&.
3450: 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c Starting in Tcl
3460: 54 4c 53 20 31 5c 26 2e 38 2c 20 74 68 65 20 64 TLS 1\&.8, the d
3470: 65 66 61 75 6c 74 20 69 73 0a 5c 66 42 74 72 75 efault is.\fBtru
3480: 65 5c 66 52 5c 26 2e 20 53 74 61 72 74 69 6e 67 e\fR\&. Starting
3490: 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 2e 30 in TclTLS 2\&.0
34a0: 2c 20 69 66 20 73 65 74 20 74 6f 20 5c 66 42 66 , if set to \fBf
34b0: 61 6c 73 65 5c 66 52 20 61 6e 64 0a 5c 66 42 2d alse\fR and.\fB-
34c0: 72 65 71 75 69 72 65 5c 66 52 20 69 73 20 5c 66 require\fR is \f
34d0: 42 74 72 75 65 5c 66 52 2c 20 74 68 65 6e 20 74 Btrue\fR, then t
34e0: 68 69 73 20 77 69 6c 6c 20 62 65 20 6f 76 65 72 his will be over
34f0: 72 69 64 64 65 6e 20 74 6f 20 5c 66 42 74 72 75 ridden to \fBtru
3500: 65 5c 66 52 5c 26 2e 0a 53 65 65 20 5c 66 42 43 e\fR\&..See \fBC
3510: 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 ertificate Valid
3520: 61 74 69 6f 6e 5c 66 52 20 66 6f 72 20 6d 6f 72 ation\fR for mor
3530: 65 20 64 65 74 61 69 6c 73 5c 26 2e 0a 2e 54 50 e details\&...TP
3540: 0a 5c 66 42 2d 72 65 71 75 69 72 65 5c 66 52 20 .\fB-require\fR
3550: 5c 66 49 62 6f 6f 6c 5c 66 52 0a 52 65 71 75 69 \fIbool\fR.Requi
3560: 72 65 20 61 20 76 61 6c 69 64 20 63 65 72 74 69 re a valid certi
3570: 66 69 63 61 74 65 20 66 72 6f 6d 20 74 68 65 20 ficate from the
3580: 70 65 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 peer during the
3590: 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 5c 26 2e SSL handshake\&.
35a0: 20 49 66 20 74 68 69 73 20 69 73 0a 73 65 74 20 If this is.set
35b0: 74 6f 20 74 72 75 65 2c 20 74 68 65 6e 20 5c 66 to true, then \f
35c0: 42 2d 72 65 71 75 65 73 74 5c 66 52 20 6d 75 73 B-request\fR mus
35d0: 74 20 61 6c 73 6f 20 62 65 20 73 65 74 20 74 6f t also be set to
35e0: 20 74 72 75 65 20 61 6e 64 20 61 20 65 69 74 68 true and a eith
35f0: 65 72 0a 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c er.\fB-cadir\fR,
3600: 20 5c 66 42 2d 63 61 66 69 6c 65 5c 66 52 2c 20 \fB-cafile\fR,
3610: 5c 66 42 2d 63 61 73 74 6f 72 65 5c 66 52 2c 20 \fB-castore\fR,
3620: 6f 72 20 61 20 70 6c 61 74 66 6f 72 6d 20 64 65 or a platform de
3630: 66 61 75 6c 74 0a 6d 75 73 74 20 62 65 20 70 72 fault.must be pr
3640: 6f 76 69 64 65 64 20 69 6e 20 6f 72 64 65 72 20 ovided in order
3650: 74 6f 20 76 61 6c 69 64 61 74 65 20 61 67 61 69 to validate agai
3660: 6e 73 74 5c 26 2e 20 54 68 65 20 64 65 66 61 75 nst\&. The defau
3670: 6c 74 20 69 6e 20 54 63 6c 54 4c 53 20 31 5c 26 lt in TclTLS 1\&
3680: 2e 38 20 61 6e 64 0a 65 61 72 6c 69 65 72 20 76 .8 and.earlier v
3690: 65 72 73 69 6f 6e 73 20 69 73 20 5c 66 42 66 61 ersions is \fBfa
36a0: 6c 73 65 5c 66 52 20 73 69 6e 63 65 20 6e 6f 74 lse\fR since not
36b0: 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d 73 20 68 all platforms h
36c0: 61 76 65 20 63 65 72 74 69 66 69 63 61 74 65 73 ave certificates
36d0: 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 67 61 to.validate aga
36e0: 69 6e 73 74 20 69 6e 20 61 20 66 6f 72 6d 20 63 inst in a form c
36f0: 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 4f ompatible with O
3700: 70 65 6e 53 53 4c 5c 26 2e 20 53 74 61 72 74 69 penSSL\&. Starti
3710: 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 ng in TclTLS 2\&
3720: 2e 30 2c 0a 74 68 65 20 64 65 66 61 75 6c 74 20 .0,.the default
3730: 69 73 20 5c 66 42 74 72 75 65 5c 66 52 5c 26 2e is \fBtrue\fR\&.
3740: 0a 53 65 65 20 5c 66 42 43 65 72 74 69 66 69 63 .See \fBCertific
3750: 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 5c 66 ate Validation\f
3760: 52 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 R for more detai
3770: 6c 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 73 65 ls\&...TP.\fB-se
3780: 63 75 72 69 74 79 5f 6c 65 76 65 6c 5c 66 52 20 curity_level\fR
3790: 5c 66 49 69 6e 74 65 67 65 72 5c 66 52 0a 53 70 \fIinteger\fR.Sp
37a0: 65 63 69 66 69 65 73 20 74 68 65 20 73 65 63 75 ecifies the secu
37b0: 72 69 74 79 20 6c 65 76 65 6c 20 28 76 61 6c 75 rity level (valu
37c0: 65 20 66 72 6f 6d 20 30 20 74 6f 20 35 29 5c 26 e from 0 to 5)\&
37d0: 2e 20 54 68 65 20 73 65 63 75 72 69 74 79 20 6c . The security l
37e0: 65 76 65 6c 20 61 66 66 65 63 74 73 0a 74 68 65 evel affects.the
37f0: 20 61 6c 6c 6f 77 65 64 20 63 69 70 68 65 72 20 allowed cipher
3800: 73 75 69 74 65 20 65 6e 63 72 79 70 74 69 6f 6e suite encryption
3810: 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20 73 75 70 algorithms, sup
3820: 70 6f 72 74 65 64 20 45 43 43 20 63 75 72 76 65 ported ECC curve
3830: 73 2c 0a 73 75 70 70 6f 72 74 65 64 20 73 69 67 s,.supported sig
3840: 6e 61 74 75 72 65 20 61 6c 67 6f 72 69 74 68 6d nature algorithm
3850: 73 2c 20 44 48 20 70 61 72 61 6d 65 74 65 72 20 s, DH parameter
3860: 73 69 7a 65 73 2c 20 63 65 72 74 69 66 69 63 61 sizes, certifica
3870: 74 65 20 6b 65 79 20 73 69 7a 65 73 0a 61 6e 64 te key sizes.and
3880: 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 signature algor
3890: 69 74 68 6d 73 5c 26 2e 20 54 68 65 20 64 65 66 ithms\&. The def
38a0: 61 75 6c 74 20 69 73 20 31 20 70 72 69 6f 72 20 ault is 1 prior
38b0: 74 6f 20 4f 70 65 6e 53 53 4c 20 33 5c 26 2e 32 to OpenSSL 3\&.2
38c0: 20 61 6e 64 20 32 0a 74 68 65 72 65 61 66 74 65 and 2.thereafte
38d0: 72 5c 26 2e 20 4c 65 76 65 6c 20 33 20 61 6e 64 r\&. Level 3 and
38e0: 20 68 69 67 68 65 72 20 64 69 73 61 62 6c 65 20 higher disable
38f0: 73 75 70 70 6f 72 74 20 66 6f 72 20 73 65 73 73 support for sess
3900: 69 6f 6e 20 74 69 63 6b 65 74 73 20 61 6e 64 0a ion tickets and.
3910: 6f 6e 6c 79 20 61 63 63 65 70 74 20 63 69 70 68 only accept ciph
3920: 65 72 20 73 75 69 74 65 73 20 74 68 61 74 20 70 er suites that p
3930: 72 6f 76 69 64 65 20 66 6f 72 77 61 72 64 20 73 rovide forward s
3940: 65 63 72 65 63 79 5c 26 2e 0a 54 68 69 73 20 6f ecrecy\&..This o
3950: 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 ption is new for
3960: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
3970: 0a 2e 54 50 0a 5c 66 42 2d 73 65 72 76 65 72 5c ..TP.\fB-server\
3980: 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 53 70 fR \fIbool\fR.Sp
3990: 65 63 69 66 69 65 73 20 77 68 65 74 68 65 72 20 ecifies whether
39a0: 74 6f 20 61 63 74 20 61 73 20 61 20 73 65 72 76 to act as a serv
39b0: 65 72 20 61 6e 64 20 72 65 73 70 6f 6e 64 20 77 er and respond w
39c0: 69 74 68 20 61 20 73 65 72 76 65 72 20 68 61 6e ith a server han
39d0: 64 73 68 61 6b 65 20 77 68 65 6e 20 61 0a 63 6c dshake when a.cl
39e0: 69 65 6e 74 20 63 6f 6e 6e 65 63 74 73 20 61 6e ient connects an
39f0: 64 20 70 72 6f 76 69 64 65 73 20 61 20 63 6c 69 d provides a cli
3a00: 65 6e 74 20 68 61 6e 64 73 68 61 6b 65 5c 26 2e ent handshake\&.
3a10: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 The default is
3a20: 5c 66 42 66 61 6c 73 65 5c 66 52 5c 26 2e 0a 2e \fBfalse\fR\&...
3a30: 54 50 0a 5c 66 42 2d 73 65 72 76 65 72 6e 61 6d TP.\fB-servernam
3a40: 65 5c 66 52 20 5c 66 49 68 6f 73 74 6e 61 6d 65 e\fR \fIhostname
3a50: 5c 66 52 0a 53 70 65 63 69 66 79 20 74 68 65 20 \fR.Specify the
3a60: 70 65 65 72 27 73 20 68 6f 73 74 6e 61 6d 65 5c peer's hostname\
3a70: 26 2e 20 54 68 69 73 20 69 73 20 75 73 65 64 20 &. This is used
3a80: 74 6f 20 73 65 74 20 74 68 65 20 54 4c 53 20 53 to set the TLS S
3a90: 65 72 76 65 72 20 4e 61 6d 65 20 49 6e 64 69 63 erver Name Indic
3aa0: 61 74 69 6f 6e 0a 28 53 4e 49 29 20 65 78 74 65 ation.(SNI) exte
3ab0: 6e 73 69 6f 6e 5c 26 2e 20 53 65 74 20 74 68 69 nsion\&. Set thi
3ac0: 73 20 74 6f 20 74 68 65 20 65 78 70 65 63 74 65 s to the expecte
3ad0: 64 20 73 65 72 76 65 72 6e 61 6d 65 20 69 6e 20 d servername in
3ae0: 74 68 65 20 73 65 72 76 65 72 27 73 20 63 65 72 the server's cer
3af0: 74 69 66 69 63 61 74 65 0a 6f 72 20 6f 6e 65 20 tificate.or one
3b00: 6f 66 20 74 68 65 20 53 75 62 6a 65 63 74 20 41 of the Subject A
3b10: 6c 74 65 72 6e 61 74 65 20 4e 61 6d 65 73 20 28 lternate Names (
3b20: 53 41 4e 29 5c 26 2e 20 53 74 61 72 74 69 6e 67 SAN)\&. Starting
3b30: 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 2e 30 in TclTLS 2\&.0
3b40: 2c 20 74 68 69 73 20 77 69 6c 6c 0a 64 65 66 61 , this will.defa
3b50: 75 6c 74 20 74 6f 20 74 68 65 20 68 6f 73 74 20 ult to the host
3b60: 66 6f 72 20 74 68 65 20 5c 66 42 74 6c 73 3a 3a for the \fBtls::
3b70: 73 6f 63 6b 65 74 5c 66 52 20 63 6f 6d 6d 61 6e socket\fR comman
3b80: 64 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 73 65 73 d\&...TP.\fB-ses
3b90: 73 69 6f 6e 5f 69 64 5c 66 52 20 5c 66 49 62 69 sion_id\fR \fIbi
3ba0: 6e 61 72 79 5f 73 74 72 69 6e 67 5c 66 52 0a 53 nary_string\fR.S
3bb0: 70 65 63 69 66 69 65 73 20 74 68 65 20 73 65 73 pecifies the ses
3bc0: 73 69 6f 6e 20 69 64 20 74 6f 20 72 65 73 75 6d sion id to resum
3bd0: 65 20 61 20 73 65 73 73 69 6f 6e 5c 26 2e 20 4e e a session\&. N
3be0: 6f 74 20 73 75 70 70 6f 72 74 65 64 20 79 65 74 ot supported yet
3bf0: 5c 26 2e 0a 54 68 69 73 20 6f 70 74 69 6f 6e 20 \&..This option
3c00: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c is new for TclTL
3c10: 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c S 1\&.8\&...TP.\
3c20: 66 42 2d 73 73 6c 32 5c 66 52 20 5c 66 49 62 6f fB-ssl2\fR \fIbo
3c30: 6f 6c 5c 66 52 0a 45 6e 61 62 6c 65 20 75 73 65 ol\fR.Enable use
3c40: 20 6f 66 20 53 53 4c 20 76 32 5c 26 2e 54 68 65 of SSL v2\&.The
3c50: 20 64 65 66 61 75 6c 74 20 69 73 20 5c 66 42 66 default is \fBf
3c60: 61 6c 73 65 5c 66 52 5c 26 2e 0a 4f 70 65 6e 53 alse\fR\&..OpenS
3c70: 53 4c 20 31 5c 26 2e 31 2b 20 6e 6f 20 6c 6f 6e SL 1\&.1+ no lon
3c80: 67 65 72 20 73 75 70 70 6f 72 74 73 20 53 53 4c ger supports SSL
3c90: 20 76 32 2c 20 73 6f 20 74 68 69 73 20 6d 61 79 v2, so this may
3ca0: 20 6e 6f 74 20 68 61 76 65 20 61 6e 79 20 65 66 not have any ef
3cb0: 66 65 63 74 5c 26 2e 0a 53 65 65 20 74 68 65 20 fect\&..See the
3cc0: 5c 66 42 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c \fBtls::protocol
3cd0: 73 5c 66 52 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 s\fR command for
3ce0: 20 73 75 70 70 6f 72 74 65 64 20 70 72 6f 74 6f supported proto
3cf0: 63 6f 6c 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d cols\&...TP.\fB-
3d00: 73 73 6c 33 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c ssl3\fR \fIbool\
3d10: 66 52 0a 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 fR.Enable use of
3d20: 20 53 53 4c 20 76 33 5c 26 2e 20 54 68 65 20 64 SSL v3\&. The d
3d30: 65 66 61 75 6c 74 20 69 73 20 5c 66 42 66 61 6c efault is \fBfal
3d40: 73 65 5c 66 52 5c 26 2e 20 53 74 61 72 74 69 6e se\fR\&. Startin
3d50: 67 20 69 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e g in TclTLS 1\&.
3d60: 38 2c 0a 75 73 65 20 6f 66 20 53 53 4c 20 76 33 8,.use of SSL v3
3d70: 20 69 66 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 if only availab
3d80: 6c 65 20 76 69 61 20 61 20 63 6f 6d 70 69 6c 65 le via a compile
3d90: 20 74 69 6d 65 20 6f 70 74 69 6f 6e 5c 26 2e 0a time option\&..
3da0: 53 65 65 20 74 68 65 20 5c 66 42 74 6c 73 3a 3a See the \fBtls::
3db0: 70 72 6f 74 6f 63 6f 6c 73 5c 66 52 20 63 6f 6d protocols\fR com
3dc0: 6d 61 6e 64 20 66 6f 72 20 73 75 70 70 6f 72 74 mand for support
3dd0: 65 64 20 70 72 6f 74 6f 63 6f 6c 73 5c 26 2e 0a ed protocols\&..
3de0: 2e 54 50 0a 5c 66 42 2d 74 6c 73 31 5c 66 52 20 .TP.\fB-tls1\fR
3df0: 5c 66 49 62 6f 6f 6c 5c 66 52 0a 45 6e 61 62 6c \fIbool\fR.Enabl
3e00: 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 5c e use of TLS v1\
3e10: 26 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 &. Starting in T
3e20: 63 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 74 68 65 clTLS 2\&.0, the
3e30: 20 64 65 66 61 75 6c 74 20 69 73 20 5c 66 42 66 default is \fBf
3e40: 61 6c 73 65 5c 66 52 5c 26 2e 0a 4e 6f 74 65 3a alse\fR\&..Note:
3e50: 20 54 4c 53 20 31 5c 26 2e 30 20 6e 65 65 64 73 TLS 1\&.0 needs
3e60: 20 53 48 41 31 20 74 6f 20 6f 70 65 72 61 74 65 SHA1 to operate
3e70: 2c 20 77 68 69 63 68 20 69 73 20 6f 6e 6c 79 20 , which is only
3e80: 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 73 65 63 available in sec
3e90: 75 72 69 74 79 20 6c 65 76 65 6c 0a 30 20 66 6f urity level.0 fo
3ea0: 72 20 4f 70 65 6e 20 53 53 4c 20 33 5c 26 2e 30 r Open SSL 3\&.0
3eb0: 2b 5c 26 2e 20 53 65 65 20 74 68 65 20 5c 66 42 +\&. See the \fB
3ec0: 2d 73 65 63 75 72 69 74 79 5f 6c 65 76 65 6c 5c -security_level\
3ed0: 66 52 20 6f 70 74 69 6f 6e 5c 26 2e 0a 2e 54 50 fR option\&...TP
3ee0: 0a 5c 66 42 2d 74 6c 73 31 5c 26 2e 31 5c 66 52 .\fB-tls1\&.1\fR
3ef0: 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 45 6e 61 62 \fIbool\fR.Enab
3f00: 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 le use of TLS v1
3f10: 5c 26 2e 31 5c 26 2e 20 53 74 61 72 74 69 6e 67 \&.1\&. Starting
3f20: 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 2e 30 in TclTLS 2\&.0
3f30: 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 , the default is
3f40: 20 5c 66 42 66 61 6c 73 65 5c 66 52 5c 26 2e 0a \fBfalse\fR\&..
3f50: 4e 6f 74 65 3a 20 54 4c 53 20 31 5c 26 2e 31 20 Note: TLS 1\&.1
3f60: 6e 65 65 64 73 20 53 48 41 31 20 74 6f 20 6f 70 needs SHA1 to op
3f70: 65 72 61 74 65 2c 20 77 68 69 63 68 20 69 73 20 erate, which is
3f80: 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 69 only available i
3f90: 6e 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c n security level
3fa0: 0a 30 20 66 6f 72 20 4f 70 65 6e 20 53 53 4c 20 .0 for Open SSL
3fb0: 33 5c 26 2e 30 2b 5c 26 2e 20 53 65 65 20 74 68 3\&.0+\&. See th
3fc0: 65 20 5c 66 42 2d 73 65 63 75 72 69 74 79 5f 6c e \fB-security_l
3fd0: 65 76 65 6c 5c 66 52 20 6f 70 74 69 6f 6e 5c 26 evel\fR option\&
3fe0: 2e 0a 2e 54 50 0a 5c 66 42 2d 74 6c 73 31 5c 26 ...TP.\fB-tls1\&
3ff0: 2e 32 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 .2\fR \fIbool\fR
4000: 0a 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 .Enable use of T
4010: 4c 53 20 76 31 5c 26 2e 32 5c 26 2e 20 54 68 65 LS v1\&.2\&. The
4020: 20 64 65 66 61 75 6c 74 20 69 73 20 5c 66 42 74 default is \fBt
4030: 72 75 65 5c 66 52 5c 26 2e 0a 2e 54 50 0a 5c 66 rue\fR\&...TP.\f
4040: 42 2d 74 6c 73 31 5c 26 2e 33 5c 66 52 20 5c 66 B-tls1\&.3\fR \f
4050: 49 62 6f 6f 6c 5c 66 52 0a 45 6e 61 62 6c 65 20 Ibool\fR.Enable
4060: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 5c 26 2e use of TLS v1\&.
4070: 33 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 3\&. The default
4080: 20 69 73 20 5c 66 42 74 72 75 65 5c 66 52 5c 26 is \fBtrue\fR\&
4090: 2e 20 54 68 69 73 20 69 73 20 6f 6e 6c 79 20 61 . This is only a
40a0: 76 61 69 6c 61 62 6c 65 0a 73 74 61 72 74 69 6e vailable.startin
40b0: 67 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 31 g with OpenSSL 1
40c0: 5c 26 2e 31 5c 26 2e 31 20 61 6e 64 20 54 63 6c \&.1\&.1 and Tcl
40d0: 54 4c 53 20 31 5c 26 2e 37 5c 26 2e 0a 2e 54 50 TLS 1\&.7\&...TP
40e0: 0a 5c 66 42 2d 76 61 6c 69 64 61 74 65 63 6f 6d .\fB-validatecom
40f0: 6d 61 6e 64 5c 66 52 20 5c 66 49 63 61 6c 6c 62 mand\fR \fIcallb
4100: 61 63 6b 5c 66 52 0a 53 70 65 63 69 66 69 65 73 ack\fR.Specifies
4110: 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 63 6f the callback co
4120: 6d 6d 61 6e 64 20 74 6f 20 69 6e 76 6f 6b 65 20 mmand to invoke
4130: 74 6f 20 76 61 6c 69 64 61 74 65 20 74 68 65 20 to validate the
4140: 70 65 65 72 20 63 65 72 74 69 66 69 63 61 74 65 peer certificate
4150: 73 0a 61 6e 64 20 6f 74 68 65 72 20 63 6f 6e 66 s.and other conf
4160: 69 67 20 69 6e 66 6f 20 64 75 72 69 6e 67 20 74 ig info during t
4170: 68 65 20 70 72 6f 74 6f 63 6f 6c 20 6e 65 67 6f he protocol nego
4180: 74 69 61 74 69 6f 6e 20 70 68 61 73 65 5c 26 2e tiation phase\&.
4190: 20 54 68 69 73 20 63 61 6e 20 62 65 20 75 73 65 This can be use
41a0: 64 0a 62 79 20 54 43 4c 20 73 63 72 69 70 74 73 d.by TCL scripts
41b0: 20 74 6f 20 70 65 72 66 6f 72 6d 20 74 68 65 69 to perform thei
41c0: 72 20 6f 77 6e 20 43 65 72 74 69 66 69 63 61 74 r own Certificat
41d0: 65 20 56 61 6c 69 64 61 74 69 6f 6e 20 74 6f 20 e Validation to
41e0: 73 75 70 70 6c 65 6d 65 6e 74 20 74 68 65 0a 64 supplement the.d
41f0: 65 66 61 75 6c 74 20 76 61 6c 69 64 61 74 69 6f efault validatio
4200: 6e 20 70 72 6f 76 69 64 65 64 20 62 79 20 4f 70 n provided by Op
4210: 65 6e 53 53 4c 5c 26 2e 20 54 68 65 20 73 63 72 enSSL\&. The scr
4220: 69 70 74 20 6d 75 73 74 20 72 65 74 75 72 6e 20 ipt must return
4230: 61 20 62 6f 6f 6c 65 61 6e 20 74 72 75 65 0a 74 a boolean true.t
4240: 6f 20 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 6e o continue the n
4250: 65 67 6f 74 69 61 74 69 6f 6e 5c 26 2e 20 53 65 egotiation\&. Se
4260: 65 20 5c 66 42 43 61 6c 6c 62 61 63 6b 20 4f 70 e \fBCallback Op
4270: 74 69 6f 6e 73 5c 66 52 20 66 6f 72 20 6d 6f 72 tions\fR for mor
4280: 65 20 69 6e 66 6f 5c 26 2e 0a 54 68 69 73 20 6f e info\&..This o
4290: 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 ption is new for
42a0: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
42b0: 0a 2e 52 45 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a ..RE..TP.\fBtls:
42c0: 3a 75 6e 69 6d 70 6f 72 74 5c 66 52 20 5c 66 49 :unimport\fR \fI
42d0: 63 68 61 6e 6e 65 6c 5c 66 52 0a 43 6f 6d 70 6c channel\fR.Compl
42e0: 69 6d 65 6e 74 20 74 6f 20 5c 66 42 74 6c 73 3a iment to \fBtls:
42f0: 3a 69 6d 70 6f 72 74 5c 66 52 5c 26 2e 20 55 73 :import\fR\&. Us
4300: 65 64 20 74 6f 20 72 65 6d 6f 76 65 20 74 68 65 ed to remove the
4310: 20 74 6f 70 20 6c 65 76 65 6c 20 73 74 61 63 6b top level stack
4320: 65 64 20 63 68 61 6e 6e 65 6c 0a 66 72 6f 6d 20 ed channel.from
4330: 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 5c 26 2e \fIchannel\fR\&.
4340: 20 54 68 69 73 20 75 6e 73 74 61 63 6b 73 20 74 This unstacks t
4350: 68 65 20 65 6e 63 72 79 70 74 69 6f 6e 20 6f 66 he encryption of
4360: 20 61 20 72 65 67 75 6c 61 72 20 54 43 4c 20 63 a regular TCL c
4370: 68 61 6e 6e 65 6c 5c 26 2e 20 41 6e 0a 65 72 72 hannel\&. An.err
4380: 6f 72 20 69 73 20 74 68 72 6f 77 6e 20 69 66 20 or is thrown if
4390: 54 4c 53 20 69 73 20 6e 6f 74 20 74 68 65 20 74 TLS is not the t
43a0: 6f 70 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e op stacked chann
43b0: 65 6c 20 74 79 70 65 5c 26 2e 0a 2e 54 50 0a 5c el type\&...TP.\
43c0: 66 42 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 fBtls::handshake
43d0: 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 \fR \fIchannel\f
43e0: 52 0a 46 6f 72 63 65 73 20 74 68 65 20 54 4c 53 R.Forces the TLS
43f0: 20 6e 65 67 6f 74 69 61 74 69 6f 6e 20 68 61 6e negotiation han
4400: 64 73 68 61 6b 65 20 74 6f 20 74 61 6b 65 20 70 dshake to take p
4410: 6c 61 63 65 20 69 6d 6d 65 64 69 61 74 65 6c 79 lace immediately
4420: 2c 20 61 6e 64 20 72 65 74 75 72 6e 73 20 30 0a , and returns 0.
4430: 69 66 20 68 61 6e 64 73 68 61 6b 65 20 69 73 20 if handshake is
4440: 73 74 69 6c 6c 20 69 6e 20 70 72 6f 67 72 65 73 still in progres
4450: 73 20 28 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 29 s (non-blocking)
4460: 2c 20 6f 72 20 31 20 69 66 20 74 68 65 20 68 61 , or 1 if the ha
4470: 6e 64 73 68 61 6b 65 20 77 61 73 0a 73 75 63 63 ndshake was.succ
4480: 65 73 73 66 75 6c 5c 26 2e 20 49 66 20 74 68 65 essful\&. If the
4490: 20 68 61 6e 64 73 68 61 6b 65 20 66 61 69 6c 65 handshake faile
44a0: 64 2c 20 61 6e 20 65 72 72 6f 72 20 77 69 6c 6c d, an error will
44b0: 20 62 65 20 72 65 74 75 72 6e 65 64 5c 26 2e 0a be returned\&..
44c0: 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 73 74 61 74 .TP.\fBtls::stat
44d0: 75 73 5c 66 52 20 3f 5c 66 42 2d 6c 6f 63 61 6c us\fR ?\fB-local
44e0: 5c 66 52 3f 20 5c 66 49 63 68 61 6e 6e 65 6c 5c \fR? \fIchannel\
44f0: 66 52 0a 52 65 74 75 72 6e 73 20 74 68 65 20 63 fR.Returns the c
4500: 75 72 72 65 6e 74 20 73 74 61 74 75 73 20 6f 66 urrent status of
4510: 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 5c an SSL channel\
4520: 26 2e 20 54 68 65 20 72 65 73 75 6c 74 20 69 73 &. The result is
4530: 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 a list of key-v
4540: 61 6c 75 65 0a 70 61 69 72 73 20 64 65 73 63 72 alue.pairs descr
4550: 69 62 69 6e 67 20 74 68 65 20 53 53 4c 2c 20 63 ibing the SSL, c
4560: 65 72 74 69 66 69 63 61 74 65 2c 20 61 6e 64 20 ertificate, and
4570: 63 65 72 74 69 66 69 63 61 74 65 20 76 65 72 69 certificate veri
4580: 66 69 63 61 74 69 6f 6e 20 73 74 61 74 75 73 5c fication status\
4590: 26 2e 20 49 66 0a 74 68 65 20 53 53 4c 20 68 61 &. If.the SSL ha
45a0: 6e 64 73 68 61 6b 65 20 68 61 73 20 6e 6f 74 20 ndshake has not
45b0: 79 65 74 20 63 6f 6d 70 6c 65 74 65 64 2c 20 61 yet completed, a
45c0: 6e 20 65 6d 70 74 79 20 6c 69 73 74 20 69 73 20 n empty list is
45d0: 72 65 74 75 72 6e 65 64 5c 26 2e 20 49 66 20 74 returned\&. If t
45e0: 68 65 0a 5c 66 42 2d 6c 6f 63 61 6c 5c 66 52 20 he.\fB-local\fR
45f0: 6f 70 74 69 6f 6e 20 69 73 20 73 70 65 63 69 66 option is specif
4600: 69 65 64 2c 20 74 68 65 6e 20 74 68 65 20 6c 6f ied, then the lo
4610: 63 61 6c 20 63 65 72 74 69 66 69 63 61 74 65 20 cal certificate
4620: 69 73 20 75 73 65 64 5c 26 2e 20 52 65 74 75 72 is used\&. Retur
4630: 6e 65 64 0a 76 61 6c 75 65 73 20 69 6e 63 6c 75 ned.values inclu
4640: 64 65 3a 0a 2e 73 70 0a 53 53 4c 20 53 74 61 74 de:..sp.SSL Stat
4650: 75 73 0a 2e 52 53 0a 2e 54 50 0a 5c 66 42 61 6c us..RS..TP.\fBal
4660: 70 6e 5c 66 52 20 5c 66 49 70 72 6f 74 6f 63 6f pn\fR \fIprotoco
4670: 6c 5c 66 52 0a 54 68 65 20 70 72 6f 74 6f 63 6f l\fR.The protoco
4680: 6c 20 73 65 6c 65 63 74 65 64 20 61 66 74 65 72 l selected after
4690: 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 Application-Lay
46a0: 65 72 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f er Protocol Nego
46b0: 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29 5c 26 tiation (ALPN)\&
46c0: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 ..This value is
46d0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
46e0: 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 63 \&.8\&...TP.\fBc
46f0: 69 70 68 65 72 5c 66 52 20 5c 66 49 63 69 70 68 ipher\fR \fIciph
4700: 65 72 5c 66 52 0a 54 68 65 20 63 75 72 72 65 6e er\fR.The curren
4710: 74 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 t cipher in use
4720: 66 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e 5c for the session\
4730: 26 2e 0a 2e 54 50 0a 5c 66 42 70 65 65 72 6e 61 &...TP.\fBpeerna
4740: 6d 65 5c 66 52 20 5c 66 49 6e 61 6d 65 5c 66 52 me\fR \fIname\fR
4750: 0a 54 68 65 20 70 65 65 72 6e 61 6d 65 20 66 72 .The peername fr
4760: 6f 6d 20 74 68 65 20 63 65 72 74 69 66 69 63 61 om the certifica
4770: 74 65 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 te\&..This value
4780: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
4790: 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a LS 1\&.8\&...TP.
47a0: 5c 66 42 70 72 6f 74 6f 63 6f 6c 5c 66 52 20 5c \fBprotocol\fR \
47b0: 66 49 76 65 72 73 69 6f 6e 5c 66 52 0a 54 68 65 fIversion\fR.The
47c0: 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f protocol versio
47d0: 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 n used for the c
47e0: 6f 6e 6e 65 63 74 69 6f 6e 3a 20 53 53 4c 32 2c onnection: SSL2,
47f0: 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53 SSL3, TLS1, TLS
4800: 31 5c 26 2e 31 2c 20 54 4c 53 31 5c 26 2e 32 2c 1\&.1, TLS1\&.2,
4810: 0a 54 4c 53 31 5c 26 2e 33 2c 20 6f 72 20 75 6e .TLS1\&.3, or un
4820: 6b 6e 6f 77 6e 5c 26 2e 20 54 68 69 73 20 76 61 known\&. This va
4830: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 lue is new for T
4840: 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e clTLS 1\&.8\&...
4850: 54 50 0a 5c 66 42 73 62 69 74 73 5c 66 52 20 5c TP.\fBsbits\fR \
4860: 66 49 6e 5c 66 52 0a 54 68 65 20 6e 75 6d 62 65 fIn\fR.The numbe
4870: 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 20 66 r of bits used f
4880: 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 6b or the session k
4890: 65 79 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 69 67 ey\&...TP.\fBsig
48a0: 6e 61 74 75 72 65 48 61 73 68 41 6c 67 6f 72 69 natureHashAlgori
48b0: 74 68 6d 5c 66 52 20 5c 66 49 61 6c 67 6f 72 69 thm\fR \fIalgori
48c0: 74 68 6d 5c 66 52 0a 54 68 65 20 73 69 67 6e 61 thm\fR.The signa
48d0: 74 75 72 65 20 68 61 73 68 20 61 6c 67 6f 72 69 ture hash algori
48e0: 74 68 6d 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 thm\&..This valu
48f0: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
4900: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 TLS 1\&.8\&...TP
4910: 0a 5c 66 42 73 69 67 6e 61 74 75 72 65 54 79 70 .\fBsignatureTyp
4920: 65 5c 66 52 20 5c 66 49 74 79 70 65 5c 66 52 0a e\fR \fItype\fR.
4930: 54 68 65 20 73 69 67 6e 61 74 75 72 65 20 74 79 The signature ty
4940: 70 65 20 76 61 6c 75 65 5c 26 2e 0a 54 68 69 73 pe value\&..This
4950: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f value is new fo
4960: 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 r TclTLS 1\&.8\&
4970: 2e 0a 2e 54 50 0a 5c 66 42 76 65 72 69 66 79 44 ...TP.\fBverifyD
4980: 65 70 74 68 5c 66 52 20 5c 66 49 6e 5c 66 52 0a epth\fR \fIn\fR.
4990: 4d 61 78 69 6d 75 6d 20 64 65 70 74 68 20 66 6f Maximum depth fo
49a0: 72 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 r the certificat
49b0: 65 20 63 68 61 69 6e 20 76 65 72 69 66 69 63 61 e chain verifica
49c0: 74 69 6f 6e 5c 26 2e 20 44 65 66 61 75 6c 74 20 tion\&. Default
49d0: 69 73 20 2d 31 2c 20 74 6f 20 63 68 65 63 6b 20 is -1, to check
49e0: 61 6c 6c 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 all\&..This valu
49f0: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
4a00: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 TLS 1\&.8\&...TP
4a10: 0a 5c 66 42 76 65 72 69 66 79 4d 6f 64 65 5c 66 .\fBverifyMode\f
4a20: 52 20 5c 66 49 6c 69 73 74 5c 66 52 0a 4c 69 73 R \fIlist\fR.Lis
4a30: 74 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 65 t of certificate
4a40: 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 6d 6f verification mo
4a50: 64 65 73 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 des\&..This valu
4a60: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
4a70: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 TLS 1\&.8\&...TP
4a80: 0a 5c 66 42 76 65 72 69 66 79 52 65 73 75 6c 74 .\fBverifyResult
4a90: 5c 66 52 20 5c 66 49 72 65 73 75 6c 74 5c 66 52 \fR \fIresult\fR
4aa0: 0a 43 65 72 74 69 66 69 63 61 74 65 20 76 65 72 .Certificate ver
4ab0: 69 66 69 63 61 74 69 6f 6e 20 72 65 73 75 6c 74 ification result
4ac0: 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 \&..This value i
4ad0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
4ae0: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 1\&.8\&...TP.\f
4af0: 42 63 61 5f 6e 61 6d 65 73 5c 66 52 20 5c 66 49 Bca_names\fR \fI
4b00: 6c 69 73 74 5c 66 52 0a 4c 69 73 74 20 6f 66 20 list\fR.List of
4b10: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 the Certificate
4b20: 41 75 74 68 6f 72 69 74 69 65 73 20 75 73 65 64 Authorities used
4b30: 20 74 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 to create the c
4b40: 65 72 74 69 66 69 63 61 74 65 5c 26 2e 0a 54 68 ertificate\&..Th
4b50: 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 is value is new
4b60: 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 for TclTLS 1\&.8
4b70: 5c 26 2e 0a 2e 52 45 0a 2e 49 50 0a 43 65 72 74 \&...RE..IP.Cert
4b80: 69 66 69 63 61 74 65 20 53 74 61 74 75 73 0a 2e ificate Status..
4b90: 52 53 0a 2e 54 50 0a 5c 66 42 61 6c 6c 5c 66 52 RS..TP.\fBall\fR
4ba0: 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 44 75 \fIstring\fR.Du
4bb0: 6d 70 20 6f 66 20 61 6c 6c 20 63 65 72 74 69 66 mp of all certif
4bc0: 69 63 61 74 65 20 69 6e 66 6f 5c 26 2e 0a 54 68 icate info\&..Th
4bd0: 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 is value is new
4be0: 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 for TclTLS 1\&.8
4bf0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 76 65 72 73 69 \&...TP.\fBversi
4c00: 6f 6e 5c 66 52 20 5c 66 49 76 61 6c 75 65 5c 66 on\fR \fIvalue\f
4c10: 52 0a 54 68 65 20 63 65 72 74 69 66 69 63 61 74 R.The certificat
4c20: 65 20 76 65 72 73 69 6f 6e 5c 26 2e 0a 2e 54 50 e version\&...TP
4c30: 0a 5c 66 42 73 65 72 69 61 6c 4e 75 6d 62 65 72 .\fBserialNumber
4c40: 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 \fR \fIstring\fR
4c50: 0a 54 68 65 20 73 65 72 69 61 6c 20 6e 75 6d 62 .The serial numb
4c60: 65 72 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 er of the certif
4c70: 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73 icate as a hex s
4c80: 74 72 69 6e 67 5c 26 2e 0a 54 68 69 73 20 76 61 tring\&..This va
4c90: 6c 75 65 20 77 61 73 20 63 68 61 6e 67 65 64 20 lue was changed
4ca0: 66 72 6f 6d 20 73 65 72 69 61 6c 20 69 6e 20 54 from serial in T
4cb0: 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e clTLS 1\&.8\&...
4cc0: 54 50 0a 5c 66 42 73 69 67 6e 61 74 75 72 65 5c TP.\fBsignature\
4cd0: 66 52 20 5c 66 49 61 6c 67 6f 72 69 74 68 6d 5c fR \fIalgorithm\
4ce0: 66 52 0a 43 69 70 68 65 72 20 61 6c 67 6f 72 69 fR.Cipher algori
4cf0: 74 68 6d 20 75 73 65 64 20 66 6f 72 20 63 65 72 thm used for cer
4d00: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 tificate signatu
4d10: 72 65 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 re\&..This value
4d20: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
4d30: 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a LS 1\&.8\&...TP.
4d40: 5c 66 42 69 73 73 75 65 72 5c 66 52 20 5c 66 49 \fBissuer\fR \fI
4d50: 73 74 72 69 6e 67 5c 66 52 0a 54 68 65 20 64 69 string\fR.The di
4d60: 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 stinguished name
4d70: 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63 65 72 (DN) of the cer
4d80: 74 69 66 69 63 61 74 65 20 69 73 73 75 65 72 5c tificate issuer\
4d90: 26 2e 0a 2e 54 50 0a 5c 66 42 6e 6f 74 42 65 66 &...TP.\fBnotBef
4da0: 6f 72 65 5c 66 52 20 5c 66 49 64 61 74 65 5c 66 ore\fR \fIdate\f
4db0: 52 0a 54 68 65 20 62 65 67 69 6e 6e 69 6e 67 20 R.The beginning
4dc0: 64 61 74 65 20 6f 66 20 74 68 65 20 63 65 72 74 date of the cert
4dd0: 69 66 69 63 61 74 65 20 76 61 6c 69 64 69 74 79 ificate validity
4de0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 6e 6f 74 41 66 \&...TP.\fBnotAf
4df0: 74 65 72 5c 66 52 20 5c 66 49 64 61 74 65 5c 66 ter\fR \fIdate\f
4e00: 52 0a 54 68 65 20 65 78 70 69 72 61 74 69 6f 6e R.The expiration
4e10: 20 64 61 74 65 20 6f 66 20 74 68 65 20 63 65 72 date of the cer
4e20: 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 69 74 tificate validit
4e30: 79 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 75 62 6a y\&...TP.\fBsubj
4e40: 65 63 74 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 ect\fR \fIstring
4e50: 5c 66 52 0a 54 68 65 20 64 69 73 74 69 6e 67 75 \fR.The distingu
4e60: 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 ished name (DN)
4e70: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 of the certifica
4e80: 74 65 20 73 75 62 6a 65 63 74 5c 26 2e 20 46 69 te subject\&. Fi
4e90: 65 6c 64 73 20 69 6e 63 6c 75 64 65 3a 20 43 6f elds include: Co
4ea0: 6d 6d 6f 6e 0a 4e 61 6d 65 20 28 43 4e 29 2c 20 mmon.Name (CN),
4eb0: 4f 72 67 61 6e 69 7a 61 74 69 6f 6e 20 28 4f 29 Organization (O)
4ec0: 2c 20 4c 6f 63 61 6c 69 74 79 20 6f 72 20 43 69 , Locality or Ci
4ed0: 74 79 20 28 4c 29 2c 20 53 74 61 74 65 20 6f 72 ty (L), State or
4ee0: 20 50 72 6f 76 69 6e 63 65 20 28 53 29 2c 20 61 Province (S), a
4ef0: 6e 64 0a 43 6f 75 6e 74 72 79 20 4e 61 6d 65 20 nd.Country Name
4f00: 28 43 29 5c 26 2e 0a 2e 54 50 0a 5c 66 42 69 73 (C)\&...TP.\fBis
4f10: 73 75 65 72 55 6e 69 71 75 65 49 44 5c 66 52 20 suerUniqueID\fR
4f20: 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 54 68 65 \fIstring\fR.The
4f30: 20 69 73 73 75 65 72 20 75 6e 69 71 75 65 20 69 issuer unique i
4f40: 64 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 d\&..This value
4f50: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c is new for TclTL
4f60: 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c S 1\&.8\&...TP.\
4f70: 66 42 73 75 62 6a 65 63 74 55 6e 69 71 75 65 49 fBsubjectUniqueI
4f80: 44 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 D\fR \fIstring\f
4f90: 52 0a 54 68 65 20 73 75 62 6a 65 63 74 20 75 6e R.The subject un
4fa0: 69 71 75 65 20 69 64 5c 26 2e 0a 54 68 69 73 20 ique id\&..This
4fb0: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
4fc0: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
4fd0: 0a 2e 54 50 0a 5c 66 42 6e 75 6d 5f 65 78 74 65 ..TP.\fBnum_exte
4fe0: 6e 73 69 6f 6e 73 5c 66 52 20 5c 66 49 6e 5c 66 nsions\fR \fIn\f
4ff0: 52 0a 4e 75 6d 62 65 72 20 6f 66 20 63 65 72 74 R.Number of cert
5000: 69 66 69 63 61 74 65 20 65 78 74 65 6e 73 69 6f ificate extensio
5010: 6e 73 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 ns\&..This value
5020: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
5030: 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a LS 1\&.8\&...TP.
5040: 5c 66 42 65 78 74 65 6e 73 69 6f 6e 73 5c 66 52 \fBextensions\fR
5050: 20 5c 66 49 6c 69 73 74 5c 66 52 0a 4c 69 73 74 \fIlist\fR.List
5060: 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 65 20 of certificate
5070: 65 78 74 65 6e 73 69 6f 6e 20 6e 61 6d 65 73 5c extension names\
5080: 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 &..This value is
5090: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
50a0: 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 1\&.8\&...TP.\fB
50b0: 61 75 74 68 6f 72 69 74 79 4b 65 79 49 64 65 6e authorityKeyIden
50c0: 74 69 66 69 65 72 5c 66 52 20 5c 66 49 73 74 72 tifier\fR \fIstr
50d0: 69 6e 67 5c 66 52 0a 41 75 74 68 6f 72 69 74 79 ing\fR.Authority
50e0: 20 4b 65 79 20 49 64 65 6e 74 69 66 69 65 72 20 Key Identifier
50f0: 28 41 4b 49 29 20 6f 66 20 74 68 65 20 49 73 73 (AKI) of the Iss
5100: 75 69 6e 67 20 43 41 20 63 65 72 74 69 66 69 63 uing CA certific
5110: 61 74 65 20 74 68 61 74 20 73 69 67 6e 65 64 20 ate that signed
5120: 74 68 65 0a 53 53 4c 20 63 65 72 74 69 66 69 63 the.SSL certific
5130: 61 74 65 20 61 73 20 61 20 68 65 78 20 73 74 72 ate as a hex str
5140: 69 6e 67 5c 26 2e 20 54 68 69 73 20 76 61 6c 75 ing\&. This valu
5150: 65 20 6d 61 74 63 68 65 73 20 74 68 65 20 53 4b e matches the SK
5160: 49 20 76 61 6c 75 65 20 6f 66 20 74 68 65 0a 49 I value of the.I
5170: 6e 74 65 72 6d 65 64 69 61 74 65 20 43 41 20 63 ntermediate CA c
5180: 65 72 74 69 66 69 63 61 74 65 5c 26 2e 0a 54 68 ertificate\&..Th
5190: 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 is value is new
51a0: 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 for TclTLS 1\&.8
51b0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 75 62 6a 65 \&...TP.\fBsubje
51c0: 63 74 4b 65 79 49 64 65 6e 74 69 66 69 65 72 5c ctKeyIdentifier\
51d0: 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a fR \fIstring\fR.
51e0: 53 75 62 6a 65 63 74 20 4b 65 79 20 49 64 65 6e Subject Key Iden
51f0: 74 69 66 69 65 72 20 28 53 4b 49 29 20 68 61 73 tifier (SKI) has
5200: 68 20 6f 66 20 74 68 65 20 70 75 62 6c 69 63 20 h of the public
5210: 6b 65 79 20 69 6e 73 69 64 65 20 74 68 65 20 63 key inside the c
5220: 65 72 74 69 66 69 63 61 74 65 20 61 73 20 61 0a ertificate as a.
5230: 68 65 78 20 73 74 72 69 6e 67 5c 26 2e 20 55 73 hex string\&. Us
5240: 65 64 20 74 6f 20 69 64 65 6e 74 69 66 79 20 63 ed to identify c
5250: 65 72 74 69 66 69 63 61 74 65 73 20 74 68 61 74 ertificates that
5260: 20 63 6f 6e 74 61 69 6e 20 61 20 70 61 72 74 69 contain a parti
5270: 63 75 6c 61 72 20 70 75 62 6c 69 63 20 6b 65 79 cular public key
5280: 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 \&..This value i
5290: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
52a0: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 1\&.8\&...TP.\f
52b0: 42 73 75 62 6a 65 63 74 41 6c 74 4e 61 6d 65 5c BsubjectAltName\
52c0: 66 52 20 5c 66 49 6c 69 73 74 5c 66 52 0a 4c 69 fR \fIlist\fR.Li
52d0: 73 74 20 6f 66 20 61 6c 6c 20 6f 66 20 74 68 65 st of all of the
52e0: 20 53 75 62 6a 65 63 74 20 41 6c 74 65 72 6e 61 Subject Alterna
52f0: 74 69 76 65 20 4e 61 6d 65 73 20 28 53 41 4e 29 tive Names (SAN)
5300: 20 69 6e 63 6c 75 64 69 6e 67 20 64 6f 6d 61 69 including domai
5310: 6e 20 6e 61 6d 65 73 2c 20 73 75 62 0a 64 6f 6d n names, sub.dom
5320: 61 69 6e 73 2c 20 61 6e 64 20 49 50 20 61 64 64 ains, and IP add
5330: 72 65 73 73 65 73 20 74 68 61 74 20 61 72 65 20 resses that are
5340: 73 65 63 75 72 65 64 20 62 79 20 74 68 65 20 63 secured by the c
5350: 65 72 74 69 66 69 63 61 74 65 5c 26 2e 0a 54 68 ertificate\&..Th
5360: 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 is value is new
5370: 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 for TclTLS 1\&.8
5380: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 6f 63 73 70 5c \&...TP.\fBocsp\
5390: 66 52 20 5c 66 49 6c 69 73 74 5c 66 52 0a 4c 69 fR \fIlist\fR.Li
53a0: 73 74 20 6f 66 20 61 6c 6c 20 4f 6e 6c 69 6e 65 st of all Online
53b0: 20 43 65 72 74 69 66 69 63 61 74 65 20 53 74 61 Certificate Sta
53c0: 74 75 73 20 50 72 6f 74 6f 63 6f 6c 20 28 4f 43 tus Protocol (OC
53d0: 53 50 29 20 55 52 4c 73 20 74 68 61 74 20 63 61 SP) URLs that ca
53e0: 6e 20 62 65 20 75 73 65 64 20 74 6f 0a 63 68 65 n be used to.che
53f0: 63 6b 20 74 68 65 20 76 61 6c 69 64 69 74 79 20 ck the validity
5400: 6f 66 20 74 68 69 73 20 63 65 72 74 69 66 69 63 of this certific
5410: 61 74 65 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 ate\&..This valu
5420: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
5430: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 TLS 1\&.8\&...TP
5440: 0a 5c 66 42 63 65 72 74 69 66 69 63 61 74 65 5c .\fBcertificate\
5450: 66 52 20 5c 66 49 63 65 72 74 5c 66 52 0a 54 68 fR \fIcert\fR.Th
5460: 65 20 50 45 4d 20 65 6e 63 6f 64 65 64 20 63 65 e PEM encoded ce
5470: 72 74 69 66 69 63 61 74 65 5c 26 2e 0a 2e 54 50 rtificate\&...TP
5480: 0a 5c 66 42 73 69 67 6e 61 74 75 72 65 41 6c 67 .\fBsignatureAlg
5490: 6f 72 69 74 68 6d 5c 66 52 20 5c 66 49 61 6c 67 orithm\fR \fIalg
54a0: 6f 72 69 74 68 6d 5c 66 52 0a 43 69 70 68 65 72 orithm\fR.Cipher
54b0: 20 61 6c 67 6f 72 69 74 68 6d 20 75 73 65 64 20 algorithm used
54c0: 66 6f 72 20 74 68 65 20 63 65 72 74 69 66 69 63 for the certific
54d0: 61 74 65 20 73 69 67 6e 61 74 75 72 65 5c 26 2e ate signature\&.
54e0: 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e .This value is n
54f0: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c ew for TclTLS 1\
5500: 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 69 &.8\&...TP.\fBsi
5510: 67 6e 61 74 75 72 65 56 61 6c 75 65 5c 66 52 20 gnatureValue\fR
5520: 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 43 65 72 \fIstring\fR.Cer
5530: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 tificate signatu
5540: 72 65 20 61 73 20 61 20 68 65 78 20 73 74 72 69 re as a hex stri
5550: 6e 67 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 ng\&..This value
5560: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
5570: 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a LS 1\&.8\&...TP.
5580: 5c 66 42 73 69 67 6e 61 74 75 72 65 44 69 67 65 \fBsignatureDige
5590: 73 74 5c 66 52 20 5c 66 49 76 65 72 73 69 6f 6e st\fR \fIversion
55a0: 5c 66 52 0a 43 65 72 74 69 66 69 63 61 74 65 20 \fR.Certificate
55b0: 73 69 67 6e 69 6e 67 20 64 69 67 65 73 74 20 61 signing digest a
55c0: 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 5c 26 s a hex string\&
55d0: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 ..This value is
55e0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
55f0: 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 70 \&.8\&...TP.\fBp
5600: 75 62 6c 69 63 4b 65 79 41 6c 67 6f 72 69 74 68 ublicKeyAlgorith
5610: 6d 5c 66 52 20 5c 66 49 61 6c 67 6f 72 69 74 68 m\fR \fIalgorith
5620: 6d 5c 66 52 0a 43 65 72 74 69 66 69 63 61 74 65 m\fR.Certificate
5630: 20 73 69 67 6e 61 74 75 72 65 20 70 75 62 6c 69 signature publi
5640: 63 20 6b 65 79 20 61 6c 67 6f 72 69 74 68 6d 5c c key algorithm\
5650: 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 &..This value is
5660: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
5670: 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 1\&.8\&...TP.\fB
5680: 70 75 62 6c 69 63 4b 65 79 5c 66 52 20 5c 66 49 publicKey\fR \fI
5690: 73 74 72 69 6e 67 5c 66 52 0a 43 65 72 74 69 66 string\fR.Certif
56a0: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 icate signature
56b0: 70 75 62 6c 69 63 20 6b 65 79 20 61 73 20 61 20 public key as a
56c0: 68 65 78 20 73 74 72 69 6e 67 5c 26 2e 0a 54 68 hex string\&..Th
56d0: 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 is value is new
56e0: 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 for TclTLS 1\&.8
56f0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 62 69 74 73 5c \&...TP.\fBbits\
5700: 66 52 20 5c 66 49 6e 5c 66 52 0a 4e 75 6d 62 65 fR \fIn\fR.Numbe
5710: 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 20 66 r of bits used f
5720: 6f 72 20 63 65 72 74 69 66 69 63 61 74 65 20 73 or certificate s
5730: 69 67 6e 61 74 75 72 65 20 6b 65 79 5c 26 2e 0a ignature key\&..
5740: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 This value is ne
5750: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 w for TclTLS 1\&
5760: 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 6c .8\&...TP.\fBsel
5770: 66 5f 73 69 67 6e 65 64 5c 66 52 20 5c 66 49 62 f_signed\fR \fIb
5780: 6f 6f 6c 65 61 6e 5c 66 52 0a 57 68 65 74 68 65 oolean\fR.Whethe
5790: 72 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 r the certificat
57a0: 65 20 73 69 67 6e 61 74 75 72 65 20 69 73 20 73 e signature is s
57b0: 65 6c 66 20 73 69 67 6e 65 64 5c 26 2e 0a 54 68 elf signed\&..Th
57c0: 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 is value is new
57d0: 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 for TclTLS 1\&.8
57e0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 68 61 31 5f \&...TP.\fBsha1_
57f0: 68 61 73 68 5c 66 52 20 5c 66 49 68 61 73 68 5c hash\fR \fIhash\
5800: 66 52 0a 54 68 65 20 53 48 41 31 20 68 61 73 68 fR.The SHA1 hash
5810: 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 of the certific
5820: 61 74 65 20 61 73 20 61 20 68 65 78 20 73 74 72 ate as a hex str
5830: 69 6e 67 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 ing\&..This valu
5840: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
5850: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 TLS 1\&.8\&...TP
5860: 0a 5c 66 42 73 68 61 32 35 36 5f 68 61 73 68 5c .\fBsha256_hash\
5870: 66 52 20 5c 66 49 68 61 73 68 5c 66 52 0a 54 68 fR \fIhash\fR.Th
5880: 65 20 53 48 41 32 35 36 20 68 61 73 68 20 6f 66 e SHA256 hash of
5890: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
58a0: 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 as a hex string
58b0: 5c 26 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 \&..This value i
58c0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
58d0: 20 31 5c 26 2e 38 5c 26 2e 0a 2e 52 45 0a 2e 54 1\&.8\&...RE..T
58e0: 50 0a 5c 66 42 74 6c 73 3a 3a 63 6f 6e 6e 65 63 P.\fBtls::connec
58f0: 74 69 6f 6e 5c 66 52 20 5c 66 49 63 68 61 6e 6e tion\fR \fIchann
5900: 65 6c 5c 66 52 0a 52 65 74 75 72 6e 73 20 74 68 el\fR.Returns th
5910: 65 20 63 75 72 72 65 6e 74 20 63 6f 6e 6e 65 63 e current connec
5920: 74 69 6f 6e 20 73 74 61 74 75 73 20 6f 66 20 61 tion status of a
5930: 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 5c 26 2e n SSL channel\&.
5940: 20 54 68 65 20 72 65 73 75 6c 74 20 69 73 20 61 The result is a
5950: 20 6c 69 73 74 0a 6f 66 20 6b 65 79 2d 76 61 6c list.of key-val
5960: 75 65 20 70 61 69 72 73 20 64 65 73 63 72 69 62 ue pairs describ
5970: 69 6e 67 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 ing the connecti
5980: 6f 6e 5c 26 2e 0a 54 68 69 73 20 63 6f 6d 6d 61 on\&..This comma
5990: 6e 64 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 nd is new for Tc
59a0: 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 20 52 65 lTLS 1\&.8\&. Re
59b0: 74 75 72 6e 65 64 20 76 61 6c 75 65 73 20 69 6e turned values in
59c0: 63 6c 75 64 65 3a 0a 2e 73 70 0a 53 53 4c 20 53 clude:..sp.SSL S
59d0: 74 61 74 75 73 0a 2e 52 53 0a 2e 54 50 0a 5c 66 tatus..RS..TP.\f
59e0: 42 73 74 61 74 65 5c 66 52 20 5c 66 49 73 74 61 Bstate\fR \fIsta
59f0: 74 65 5c 66 52 0a 53 74 61 74 65 20 6f 66 20 74 te\fR.State of t
5a00: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 5c 26 2e he connection\&.
5a10: 0a 2e 54 50 0a 5c 66 42 73 65 72 76 65 72 6e 61 ..TP.\fBserverna
5a20: 6d 65 5c 66 52 20 5c 66 49 6e 61 6d 65 5c 66 52 me\fR \fIname\fR
5a30: 0a 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 .The name of the
5a40: 20 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 73 65 connected to se
5a50: 72 76 65 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 70 rver\&...TP.\fBp
5a60: 72 6f 74 6f 63 6f 6c 5c 66 52 20 5c 66 49 76 65 rotocol\fR \fIve
5a70: 72 73 69 6f 6e 5c 66 52 0a 54 68 65 20 70 72 6f rsion\fR.The pro
5a80: 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 tocol version us
5a90: 65 64 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 ed for the conne
5aa0: 63 74 69 6f 6e 3a 20 53 53 4c 32 2c 20 53 53 4c ction: SSL2, SSL
5ab0: 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 5c 26 2e 3, TLS1, TLS1\&.
5ac0: 31 2c 20 54 4c 53 31 5c 26 2e 32 2c 20 54 4c 53 1, TLS1\&.2, TLS
5ad0: 31 5c 26 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 1\&.3, or unknow
5ae0: 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 72 65 6e 65 n\&...TP.\fBrene
5af0: 67 6f 74 69 61 74 69 6f 6e 5f 61 6c 6c 6f 77 65 gotiation_allowe
5b00: 64 5c 66 52 20 5c 66 49 62 6f 6f 6c 65 61 6e 5c d\fR \fIboolean\
5b10: 66 52 0a 57 68 65 74 68 65 72 20 70 72 6f 74 6f fR.Whether proto
5b20: 63 6f 6c 20 72 65 6e 65 67 6f 74 69 61 74 69 6f col renegotiatio
5b30: 6e 20 69 73 20 73 75 70 70 6f 72 74 65 64 20 6f n is supported o
5b40: 72 20 6e 6f 74 5c 26 2e 0a 2e 54 50 0a 5c 66 42 r not\&...TP.\fB
5b50: 73 65 63 75 72 69 74 79 5f 6c 65 76 65 6c 5c 66 security_level\f
5b60: 52 20 5c 66 49 6c 65 76 65 6c 5c 66 52 0a 54 68 R \fIlevel\fR.Th
5b70: 65 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c e security level
5b80: 20 75 73 65 64 20 66 6f 72 20 73 65 6c 65 63 74 used for select
5b90: 69 6f 6e 20 6f 66 20 63 69 70 68 65 72 73 2c 20 ion of ciphers,
5ba0: 6b 65 79 20 73 69 7a 65 2c 20 65 74 63 5c 26 2e key size, etc\&.
5bb0: 0a 2e 54 50 0a 5c 66 42 73 65 73 73 69 6f 6e 5f ..TP.\fBsession_
5bc0: 72 65 75 73 65 64 5c 66 52 20 5c 66 49 62 6f 6f reused\fR \fIboo
5bd0: 6c 65 61 6e 5c 66 52 0a 57 68 65 74 68 65 72 20 lean\fR.Whether
5be0: 74 68 65 20 73 65 73 73 69 6f 6e 20 68 61 73 20 the session has
5bf0: 62 65 65 6e 20 72 65 75 73 65 64 20 6f 72 20 6e been reused or n
5c00: 6f 74 5c 26 2e 0a 2e 54 50 0a 5c 66 42 69 73 5f ot\&...TP.\fBis_
5c10: 73 65 72 76 65 72 5c 66 52 20 5c 66 49 62 6f 6f server\fR \fIboo
5c20: 6c 65 61 6e 5c 66 52 0a 57 68 65 74 68 65 72 20 lean\fR.Whether
5c30: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 69 the connection i
5c40: 73 20 63 6f 6e 66 69 67 75 72 65 64 20 61 73 20 s configured as
5c50: 61 20 73 65 72 76 65 72 20 28 31 29 20 6f 72 20 a server (1) or
5c60: 63 6c 69 65 6e 74 20 28 30 29 5c 26 2e 0a 2e 54 client (0)\&...T
5c70: 50 0a 5c 66 42 63 6f 6d 70 72 65 73 73 69 6f 6e P.\fBcompression
5c80: 5c 66 52 20 5c 66 49 6d 6f 64 65 5c 66 52 0a 43 \fR \fImode\fR.C
5c90: 6f 6d 70 72 65 73 73 69 6f 6e 20 6d 65 74 68 6f ompression metho
5ca0: 64 5c 26 2e 0a 2e 54 50 0a 5c 66 42 65 78 70 61 d\&...TP.\fBexpa
5cb0: 6e 73 69 6f 6e 5c 66 52 20 5c 66 49 6d 6f 64 65 nsion\fR \fImode
5cc0: 5c 66 52 0a 45 78 70 61 6e 73 69 6f 6e 20 6d 65 \fR.Expansion me
5cd0: 74 68 6f 64 5c 26 2e 0a 2e 54 50 0a 5c 66 42 63 thod\&...TP.\fBc
5ce0: 61 4c 69 73 74 5c 66 52 20 5c 66 49 6c 69 73 74 aList\fR \fIlist
5cf0: 5c 66 52 0a 4c 69 73 74 20 6f 66 20 43 65 72 74 \fR.List of Cert
5d00: 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 ificate Authorit
5d10: 69 65 73 20 28 43 41 29 20 66 6f 72 20 58 5c 26 ies (CA) for X\&
5d20: 2e 35 30 39 20 63 65 72 74 69 66 69 63 61 74 65 .509 certificate
5d30: 5c 26 2e 0a 2e 52 45 0a 2e 49 50 0a 43 69 70 68 \&...RE..IP.Ciph
5d40: 65 72 20 49 6e 66 6f 0a 2e 52 53 0a 2e 54 50 0a er Info..RS..TP.
5d50: 5c 66 42 63 69 70 68 65 72 5c 66 52 20 5c 66 49 \fBcipher\fR \fI
5d60: 63 69 70 68 65 72 5c 66 52 0a 54 68 65 20 63 75 cipher\fR.The cu
5d70: 72 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e 20 rrent cipher in
5d80: 75 73 65 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e use for the conn
5d90: 65 63 74 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 ection\&...TP.\f
5da0: 42 73 74 61 6e 64 61 72 64 5f 6e 61 6d 65 5c 66 Bstandard_name\f
5db0: 52 20 5c 66 49 6e 61 6d 65 5c 66 52 0a 54 68 65 R \fIname\fR.The
5dc0: 20 73 74 61 6e 64 61 72 64 20 52 46 43 20 6e 61 standard RFC na
5dd0: 6d 65 20 6f 66 20 63 69 70 68 65 72 5c 26 2e 0a me of cipher\&..
5de0: 2e 54 50 0a 5c 66 42 61 6c 67 6f 72 69 74 68 6d .TP.\fBalgorithm
5df0: 5f 62 69 74 73 5c 66 52 20 5c 66 49 6e 5c 66 52 _bits\fR \fIn\fR
5e00: 0a 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 70 .The number of p
5e10: 72 6f 63 65 73 73 65 64 20 62 69 74 73 20 75 73 rocessed bits us
5e20: 65 64 20 66 6f 72 20 63 69 70 68 65 72 5c 26 2e ed for cipher\&.
5e30: 0a 2e 54 50 0a 5c 66 42 73 65 63 72 65 74 5f 62 ..TP.\fBsecret_b
5e40: 69 74 73 5c 66 52 20 5c 66 49 6e 5c 66 52 0a 54 its\fR \fIn\fR.T
5e50: 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 73 65 63 he number of sec
5e60: 72 65 74 20 62 69 74 73 20 75 73 65 64 20 66 6f ret bits used fo
5e70: 72 20 63 69 70 68 65 72 5c 26 2e 0a 2e 54 50 0a r cipher\&...TP.
5e80: 5c 66 42 6d 69 6e 5f 76 65 72 73 69 6f 6e 5c 66 \fBmin_version\f
5e90: 52 20 5c 66 49 76 65 72 73 69 6f 6e 5c 66 52 0a R \fIversion\fR.
5ea0: 54 68 65 20 6d 69 6e 69 6d 75 6d 20 70 72 6f 74 The minimum prot
5eb0: 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 66 6f 72 ocol version for
5ec0: 20 63 69 70 68 65 72 5c 26 2e 0a 2e 54 50 0a 5c cipher\&...TP.\
5ed0: 66 42 63 69 70 68 65 72 5f 69 73 5f 61 65 61 64 fBcipher_is_aead
5ee0: 5c 66 52 20 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 \fR \fIboolean\f
5ef0: 52 0a 57 68 65 74 68 65 72 20 74 68 65 20 63 69 R.Whether the ci
5f00: 70 68 65 72 20 69 73 20 41 75 74 68 65 6e 74 69 pher is Authenti
5f10: 63 61 74 65 64 20 45 6e 63 72 79 70 74 69 6f 6e cated Encryption
5f20: 20 77 69 74 68 20 41 73 73 6f 63 69 61 74 65 64 with Associated
5f30: 20 44 61 74 61 20 28 41 45 41 44 29 5c 26 2e 0a Data (AEAD)\&..
5f40: 2e 54 50 0a 5c 66 42 63 69 70 68 65 72 5f 69 64 .TP.\fBcipher_id
5f50: 5c 66 52 20 5c 66 49 69 64 5c 66 52 0a 54 68 65 \fR \fIid\fR.The
5f60: 20 4f 70 65 6e 53 53 4c 20 63 69 70 68 65 72 20 OpenSSL cipher
5f70: 69 64 5c 26 2e 0a 2e 54 50 0a 5c 66 42 64 65 73 id\&...TP.\fBdes
5f80: 63 72 69 70 74 69 6f 6e 5c 66 52 20 5c 66 49 73 cription\fR \fIs
5f90: 74 72 69 6e 67 5c 66 52 0a 41 20 74 65 78 74 20 tring\fR.A text
5fa0: 64 65 73 63 72 69 70 74 69 6f 6e 20 6f 66 20 74 description of t
5fb0: 68 65 20 63 69 70 68 65 72 5c 26 2e 0a 2e 54 50 he cipher\&...TP
5fc0: 0a 5c 66 42 68 61 6e 64 73 68 61 6b 65 5f 64 69 .\fBhandshake_di
5fd0: 67 65 73 74 5c 66 52 20 5c 66 49 62 6f 6f 6c 65 gest\fR \fIboole
5fe0: 61 6e 5c 66 52 0a 44 69 67 65 73 74 20 75 73 65 an\fR.Digest use
5ff0: 64 20 64 75 72 69 6e 67 20 68 61 6e 64 73 68 61 d during handsha
6000: 6b 65 5c 26 2e 0a 2e 52 45 0a 2e 49 50 0a 53 65 ke\&...RE..IP.Se
6010: 73 73 69 6f 6e 20 49 6e 66 6f 0a 2e 52 53 0a 2e ssion Info..RS..
6020: 54 50 0a 5c 66 42 61 6c 70 6e 5c 66 52 20 5c 66 TP.\fBalpn\fR \f
6030: 49 70 72 6f 74 6f 63 6f 6c 5c 66 52 0a 54 68 65 Iprotocol\fR.The
6040: 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 protocol select
6050: 65 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 61 ed after Applica
6060: 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f tion-Layer Proto
6070: 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 col Negotiation
6080: 28 41 4c 50 4e 29 5c 26 2e 0a 2e 54 50 0a 5c 66 (ALPN)\&...TP.\f
6090: 42 72 65 73 75 6d 61 62 6c 65 5c 66 52 20 5c 66 Bresumable\fR \f
60a0: 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a 57 68 65 74 Iboolean\fR.Whet
60b0: 68 65 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 her the session
60c0: 63 61 6e 20 62 65 20 72 65 73 75 6d 65 64 20 6f can be resumed o
60d0: 72 20 6e 6f 74 5c 26 2e 0a 2e 54 50 0a 5c 66 42 r not\&...TP.\fB
60e0: 73 74 61 72 74 5f 74 69 6d 65 5c 66 52 20 5c 66 start_time\fR \f
60f0: 49 73 65 63 6f 6e 64 73 5c 66 52 0a 54 69 6d 65 Iseconds\fR.Time
6100: 20 73 69 6e 63 65 20 73 65 73 73 69 6f 6e 20 73 since session s
6110: 74 61 72 74 65 64 20 69 6e 20 73 65 63 6f 6e 64 tarted in second
6120: 73 20 73 69 6e 63 65 20 65 70 6f 63 68 5c 26 2e s since epoch\&.
6130: 0a 2e 54 50 0a 5c 66 42 74 69 6d 65 6f 75 74 5c ..TP.\fBtimeout\
6140: 66 52 20 5c 66 49 73 65 63 6f 6e 64 73 5c 66 52 fR \fIseconds\fR
6150: 0a 4d 61 78 20 64 75 72 61 74 69 6f 6e 20 6f 66 .Max duration of
6160: 20 73 65 73 73 69 6f 6e 20 69 6e 20 73 65 63 6f session in seco
6170: 6e 64 73 20 62 65 66 6f 72 65 20 74 69 6d 65 2d nds before time-
6180: 6f 75 74 5c 26 2e 0a 2e 54 50 0a 5c 66 42 6c 69 out\&...TP.\fBli
6190: 66 65 74 69 6d 65 5c 66 52 20 5c 66 49 73 65 63 fetime\fR \fIsec
61a0: 6f 6e 64 73 5c 66 52 0a 53 65 73 73 69 6f 6e 20 onds\fR.Session
61b0: 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 ticket lifetime
61c0: 68 69 6e 74 20 69 6e 20 73 65 63 6f 6e 64 73 5c hint in seconds\
61d0: 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 73 73 69 6f &...TP.\fBsessio
61e0: 6e 5f 69 64 5c 66 52 20 5c 66 49 62 69 6e 61 72 n_id\fR \fIbinar
61f0: 79 5f 73 74 72 69 6e 67 5c 66 52 0a 55 6e 69 71 y_string\fR.Uniq
6200: 75 65 20 73 65 73 73 69 6f 6e 20 69 64 20 66 6f ue session id fo
6210: 72 20 75 73 65 20 69 6e 20 72 65 73 75 6d 69 6e r use in resumin
6220: 67 20 74 68 65 20 73 65 73 73 69 6f 6e 5c 26 2e g the session\&.
6230: 0a 2e 54 50 0a 5c 66 42 73 65 73 73 69 6f 6e 5f ..TP.\fBsession_
6240: 74 69 63 6b 65 74 5c 66 52 20 5c 66 49 62 69 6e ticket\fR \fIbin
6250: 61 72 79 5f 73 74 72 69 6e 67 5c 66 52 0a 55 6e ary_string\fR.Un
6260: 69 71 75 65 20 73 65 73 73 69 6f 6e 20 74 69 63 ique session tic
6270: 6b 65 74 20 66 6f 72 20 75 73 65 20 69 6e 20 72 ket for use in r
6280: 65 73 75 6d 69 6e 67 20 74 68 65 20 73 65 73 73 esuming the sess
6290: 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 69 ion\&...TP.\fBti
62a0: 63 6b 65 74 5f 61 70 70 5f 64 61 74 61 5c 66 52 cket_app_data\fR
62b0: 20 5c 66 49 62 69 6e 61 72 79 5f 73 74 72 69 6e \fIbinary_strin
62c0: 67 5c 66 52 0a 55 6e 69 71 75 65 20 73 65 73 73 g\fR.Unique sess
62d0: 69 6f 6e 20 74 69 63 6b 65 74 20 61 70 70 6c 69 ion ticket appli
62e0: 63 61 74 69 6f 6e 20 64 61 74 61 5c 26 2e 0a 2e cation data\&...
62f0: 54 50 0a 5c 66 42 6d 61 73 74 65 72 5f 6b 65 79 TP.\fBmaster_key
6300: 5c 66 52 20 5c 66 49 62 69 6e 61 72 79 5f 73 74 \fR \fIbinary_st
6310: 72 69 6e 67 5c 66 52 0a 55 6e 69 71 75 65 20 73 ring\fR.Unique s
6320: 65 73 73 69 6f 6e 20 6d 61 73 74 65 72 20 6b 65 ession master ke
6330: 79 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 73 73 y\&...TP.\fBsess
6340: 69 6f 6e 5f 63 61 63 68 65 5f 6d 6f 64 65 5c 66 ion_cache_mode\f
6350: 52 20 5c 66 49 6d 6f 64 65 5c 66 52 0a 53 65 72 R \fImode\fR.Ser
6360: 76 65 72 20 63 61 63 68 65 20 6d 6f 64 65 20 28 ver cache mode (
6370: 63 6c 69 65 6e 74 2c 20 73 65 72 76 65 72 2c 20 client, server,
6380: 6f 72 20 62 6f 74 68 29 5c 26 2e 0a 2e 52 45 0a or both)\&...RE.
6390: 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 63 69 70 68 .TP.\fBtls::ciph
63a0: 65 72 73 5c 66 52 20 3f 5c 66 49 70 72 6f 74 6f ers\fR ?\fIproto
63b0: 63 6f 6c 5c 66 52 3f 20 3f 5c 66 49 76 65 72 62 col\fR? ?\fIverb
63c0: 6f 73 65 5c 66 52 3f 20 3f 5c 66 49 73 75 70 70 ose\fR? ?\fIsupp
63d0: 6f 72 74 65 64 5c 66 52 3f 0a 57 69 74 68 6f 75 orted\fR?.Withou
63e0: 74 20 61 6e 79 20 6f 70 74 69 6f 6e 73 2c 20 69 t any options, i
63f0: 74 20 72 65 74 75 72 6e 73 20 61 20 6c 69 73 74 t returns a list
6400: 20 6f 66 20 61 6c 6c 20 73 79 6d 6d 65 74 72 69 of all symmetri
6410: 63 20 63 69 70 68 65 72 73 20 66 6f 72 20 75 73 c ciphers for us
6420: 65 20 77 69 74 68 20 74 68 65 0a 5c 66 49 2d 63 e with the.\fI-c
6430: 69 70 68 65 72 5c 66 52 20 6f 70 74 69 6f 6e 5c ipher\fR option\
6440: 26 2e 20 57 69 74 68 20 5c 66 49 70 72 6f 74 6f &. With \fIproto
6450: 63 6f 6c 5c 66 52 2c 20 6f 6e 6c 79 20 74 68 65 col\fR, only the
6460: 20 63 69 70 68 65 72 73 20 73 75 70 70 6f 72 74 ciphers support
6470: 65 64 20 66 6f 72 20 74 68 61 74 0a 70 72 6f 74 ed for that.prot
6480: 6f 63 6f 6c 20 61 72 65 20 72 65 74 75 72 6e 65 ocol are returne
6490: 64 5c 26 2e 20 53 65 65 20 74 68 65 20 5c 66 42 d\&. See the \fB
64a0: 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 5c 66 tls::protocols\f
64b0: 52 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 74 68 R command for th
64c0: 65 20 73 75 70 70 6f 72 74 65 64 0a 70 72 6f 74 e supported.prot
64d0: 6f 63 6f 6c 73 5c 26 2e 20 49 66 20 5c 66 49 76 ocols\&. If \fIv
64e0: 65 72 62 6f 73 65 5c 66 52 20 69 73 20 73 70 65 erbose\fR is spe
64f0: 63 69 66 69 65 64 20 61 73 20 74 72 75 65 20 74 cified as true t
6500: 68 65 6e 20 61 20 76 65 72 62 6f 73 65 2c 20 68 hen a verbose, h
6510: 75 6d 61 6e 20 72 65 61 64 61 62 6c 65 0a 6c 69 uman readable.li
6520: 73 74 20 69 73 20 72 65 74 75 72 6e 65 64 20 77 st is returned w
6530: 69 74 68 20 61 64 64 69 74 69 6f 6e 61 6c 20 69 ith additional i
6540: 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 nformation on th
6550: 65 20 63 69 70 68 65 72 5c 26 2e 20 49 66 20 5c e cipher\&. If \
6560: 66 49 73 75 70 70 6f 72 74 65 64 5c 66 52 0a 69 fIsupported\fR.i
6570: 73 20 73 70 65 63 69 66 69 65 64 20 61 73 20 74 s specified as t
6580: 72 75 65 2c 20 74 68 65 6e 20 6f 6e 6c 79 20 74 rue, then only t
6590: 68 65 20 63 69 70 68 65 72 73 20 73 75 70 70 6f he ciphers suppo
65a0: 72 74 65 64 20 66 6f 72 20 70 72 6f 74 6f 63 6f rted for protoco
65b0: 6c 20 77 69 6c 6c 20 62 65 20 6c 69 73 74 65 64 l will be listed
65c0: 5c 26 2e 0a 54 68 65 20 5c 66 49 73 75 70 70 6f \&..The \fIsuppo
65d0: 72 74 65 64 5c 66 52 20 61 72 67 20 69 73 20 6e rted\fR arg is n
65e0: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c ew for TclTLS 1\
65f0: 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 6c &.8\&...TP.\fBtl
6600: 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 5c 66 52 0a s::protocols\fR.
6610: 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f Returns a list o
6620: 66 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 20 f the supported
6630: 53 53 4c 2f 54 4c 53 20 70 72 6f 74 6f 63 6f 6c SSL/TLS protocol
6640: 73 5c 26 2e 20 56 61 6c 69 64 20 76 61 6c 75 65 s\&. Valid value
6650: 73 20 61 72 65 3a 0a 5c 66 42 73 73 6c 32 5c 66 s are:.\fBssl2\f
6660: 52 2c 20 5c 66 42 73 73 6c 33 5c 66 52 2c 20 5c R, \fBssl3\fR, \
6670: 66 42 74 6c 73 31 5c 66 52 2c 20 5c 66 42 74 6c fBtls1\fR, \fBtl
6680: 73 31 5c 26 2e 31 5c 66 52 2c 20 5c 66 42 74 6c s1\&.1\fR, \fBtl
6690: 73 31 5c 26 2e 32 5c 66 52 2c 20 61 6e 64 0a 5c s1\&.2\fR, and.\
66a0: 66 42 74 6c 73 31 5c 26 2e 33 5c 66 52 5c 26 2e fBtls1\&.3\fR\&.
66b0: 20 45 78 61 63 74 20 6c 69 73 74 20 64 65 70 65 Exact list depe
66c0: 6e 64 73 20 6f 6e 20 4f 70 65 6e 53 53 4c 20 76 nds on OpenSSL v
66d0: 65 72 73 69 6f 6e 20 61 6e 64 20 63 6f 6d 70 69 ersion and compi
66e0: 6c 65 20 74 69 6d 65 20 66 6c 61 67 73 5c 26 2e le time flags\&.
66f0: 0a 54 68 69 73 20 63 6f 6d 6d 61 6e 64 20 69 73 .This command is
6700: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
6710: 31 5c 26 2e 38 5c 26 2e 0a 2e 54 50 0a 5c 66 42 1\&.8\&...TP.\fB
6720: 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 5c 66 52 0a tls::version\fR.
6730: 52 65 74 75 72 6e 73 20 74 68 65 20 4f 70 65 6e Returns the Open
6740: 53 53 4c 20 76 65 72 73 69 6f 6e 20 73 74 72 69 SSL version stri
6750: 6e 67 5c 26 2e 0a 2e 50 50 0a 2e 53 48 20 22 43 ng\&...PP..SH "C
6760: 45 52 54 49 46 49 43 41 54 45 20 56 41 4c 49 44 ERTIFICATE VALID
6770: 41 54 49 4f 4e 22 0a 2e 53 53 20 22 50 4b 49 20 ATION"..SS "PKI
6780: 41 4e 44 20 43 45 52 54 49 46 49 43 41 54 45 53 AND CERTIFICATES
6790: 22 0a 55 73 69 6e 67 20 74 68 65 20 50 75 62 6c ".Using the Publ
67a0: 69 63 20 4b 65 79 20 49 6e 66 72 61 73 74 72 75 ic Key Infrastru
67b0: 63 74 75 72 65 20 28 50 4b 49 29 2c 20 65 61 63 cture (PKI), eac
67c0: 68 20 75 73 65 72 20 63 72 65 61 74 65 73 20 61 h user creates a
67d0: 20 70 72 69 76 61 74 65 20 6b 65 79 20 74 68 61 private key tha
67e0: 74 0a 6f 6e 6c 79 20 74 68 65 79 20 6b 6e 6f 77 t.only they know
67f0: 20 61 62 6f 75 74 20 61 6e 64 20 61 20 70 75 62 about and a pub
6800: 6c 69 63 20 6b 65 79 20 74 68 65 79 20 63 61 6e lic key they can
6810: 20 65 78 63 68 61 6e 67 65 20 77 69 74 68 20 6f exchange with o
6820: 74 68 65 72 73 20 66 6f 72 20 75 73 65 20 69 6e thers for use in
6830: 0a 65 6e 63 72 79 70 74 69 6e 67 20 61 6e 64 20 .encrypting and
6840: 64 65 63 72 79 70 74 69 6e 67 20 64 61 74 61 5c decrypting data\
6850: 26 2e 20 54 68 65 20 70 72 6f 63 65 73 73 20 69 &. The process i
6860: 73 20 74 68 65 20 73 65 6e 64 65 72 20 65 6e 63 s the sender enc
6870: 72 79 70 74 73 20 74 68 65 69 72 20 64 61 74 61 rypts their data
6880: 0a 75 73 69 6e 67 20 74 68 65 69 72 20 70 72 69 .using their pri
6890: 76 61 74 65 20 6b 65 79 20 61 6e 64 20 74 68 65 vate key and the
68a0: 20 72 65 63 65 69 76 65 72 27 73 20 70 75 62 6c receiver's publ
68b0: 69 63 20 6b 65 79 5c 26 2e 20 54 68 65 20 64 61 ic key\&. The da
68c0: 74 61 20 69 73 20 74 68 65 6e 20 73 65 6e 74 0a ta is then sent.
68d0: 74 6f 20 74 68 65 20 72 65 63 65 69 76 65 72 5c to the receiver\
68e0: 26 2e 20 49 6e 20 61 20 73 69 6d 69 6c 61 72 20 &. In a similar
68f0: 6d 61 6e 6e 65 72 2c 20 74 68 65 20 72 65 63 65 manner, the rece
6900: 69 76 65 72 20 75 73 65 73 20 74 68 65 69 72 20 iver uses their
6910: 70 72 69 76 61 74 65 20 6b 65 79 20 61 6e 64 0a private key and.
6920: 74 68 65 20 73 65 6e 64 65 72 27 73 20 70 75 62 the sender's pub
6930: 6c 69 63 20 6b 65 79 20 74 6f 20 64 65 63 72 79 lic key to decry
6940: 70 74 20 74 68 65 20 64 61 74 61 5c 26 2e 20 54 pt the data\&. T
6950: 68 69 73 20 70 72 6f 76 69 64 65 73 20 64 61 74 his provides dat
6960: 61 20 69 6e 74 65 67 72 69 74 79 2c 20 74 6f 0a a integrity, to.
6970: 65 6e 73 75 72 65 20 74 68 65 20 64 61 74 61 20 ensure the data
6980: 63 61 6e 27 74 20 62 65 20 76 69 65 77 65 64 20 can't be viewed
6990: 6f 72 20 61 6c 74 65 72 65 64 20 64 75 72 69 6e or altered durin
69a0: 67 20 74 72 61 6e 73 70 6f 72 74 5c 26 2e 20 53 g transport\&. S
69b0: 65 65 20 74 68 65 0a 5c 66 42 2d 6b 65 79 5c 66 ee the.\fB-key\f
69c0: 52 20 61 6e 64 20 5c 66 42 2d 6b 65 79 66 69 6c R and \fB-keyfil
69d0: 65 5c 66 52 20 6f 70 74 69 6f 6e 73 20 66 6f 72 e\fR options for
69e0: 20 68 6f 77 20 74 6f 20 73 70 65 63 69 66 79 20 how to specify
69f0: 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 5c the private key\
6a00: 26 2e 0a 41 6c 73 6f 20 73 65 65 20 74 68 65 20 &..Also see the
6a10: 5c 66 42 2d 70 61 73 73 77 6f 72 64 5c 66 52 20 \fB-password\fR
6a20: 6f 70 74 69 6f 6e 20 66 6f 72 20 68 6f 77 20 74 option for how t
6a30: 6f 20 70 72 6f 76 69 64 65 20 74 68 65 20 70 61 o provide the pa
6a40: 73 73 77 6f 72 64 5c 26 2e 0a 2e 50 50 0a 49 6e ssword\&...PP.In
6a50: 20 6f 72 64 65 72 20 74 6f 20 70 72 6f 76 69 64 order to provid
6a60: 65 20 61 75 74 68 65 6e 74 69 63 61 74 69 6f 6e e authentication
6a70: 2c 20 69 5c 26 2e 65 5c 26 2e 20 65 6e 73 75 72 , i\&.e\&. ensur
6a80: 69 6e 67 20 73 6f 6d 65 6f 6e 65 20 69 73 20 77 ing someone is w
6a90: 68 6f 20 74 68 65 79 20 73 61 79 20 74 68 65 79 ho they say they
6aa0: 0a 61 72 65 2c 20 74 68 65 20 70 75 62 6c 69 63 .are, the public
6ab0: 20 6b 65 79 20 61 6e 64 20 75 73 65 72 20 69 64 key and user id
6ac0: 65 6e 74 69 66 69 63 61 74 69 6f 6e 20 69 6e 66 entification inf
6ad0: 6f 20 69 73 20 73 74 6f 72 65 64 20 69 6e 20 61 o is stored in a
6ae0: 20 58 5c 26 2e 35 30 39 0a 63 65 72 74 69 66 69 X\&.509.certifi
6af0: 63 61 74 65 20 61 6e 64 20 74 68 61 74 20 63 65 cate and that ce
6b00: 72 74 69 66 69 63 61 74 65 20 69 73 20 61 75 74 rtificate is aut
6b10: 68 65 6e 74 69 63 61 74 65 64 20 28 69 5c 26 2e henticated (i\&.
6b20: 65 5c 26 2e 20 73 69 67 6e 65 64 29 20 62 79 20 e\&. signed) by
6b30: 61 20 43 65 72 74 69 66 69 63 61 74 65 0a 41 75 a Certificate.Au
6b40: 74 68 6f 72 69 74 79 20 28 43 41 29 5c 26 2e 20 thority (CA)\&.
6b50: 55 73 65 72 73 20 63 61 6e 20 74 68 65 6e 20 65 Users can then e
6b60: 78 63 68 61 6e 67 65 20 74 68 65 73 65 20 63 65 xchange these ce
6b70: 72 74 69 66 69 63 61 74 65 73 20 64 75 72 69 6e rtificates durin
6b80: 67 20 74 68 65 20 54 4c 53 0a 69 6e 69 74 69 61 g the TLS.initia
6b90: 6c 69 7a 61 74 69 6f 6e 20 70 72 6f 63 65 73 73 lization process
6ba0: 20 61 6e 64 20 63 68 65 63 6b 20 74 68 65 6d 20 and check them
6bb0: 61 67 61 69 6e 73 74 20 74 68 65 20 72 6f 6f 74 against the root
6bc0: 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 73 CA certificates
6bd0: 20 74 6f 20 65 6e 73 75 72 65 0a 74 68 65 79 20 to ensure.they
6be0: 61 72 65 20 76 61 6c 69 64 5c 26 2e 20 54 68 69 are valid\&. Thi
6bf0: 73 20 69 73 20 68 61 6e 64 6c 65 64 20 62 79 20 s is handled by
6c00: 4f 70 65 6e 53 53 4c 20 76 69 61 20 74 68 65 20 OpenSSL via the
6c10: 5c 66 42 2d 72 65 71 75 65 73 74 5c 66 52 20 61 \fB-request\fR a
6c20: 6e 64 0a 5c 66 42 2d 72 65 71 75 69 72 65 5c 66 nd.\fB-require\f
6c30: 52 20 6f 70 74 69 6f 6e 73 5c 26 2e 20 53 65 65 R options\&. See
6c40: 20 74 68 65 20 5c 66 42 2d 63 61 64 69 72 5c 66 the \fB-cadir\f
6c50: 52 2c 20 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c R, \fB-cadir\fR,
6c60: 20 61 6e 64 0a 5c 66 42 2d 63 61 73 74 6f 72 65 and.\fB-castore
6c70: 5c 66 52 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 \fR options for
6c80: 68 6f 77 20 74 6f 20 73 70 65 63 69 66 79 20 77 how to specify w
6c90: 68 65 72 65 20 74 6f 20 66 69 6e 64 20 74 68 65 here to find the
6ca0: 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 73 CA certificates
6cb0: 5c 26 2e 0a 4f 70 74 69 6f 6e 61 6c 6c 79 2c 20 \&..Optionally,
6cc0: 69 6e 20 61 20 66 75 74 75 72 65 20 72 65 6c 65 in a future rele
6cd0: 61 73 65 2c 20 74 68 65 79 20 63 61 6e 20 61 6c ase, they can al
6ce0: 73 6f 20 62 65 20 63 68 65 63 6b 65 64 20 61 67 so be checked ag
6cf0: 61 69 6e 73 74 20 74 68 65 20 43 65 72 74 69 66 ainst the Certif
6d00: 69 63 61 74 65 0a 52 65 76 6f 63 61 74 69 6f 6e icate.Revocation
6d10: 20 4c 69 73 74 20 28 43 52 4c 29 20 6f 66 20 72 List (CRL) of r
6d20: 65 76 6f 6b 65 64 20 63 65 72 74 69 66 69 63 61 evoked certifica
6d30: 74 65 73 5c 26 2e 20 43 65 72 74 69 66 69 63 61 tes\&. Certifica
6d40: 74 65 73 20 63 61 6e 20 61 6c 73 6f 20 62 65 0a tes can also be.
6d50: 73 65 6c 66 2d 73 69 67 6e 65 64 2c 20 62 75 74 self-signed, but
6d60: 20 74 68 65 79 20 61 72 65 20 62 79 20 64 65 66 they are by def
6d70: 61 75 6c 74 20 6e 6f 74 20 74 72 75 73 74 65 64 ault not trusted
6d80: 20 75 6e 6c 65 73 73 20 79 6f 75 20 61 64 64 20 unless you add
6d90: 74 68 65 6d 20 74 6f 20 79 6f 75 72 0a 63 65 72 them to your.cer
6da0: 74 69 66 69 63 61 74 65 20 73 74 6f 72 65 5c 26 tificate store\&
6db0: 2e 0a 2e 50 50 0a 54 79 70 69 63 61 6c 6c 79 20 ...PP.Typically
6dc0: 77 68 65 6e 20 76 69 73 69 74 69 6e 67 20 77 65 when visiting we
6dd0: 62 20 73 69 74 65 73 2c 20 6f 6e 6c 79 20 74 68 b sites, only th
6de0: 65 20 63 6c 69 65 6e 74 20 6e 65 65 64 73 20 74 e client needs t
6df0: 6f 20 63 68 65 63 6b 20 74 68 65 20 73 65 72 76 o check the serv
6e00: 65 72 27 73 0a 63 65 72 74 69 66 69 63 61 74 65 er's.certificate
6e10: 20 74 6f 20 65 6e 73 75 72 65 20 69 74 20 69 73 to ensure it is
6e20: 20 76 61 6c 69 64 5c 26 2e 20 54 68 65 20 73 65 valid\&. The se
6e30: 72 76 65 72 20 64 6f 65 73 6e 27 74 20 6e 65 65 rver doesn't nee
6e40: 64 20 74 6f 20 63 68 65 63 6b 20 74 68 65 20 63 d to check the c
6e50: 6c 69 65 6e 74 0a 63 65 72 74 69 66 69 63 61 74 lient.certificat
6e60: 65 20 75 6e 6c 65 73 73 20 79 6f 75 20 6e 65 65 e unless you nee
6e70: 64 20 74 6f 20 61 75 74 68 65 6e 74 69 63 61 74 d to authenticat
6e80: 65 20 77 69 74 68 20 74 68 65 6d 20 74 6f 20 6c e with them to l
6e90: 6f 67 69 6e 2c 20 65 74 63 5c 26 2e 20 53 65 65 ogin, etc\&. See
6ea0: 20 74 68 65 0a 5c 66 42 2d 63 65 72 74 5c 66 52 the.\fB-cert\fR
6eb0: 20 61 6e 64 20 5c 66 42 2d 63 65 72 74 66 69 6c and \fB-certfil
6ec0: 65 5c 66 52 20 6f 70 74 69 6f 6e 73 20 69 66 20 e\fR options if
6ed0: 79 6f 75 20 6e 65 65 64 20 74 6f 20 70 72 6f 76 you need to prov
6ee0: 69 64 65 20 61 20 63 65 72 74 69 66 69 63 61 74 ide a certificat
6ef0: 65 5c 26 2e 0a 2e 53 53 20 22 53 55 4d 4d 41 52 e\&...SS "SUMMAR
6f00: 59 20 4f 46 20 43 4f 4d 4d 41 4e 44 20 4c 49 4e Y OF COMMAND LIN
6f10: 45 20 4f 50 54 49 4f 4e 53 22 0a 54 68 65 20 66 E OPTIONS".The f
6f20: 6f 6c 6c 6f 77 69 6e 67 20 6f 70 74 69 6f 6e 73 ollowing options
6f30: 20 61 72 65 20 75 73 65 64 20 66 6f 72 20 70 65 are used for pe
6f40: 65 72 20 63 65 72 74 69 66 69 63 61 74 65 20 76 er certificate v
6f50: 61 6c 69 64 61 74 69 6f 6e 3a 0a 2e 54 50 0a 5c alidation:..TP.\
6f60: 66 42 2d 63 61 64 69 72 5c 66 52 20 5c 66 49 64 fB-cadir\fR \fId
6f70: 69 72 65 63 74 6f 72 79 5c 66 52 0a 53 70 65 63 irectory\fR.Spec
6f80: 69 66 69 65 73 20 74 68 65 20 64 69 72 65 63 74 ifies the direct
6f90: 6f 72 79 20 77 68 65 72 65 20 74 68 65 20 43 65 ory where the Ce
6fa0: 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 rtificate Author
6fb0: 69 74 79 20 28 43 41 29 20 63 65 72 74 69 66 69 ity (CA) certifi
6fc0: 63 61 74 65 73 20 61 72 65 0a 73 74 6f 72 65 64 cates are.stored
6fd0: 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 \&. The default
6fe0: 69 73 20 70 6c 61 74 66 6f 72 6d 20 73 70 65 63 is platform spec
6ff0: 69 66 69 63 2c 20 62 75 74 20 69 73 20 75 73 75 ific, but is usu
7000: 61 6c 6c 79 20 22 5c 66 49 2f 65 74 63 2f 73 73 ally "\fI/etc/ss
7010: 6c 2f 63 65 72 74 73 5c 66 52 22 20 6f 6e 0a 4c l/certs\fR" on.L
7020: 69 6e 75 78 2f 55 6e 69 78 20 73 79 73 74 65 6d inux/Unix system
7030: 73 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 s\&. The default
7040: 20 6c 6f 63 61 74 69 6f 6e 20 63 61 6e 20 62 65 location can be
7050: 20 6f 76 65 72 72 69 64 64 65 6e 20 62 79 20 74 overridden by t
7060: 68 65 0a 5c 66 42 53 53 4c 5f 43 45 52 54 5f 44 he.\fBSSL_CERT_D
7070: 49 52 5c 66 52 20 65 6e 76 69 72 6f 6e 6d 65 6e IR\fR environmen
7080: 74 20 76 61 72 69 61 62 6c 65 5c 26 2e 0a 2e 54 t variable\&...T
7090: 50 0a 5c 66 42 2d 63 61 66 69 6c 65 5c 66 52 20 P.\fB-cafile\fR
70a0: 5c 66 49 66 69 6c 65 6e 61 6d 65 5c 66 52 0a 53 \fIfilename\fR.S
70b0: 70 65 63 69 66 69 65 73 20 74 68 65 20 66 69 6c pecifies the fil
70c0: 65 20 77 69 74 68 20 74 68 65 20 43 65 72 74 69 e with the Certi
70d0: 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 ficate Authority
70e0: 20 28 43 41 29 20 63 65 72 74 69 66 69 63 61 74 (CA) certificat
70f0: 65 73 20 74 6f 20 75 73 65 20 69 6e 0a 5c 66 42 es to use in.\fB
7100: 50 45 4d 5c 66 52 20 66 69 6c 65 20 66 6f 72 6d PEM\fR file form
7110: 61 74 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c at\&. The defaul
7120: 74 20 69 73 20 22 5c 66 49 63 65 72 74 5c 26 2e t is "\fIcert\&.
7130: 70 65 6d 5c 66 52 22 2c 20 69 6e 20 74 68 65 20 pem\fR", in the
7140: 4f 70 65 6e 53 53 4c 0a 64 69 72 65 63 74 6f 72 OpenSSL.director
7150: 79 5c 26 2e 20 4f 6e 20 4c 69 6e 75 78 2f 55 6e y\&. On Linux/Un
7160: 69 78 20 73 79 73 74 65 6d 73 2c 20 74 68 69 73 ix systems, this
7170: 20 69 73 20 75 73 75 61 6c 6c 79 20 22 5c 66 49 is usually "\fI
7180: 2f 65 74 63 2f 73 73 6c 2f 63 61 2d 62 75 6e 64 /etc/ssl/ca-bund
7190: 6c 65 5c 26 2e 70 65 6d 5c 66 52 22 5c 26 2e 0a le\&.pem\fR"\&..
71a0: 54 68 65 20 64 65 66 61 75 6c 74 20 66 69 6c 65 The default file
71b0: 20 63 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64 can be overridd
71c0: 65 6e 20 62 79 20 74 68 65 20 5c 66 42 53 53 4c en by the \fBSSL
71d0: 5f 43 45 52 54 5f 46 49 4c 45 5c 66 52 20 65 6e _CERT_FILE\fR en
71e0: 76 69 72 6f 6e 6d 65 6e 74 0a 76 61 72 69 61 62 vironment.variab
71f0: 6c 65 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 61 le\&...TP.\fB-ca
7200: 73 74 6f 72 65 5c 66 52 20 5c 66 49 55 52 49 5c store\fR \fIURI\
7210: 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 fR.Specifies the
7220: 20 55 6e 69 66 6f 72 6d 20 52 65 73 6f 75 72 63 Uniform Resourc
7230: 65 20 49 64 65 6e 74 69 66 69 65 72 20 28 55 52 e Identifier (UR
7240: 49 29 20 66 6f 72 20 74 68 65 20 43 65 72 74 69 I) for the Certi
7250: 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 ficate Authority
7260: 0a 28 43 41 29 20 73 74 6f 72 65 2c 20 77 68 69 .(CA) store, whi
7270: 63 68 20 6d 61 79 20 62 65 20 61 20 73 69 6e 67 ch may be a sing
7280: 6c 65 20 63 6f 6e 74 61 69 6e 65 72 20 6f 72 20 le container or
7290: 61 20 63 61 74 61 6c 6f 67 20 6f 66 20 63 6f 6e a catalog of con
72a0: 74 61 69 6e 65 72 73 5c 26 2e 0a 53 74 61 72 74 tainers\&..Start
72b0: 69 6e 67 20 77 69 74 68 20 4f 70 65 6e 53 53 4c ing with OpenSSL
72c0: 20 33 5c 26 2e 32 20 6f 6e 20 4d 53 20 57 69 6e 3\&.2 on MS Win
72d0: 64 6f 77 73 2c 20 73 65 74 20 74 6f 20 22 5c 66 dows, set to "\f
72e0: 42 6f 72 67 5c 26 2e 6f 70 65 6e 73 73 6c 5c 26 Borg\&.openssl\&
72f0: 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 5c 66 52 22 .winstore://\fR"
7300: 0a 74 6f 20 75 73 65 20 74 68 65 20 62 75 69 6c .to use the buil
7310: 74 2d 69 6e 20 4d 53 20 57 69 6e 64 6f 77 73 20 t-in MS Windows
7320: 43 65 72 74 69 66 69 63 61 74 65 20 53 74 6f 72 Certificate Stor
7330: 65 5c 26 2e 20 53 74 61 72 74 69 6e 67 20 69 6e e\&. Starting in
7340: 20 54 63 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 74 TclTLS 2\&.0, t
7350: 68 69 73 0a 69 73 20 74 68 65 20 64 65 66 61 75 his.is the defau
7360: 6c 74 20 69 66 20 5c 66 42 2d 63 61 64 69 72 5c lt if \fB-cadir\
7370: 66 52 2c 20 5c 66 42 2d 63 61 64 69 72 5c 66 52 fR, \fB-cadir\fR
7380: 2c 20 61 6e 64 20 5c 66 42 2d 63 61 73 74 6f 72 , and \fB-castor
7390: 65 5c 66 52 20 61 72 65 0a 6e 6f 74 20 73 70 65 e\fR are.not spe
73a0: 63 69 66 69 65 64 5c 26 2e 20 54 68 69 73 20 73 cified\&. This s
73b0: 74 6f 72 65 20 6f 6e 6c 79 20 73 75 70 70 6f 72 tore only suppor
73c0: 74 73 20 72 6f 6f 74 20 63 65 72 74 69 66 69 63 ts root certific
73d0: 61 74 65 20 73 74 6f 72 65 73 5c 26 2e 0a 2e 54 ate stores\&...T
73e0: 50 0a 5c 66 42 2d 72 65 71 75 65 73 74 5c 66 52 P.\fB-request\fR
73f0: 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 52 65 71 75 \fIbool\fR.Requ
7400: 65 73 74 20 61 20 63 65 72 74 69 66 69 63 61 74 est a certificat
7410: 65 20 66 72 6f 6d 20 74 68 65 20 70 65 65 72 20 e from the peer
7420: 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68 during the SSL h
7430: 61 6e 64 73 68 61 6b 65 5c 26 2e 20 54 68 69 73 andshake\&. This
7440: 20 69 73 20 6e 65 65 64 65 64 0a 74 6f 20 64 6f is needed.to do
7450: 20 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c Certificate Val
7460: 69 64 61 74 69 6f 6e 5c 26 2e 20 53 74 61 72 74 idation\&. Start
7470: 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 31 5c ing in TclTLS 1\
7480: 26 2e 38 2c 20 74 68 65 20 64 65 66 61 75 6c 74 &.8, the default
7490: 20 69 73 0a 5c 66 42 74 72 75 65 5c 66 52 5c 26 is.\fBtrue\fR\&
74a0: 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 . Starting in Tc
74b0: 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 69 66 20 73 lTLS 2\&.0, if s
74c0: 65 74 20 74 6f 20 5c 66 42 66 61 6c 73 65 5c 66 et to \fBfalse\f
74d0: 52 20 61 6e 64 0a 5c 66 42 2d 72 65 71 75 69 72 R and.\fB-requir
74e0: 65 5c 66 52 20 69 73 20 5c 66 42 74 72 75 65 5c e\fR is \fBtrue\
74f0: 66 52 2c 20 74 68 65 6e 20 74 68 69 73 20 77 69 fR, then this wi
7500: 6c 6c 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e ll be overridden
7510: 20 74 6f 20 5c 66 42 74 72 75 65 5c 66 52 5c 26 to \fBtrue\fR\&
7520: 2e 0a 49 6e 20 61 64 64 69 74 69 6f 6e 2c 20 74 ..In addition, t
7530: 68 65 20 63 6c 69 65 6e 74 20 63 61 6e 20 6d 61 he client can ma
7540: 6e 75 61 6c 6c 79 20 69 6e 73 70 65 63 74 20 61 nually inspect a
7550: 6e 64 20 61 63 63 65 70 74 20 6f 72 20 72 65 6a nd accept or rej
7560: 65 63 74 0a 65 61 63 68 20 63 65 72 74 69 66 69 ect.each certifi
7570: 63 61 74 65 20 75 73 69 6e 67 20 74 68 65 20 5c cate using the \
7580: 66 42 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 fB-validatecomma
7590: 6e 64 5c 66 52 20 6f 70 74 69 6f 6e 5c 26 2e 0a nd\fR option\&..
75a0: 2e 54 50 0a 5c 66 42 2d 72 65 71 75 69 72 65 5c .TP.\fB-require\
75b0: 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 52 65 fR \fIbool\fR.Re
75c0: 71 75 69 72 65 20 61 20 76 61 6c 69 64 20 63 65 quire a valid ce
75d0: 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20 74 rtificate from t
75e0: 68 65 20 70 65 65 72 20 64 75 72 69 6e 67 20 74 he peer during t
75f0: 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 he SSL handshake
7600: 5c 26 2e 20 49 66 20 74 68 69 73 20 69 73 0a 73 \&. If this is.s
7610: 65 74 20 74 6f 20 74 72 75 65 2c 20 74 68 65 6e et to true, then
7620: 20 5c 66 42 2d 72 65 71 75 65 73 74 5c 66 52 20 \fB-request\fR
7630: 6d 75 73 74 20 61 6c 73 6f 20 62 65 20 73 65 74 must also be set
7640: 20 74 6f 20 74 72 75 65 20 61 6e 64 20 61 20 65 to true and a e
7650: 69 74 68 65 72 0a 5c 66 42 2d 63 61 64 69 72 5c ither.\fB-cadir\
7660: 66 52 2c 20 5c 66 42 2d 63 61 66 69 6c 65 5c 66 fR, \fB-cafile\f
7670: 52 2c 20 5c 66 42 2d 63 61 73 74 6f 72 65 5c 66 R, \fB-castore\f
7680: 52 2c 20 6f 72 20 61 20 70 6c 61 74 66 6f 72 6d R, or a platform
7690: 20 64 65 66 61 75 6c 74 0a 6d 75 73 74 20 62 65 default.must be
76a0: 20 70 72 6f 76 69 64 65 64 20 69 6e 20 6f 72 64 provided in ord
76b0: 65 72 20 74 6f 20 76 61 6c 69 64 61 74 65 20 61 er to validate a
76c0: 67 61 69 6e 73 74 5c 26 2e 20 54 68 65 20 64 65 gainst\&. The de
76d0: 66 61 75 6c 74 20 69 6e 20 54 63 6c 54 4c 53 20 fault in TclTLS
76e0: 31 5c 26 2e 38 20 61 6e 64 0a 65 61 72 6c 69 65 1\&.8 and.earlie
76f0: 72 20 76 65 72 73 69 6f 6e 73 20 69 73 20 5c 66 r versions is \f
7700: 42 66 61 6c 73 65 5c 66 52 20 73 69 6e 63 65 20 Bfalse\fR since
7710: 6e 6f 74 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d not all platform
7720: 73 20 68 61 76 65 20 63 65 72 74 69 66 69 63 61 s have certifica
7730: 74 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 tes to.validate
7740: 61 67 61 69 6e 73 74 20 69 6e 20 61 20 66 6f 72 against in a for
7750: 6d 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 m compatible wit
7760: 68 20 4f 70 65 6e 53 53 4c 5c 26 2e 20 53 74 61 h OpenSSL\&. Sta
7770: 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 rting in TclTLS
7780: 32 5c 26 2e 30 2c 0a 74 68 65 20 64 65 66 61 75 2\&.0,.the defau
7790: 6c 74 20 69 73 20 5c 66 42 74 72 75 65 5c 66 52 lt is \fBtrue\fR
77a0: 5c 26 2e 0a 2e 50 50 0a 2e 53 53 20 22 57 48 45 \&...PP..SS "WHE
77b0: 4e 20 41 52 45 20 43 4f 4d 4d 41 4e 44 20 4c 49 N ARE COMMAND LI
77c0: 4e 45 20 4f 50 54 49 4f 4e 53 20 4e 45 45 44 45 NE OPTIONS NEEDE
77d0: 44 3f 22 0a 49 6e 20 54 63 6c 54 4c 53 20 31 5c D?".In TclTLS 1\
77e0: 26 2e 38 20 61 6e 64 20 65 61 72 6c 69 65 72 20 &.8 and earlier
77f0: 76 65 72 73 69 6f 6e 73 2c 20 63 65 72 74 69 66 versions, certif
7800: 69 63 61 74 65 20 76 61 6c 69 64 61 74 69 6f 6e icate validation
7810: 20 69 73 0a 5c 66 49 4e 4f 54 5c 66 52 20 65 6e is.\fINOT\fR en
7820: 61 62 6c 65 64 20 62 79 20 64 65 66 61 75 6c 74 abled by default
7830: 5c 26 2e 20 54 68 69 73 20 6c 69 6d 69 74 61 74 \&. This limitat
7840: 69 6f 6e 20 69 73 20 64 75 65 20 74 6f 20 74 68 ion is due to th
7850: 65 20 6c 61 63 6b 20 6f 66 20 61 20 63 6f 6d 6d e lack of a comm
7860: 6f 6e 0a 63 72 6f 73 73 20 70 6c 61 74 66 6f 72 on.cross platfor
7870: 6d 20 64 61 74 61 62 61 73 65 20 6f 66 20 43 65 m database of Ce
7880: 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 rtificate Author
7890: 69 74 79 20 28 43 41 29 20 70 72 6f 76 69 64 65 ity (CA) provide
78a0: 64 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 d certificates t
78b0: 6f 0a 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e o.validate again
78c0: 73 74 5c 26 2e 20 4d 61 6e 79 20 4c 69 6e 75 78 st\&. Many Linux
78d0: 20 73 79 73 74 65 6d 73 20 6e 61 74 69 76 65 6c systems nativel
78e0: 79 20 73 75 70 70 6f 72 74 20 4f 70 65 6e 53 53 y support OpenSS
78f0: 4c 20 61 6e 64 20 74 68 75 73 20 68 61 76 65 0a L and thus have.
7900: 74 68 65 73 65 20 63 65 72 74 69 66 69 63 61 74 these certificat
7910: 65 73 20 69 6e 73 74 61 6c 6c 65 64 20 61 73 20 es installed as
7920: 70 61 72 74 20 6f 66 20 74 68 65 20 4f 53 2c 20 part of the OS,
7930: 62 75 74 20 4d 61 63 4f 53 20 61 6e 64 20 4d 53 but MacOS and MS
7940: 20 57 69 6e 64 6f 77 73 20 64 6f 20 6e 6f 74 5c Windows do not\
7950: 26 2e 0a 53 74 61 72 69 6e 67 20 69 6e 20 54 63 &..Staring in Tc
7960: 6c 54 4c 53 20 32 5c 26 2e 30 2c 20 74 68 69 73 lTLS 2\&.0, this
7970: 20 68 61 73 20 62 65 65 6e 20 63 68 61 6e 67 65 has been change
7980: 64 20 74 6f 20 72 65 71 75 69 72 65 20 63 65 72 d to require cer
7990: 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 74 tificate validat
79a0: 69 6f 6e 0a 62 79 20 64 65 66 61 75 6c 74 5c 26 ion.by default\&
79b0: 2e 20 49 6e 20 6f 72 64 65 72 20 74 6f 20 75 73 . In order to us
79c0: 65 20 74 68 65 20 5c 66 42 2d 72 65 71 75 69 72 e the \fB-requir
79d0: 65 5c 66 52 20 6f 70 74 69 6f 6e 2c 20 6f 6e 65 e\fR option, one
79e0: 20 6f 66 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e of the followin
79f0: 67 0a 6d 75 73 74 20 62 65 20 74 72 75 65 3a 0a g.must be true:.
7a00: 2e 49 50 20 5c 28 62 75 0a 4f 6e 20 4c 69 6e 75 .IP \(bu.On Linu
7a10: 78 20 61 6e 64 20 55 6e 69 78 20 73 79 73 74 65 x and Unix syste
7a20: 6d 73 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 ms with OpenSSL
7a30: 61 6c 72 65 61 64 79 20 69 6e 73 74 61 6c 6c 65 already installe
7a40: 64 20 6f 72 20 69 66 20 74 68 65 20 43 41 0a 63 d or if the CA.c
7a50: 65 72 74 69 66 69 63 61 74 65 73 20 61 72 65 20 ertificates are
7a60: 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 50 45 4d available in PEM
7a70: 20 66 6f 72 6d 61 74 2c 20 61 6e 64 20 69 66 20 format, and if
7a80: 74 68 65 79 20 61 72 65 20 73 74 6f 72 65 64 20 they are stored
7a90: 69 6e 20 74 68 65 0a 73 74 61 6e 64 61 72 64 20 in the.standard
7aa0: 6c 6f 63 61 74 69 6f 6e 73 2c 20 6f 72 20 69 66 locations, or if
7ab0: 20 74 68 65 20 5c 66 42 53 53 4c 5f 43 45 52 54 the \fBSSL_CERT
7ac0: 5f 44 49 52 5c 66 52 20 6f 72 20 5c 66 42 53 53 _DIR\fR or \fBSS
7ad0: 4c 5f 43 45 52 54 5f 46 49 4c 45 5c 66 52 0a 65 L_CERT_FILE\fR.e
7ae0: 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 nvironment varia
7af0: 62 6c 65 73 20 61 72 65 20 73 65 74 2c 20 74 68 bles are set, th
7b00: 65 6e 20 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c en \fB-cadir\fR,
7b10: 20 5c 66 42 2d 63 61 64 69 72 5c 66 52 2c 0a 61 \fB-cadir\fR,.a
7b20: 6e 64 20 5c 66 42 2d 63 61 73 74 6f 72 65 5c 66 nd \fB-castore\f
7b30: 52 20 61 72 65 6e 27 74 20 6e 65 65 64 65 64 5c R aren't needed\
7b40: 26 2e 0a 2e 49 50 20 5c 28 62 75 0a 49 66 20 4f &...IP \(bu.If O
7b50: 70 65 6e 53 53 4c 20 69 73 20 6e 6f 74 20 69 6e penSSL is not in
7b60: 73 74 61 6c 6c 65 64 20 69 6e 20 74 68 65 20 64 stalled in the d
7b70: 65 66 61 75 6c 74 20 6c 6f 63 61 74 69 6f 6e 2c efault location,
7b80: 20 6f 72 20 77 68 65 6e 20 75 73 69 6e 67 20 4d or when using M
7b90: 61 63 20 4f 53 0a 6f 72 20 4d 53 20 57 69 6e 64 ac OS.or MS Wind
7ba0: 6f 77 73 20 61 6e 64 20 4f 70 65 6e 53 53 4c 20 ows and OpenSSL
7bb0: 69 73 20 69 6e 73 74 61 6c 6c 65 64 2c 20 74 68 is installed, th
7bc0: 65 20 5c 66 42 53 53 4c 5f 43 45 52 54 5f 44 49 e \fBSSL_CERT_DI
7bd0: 52 5c 66 52 20 61 6e 64 2f 6f 72 0a 5c 66 42 53 R\fR and/or.\fBS
7be0: 53 4c 5f 43 45 52 54 5f 46 49 4c 45 5c 66 52 20 SL_CERT_FILE\fR
7bf0: 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 environment vari
7c00: 61 62 6c 65 73 20 6f 72 20 74 68 65 20 6f 6e 65 ables or the one
7c10: 20 6f 66 20 74 68 65 20 5c 66 42 2d 63 61 64 69 of the \fB-cadi
7c20: 72 5c 66 52 2c 0a 5c 66 42 2d 63 61 64 69 72 5c r\fR,.\fB-cadir\
7c30: 66 52 2c 20 6f 72 20 5c 66 42 2d 63 61 73 74 6f fR, or \fB-casto
7c40: 72 65 5c 66 52 20 6f 70 74 69 6f 6e 73 20 6d 75 re\fR options mu
7c50: 73 74 20 62 65 20 64 65 66 69 6e 65 64 5c 26 2e st be defined\&.
7c60: 0a 2e 49 50 20 5c 28 62 75 0a 4f 6e 20 4d 53 20 ..IP \(bu.On MS
7c70: 57 69 6e 64 6f 77 73 2c 20 73 74 61 72 74 69 6e Windows, startin
7c80: 67 20 69 6e 20 4f 70 65 6e 53 53 4c 20 33 5c 26 g in OpenSSL 3\&
7c90: 2e 32 2c 20 69 74 20 69 73 20 6e 6f 77 20 70 6f .2, it is now po
7ca0: 73 73 69 62 6c 65 20 74 6f 20 61 63 63 65 73 73 ssible to access
7cb0: 20 74 68 65 0a 62 75 69 6c 74 2d 69 6e 20 57 69 the.built-in Wi
7cc0: 6e 64 6f 77 73 20 43 65 72 74 69 66 69 63 61 74 ndows Certificat
7cd0: 65 20 53 74 6f 72 65 20 66 72 6f 6d 20 4f 70 65 e Store from Ope
7ce0: 6e 53 53 4c 5c 26 2e 20 54 68 69 73 20 63 61 6e nSSL\&. This can
7cf0: 20 75 74 69 6c 69 7a 65 64 20 62 79 0a 73 65 74 utilized by.set
7d00: 74 69 6e 67 20 74 68 65 20 5c 66 42 2d 63 61 73 ting the \fB-cas
7d10: 74 6f 72 65 5c 66 52 20 6f 70 74 69 6f 6e 20 74 tore\fR option t
7d20: 6f 20 22 5c 66 42 6f 72 67 5c 26 2e 6f 70 65 6e o "\fBorg\&.open
7d30: 73 73 6c 5c 26 2e 77 69 6e 73 74 6f 72 65 3a 2f ssl\&.winstore:/
7d40: 2f 5c 66 52 22 5c 26 2e 0a 49 6e 20 54 63 6c 54 /\fR"\&..In TclT
7d50: 4c 53 20 32 5c 26 2e 30 2c 20 74 68 69 73 20 69 LS 2\&.0, this i
7d60: 73 20 74 68 65 20 64 65 66 61 75 6c 74 20 76 61 s the default va
7d70: 6c 75 65 20 69 66 20 5c 66 42 2d 63 61 64 69 72 lue if \fB-cadir
7d80: 5c 66 52 2c 0a 5c 66 42 2d 63 61 64 69 72 5c 66 \fR,.\fB-cadir\f
7d90: 52 2c 20 61 6e 64 20 5c 66 42 2d 63 61 73 74 6f R, and \fB-casto
7da0: 72 65 5c 66 52 20 61 72 65 20 6e 6f 74 20 73 70 re\fR are not sp
7db0: 65 63 69 66 69 65 64 5c 26 2e 0a 2e 49 50 20 5c ecified\&...IP \
7dc0: 28 62 75 0a 49 66 20 4f 70 65 6e 53 53 4c 20 69 (bu.If OpenSSL i
7dd0: 73 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 65 64 20 s not installed
7de0: 6f 72 20 74 68 65 20 43 41 20 63 65 72 74 69 66 or the CA certif
7df0: 69 63 61 74 65 73 20 61 72 65 20 6e 6f 74 20 61 icates are not a
7e00: 76 61 69 6c 61 62 6c 65 20 69 6e 20 50 45 4d 0a vailable in PEM.
7e10: 66 6f 72 6d 61 74 2c 20 74 68 65 20 43 41 20 63 format, the CA c
7e20: 65 72 74 69 66 69 63 61 74 65 73 20 6d 75 73 74 ertificates must
7e30: 20 62 65 20 64 6f 77 6e 6c 6f 61 64 65 64 20 61 be downloaded a
7e40: 6e 64 20 69 6e 73 74 61 6c 6c 65 64 20 77 69 74 nd installed wit
7e50: 68 20 74 68 65 20 75 73 65 72 0a 73 6f 66 74 77 h the user.softw
7e60: 61 72 65 5c 26 2e 20 54 68 65 20 43 55 52 4c 20 are\&. The CURL
7e70: 74 65 61 6d 20 6d 61 6b 65 73 20 74 68 65 6d 20 team makes them
7e80: 61 76 61 69 6c 61 62 6c 65 20 61 74 0a 5c 66 49 available at.\fI
7e90: 43 41 20 63 65 72 74 69 66 69 63 61 74 65 73 20 CA certificates
7ea0: 65 78 74 72 61 63 74 65 64 0a 66 72 6f 6d 20 4d extracted.from M
7eb0: 6f 7a 69 6c 6c 61 5c 66 52 20 5b 68 74 74 70 73 ozilla\fR [https
7ec0: 3a 2f 2f 63 75 72 6c 5c 26 2e 73 65 2f 64 6f 63 ://curl\&.se/doc
7ed0: 73 2f 63 61 65 78 74 72 61 63 74 5c 26 2e 68 74 s/caextract\&.ht
7ee0: 6d 6c 5d 20 69 6e 20 74 68 65 20 22 5c 66 49 63 ml] in the "\fIc
7ef0: 61 63 65 72 74 5c 26 2e 70 65 6d 5c 66 52 22 20 acert\&.pem\fR"
7f00: 66 69 6c 65 5c 26 2e 20 59 6f 75 20 6d 75 73 74 file\&. You must
7f10: 20 74 68 65 6e 20 65 69 74 68 65 72 20 73 65 74 then either set
7f20: 20 74 68 65 0a 5c 66 42 53 53 4c 5f 43 45 52 54 the.\fBSSL_CERT
7f30: 5f 44 49 52 5c 66 52 20 61 6e 64 2f 6f 72 20 5c _DIR\fR and/or \
7f40: 66 42 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 5c fBSSL_CERT_FILE\
7f50: 66 52 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 fR environment v
7f60: 61 72 69 61 62 6c 65 73 20 6f 72 20 74 68 65 0a ariables or the.
7f70: 5c 66 42 2d 63 61 64 69 72 5c 66 52 20 6f 72 20 \fB-cadir\fR or
7f80: 5c 66 42 2d 63 61 66 69 6c 65 5c 66 52 20 6f 70 \fB-cafile\fR op
7f90: 74 69 6f 6e 73 20 74 6f 20 74 68 65 20 43 41 20 tions to the CA
7fa0: 63 65 72 74 20 66 69 6c 65 27 73 20 69 6e 73 74 cert file's inst
7fb0: 61 6c 6c 0a 6c 6f 63 61 74 69 6f 6e 5c 26 2e 20 all.location\&.
7fc0: 49 74 20 69 73 20 79 6f 75 72 20 72 65 73 70 6f It is your respo
7fd0: 6e 73 69 62 69 6c 69 74 79 20 74 6f 20 6b 65 65 nsibility to kee
7fe0: 70 20 74 68 69 73 20 66 69 6c 65 20 75 70 20 74 p this file up t
7ff0: 6f 20 64 61 74 65 5c 26 2e 0a 2e 50 50 0a 2e 53 o date\&...PP..S
8000: 48 20 22 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 H "CALLBACK OPTI
8010: 4f 4e 53 22 0a 41 73 20 70 72 65 76 69 6f 75 73 ONS".As previous
8020: 6c 79 20 64 65 73 63 72 69 62 65 64 2c 20 65 61 ly described, ea
8030: 63 68 20 63 68 61 6e 6e 65 6c 20 63 61 6e 20 62 ch channel can b
8040: 65 20 67 69 76 65 6e 20 74 68 65 69 72 20 6f 77 e given their ow
8050: 6e 20 63 61 6c 6c 62 61 63 6b 73 0a 74 6f 20 68 n callbacks.to h
8060: 61 6e 64 6c 65 20 69 6e 74 65 72 6d 65 64 69 61 andle intermedia
8070: 74 65 20 70 72 6f 63 65 73 73 69 6e 67 20 62 79 te processing by
8080: 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 the OpenSSL lib
8090: 72 61 72 79 2c 20 75 73 69 6e 67 20 74 68 65 0a rary, using the.
80a0: 5c 66 42 2d 63 6f 6d 6d 61 6e 64 5c 66 52 2c 20 \fB-command\fR,
80b0: 5c 66 42 2d 70 61 73 73 77 6f 72 64 5c 66 52 2c \fB-password\fR,
80c0: 20 61 6e 64 20 5c 66 42 2d 76 61 6c 69 64 61 74 and \fB-validat
80d0: 65 5f 63 6f 6d 6d 61 6e 64 5c 66 52 20 6f 70 74 e_command\fR opt
80e0: 69 6f 6e 73 0a 70 61 73 73 65 64 20 74 6f 20 65 ions.passed to e
80f0: 69 74 68 65 72 20 6f 66 20 5c 66 42 74 6c 73 3a ither of \fBtls:
8100: 3a 73 6f 63 6b 65 74 5c 66 52 20 6f 72 20 5c 66 :socket\fR or \f
8110: 42 74 6c 73 3a 3a 69 6d 70 6f 72 74 5c 66 52 5c Btls::import\fR\
8120: 26 2e 0a 55 6e 6c 69 6b 65 20 70 72 65 76 69 6f &..Unlike previo
8130: 75 73 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 54 us versions of T
8140: 63 6c 54 4c 53 2c 20 6f 6e 6c 79 20 69 66 20 74 clTLS, only if t
8150: 68 65 20 63 61 6c 6c 62 61 63 6b 20 67 65 6e 65 he callback gene
8160: 72 61 74 65 73 20 61 6e 20 65 72 72 6f 72 2c 0a rates an error,.
8170: 77 69 6c 6c 20 74 68 65 20 5c 66 42 62 67 65 72 will the \fBbger
8180: 72 6f 72 5c 66 52 20 63 6f 6d 6d 61 6e 64 20 62 ror\fR command b
8190: 65 20 69 6e 76 6f 6b 65 64 20 77 69 74 68 20 74 e invoked with t
81a0: 68 65 20 65 72 72 6f 72 20 69 6e 66 6f 72 6d 61 he error informa
81b0: 74 69 6f 6e 5c 26 2e 0a 2e 53 53 20 22 56 41 4c tion\&...SS "VAL
81c0: 55 45 53 20 46 4f 52 20 43 4f 4d 4d 41 4e 44 20 UES FOR COMMAND
81d0: 43 41 4c 4c 42 41 43 4b 22 0a 54 68 65 20 63 61 CALLBACK".The ca
81e0: 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20 5c llback for the \
81f0: 66 42 2d 63 6f 6d 6d 61 6e 64 5c 66 52 20 6f 70 fB-command\fR op
8200: 74 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20 tion is invoked
8210: 61 74 20 73 65 76 65 72 61 6c 20 70 6f 69 6e 74 at several point
8220: 73 20 64 75 72 69 6e 67 20 74 68 65 0a 4f 70 65 s during the.Ope
8230: 6e 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 20 61 nSSL handshake a
8240: 6e 64 20 64 75 72 69 6e 67 20 72 6f 75 74 69 6e nd during routin
8250: 65 20 6f 70 65 72 61 74 69 6f 6e 73 5c 26 2e 20 e operations\&.
8260: 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 See below for th
8270: 65 20 70 6f 73 73 69 62 6c 65 0a 61 72 67 75 6d e possible.argum
8280: 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f 20 74 ents passed to t
8290: 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 he callback scri
82a0: 70 74 5c 26 2e 20 56 61 6c 75 65 73 20 72 65 74 pt\&. Values ret
82b0: 75 72 6e 65 64 20 66 72 6f 6d 20 74 68 65 20 63 urned from the c
82c0: 61 6c 6c 62 61 63 6b 20 61 72 65 0a 69 67 6e 6f allback are.igno
82d0: 72 65 64 5c 26 2e 0a 2e 54 50 0a 5c 66 42 65 72 red\&...TP.\fBer
82e0: 72 6f 72 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 ror\fR \fIchanne
82f0: 6c 49 64 20 6d 65 73 73 61 67 65 5c 66 52 0a 54 lId message\fR.T
8300: 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c his form of call
8310: 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 back is invoked
8320: 77 68 65 6e 65 76 65 72 20 61 6e 20 65 72 72 6f whenever an erro
8330: 72 20 6f 63 63 75 72 73 20 64 75 72 69 6e 67 20 r occurs during
8340: 74 68 65 20 69 6e 69 74 69 61 6c 0a 63 6f 6e 6e the initial.conn
8350: 65 63 74 69 6f 6e 2c 20 68 61 6e 64 73 68 61 6b ection, handshak
8360: 65 2c 20 6f 72 20 49 2f 4f 20 6f 70 65 72 61 74 e, or I/O operat
8370: 69 6f 6e 73 5c 26 2e 20 54 68 65 20 5c 66 49 6d ions\&. The \fIm
8380: 65 73 73 61 67 65 5c 66 52 20 61 72 67 75 6d 65 essage\fR argume
8390: 6e 74 20 63 61 6e 20 62 65 0a 66 72 6f 6d 20 74 nt can be.from t
83a0: 68 65 20 54 63 6c 5f 45 72 72 6e 6f 4d 73 67 2c he Tcl_ErrnoMsg,
83b0: 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f OpenSSL functio
83c0: 6e 20 5c 66 42 45 52 52 5f 72 65 61 73 6f 6e 5f n \fBERR_reason_
83d0: 65 72 72 6f 72 5f 73 74 72 69 6e 67 28 29 5c 66 error_string()\f
83e0: 52 2c 0a 6f 72 20 61 20 63 75 73 74 6f 6d 20 6d R,.or a custom m
83f0: 65 73 73 61 67 65 5c 26 2e 20 54 68 69 73 20 63 essage\&. This c
8400: 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 66 allback is new f
8410: 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c or TclTLS 1\&.8\
8420: 26 2e 0a 2e 54 50 0a 5c 66 42 69 6e 66 6f 5c 66 &...TP.\fBinfo\f
8430: 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 6d R \fIchannelId m
8440: 61 6a 6f 72 20 6d 69 6e 6f 72 20 6d 65 73 73 61 ajor minor messa
8450: 67 65 20 74 79 70 65 5c 66 52 0a 54 68 69 73 20 ge type\fR.This
8460: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b form of callback
8470: 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 is invoked by t
8480: 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 he OpenSSL funct
8490: 69 6f 6e 0a 5c 66 42 53 53 4c 5f 73 65 74 5f 69 ion.\fBSSL_set_i
84a0: 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 29 5c 66 nfo_callback()\f
84b0: 52 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e 69 R during the ini
84c0: 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 tial connection
84d0: 61 6e 64 20 68 61 6e 64 73 68 61 6b 65 0a 6f 70 and handshake.op
84e0: 65 72 61 74 69 6f 6e 73 5c 26 2e 20 54 68 65 20 erations\&. The
84f0: 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 0a 2e arguments are:..
8500: 52 53 0a 2e 54 50 0a 5c 66 49 6d 61 6a 6f 72 5c RS..TP.\fImajor\
8510: 66 52 0a 4d 61 6a 6f 72 20 63 61 74 65 67 6f 72 fR.Major categor
8520: 79 20 66 6f 72 20 65 72 72 6f 72 5c 26 2e 20 56 y for error\&. V
8530: 61 6c 69 64 20 65 6e 75 6d 73 20 61 72 65 3a 20 alid enums are:
8540: 5c 66 42 68 61 6e 64 73 68 61 6b 65 5c 66 52 2c \fBhandshake\fR,
8550: 20 5c 66 42 61 6c 65 72 74 5c 66 52 2c 0a 5c 66 \fBalert\fR,.\f
8560: 42 63 6f 6e 6e 65 63 74 5c 66 52 2c 20 5c 66 42 Bconnect\fR, \fB
8570: 61 63 63 65 70 74 5c 66 52 5c 26 2e 0a 2e 54 50 accept\fR\&...TP
8580: 0a 5c 66 49 6d 69 6e 6f 72 5c 66 52 0a 4d 69 6e .\fIminor\fR.Min
8590: 6f 72 20 63 61 74 65 67 6f 72 79 20 66 6f 72 20 or category for
85a0: 65 72 72 6f 72 5c 26 2e 20 56 61 6c 69 64 20 65 error\&. Valid e
85b0: 6e 75 6d 73 20 61 72 65 3a 20 5c 66 42 73 74 61 nums are: \fBsta
85c0: 72 74 5c 66 52 2c 20 5c 66 42 64 6f 6e 65 5c 66 rt\fR, \fBdone\f
85d0: 52 2c 20 5c 66 42 72 65 61 64 5c 66 52 2c 0a 5c R, \fBread\fR,.\
85e0: 66 42 77 72 69 74 65 5c 66 52 2c 20 5c 66 42 6c fBwrite\fR, \fBl
85f0: 6f 6f 70 5c 66 52 2c 20 5c 66 42 65 78 69 74 5c oop\fR, \fBexit\
8600: 66 52 5c 26 2e 0a 2e 54 50 0a 5c 66 49 6d 65 73 fR\&...TP.\fImes
8610: 73 61 67 65 5c 66 52 0a 44 65 73 63 72 69 70 74 sage\fR.Descript
8620: 69 76 65 20 6d 65 73 73 61 67 65 20 73 74 72 69 ive message stri
8630: 6e 67 20 77 68 69 63 68 20 6d 61 79 20 62 65 20 ng which may be
8640: 67 65 6e 65 72 61 74 65 64 20 65 69 74 68 65 72 generated either
8650: 20 62 79 0a 5c 66 42 53 53 4c 5f 73 74 61 74 65 by.\fBSSL_state
8660: 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 5c 66 _string_long()\f
8670: 52 20 6f 72 20 5c 66 42 53 53 4c 5f 61 6c 65 72 R or \fBSSL_aler
8680: 74 5f 64 65 73 63 5f 73 74 72 69 6e 67 5f 6c 6f t_desc_string_lo
8690: 6e 67 28 29 5c 66 52 2c 0a 64 65 70 65 6e 64 69 ng()\fR,.dependi
86a0: 6e 67 20 6f 6e 20 74 68 65 20 63 6f 6e 74 65 78 ng on the contex
86b0: 74 5c 26 2e 0a 2e 54 50 0a 5c 66 49 74 79 70 65 t\&...TP.\fItype
86c0: 5c 66 52 0a 46 6f 72 20 61 6c 65 72 74 73 2c 20 \fR.For alerts,
86d0: 74 68 65 20 70 6f 73 73 69 62 6c 65 20 76 61 6c the possible val
86e0: 75 65 73 20 61 72 65 3a 20 5c 66 42 77 61 72 6e ues are: \fBwarn
86f0: 69 6e 67 5c 66 52 2c 0a 5c 66 42 66 61 74 61 6c ing\fR,.\fBfatal
8700: 5c 66 52 2c 20 61 6e 64 20 5c 66 42 75 6e 6b 6e \fR, and \fBunkn
8710: 6f 77 6e 5c 66 52 5c 26 2e 20 46 6f 72 20 6f 74 own\fR\&. For ot
8720: 68 65 72 73 2c 20 5c 66 42 69 6e 66 6f 5c 66 52 hers, \fBinfo\fR
8730: 20 69 73 20 75 73 65 64 5c 26 2e 0a 54 68 69 73 is used\&..This
8740: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 77 argument is new
8750: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e for TclTLS 1\&.
8760: 38 5c 26 2e 0a 2e 52 45 0a 2e 54 50 0a 5c 66 42 8\&...RE..TP.\fB
8770: 6d 65 73 73 61 67 65 5c 66 52 20 5c 66 49 63 68 message\fR \fIch
8780: 61 6e 6e 65 6c 49 64 20 64 69 72 65 63 74 69 6f annelId directio
8790: 6e 20 76 65 72 73 69 6f 6e 20 63 6f 6e 74 65 6e n version conten
87a0: 74 5f 74 79 70 65 20 6d 65 73 73 61 67 65 5c 66 t_type message\f
87b0: 52 0a 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 R.This form of c
87c0: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b allback is invok
87d0: 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 ed by the OpenSS
87e0: 4c 20 66 75 6e 63 74 69 6f 6e 0a 5c 66 42 53 53 L function.\fBSS
87f0: 4c 5f 73 65 74 5f 6d 73 67 5f 63 61 6c 6c 62 61 L_set_msg_callba
8800: 63 6b 28 29 5c 66 52 20 77 68 65 6e 65 76 65 72 ck()\fR whenever
8810: 20 61 20 6d 65 73 73 61 67 65 20 69 73 20 73 65 a message is se
8820: 6e 74 20 6f 72 20 72 65 63 65 69 76 65 64 20 64 nt or received d
8830: 75 72 69 6e 67 20 74 68 65 0a 69 6e 69 74 69 61 uring the.initia
8840: 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 61 l connection, ha
8850: 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f 4f 20 ndshake, or I/O
8860: 6f 70 65 72 61 74 69 6f 6e 73 5c 26 2e 20 49 74 operations\&. It
8870: 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 is only availab
8880: 6c 65 20 77 68 65 6e 0a 4f 70 65 6e 53 53 4c 20 le when.OpenSSL
8890: 69 73 20 63 6f 6d 70 6c 69 65 64 20 77 69 74 68 is complied with
88a0: 20 74 68 65 20 5c 66 42 65 6e 61 62 6c 65 2d 73 the \fBenable-s
88b0: 73 6c 2d 74 72 61 63 65 5c 66 52 20 6f 70 74 69 sl-trace\fR opti
88c0: 6f 6e 5c 26 2e 20 54 68 69 73 20 63 61 6c 6c 62 on\&. This callb
88d0: 61 63 6b 20 69 73 0a 6e 65 77 20 66 6f 72 20 54 ack is.new for T
88e0: 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 20 54 clTLS 1\&.8\&. T
88f0: 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 he arguments are
8900: 3a 0a 2e 52 53 0a 2e 54 50 0a 5c 66 49 64 69 72 :..RS..TP.\fIdir
8910: 65 63 74 69 6f 6e 5c 66 52 0a 44 69 72 65 63 74 ection\fR.Direct
8920: 69 6f 6e 20 69 73 20 65 69 74 68 65 72 20 5c 66 ion is either \f
8930: 42 53 65 6e 74 5c 66 52 20 6f 72 20 5c 66 42 52 BSent\fR or \fBR
8940: 65 63 65 69 76 65 64 5c 66 52 5c 26 2e 0a 2e 54 eceived\fR\&...T
8950: 50 0a 5c 66 49 76 65 72 73 69 6f 6e 5c 66 52 0a P.\fIversion\fR.
8960: 56 65 72 73 69 6f 6e 20 69 73 20 74 68 65 20 70 Version is the p
8970: 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 5c rotocol version\
8980: 26 2e 0a 2e 54 50 0a 5c 66 49 63 6f 6e 74 65 6e &...TP.\fIconten
8990: 74 5f 74 79 70 65 5c 66 52 0a 43 6f 6e 74 65 6e t_type\fR.Conten
89a0: 74 20 74 79 70 65 20 69 73 20 74 68 65 20 6d 65 t type is the me
89b0: 73 73 61 67 65 20 63 6f 6e 74 65 6e 74 20 74 79 ssage content ty
89c0: 70 65 5c 26 2e 0a 2e 54 50 0a 5c 66 49 6d 65 73 pe\&...TP.\fImes
89d0: 73 61 67 65 5c 66 52 0a 4d 65 73 73 61 67 65 20 sage\fR.Message
89e0: 69 73 20 6d 6f 72 65 20 69 6e 66 6f 20 66 72 6f is more info fro
89f0: 6d 20 74 68 65 20 5c 66 42 53 53 4c 5f 74 72 61 m the \fBSSL_tra
8a00: 63 65 5c 66 52 20 41 50 49 5c 26 2e 0a 2e 52 45 ce\fR API\&...RE
8a10: 0a 2e 54 50 0a 5c 66 42 73 65 73 73 69 6f 6e 5c ..TP.\fBsession\
8a20: 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 fR \fIchannelId
8a30: 73 65 73 73 69 6f 6e 5f 69 64 20 73 65 73 73 69 session_id sessi
8a40: 6f 6e 5f 74 69 63 6b 65 74 20 6c 69 66 65 74 69 on_ticket lifeti
8a50: 6d 65 5c 66 52 0a 54 68 69 73 20 66 6f 72 6d 20 me\fR.This form
8a60: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 of callback is i
8a70: 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 nvoked by the Op
8a80: 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 5c enSSL function.\
8a90: 66 42 53 53 4c 5f 43 54 58 5f 73 65 73 73 5f 73 fBSSL_CTX_sess_s
8aa0: 65 74 5f 6e 65 77 5f 63 62 28 29 5c 66 52 20 77 et_new_cb()\fR w
8ab0: 68 65 6e 65 76 65 72 20 61 20 6e 65 77 20 73 65 henever a new se
8ac0: 73 73 69 6f 6e 20 69 64 20 69 73 20 73 65 6e 74 ssion id is sent
8ad0: 20 62 79 20 74 68 65 0a 73 65 72 76 65 72 20 64 by the.server d
8ae0: 75 72 69 6e 67 20 74 68 65 20 69 6e 69 74 69 61 uring the initia
8af0: 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 61 6e 64 l connection and
8b00: 20 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 20 61 handshake and a
8b10: 6c 73 6f 20 64 75 72 69 6e 67 20 74 68 65 20 73 lso during the s
8b20: 65 73 73 69 6f 6e 0a 69 66 20 74 68 65 20 5c 66 ession.if the \f
8b30: 42 2d 70 6f 73 74 5f 68 61 6e 64 73 68 61 6b 65 B-post_handshake
8b40: 5c 66 52 20 6f 70 74 69 6f 6e 20 69 73 20 73 65 \fR option is se
8b50: 74 20 74 6f 20 74 72 75 65 5c 26 2e 20 54 68 69 t to true\&. Thi
8b60: 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 s callback is ne
8b70: 77 20 66 6f 72 0a 54 63 6c 54 4c 53 20 31 5c 26 w for.TclTLS 1\&
8b80: 2e 38 5c 26 2e 20 54 68 65 20 61 72 67 75 6d 65 .8\&. The argume
8b90: 6e 74 73 20 61 72 65 3a 0a 2e 52 53 0a 2e 54 50 nts are:..RS..TP
8ba0: 0a 5c 66 49 73 65 73 73 69 6f 6e 5f 69 64 5c 66 .\fIsession_id\f
8bb0: 52 0a 53 65 73 73 69 6f 6e 20 49 64 20 69 73 20 R.Session Id is
8bc0: 74 68 65 20 63 75 72 72 65 6e 74 20 73 65 73 73 the current sess
8bd0: 69 6f 6e 20 69 64 65 6e 74 69 66 69 65 72 0a 2e ion identifier..
8be0: 54 50 0a 5c 66 49 73 65 73 73 69 6f 6e 5f 74 69 TP.\fIsession_ti
8bf0: 63 6b 65 74 5c 66 52 0a 54 69 63 6b 65 74 20 69 cket\fR.Ticket i
8c00: 73 20 74 68 65 20 73 65 73 73 69 6f 6e 20 74 69 s the session ti
8c10: 63 6b 65 74 20 69 6e 66 6f 0a 2e 54 50 0a 5c 66 cket info..TP.\f
8c20: 49 6c 69 66 65 74 69 6d 65 5c 66 52 0a 4c 69 66 Ilifetime\fR.Lif
8c30: 65 74 69 6d 65 20 69 73 20 74 68 65 20 74 69 63 etime is the tic
8c40: 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 69 6e 20 ket lifetime in
8c50: 73 65 63 6f 6e 64 73 5c 26 2e 0a 2e 52 45 0a 2e seconds\&...RE..
8c60: 54 50 0a 5c 66 42 76 65 72 69 66 79 5c 66 52 20 TP.\fBverify\fR
8c70: 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 64 65 70 \fIchannelId dep
8c80: 74 68 20 63 65 72 74 20 73 74 61 74 75 73 20 65 th cert status e
8c90: 72 72 6f 72 5c 66 52 0a 54 68 69 73 20 63 61 6c rror\fR.This cal
8ca0: 6c 62 61 63 6b 20 77 61 73 20 6d 6f 76 65 64 20 lback was moved
8cb0: 74 6f 20 5c 66 42 2d 76 61 6c 69 64 61 74 65 63 to \fB-validatec
8cc0: 6f 6d 6d 61 6e 64 5c 66 52 20 69 6e 20 54 63 6c ommand\fR in Tcl
8cd0: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 50 50 TLS 1\&.8\&...PP
8ce0: 0a 2e 53 53 20 22 56 41 4c 55 45 53 20 46 4f 52 ..SS "VALUES FOR
8cf0: 20 50 41 53 53 57 4f 52 44 20 43 41 4c 4c 42 41 PASSWORD CALLBA
8d00: 43 4b 22 0a 54 68 65 20 63 61 6c 6c 62 61 63 6b CK".The callback
8d10: 20 66 6f 72 20 74 68 65 20 5c 66 42 2d 70 61 73 for the \fB-pas
8d20: 73 77 6f 72 64 5c 66 52 20 6f 70 74 69 6f 6e 20 sword\fR option
8d30: 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 54 63 is invoked by Tc
8d40: 6c 54 4c 53 20 77 68 65 6e 65 76 65 72 20 4f 70 lTLS whenever Op
8d50: 65 6e 53 53 4c 20 6e 65 65 64 73 0a 74 6f 20 6f enSSL needs.to o
8d60: 62 74 61 69 6e 20 61 20 70 61 73 73 77 6f 72 64 btain a password
8d70: 5c 26 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f \&. See below fo
8d80: 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 20 61 r the possible a
8d90: 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20 rguments passed
8da0: 74 6f 20 74 68 65 0a 63 61 6c 6c 62 61 63 6b 20 to the.callback
8db0: 73 63 72 69 70 74 5c 26 2e 20 54 68 65 20 75 73 script\&. The us
8dc0: 65 72 20 70 72 6f 76 69 64 65 64 20 70 61 73 73 er provided pass
8dd0: 77 6f 72 64 20 69 73 20 65 78 70 65 63 74 65 64 word is expected
8de0: 20 74 6f 20 62 65 20 72 65 74 75 72 6e 65 64 20 to be returned
8df0: 62 79 20 74 68 65 0a 63 61 6c 6c 62 61 63 6b 5c by the.callback\
8e00: 26 2e 0a 2e 54 50 0a 5c 66 42 70 61 73 73 77 6f &...TP.\fBpasswo
8e10: 72 64 5c 66 52 20 5c 66 49 72 77 66 6c 61 67 20 rd\fR \fIrwflag
8e20: 73 69 7a 65 5c 66 52 0a 49 6e 76 6f 6b 65 64 20 size\fR.Invoked
8e30: 77 68 65 6e 20 6c 6f 61 64 69 6e 67 20 6f 72 20 when loading or
8e40: 73 74 6f 72 69 6e 67 20 61 6e 20 65 6e 63 72 79 storing an encry
8e50: 70 74 65 64 20 50 45 4d 20 63 65 72 74 69 66 69 pted PEM certifi
8e60: 63 61 74 65 5c 26 2e 20 54 68 65 20 61 72 67 75 cate\&. The argu
8e70: 6d 65 6e 74 73 20 61 72 65 3a 0a 2e 52 53 0a 2e ments are:..RS..
8e80: 54 50 0a 5c 66 49 72 77 66 6c 61 67 5c 66 52 0a TP.\fIrwflag\fR.
8e90: 54 68 65 20 72 65 61 64 2f 77 72 69 74 65 20 66 The read/write f
8ea0: 6c 61 67 20 69 73 20 30 20 66 6f 72 20 72 65 61 lag is 0 for rea
8eb0: 64 69 6e 67 2f 64 65 63 72 79 70 74 69 6f 6e 20 ding/decryption
8ec0: 6f 72 20 31 20 66 6f 72 20 77 72 69 74 69 6e 67 or 1 for writing
8ed0: 2f 65 6e 63 72 79 70 74 69 6f 6e 5c 26 2e 0a 54 /encryption\&..T
8ee0: 68 65 20 6c 61 74 74 65 72 20 63 61 6e 20 62 65 he latter can be
8ef0: 20 75 73 65 64 20 74 6f 20 64 65 74 65 72 6d 69 used to determi
8f00: 6e 65 20 77 68 65 6e 20 74 6f 20 70 72 6f 6d 70 ne when to promp
8f10: 74 20 74 68 65 20 75 73 65 72 20 74 6f 20 63 6f t the user to co
8f20: 6e 66 69 72 6d 5c 26 2e 0a 54 68 69 73 20 61 72 nfirm\&..This ar
8f30: 67 75 6d 65 6e 74 20 69 73 20 6e 65 77 20 66 6f gument is new fo
8f40: 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 r TclTLS 1\&.8\&
8f50: 2e 0a 2e 54 50 0a 5c 66 49 73 69 7a 65 5c 66 52 ...TP.\fIsize\fR
8f60: 0a 54 68 65 20 73 69 7a 65 20 69 73 20 74 68 65 .The size is the
8f70: 20 6d 61 78 69 6d 75 6d 20 6c 65 6e 67 74 68 20 maximum length
8f80: 6f 66 20 74 68 65 20 70 61 73 73 77 6f 72 64 20 of the password
8f90: 69 6e 20 62 79 74 65 73 5c 26 2e 0a 54 68 69 73 in bytes\&..This
8fa0: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 77 argument is new
8fb0: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e for TclTLS 1\&.
8fc0: 38 5c 26 2e 0a 2e 52 45 0a 2e 50 50 0a 2e 53 53 8\&...RE..PP..SS
8fd0: 20 22 56 41 4c 55 45 53 20 46 4f 52 20 56 41 4c "VALUES FOR VAL
8fe0: 49 44 41 54 45 20 43 4f 4d 4d 41 4e 44 20 43 41 IDATE COMMAND CA
8ff0: 4c 4c 42 41 43 4b 22 0a 54 68 65 20 63 61 6c 6c LLBACK".The call
9000: 62 61 63 6b 20 66 6f 72 20 74 68 65 20 5c 66 42 back for the \fB
9010: 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 -validatecommand
9020: 5c 66 52 20 6f 70 74 69 6f 6e 20 69 73 20 69 6e \fR option is in
9030: 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 74 68 65 voked during the
9040: 20 68 61 6e 64 73 68 61 6b 65 0a 70 72 6f 63 65 handshake.proce
9050: 73 73 20 69 6e 20 6f 72 64 65 72 20 66 6f 72 20 ss in order for
9060: 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 the application
9070: 74 6f 20 76 61 6c 69 64 61 74 65 20 74 68 65 20 to validate the
9080: 70 72 6f 76 69 64 65 64 20 76 61 6c 75 65 28 73 provided value(s
9090: 29 5c 26 2e 20 53 65 65 0a 62 65 6c 6f 77 20 66 )\&. See.below f
90a0: 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 20 or the possible
90b0: 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65 64 arguments passed
90c0: 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 63 6b to the callback
90d0: 20 73 63 72 69 70 74 5c 26 2e 20 49 66 20 6e 6f script\&. If no
90e0: 74 0a 73 70 65 63 69 66 69 65 64 2c 20 4f 70 65 t.specified, Ope
90f0: 6e 53 53 4c 20 77 69 6c 6c 20 61 63 63 65 70 74 nSSL will accept
9100: 20 61 6c 6c 20 76 61 6c 69 64 20 63 65 72 74 69 all valid certi
9110: 66 69 63 61 74 65 73 20 61 6e 64 20 65 78 74 65 ficates and exte
9120: 6e 73 69 6f 6e 73 5c 26 2e 20 54 6f 20 72 65 6a nsions\&. To rej
9130: 65 63 74 0a 74 68 65 20 76 61 6c 75 65 20 61 6e ect.the value an
9140: 64 20 61 62 6f 72 74 20 74 68 65 20 63 6f 6e 6e d abort the conn
9150: 65 63 74 69 6f 6e 2c 20 74 68 65 20 63 61 6c 6c ection, the call
9160: 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 74 75 back should retu
9170: 72 6e 20 30 5c 26 2e 20 54 6f 20 61 63 63 65 70 rn 0\&. To accep
9180: 74 20 74 68 65 0a 76 61 6c 75 65 20 61 6e 64 20 t the.value and
9190: 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 6f 6e continue the con
91a0: 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73 68 6f 75 nection, it shou
91b0: 6c 64 20 72 65 74 75 72 6e 20 31 5c 26 2e 20 54 ld return 1\&. T
91c0: 6f 20 72 65 6a 65 63 74 20 74 68 65 20 76 61 6c o reject the val
91d0: 75 65 2c 20 62 75 74 0a 63 6f 6e 74 69 6e 75 65 ue, but.continue
91e0: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c the connection,
91f0: 20 69 74 20 73 68 6f 75 6c 64 20 72 65 74 75 72 it should retur
9200: 6e 20 32 5c 26 2e 20 54 68 69 73 20 63 61 6c 6c n 2\&. This call
9210: 62 61 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 20 back is new for
9220: 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a TclTLS 1\&.8\&..
9230: 2e 54 50 0a 5c 66 42 61 6c 70 6e 5c 66 52 20 5c .TP.\fBalpn\fR \
9240: 66 49 63 68 61 6e 6e 65 6c 49 64 20 70 72 6f 74 fIchannelId prot
9250: 6f 63 6f 6c 20 6d 61 74 63 68 5c 66 52 0a 46 6f ocol match\fR.Fo
9260: 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 r servers, this
9270: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b form of callback
9280: 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e is invoked when
9290: 20 74 68 65 20 63 6c 69 65 6e 74 20 41 4c 50 4e the client ALPN
92a0: 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 0a 72 65 extension is.re
92b0: 63 65 69 76 65 64 5c 26 2e 20 49 66 20 5c 66 49 ceived\&. If \fI
92c0: 6d 61 74 63 68 5c 66 52 20 69 73 20 74 72 75 65 match\fR is true
92d0: 2c 20 74 68 65 6e 20 5c 66 49 70 72 6f 74 6f 63 , then \fIprotoc
92e0: 6f 6c 5c 66 52 20 69 73 20 74 68 65 20 66 69 72 ol\fR is the fir
92f0: 73 74 0a 5c 66 42 2d 61 6c 70 6e 5c 66 52 20 70 st.\fB-alpn\fR p
9300: 72 6f 74 6f 63 6f 6c 20 6f 70 74 69 6f 6e 20 69 rotocol option i
9310: 6e 20 63 6f 6d 6d 6f 6e 20 74 6f 20 62 6f 74 68 n common to both
9320: 20 74 68 65 20 63 6c 69 65 6e 74 20 61 6e 64 20 the client and
9330: 73 65 72 76 65 72 5c 26 2e 0a 49 66 20 6e 6f 74 server\&..If not
9340: 2c 20 74 68 65 20 66 69 72 73 74 20 63 6c 69 65 , the first clie
9350: 6e 74 20 73 70 65 63 69 66 69 65 64 20 70 72 6f nt specified pro
9360: 74 6f 63 6f 6c 20 69 73 20 75 73 65 64 5c 26 2e tocol is used\&.
9370: 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 This callback i
9380: 73 20 63 61 6c 6c 65 64 0a 61 66 74 65 72 20 74 s called.after t
9390: 68 65 20 48 65 6c 6c 6f 20 61 6e 64 20 53 4e 49 he Hello and SNI
93a0: 20 63 61 6c 6c 62 61 63 6b 73 5c 26 2e 0a 2e 54 callbacks\&...T
93b0: 50 0a 5c 66 42 68 65 6c 6c 6f 5c 66 52 20 5c 66 P.\fBhello\fR \f
93c0: 49 63 68 61 6e 6e 65 6c 49 64 20 73 65 72 76 65 IchannelId serve
93d0: 72 6e 61 6d 65 5c 66 52 0a 46 6f 72 20 73 65 72 rname\fR.For ser
93e0: 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 vers, this form
93f0: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 of callback is i
9400: 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 63 6c nvoked during cl
9410: 69 65 6e 74 20 68 65 6c 6c 6f 20 6d 65 73 73 61 ient hello messa
9420: 67 65 0a 70 72 6f 63 65 73 73 69 6e 67 5c 26 2e ge.processing\&.
9430: 20 54 68 65 20 70 75 72 70 6f 73 65 20 69 73 20 The purpose is
9440: 73 6f 20 74 68 65 20 73 65 72 76 65 72 20 63 61 so the server ca
9450: 6e 20 73 65 6c 65 63 74 20 74 68 65 20 61 70 70 n select the app
9460: 72 6f 70 72 69 61 74 65 20 63 65 72 74 69 66 69 ropriate certifi
9470: 63 61 74 65 0a 74 6f 20 70 72 65 73 65 6e 74 20 cate.to present
9480: 74 6f 20 74 68 65 20 63 6c 69 65 6e 74 2c 20 61 to the client, a
9490: 6e 64 20 74 6f 20 6d 61 6b 65 20 6f 74 68 65 72 nd to make other
94a0: 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 configuration a
94b0: 64 6a 75 73 74 6d 65 6e 74 73 20 72 65 6c 65 76 djustments relev
94c0: 61 6e 74 0a 74 6f 20 74 68 61 74 20 73 65 72 76 ant.to that serv
94d0: 65 72 20 6e 61 6d 65 20 61 6e 64 20 69 74 73 20 er name and its
94e0: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 5c 26 2e configuration\&.
94f0: 20 49 74 20 69 73 20 63 61 6c 6c 65 64 20 62 65 It is called be
9500: 66 6f 72 65 20 74 68 65 20 53 4e 49 20 61 6e 64 fore the SNI and
9510: 20 41 4c 50 4e 0a 63 61 6c 6c 62 61 63 6b 73 5c ALPN.callbacks\
9520: 26 2e 0a 2e 54 50 0a 5c 66 42 73 6e 69 5c 66 52 &...TP.\fBsni\fR
9530: 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 73 65 \fIchannelId se
9540: 72 76 65 72 6e 61 6d 65 5c 66 52 0a 46 6f 72 20 rvername\fR.For
9550: 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f servers, this fo
9560: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 rm of callback i
9570: 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74 s invoked when t
9580: 68 65 20 53 65 72 76 65 72 20 4e 61 6d 65 20 49 he Server Name I
9590: 6e 64 69 63 61 74 69 6f 6e 0a 28 53 4e 49 29 20 ndication.(SNI)
95a0: 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 72 65 63 extension is rec
95b0: 65 69 76 65 64 5c 26 2e 20 54 68 65 20 5c 66 49 eived\&. The \fI
95c0: 73 65 72 76 65 72 6e 61 6d 65 5c 66 52 20 61 72 servername\fR ar
95d0: 67 75 6d 65 6e 74 20 69 73 20 74 68 65 20 63 6c gument is the cl
95e0: 69 65 6e 74 0a 70 72 6f 76 69 64 65 64 20 73 65 ient.provided se
95f0: 72 76 65 72 20 6e 61 6d 65 20 73 70 65 63 69 66 rver name specif
9600: 69 65 64 20 69 6e 20 74 68 65 20 5c 66 42 2d 73 ied in the \fB-s
9610: 65 72 76 65 72 6e 61 6d 65 5c 66 52 20 6f 70 74 ervername\fR opt
9620: 69 6f 6e 5c 26 2e 20 54 68 65 0a 70 75 72 70 6f ion\&. The.purpo
9630: 73 65 20 69 73 20 73 6f 20 77 68 65 6e 20 61 20 se is so when a
9640: 73 65 72 76 65 72 20 73 75 70 70 6f 72 74 73 20 server supports
9650: 6d 75 6c 74 69 70 6c 65 20 6e 61 6d 65 73 2c 20 multiple names,
9660: 74 68 65 20 72 69 67 68 74 20 63 65 72 74 69 66 the right certif
9670: 69 63 61 74 65 0a 63 61 6e 20 62 65 20 75 73 65 icate.can be use
9680: 64 5c 26 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 d\&. It is calle
9690: 64 20 61 66 74 65 72 20 74 68 65 20 48 65 6c 6c d after the Hell
96a0: 6f 20 63 61 6c 6c 62 61 63 6b 20 62 75 74 20 62 o callback but b
96b0: 65 66 6f 72 65 20 74 68 65 20 41 4c 50 4e 0a 63 efore the ALPN.c
96c0: 61 6c 6c 62 61 63 6b 5c 26 2e 0a 2e 54 50 0a 5c allback\&...TP.\
96d0: 66 42 76 65 72 69 66 79 5c 66 52 20 5c 66 49 63 fBverify\fR \fIc
96e0: 68 61 6e 6e 65 6c 49 64 20 64 65 70 74 68 20 63 hannelId depth c
96f0: 65 72 74 20 73 74 61 74 75 73 20 65 72 72 6f 72 ert status error
9700: 5c 66 52 0a 54 68 69 73 20 66 6f 72 6d 20 6f 66 \fR.This form of
9710: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 callback is inv
9720: 6f 6b 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 20 oked by OpenSSL
9730: 77 68 65 6e 20 61 20 6e 65 77 20 63 65 72 74 69 when a new certi
9740: 66 69 63 61 74 65 20 69 73 20 72 65 63 65 69 76 ficate is receiv
9750: 65 64 0a 66 72 6f 6d 20 74 68 65 20 70 65 65 72 ed.from the peer
9760: 5c 26 2e 20 49 74 20 61 6c 6c 6f 77 73 20 74 68 \&. It allows th
9770: 65 20 63 6c 69 65 6e 74 20 74 6f 20 63 68 65 63 e client to chec
9780: 6b 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 k the certificat
9790: 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e 0a 72 e verification.r
97a0: 65 73 75 6c 74 73 20 61 6e 64 20 63 68 6f 6f 73 esults and choos
97b0: 65 20 77 68 65 74 68 65 72 20 74 6f 20 63 6f 6e e whether to con
97c0: 74 69 6e 75 65 20 6f 72 20 6e 6f 74 5c 26 2e 20 tinue or not\&.
97d0: 49 74 20 69 73 20 63 61 6c 6c 65 64 20 66 6f 72 It is called for
97e0: 20 65 61 63 68 0a 63 65 72 74 69 66 69 63 61 74 each.certificat
97f0: 65 20 69 6e 20 74 68 65 20 63 65 72 74 69 66 69 e in the certifi
9800: 63 61 74 65 20 63 68 61 69 6e 5c 26 2e 20 54 68 cate chain\&. Th
9810: 69 73 20 63 61 6c 6c 62 61 63 6b 20 77 61 73 20 is callback was
9820: 6d 6f 76 65 64 20 66 72 6f 6d 0a 5c 66 42 2d 63 moved from.\fB-c
9830: 6f 6d 6d 61 6e 64 5c 66 52 20 69 6e 20 54 63 6c ommand\fR in Tcl
9840: 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 20 54 68 65 TLS 1\&.8\&. The
9850: 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 0a arguments are:.
9860: 2e 52 53 0a 2e 54 50 0a 5c 66 49 64 65 70 74 68 .RS..TP.\fIdepth
9870: 5c 66 52 0a 54 68 65 20 64 65 70 74 68 20 69 73 \fR.The depth is
9880: 20 74 68 65 20 69 6e 74 65 67 65 72 20 64 65 70 the integer dep
9890: 74 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 th of the certif
98a0: 69 63 61 74 65 20 69 6e 20 74 68 65 20 63 65 72 icate in the cer
98b0: 74 69 66 69 63 61 74 65 20 63 68 61 69 6e 2c 0a tificate chain,.
98c0: 77 68 65 72 65 20 30 20 69 73 20 74 68 65 20 70 where 0 is the p
98d0: 65 65 72 20 63 65 72 74 69 66 69 63 61 74 65 20 eer certificate
98e0: 61 6e 64 20 68 69 67 68 65 72 20 76 61 6c 75 65 and higher value
98f0: 73 20 67 6f 69 6e 67 20 75 70 20 74 6f 20 74 68 s going up to th
9900: 65 20 43 65 72 74 69 66 69 63 61 74 65 0a 41 75 e Certificate.Au
9910: 74 68 6f 72 69 74 79 20 28 43 41 29 5c 26 2e 0a thority (CA)\&..
9920: 2e 54 50 0a 5c 66 49 63 65 72 74 5c 66 52 0a 54 .TP.\fIcert\fR.T
9930: 68 65 20 63 65 72 74 20 61 72 67 75 6d 65 6e 74 he cert argument
9940: 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 is a list of ke
9950: 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 73 69 y-value pairs si
9960: 6d 69 6c 61 72 20 74 6f 20 74 68 6f 73 65 20 72 milar to those r
9970: 65 74 75 72 6e 65 64 20 62 79 0a 5c 66 42 74 6c eturned by.\fBtl
9980: 73 3a 3a 73 74 61 74 75 73 5c 66 52 5c 26 2e 0a s::status\fR\&..
9990: 2e 54 50 0a 5c 66 49 73 74 61 74 75 73 5c 66 52 .TP.\fIstatus\fR
99a0: 0a 54 68 65 20 73 74 61 74 75 73 20 61 72 67 75 .The status argu
99b0: 6d 65 6e 74 20 69 73 20 74 68 65 20 62 6f 6f 6c ment is the bool
99c0: 65 61 6e 20 76 61 6c 69 64 69 74 79 20 6f 66 20 ean validity of
99d0: 74 68 65 20 63 75 72 72 65 6e 74 20 63 65 72 74 the current cert
99e0: 69 66 69 63 61 74 65 20 77 68 65 72 65 20 30 0a ificate where 0.
99f0: 69 73 20 69 6e 76 61 6c 69 64 20 61 6e 64 20 31 is invalid and 1
9a00: 20 69 73 20 76 61 6c 69 64 5c 26 2e 0a 2e 54 50 is valid\&...TP
9a10: 0a 5c 66 49 65 72 72 6f 72 5c 66 52 0a 54 68 65 .\fIerror\fR.The
9a20: 20 65 72 72 6f 72 20 61 72 67 75 6d 65 6e 74 20 error argument
9a30: 69 73 20 74 68 65 20 65 72 72 6f 72 20 6d 65 73 is the error mes
9a40: 73 61 67 65 2c 20 69 66 20 61 6e 79 2c 20 67 65 sage, if any, ge
9a50: 6e 65 72 61 74 65 64 20 62 79 0a 5c 66 42 58 35 nerated by.\fBX5
9a60: 30 39 5f 53 54 4f 52 45 5f 43 54 58 5f 67 65 74 09_STORE_CTX_get
9a70: 5f 65 72 72 6f 72 28 29 5c 66 52 5c 26 2e 0a 2e _error()\fR\&...
9a80: 52 45 0a 2e 50 50 0a 52 65 66 65 72 65 6e 63 65 RE..PP.Reference
9a90: 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 implementations
9aa0: 20 6f 66 20 74 68 65 73 65 20 63 61 6c 6c 62 61 of these callba
9ab0: 63 6b 73 20 61 72 65 20 70 72 6f 76 69 64 65 64 cks are provided
9ac0: 20 69 6e 20 22 5c 66 49 74 6c 73 5c 26 2e 74 63 in "\fItls\&.tc
9ad0: 6c 5c 66 52 22 0a 61 73 20 5c 66 42 74 6c 73 3a l\fR".as \fBtls:
9ae0: 3a 63 61 6c 6c 62 61 63 6b 5c 66 52 2c 20 5c 66 :callback\fR, \f
9af0: 42 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 5c 66 Btls::password\f
9b00: 52 2c 20 61 6e 64 20 5c 66 42 74 6c 73 3a 3a 76 R, and \fBtls::v
9b10: 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c alidate_command\
9b20: 66 52 0a 72 65 73 70 65 63 74 69 76 65 6c 79 5c fR.respectively\
9b30: 26 2e 20 4e 6f 74 65 20 74 68 61 74 20 74 68 65 &. Note that the
9b40: 73 65 20 61 72 65 20 6f 6e 6c 79 20 5c 66 49 73 se are only \fIs
9b50: 61 6d 70 6c 65 5c 66 52 20 69 6d 70 6c 65 6d 65 ample\fR impleme
9b60: 6e 74 61 74 69 6f 6e 73 5c 26 2e 20 49 6e 20 61 ntations\&. In a
9b70: 20 6d 6f 72 65 0a 72 65 61 6c 69 73 74 69 63 20 more.realistic
9b80: 64 65 70 6c 6f 79 6d 65 6e 74 20 79 6f 75 20 77 deployment you w
9b90: 6f 75 6c 64 20 73 70 65 63 69 66 79 20 79 6f 75 ould specify you
9ba0: 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 20 73 r own callback s
9bb0: 63 72 69 70 74 73 20 6f 6e 20 65 61 63 68 20 54 cripts on each T
9bc0: 4c 53 0a 63 68 61 6e 6e 65 6c 20 75 73 69 6e 67 LS.channel using
9bd0: 20 74 68 65 20 5c 66 42 2d 63 6f 6d 6d 61 6e 64 the \fB-command
9be0: 5c 66 52 2c 20 5c 66 42 2d 70 61 73 73 77 6f 72 \fR, \fB-passwor
9bf0: 64 5c 66 52 2c 20 61 6e 64 0a 5c 66 42 2d 76 61 d\fR, and.\fB-va
9c00: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 lidate_command\f
9c10: 52 20 6f 70 74 69 6f 6e 73 5c 26 2e 0a 2e 50 50 R options\&...PP
9c20: 0a 54 68 65 20 64 65 66 61 75 6c 74 20 62 65 68 .The default beh
9c30: 61 76 69 6f 72 20 77 68 65 6e 20 74 68 65 20 5c avior when the \
9c40: 66 42 2d 63 6f 6d 6d 61 6e 64 5c 66 52 20 61 6e fB-command\fR an
9c50: 64 20 5c 66 42 2d 76 61 6c 69 64 61 74 65 5f 63 d \fB-validate_c
9c60: 6f 6d 6d 61 6e 64 5c 66 52 0a 6f 70 74 69 6f 6e ommand\fR.option
9c70: 73 20 61 72 65 20 6e 6f 74 20 73 70 65 63 69 66 s are not specif
9c80: 69 65 64 2c 20 69 73 20 66 6f 72 20 54 63 6c 54 ied, is for TclT
9c90: 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 LS to process th
9ca0: 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 e associated lib
9cb0: 72 61 72 79 0a 63 61 6c 6c 62 61 63 6b 73 20 69 rary.callbacks i
9cc0: 6e 74 65 72 6e 61 6c 6c 79 5c 26 2e 20 54 68 65 nternally\&. The
9cd0: 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f default behavio
9ce0: 72 20 77 68 65 6e 20 74 68 65 20 5c 66 42 2d 70 r when the \fB-p
9cf0: 61 73 73 77 6f 72 64 5c 66 52 20 6f 70 74 69 6f assword\fR optio
9d00: 6e 0a 69 73 20 6e 6f 74 20 73 70 65 63 69 66 69 n.is not specifi
9d10: 65 64 20 69 73 20 66 6f 72 20 54 63 6c 54 4c 53 ed is for TclTLS
9d20: 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 to process the
9d30: 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 associated libra
9d40: 72 79 20 63 61 6c 6c 62 61 63 6b 73 20 62 79 0a ry callbacks by.
9d50: 61 74 74 65 6d 70 74 69 6e 67 20 74 6f 20 63 61 attempting to ca
9d60: 6c 6c 20 5c 66 42 74 6c 73 3a 3a 70 61 73 73 77 ll \fBtls::passw
9d70: 6f 72 64 5c 66 52 5c 26 2e 20 54 68 65 20 64 69 ord\fR\&. The di
9d80: 66 66 65 72 65 6e 63 65 20 62 65 74 77 65 65 6e fference between
9d90: 20 74 68 65 73 65 20 74 77 6f 0a 62 65 68 61 76 these two.behav
9da0: 69 6f 72 73 20 69 73 20 61 20 63 6f 6e 73 65 71 iors is a conseq
9db0: 75 65 6e 63 65 20 6f 66 20 6d 61 69 6e 74 61 69 uence of maintai
9dc0: 6e 69 6e 67 20 63 6f 6d 70 61 74 69 62 69 6c 69 ning compatibili
9dd0: 74 79 20 77 69 74 68 20 65 61 72 6c 69 65 72 0a ty with earlier.
9de0: 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 5c implementations\
9df0: 26 2e 0a 2e 50 50 0a 5c 66 49 54 68 65 20 75 73 &...PP.\fIThe us
9e00: 65 20 6f 66 20 74 68 65 20 72 65 66 65 72 65 6e e of the referen
9e10: 63 65 20 63 61 6c 6c 62 61 63 6b 73 20 5c 66 42 ce callbacks \fB
9e20: 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 5c 66 52 tls::callback\fR
9e30: 2c 20 5c 66 42 74 6c 73 3a 3a 70 61 73 73 77 6f , \fBtls::passwo
9e40: 72 64 5c 66 52 2c 0a 61 6e 64 20 5c 66 42 74 6c rd\fR,.and \fBtl
9e50: 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d s::validate_comm
9e60: 61 6e 64 5c 66 52 20 69 73 20 6e 6f 74 20 72 65 and\fR is not re
9e70: 63 6f 6d 6d 65 6e 64 65 64 5c 26 2e 20 54 68 65 commended\&. The
9e80: 79 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 y may be removed
9e90: 20 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c from future rel
9ea0: 65 61 73 65 73 5c 26 2e 5c 66 52 0a 2e 53 48 20 eases\&.\fR..SH
9eb0: 44 45 42 55 47 0a 46 6f 72 20 6d 6f 73 74 20 64 DEBUG.For most d
9ec0: 65 62 75 67 67 69 6e 67 20 6e 65 65 64 73 2c 20 ebugging needs,
9ed0: 74 68 65 20 5c 66 42 2d 63 61 6c 6c 62 61 63 6b the \fB-callback
9ee0: 5c 66 52 20 6f 70 74 69 6f 6e 20 63 61 6e 20 62 \fR option can b
9ef0: 65 20 75 73 65 64 20 74 6f 20 70 72 6f 76 69 64 e used to provid
9f00: 65 0a 73 75 66 66 69 63 69 65 6e 74 20 69 6e 73 e.sufficient ins
9f10: 69 67 68 74 20 61 6e 64 20 69 6e 66 6f 72 6d 61 ight and informa
9f20: 74 69 6f 6e 20 6f 6e 20 74 68 65 20 54 4c 53 20 tion on the TLS
9f30: 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 20 70 72 handshake and pr
9f40: 6f 67 72 65 73 73 5c 26 2e 20 49 66 0a 66 75 72 ogress\&. If.fur
9f50: 74 68 65 72 20 74 72 6f 75 62 6c 65 73 68 6f 6f ther troubleshoo
9f60: 74 69 6e 67 20 69 6e 73 69 67 68 74 20 69 73 20 ting insight is
9f70: 6e 65 65 64 65 64 2c 20 74 68 65 20 63 6f 6d 70 needed, the comp
9f80: 69 6c 65 20 74 69 6d 65 20 6f 70 74 69 6f 6e 0a ile time option.
9f90: 5c 66 42 2d 2d 65 6e 61 62 6c 65 2d 64 65 62 75 \fB--enable-debu
9fa0: 67 5c 66 52 20 63 61 6e 20 62 65 20 75 73 65 64 g\fR can be used
9fb0: 20 74 6f 20 67 65 74 20 64 65 74 61 69 6c 65 64 to get detailed
9fc0: 20 65 78 65 63 75 74 69 6f 6e 20 66 6c 6f 77 20 execution flow
9fd0: 73 74 61 74 75 73 5c 26 2e 0a 2e 50 50 0a 54 4c status\&...PP.TL
9fe0: 53 20 6b 65 79 20 6c 6f 67 67 69 6e 67 20 63 61 S key logging ca
9ff0: 6e 20 62 65 20 65 6e 61 62 6c 65 64 20 62 79 20 n be enabled by
a000: 73 65 74 74 69 6e 67 20 74 68 65 20 65 6e 76 69 setting the envi
a010: 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 ronment variable
a020: 0a 5c 66 42 53 53 4c 4b 45 59 4c 4f 47 46 49 4c .\fBSSLKEYLOGFIL
a030: 45 5c 66 52 20 74 6f 20 74 68 65 20 6e 61 6d 65 E\fR to the name
a040: 20 6f 66 20 74 68 65 20 66 69 6c 65 20 74 6f 20 of the file to
a050: 6c 6f 67 20 74 6f 5c 26 2e 20 54 68 65 6e 20 77 log to\&. Then w
a060: 68 65 6e 65 76 65 72 20 54 4c 53 20 6b 65 79 0a henever TLS key.
a070: 6d 61 74 65 72 69 61 6c 20 69 73 20 67 65 6e 65 material is gene
a080: 72 61 74 65 64 20 6f 72 20 72 65 63 65 69 76 65 rated or receive
a090: 64 20 69 74 20 77 69 6c 6c 20 62 65 20 6c 6f 67 d it will be log
a0a0: 67 65 64 20 74 6f 20 74 68 65 20 66 69 6c 65 5c ged to the file\
a0b0: 26 2e 20 54 68 69 73 20 69 73 20 75 73 65 66 75 &. This is usefu
a0c0: 6c 0a 66 6f 72 20 6c 6f 67 67 69 6e 67 20 6b 65 l.for logging ke
a0d0: 79 20 64 61 74 61 20 66 6f 72 20 6e 65 74 77 6f y data for netwo
a0e0: 72 6b 20 6c 6f 67 67 69 6e 67 20 74 6f 6f 6c 73 rk logging tools
a0f0: 20 74 6f 20 75 73 65 20 74 6f 20 64 65 63 72 79 to use to decry
a100: 70 74 20 74 68 65 20 64 61 74 61 5c 26 2e 0a 2e pt the data\&...
a110: 50 50 0a 54 68 65 20 5c 66 42 74 6c 73 3a 3a 64 PP.The \fBtls::d
a120: 65 62 75 67 5c 66 52 20 76 61 72 69 61 62 6c 65 ebug\fR variable
a130: 20 70 72 6f 76 69 64 65 73 20 73 6f 6d 65 20 61 provides some a
a140: 64 64 69 74 69 6f 6e 61 6c 20 63 6f 6e 74 72 6f dditional contro
a150: 6c 20 6f 76 65 72 20 74 68 65 0a 64 65 62 75 67 l over the.debug
a160: 20 6c 6f 67 67 69 6e 67 20 69 6e 20 74 68 65 20 logging in the
a170: 5c 66 42 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b \fBtls::callback
a180: 5c 66 52 2c 20 5c 66 42 74 6c 73 3a 3a 70 61 73 \fR, \fBtls::pas
a190: 73 77 6f 72 64 5c 66 52 2c 20 61 6e 64 0a 5c 66 sword\fR, and.\f
a1a0: 42 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 Btls::validate_c
a1b0: 6f 6d 6d 61 6e 64 5c 66 52 20 64 65 66 61 75 6c ommand\fR defaul
a1c0: 74 20 68 61 6e 64 6c 65 72 73 20 69 6e 20 22 5c t handlers in "\
a1d0: 66 49 74 6c 73 5c 26 2e 74 63 6c 5c 66 52 22 5c fItls\&.tcl\fR"\
a1e0: 26 2e 0a 54 68 65 20 64 65 66 61 75 6c 74 20 76 &..The default v
a1f0: 61 6c 75 65 20 69 73 20 30 20 77 69 74 68 20 68 alue is 0 with h
a200: 69 67 68 65 72 20 76 61 6c 75 65 73 20 70 72 6f igher values pro
a210: 64 75 63 69 6e 67 20 6d 6f 72 65 20 64 69 61 67 ducing more diag
a220: 6e 6f 73 74 69 63 20 6f 75 74 70 75 74 2c 0a 61 nostic output,.a
a230: 6e 64 20 77 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 nd will also for
a240: 63 65 20 74 68 65 20 76 65 72 69 66 79 20 6d 65 ce the verify me
a250: 74 68 6f 64 20 69 6e 20 5c 66 42 74 6c 73 3a 3a thod in \fBtls::
a260: 63 61 6c 6c 62 61 63 6b 5c 66 52 20 74 6f 20 61 callback\fR to a
a270: 63 63 65 70 74 20 74 68 65 0a 63 65 72 74 69 66 ccept the.certif
a280: 69 63 61 74 65 2c 20 65 76 65 6e 20 69 66 20 69 icate, even if i
a290: 74 20 69 73 20 69 6e 76 61 6c 69 64 20 77 68 65 t is invalid whe
a2a0: 6e 20 74 68 65 20 5c 66 42 2d 76 61 6c 69 64 61 n the \fB-valida
a2b0: 74 65 63 6f 6d 6d 61 6e 64 5c 66 52 0a 6f 70 74 tecommand\fR.opt
a2c0: 69 6f 6e 20 69 73 20 73 65 74 20 74 6f 20 5c 66 ion is set to \f
a2d0: 42 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 Btls::validate_c
a2e0: 6f 6d 6d 61 6e 64 5c 66 52 5c 26 2e 0a 2e 50 50 ommand\fR\&...PP
a2f0: 0a 5c 66 49 54 68 65 20 75 73 65 20 6f 66 20 74 .\fIThe use of t
a300: 68 65 20 76 61 72 69 61 62 6c 65 20 5c 66 42 74 he variable \fBt
a310: 6c 73 3a 3a 64 65 62 75 67 5c 66 52 20 69 73 20 ls::debug\fR is
a320: 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 5c not recommended\
a330: 26 2e 0a 49 74 20 6d 61 79 20 62 65 20 72 65 6d &..It may be rem
a340: 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65 oved from future
a350: 20 72 65 6c 65 61 73 65 73 5c 26 2e 5c 66 52 0a releases\&.\fR.
a360: 2e 53 48 20 45 58 41 4d 50 4c 45 53 0a 54 68 65 .SH EXAMPLES.The
a370: 20 66 6f 6c 6c 6f 77 69 6e 67 20 61 72 65 20 65 following are e
a380: 78 61 6d 70 6c 65 20 73 63 72 69 70 74 73 20 74 xample scripts t
a390: 6f 20 64 6f 77 6e 6c 6f 61 64 20 61 20 77 65 62 o download a web
a3a0: 70 61 67 65 20 61 6e 64 20 66 69 6c 65 20 75 73 page and file us
a3b0: 69 6e 67 20 74 68 65 0a 68 74 74 70 20 70 61 63 ing the.http pac
a3c0: 6b 61 67 65 5c 26 2e 20 53 65 65 20 5c 66 42 43 kage\&. See \fBC
a3d0: 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 ertificate Valid
a3e0: 61 74 69 6f 6e 5c 66 52 20 66 6f 72 20 77 68 65 ation\fR for whe
a3f0: 6e 20 74 68 65 0a 5c 66 42 2d 63 61 64 69 72 5c n the.\fB-cadir\
a400: 66 52 2c 20 5c 66 42 2d 63 61 66 69 6c 65 5c 66 fR, \fB-cafile\f
a410: 52 2c 20 61 6e 64 20 5c 66 42 2d 63 61 73 74 6f R, and \fB-casto
a420: 72 65 5c 66 52 20 6f 70 74 69 6f 6e 73 20 61 72 re\fR options ar
a430: 65 20 61 6c 73 6f 0a 6e 65 65 64 65 64 5c 26 2e e also.needed\&.
a440: 20 53 65 65 20 74 68 65 20 22 5c 66 49 64 65 6d See the "\fIdem
a450: 6f 73 5c 66 52 22 20 64 69 72 65 63 74 6f 72 79 os\fR" directory
a460: 20 66 6f 72 20 6d 6f 72 65 20 65 78 61 6d 70 6c for more exampl
a470: 65 20 73 63 72 69 70 74 73 5c 26 2e 0a 2e 50 50 e scripts\&...PP
a480: 0a 45 78 61 6d 70 6c 65 20 23 31 3a 20 44 6f 77 .Example #1: Dow
a490: 6e 6c 6f 61 64 20 61 20 77 65 62 20 70 61 67 65 nload a web page
a4a0: 0a 2e 43 53 0a 0a 0a 0a 70 61 63 6b 61 67 65 20 ..CS....package
a4b0: 72 65 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 require http.pac
a4c0: 6b 61 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 kage require tls
a4d0: 0a 0a 73 65 74 20 75 72 6c 20 22 68 74 74 70 73 ..set url "https
a4e0: 3a 2f 2f 77 77 77 5c 26 2e 74 63 6c 5c 26 2e 74 ://www\&.tcl\&.t
a4f0: 6b 2f 22 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 k/".http::regist
a500: 65 72 20 68 74 74 70 73 20 34 34 33 20 5b 6c 69 er https 443 [li
a510: 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 st ::tls::socket
a520: 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 -autoservername
a530: 20 31 20 2d 72 65 71 75 69 72 65 20 31 5d 0a 0a 1 -require 1]..
a540: 23 20 47 65 74 20 55 52 4c 0a 73 65 74 20 74 6f # Get URL.set to
a550: 6b 65 6e 20 5b 68 74 74 70 3a 3a 67 65 74 75 72 ken [http::getur
a560: 6c 20 24 75 72 6c 5d 0a 0a 23 20 43 68 65 63 6b l $url]..# Check
a570: 20 66 6f 72 20 65 72 72 6f 72 0a 69 66 20 7b 5b for error.if {[
a580: 68 74 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f http::status $to
a590: 6b 65 6e 5d 20 6e 65 20 22 6f 6b 22 7d 20 7b 0a ken] ne "ok"} {.
a5a0: 20 20 20 20 70 75 74 73 20 5b 66 6f 72 6d 61 74 puts [format
a5b0: 20 22 45 72 72 6f 72 20 25 73 22 20 5b 68 74 74 "Error %s" [htt
a5c0: 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e p::status $token
a5d0: 5d 5d 0a 7d 0a 0a 23 20 53 61 76 65 20 77 65 62 ]].}..# Save web
a5e0: 20 70 61 67 65 20 74 6f 20 66 69 6c 65 0a 73 65 page to file.se
a5f0: 74 20 63 68 20 5b 6f 70 65 6e 20 65 78 61 6d 70 t ch [open examp
a600: 6c 65 5c 26 2e 68 74 6d 6c 20 77 62 5d 0a 70 75 le\&.html wb].pu
a610: 74 73 20 24 63 68 20 5b 68 74 74 70 3a 3a 64 61 ts $ch [http::da
a620: 74 61 20 24 74 6f 6b 65 6e 5d 0a 63 6c 6f 73 65 ta $token].close
a630: 20 24 63 68 0a 0a 23 20 43 6c 65 61 6e 75 70 0a $ch..# Cleanup.
a640: 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 ::http::cleanup
a650: 24 74 6f 6b 65 6e 0a 0a 2e 43 45 0a 45 78 61 6d $token...CE.Exam
a660: 70 6c 65 20 23 32 3a 20 44 6f 77 6e 6c 6f 61 64 ple #2: Download
a670: 20 61 20 66 69 6c 65 0a 2e 43 53 0a 0a 0a 0a 70 a file..CS....p
a680: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 ackage require h
a690: 74 74 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 ttp.package requ
a6a0: 69 72 65 20 74 6c 73 0a 0a 73 65 74 20 75 72 6c ire tls..set url
a6b0: 20 22 68 74 74 70 73 3a 2f 2f 77 69 6b 69 5c 26 "https://wiki\&
a6c0: 2e 74 63 6c 2d 6c 61 6e 67 5c 26 2e 6f 72 67 2f .tcl-lang\&.org/
a6d0: 73 69 74 65 6d 61 70 5c 26 2e 78 6d 6c 22 0a 68 sitemap\&.xml".h
a6e0: 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 ttp::register ht
a6f0: 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a tps 443 [list ::
a700: 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 tls::socket -aut
a710: 6f 73 65 72 76 65 72 6e 61 6d 65 20 31 20 2d 72 oservername 1 -r
a720: 65 71 75 69 72 65 20 31 5d 0a 0a 23 20 4f 70 65 equire 1]..# Ope
a730: 6e 20 6f 75 74 70 75 74 20 66 69 6c 65 0a 73 65 n output file.se
a740: 74 20 66 69 6c 65 6e 61 6d 65 20 5b 66 69 6c 65 t filename [file
a750: 20 74 61 69 6c 20 24 75 72 6c 5d 0a 73 65 74 20 tail $url].set
a760: 63 68 20 5b 6f 70 65 6e 20 24 66 69 6c 65 6e 61 ch [open $filena
a770: 6d 65 20 77 62 5d 0a 0a 23 20 47 65 74 20 66 69 me wb]..# Get fi
a780: 6c 65 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 3a 3a le.set token [::
a790: 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 24 75 72 http::geturl $ur
a7a0: 6c 20 2d 62 6c 6f 63 6b 73 69 7a 65 20 36 35 35 l -blocksize 655
a7b0: 33 36 20 2d 63 68 61 6e 6e 65 6c 20 24 63 68 5d 36 -channel $ch]
a7c0: 0a 0a 23 20 43 68 65 63 6b 20 66 6f 72 20 65 72 ..# Check for er
a7d0: 72 6f 72 0a 69 66 20 7b 5b 68 74 74 70 3a 3a 73 ror.if {[http::s
a7e0: 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 tatus $token] ne
a7f0: 20 22 6f 6b 22 7d 20 7b 0a 20 20 20 20 70 75 74 "ok"} {. put
a800: 73 20 5b 66 6f 72 6d 61 74 20 22 45 72 72 6f 72 s [format "Error
a810: 20 25 73 22 20 5b 68 74 74 70 3a 3a 73 74 61 74 %s" [http::stat
a820: 75 73 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 0a 23 us $token]].}..#
a830: 20 43 6c 65 61 6e 75 70 0a 63 6c 6f 73 65 20 24 Cleanup.close $
a840: 63 68 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e ch.::http::clean
a850: 75 70 20 24 74 6f 6b 65 6e 0a 0a 2e 43 45 0a 2e up $token...CE..
a860: 53 48 20 22 53 50 45 43 49 41 4c 20 43 4f 4e 53 SH "SPECIAL CONS
a870: 49 44 45 52 41 54 49 4f 4e 53 22 0a 54 68 65 20 IDERATIONS".The
a880: 63 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20 capabilities of
a890: 74 68 69 73 20 70 61 63 6b 61 67 65 20 63 61 6e this package can
a8a0: 20 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c 79 vary enormously
a8b0: 20 62 61 73 65 64 20 75 70 6f 6e 20 68 6f 77 20 based upon how
a8c0: 74 68 65 0a 6c 69 6e 6b 65 64 20 74 6f 20 4f 70 the.linked to Op
a8d0: 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 20 77 61 enSSL library wa
a8e0: 73 20 63 6f 6e 66 69 67 75 72 65 64 20 61 6e 64 s configured and
a8f0: 20 62 75 69 6c 74 5c 26 2e 20 4e 65 77 20 76 65 built\&. New ve
a900: 72 73 69 6f 6e 73 20 6d 61 79 20 6f 62 73 6f 6c rsions may obsol
a910: 65 74 65 0a 6f 6c 64 65 72 20 70 72 6f 74 6f 63 ete.older protoc
a920: 6f 6c 20 76 65 72 73 69 6f 6e 73 2c 20 61 64 64 ol versions, add
a930: 20 6f 72 20 72 65 6d 6f 76 65 20 63 69 70 68 65 or remove ciphe
a940: 72 73 2c 20 63 68 61 6e 67 65 20 64 65 66 61 75 rs, change defau
a950: 6c 74 20 76 61 6c 75 65 73 2c 20 65 74 63 5c 26 lt values, etc\&
a960: 2e 0a 55 73 65 20 74 68 65 20 5c 66 42 74 6c 73 ..Use the \fBtls
a970: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 5c 66 52 20 63 ::protocols\fR c
a980: 6f 6d 6d 61 6e 64 20 74 6f 20 6f 62 74 61 69 6e ommand to obtain
a990: 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 0a 70 the supported.p
a9a0: 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73 rotocol versions
a9b0: 5c 26 2e 0a 2e 53 48 20 22 53 45 45 20 41 4c 53 \&...SH "SEE ALS
a9c0: 4f 22 0a 5c 66 49 4f 70 65 6e 53 53 4c 5c 66 52 O".\fIOpenSSL\fR
a9d0: 20 5b 68 74 74 70 73 3a 2f 2f 77 77 77 5c 26 2e [https://www\&.
a9e0: 6f 70 65 6e 73 73 6c 5c 26 2e 6f 72 67 2f 5d 2c openssl\&.org/],
a9f0: 20 68 74 74 70 2c 20 73 6f 63 6b 65 74 0a 2e 53 http, socket..S
aa00: 48 20 4b 45 59 57 4f 52 44 53 0a 49 2f 4f 2c 20 H KEYWORDS.I/O,
aa10: 49 50 20 41 64 64 72 65 73 73 2c 20 4f 70 65 6e IP Address, Open
aa20: 53 53 4c 2c 20 53 53 4c 2c 20 54 43 50 2c 20 54 SSL, SSL, TCP, T
aa30: 4c 53 2c 20 54 63 6c 54 4c 53 2c 20 61 73 79 6e LS, TclTLS, asyn
aa40: 63 68 72 6f 6e 6f 75 73 20 49 2f 4f 2c 20 62 69 chronous I/O, bi
aa50: 6e 64 2c 20 63 65 72 74 69 66 69 63 61 74 65 2c nd, certificate,
aa60: 20 63 68 61 6e 6e 65 6c 2c 20 63 6f 6e 6e 65 63 channel, connec
aa70: 74 69 6f 6e 2c 20 64 6f 6d 61 69 6e 20 6e 61 6d tion, domain nam
aa80: 65 2c 20 68 6f 73 74 2c 20 68 74 74 70 73 2c 20 e, host, https,
aa90: 6e 65 74 77 6f 72 6b 2c 20 6e 65 74 77 6f 72 6b network, network
aaa0: 20 61 64 64 72 65 73 73 2c 20 73 6f 63 6b 65 74 address, socket
aab0: 2c 20 74 6c 73 0a 2e 53 48 20 43 41 54 45 47 4f , tls..SH CATEGO
aac0: 52 59 0a 74 6c 73 0a 2e 53 48 20 43 4f 50 59 52 RY.tls..SH COPYR
aad0: 49 47 48 54 0a 2e 6e 66 0a 43 6f 70 79 72 69 67 IGHT..nf.Copyrig
aae0: 68 74 20 28 63 29 20 31 39 39 39 20 4d 61 74 74 ht (c) 1999 Matt
aaf0: 20 4e 65 77 6d 61 6e 0a 43 6f 70 79 72 69 67 68 Newman.Copyrigh
ab00: 74 20 28 63 29 20 32 30 30 34 20 53 74 61 72 66 t (c) 2004 Starf
ab10: 69 73 68 20 53 79 73 74 65 6d 73 0a 43 6f 70 79 ish Systems.Copy
ab20: 72 69 67 68 74 20 28 63 29 20 32 30 32 34 20 42 right (c) 2024 B
ab30: 72 69 61 6e 20 4f 27 48 61 67 61 6e 0a 0a 2e 66 rian O'Hagan...f
ab40: 69 0a i.