0000: 27 5c 22 0a 27 5c 22 20 47 65 6e 65 72 61 74 65 '\".'\" Generate
0010: 64 20 66 72 6f 6d 20 66 69 6c 65 20 27 74 6c 73 d from file 'tls
0020: 5c 26 2e 6d 61 6e 27 20 62 79 20 74 63 6c 6c 69 \&.man' by tclli
0030: 62 2f 64 6f 63 74 6f 6f 6c 73 20 77 69 74 68 20 b/doctools with
0040: 66 6f 72 6d 61 74 20 27 6e 72 6f 66 66 27 0a 27 format 'nroff'.'
0050: 5c 22 20 43 6f 70 79 72 69 67 68 74 20 28 63 29 \" Copyright (c)
0060: 20 31 39 39 39 20 4d 61 74 74 20 4e 65 77 6d 61 1999 Matt Newma
0070: 6e 0a 27 5c 22 20 43 6f 70 79 72 69 67 68 74 20 n.'\" Copyright
0080: 28 63 29 20 32 30 30 34 20 53 74 61 72 66 69 73 (c) 2004 Starfis
0090: 68 20 53 79 73 74 65 6d 73 0a 27 5c 22 20 43 6f h Systems.'\" Co
00a0: 70 79 72 69 67 68 74 20 28 63 29 20 32 30 32 34 pyright (c) 2024
00b0: 20 42 72 69 61 6e 20 4f 27 48 61 67 61 6e 0a 27 Brian O'Hagan.'
00c0: 5c 22 0a 2e 54 48 20 22 74 6c 73 22 20 6e 20 32 \"..TH "tls" n 2
00d0: 5c 26 2e 30 62 31 20 74 6c 73 20 22 54 63 6c 20 \&.0b1 tls "Tcl
00e0: 54 4c 53 20 65 78 74 65 6e 73 69 6f 6e 22 0a 2e TLS extension"..
00f0: 5c 22 20 54 68 65 20 2d 2a 2d 20 6e 72 6f 66 66 \" The -*- nroff
0100: 20 2d 2a 2d 20 64 65 66 69 6e 69 74 69 6f 6e 73 -*- definitions
0110: 20 62 65 6c 6f 77 20 61 72 65 20 66 6f 72 20 73 below are for s
0120: 75 70 70 6c 65 6d 65 6e 74 61 6c 20 6d 61 63 72 upplemental macr
0130: 6f 73 20 75 73 65 64 0a 2e 5c 22 20 69 6e 20 54 os used..\" in T
0140: 63 6c 2f 54 6b 20 6d 61 6e 75 61 6c 20 65 6e 74 cl/Tk manual ent
0150: 72 69 65 73 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 41 ries...\"..\" .A
0160: 50 20 74 79 70 65 20 6e 61 6d 65 20 69 6e 2f 6f P type name in/o
0170: 75 74 20 3f 69 6e 64 65 6e 74 3f 0a 2e 5c 22 09 ut ?indent?..\".
0180: 53 74 61 72 74 20 70 61 72 61 67 72 61 70 68 20 Start paragraph
0190: 64 65 73 63 72 69 62 69 6e 67 20 61 6e 20 61 72 describing an ar
01a0: 67 75 6d 65 6e 74 20 74 6f 20 61 20 6c 69 62 72 gument to a libr
01b0: 61 72 79 20 70 72 6f 63 65 64 75 72 65 2e 0a 2e ary procedure...
01c0: 5c 22 09 74 79 70 65 20 69 73 20 74 79 70 65 20 \".type is type
01d0: 6f 66 20 61 72 67 75 6d 65 6e 74 20 28 69 6e 74 of argument (int
01e0: 2c 20 65 74 63 2e 29 2c 20 69 6e 2f 6f 75 74 20 , etc.), in/out
01f0: 69 73 20 65 69 74 68 65 72 20 22 69 6e 22 2c 20 is either "in",
0200: 22 6f 75 74 22 2c 0a 2e 5c 22 09 6f 72 20 22 69 "out",..\".or "i
0210: 6e 2f 6f 75 74 22 20 74 6f 20 64 65 73 63 72 69 n/out" to descri
0220: 62 65 20 77 68 65 74 68 65 72 20 70 72 6f 63 65 be whether proce
0230: 64 75 72 65 20 72 65 61 64 73 20 6f 72 20 6d 6f dure reads or mo
0240: 64 69 66 69 65 73 20 61 72 67 2c 0a 2e 5c 22 09 difies arg,..\".
0250: 61 6e 64 20 69 6e 64 65 6e 74 20 69 73 20 65 71 and indent is eq
0260: 75 69 76 61 6c 65 6e 74 20 74 6f 20 73 65 63 6f uivalent to seco
0270: 6e 64 20 61 72 67 20 6f 66 20 2e 49 50 20 28 73 nd arg of .IP (s
0280: 68 6f 75 6c 64 6e 27 74 20 65 76 65 72 20 62 65 houldn't ever be
0290: 0a 2e 5c 22 09 6e 65 65 64 65 64 3b 20 20 75 73 ..\".needed; us
02a0: 65 20 2e 41 53 20 62 65 6c 6f 77 20 69 6e 73 74 e .AS below inst
02b0: 65 61 64 29 0a 2e 5c 22 0a 2e 5c 22 20 2e 41 53 ead)..\"..\" .AS
02c0: 20 3f 74 79 70 65 3f 20 3f 6e 61 6d 65 3f 0a 2e ?type? ?name?..
02d0: 5c 22 09 47 69 76 65 20 6d 61 78 69 6d 75 6d 20 \".Give maximum
02e0: 73 69 7a 65 73 20 6f 66 20 61 72 67 75 6d 65 6e sizes of argumen
02f0: 74 73 20 66 6f 72 20 73 65 74 74 69 6e 67 20 74 ts for setting t
0300: 61 62 20 73 74 6f 70 73 2e 20 20 54 79 70 65 20 ab stops. Type
0310: 61 6e 64 0a 2e 5c 22 09 6e 61 6d 65 20 61 72 65 and..\".name are
0320: 20 65 78 61 6d 70 6c 65 73 20 6f 66 20 6c 61 72 examples of lar
0330: 67 65 73 74 20 70 6f 73 73 69 62 6c 65 20 61 72 gest possible ar
0340: 67 75 6d 65 6e 74 73 20 74 68 61 74 20 77 69 6c guments that wil
0350: 6c 20 62 65 20 70 61 73 73 65 64 0a 2e 5c 22 09 l be passed..\".
0360: 74 6f 20 2e 41 50 20 6c 61 74 65 72 2e 20 20 49 to .AP later. I
0370: 66 20 61 72 67 73 20 61 72 65 20 6f 6d 69 74 74 f args are omitt
0380: 65 64 2c 20 64 65 66 61 75 6c 74 20 74 61 62 20 ed, default tab
0390: 73 74 6f 70 73 20 61 72 65 20 75 73 65 64 2e 0a stops are used..
03a0: 2e 5c 22 0a 2e 5c 22 20 2e 42 53 0a 2e 5c 22 09 .\"..\" .BS..\".
03b0: 53 74 61 72 74 20 62 6f 78 20 65 6e 63 6c 6f 73 Start box enclos
03c0: 75 72 65 2e 20 20 46 72 6f 6d 20 68 65 72 65 20 ure. From here
03d0: 75 6e 74 69 6c 20 6e 65 78 74 20 2e 42 45 2c 20 until next .BE,
03e0: 65 76 65 72 79 74 68 69 6e 67 20 77 69 6c 6c 20 everything will
03f0: 62 65 0a 2e 5c 22 09 65 6e 63 6c 6f 73 65 64 20 be..\".enclosed
0400: 69 6e 20 6f 6e 65 20 6c 61 72 67 65 20 62 6f 78 in one large box
0410: 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 42 45 0a 2e 5c ...\"..\" .BE..\
0420: 22 09 45 6e 64 20 6f 66 20 62 6f 78 20 65 6e 63 ".End of box enc
0430: 6c 6f 73 75 72 65 2e 0a 2e 5c 22 0a 2e 5c 22 20 losure...\"..\"
0440: 2e 43 53 0a 2e 5c 22 09 42 65 67 69 6e 20 63 6f .CS..\".Begin co
0450: 64 65 20 65 78 63 65 72 70 74 2e 0a 2e 5c 22 0a de excerpt...\".
0460: 2e 5c 22 20 2e 43 45 0a 2e 5c 22 09 45 6e 64 20 .\" .CE..\".End
0470: 63 6f 64 65 20 65 78 63 65 72 70 74 2e 0a 2e 5c code excerpt...\
0480: 22 0a 2e 5c 22 20 2e 56 53 20 3f 76 65 72 73 69 "..\" .VS ?versi
0490: 6f 6e 3f 20 3f 62 72 3f 0a 2e 5c 22 09 42 65 67 on? ?br?..\".Beg
04a0: 69 6e 20 76 65 72 74 69 63 61 6c 20 73 69 64 65 in vertical side
04b0: 62 61 72 2c 20 66 6f 72 20 75 73 65 20 69 6e 20 bar, for use in
04c0: 6d 61 72 6b 69 6e 67 20 6e 65 77 6c 79 2d 63 68 marking newly-ch
04d0: 61 6e 67 65 64 20 70 61 72 74 73 0a 2e 5c 22 09 anged parts..\".
04e0: 6f 66 20 6d 61 6e 20 70 61 67 65 73 2e 20 20 54 of man pages. T
04f0: 68 65 20 66 69 72 73 74 20 61 72 67 75 6d 65 6e he first argumen
0500: 74 20 69 73 20 69 67 6e 6f 72 65 64 20 61 6e 64 t is ignored and
0510: 20 75 73 65 64 20 66 6f 72 20 72 65 63 6f 72 64 used for record
0520: 69 6e 67 0a 2e 5c 22 09 74 68 65 20 76 65 72 73 ing..\".the vers
0530: 69 6f 6e 20 77 68 65 6e 20 74 68 65 20 2e 56 53 ion when the .VS
0540: 20 77 61 73 20 61 64 64 65 64 2c 20 73 6f 20 74 was added, so t
0550: 68 61 74 20 74 68 65 20 73 69 64 65 62 61 72 73 hat the sidebars
0560: 20 63 61 6e 20 62 65 0a 2e 5c 22 09 66 6f 75 6e can be..\".foun
0570: 64 20 61 6e 64 20 72 65 6d 6f 76 65 64 20 77 68 d and removed wh
0580: 65 6e 20 74 68 65 79 20 72 65 61 63 68 20 61 20 en they reach a
0590: 63 65 72 74 61 69 6e 20 61 67 65 2e 20 20 49 66 certain age. If
05a0: 20 61 6e 6f 74 68 65 72 20 61 72 67 75 6d 65 6e another argumen
05b0: 74 0a 2e 5c 22 09 69 73 20 70 72 65 73 65 6e 74 t..\".is present
05c0: 2c 20 74 68 65 6e 20 61 20 6c 69 6e 65 20 62 72 , then a line br
05d0: 65 61 6b 20 69 73 20 66 6f 72 63 65 64 20 62 65 eak is forced be
05e0: 66 6f 72 65 20 73 74 61 72 74 69 6e 67 20 74 68 fore starting th
05f0: 65 20 73 69 64 65 62 61 72 2e 0a 2e 5c 22 0a 2e e sidebar...\"..
0600: 5c 22 20 2e 56 45 0a 2e 5c 22 09 45 6e 64 20 6f \" .VE..\".End o
0610: 66 20 76 65 72 74 69 63 61 6c 20 73 69 64 65 62 f vertical sideb
0620: 61 72 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 44 53 0a ar...\"..\" .DS.
0630: 2e 5c 22 09 42 65 67 69 6e 20 61 6e 20 69 6e 64 .\".Begin an ind
0640: 65 6e 74 65 64 20 75 6e 66 69 6c 6c 65 64 20 64 ented unfilled d
0650: 69 73 70 6c 61 79 2e 0a 2e 5c 22 0a 2e 5c 22 20 isplay...\"..\"
0660: 2e 44 45 0a 2e 5c 22 09 45 6e 64 20 6f 66 20 69 .DE..\".End of i
0670: 6e 64 65 6e 74 65 64 20 75 6e 66 69 6c 6c 65 64 ndented unfilled
0680: 20 64 69 73 70 6c 61 79 2e 0a 2e 5c 22 0a 2e 5c display...\"..\
0690: 22 20 2e 53 4f 20 3f 6d 61 6e 70 61 67 65 3f 0a " .SO ?manpage?.
06a0: 2e 5c 22 09 53 74 61 72 74 20 6f 66 20 6c 69 73 .\".Start of lis
06b0: 74 20 6f 66 20 73 74 61 6e 64 61 72 64 20 6f 70 t of standard op
06c0: 74 69 6f 6e 73 20 66 6f 72 20 61 20 54 6b 20 77 tions for a Tk w
06d0: 69 64 67 65 74 2e 20 54 68 65 20 6d 61 6e 70 61 idget. The manpa
06e0: 67 65 0a 2e 5c 22 09 61 72 67 75 6d 65 6e 74 20 ge..\".argument
06f0: 64 65 66 69 6e 65 73 20 77 68 65 72 65 20 74 6f defines where to
0700: 20 6c 6f 6f 6b 20 75 70 20 74 68 65 20 73 74 61 look up the sta
0710: 6e 64 61 72 64 20 6f 70 74 69 6f 6e 73 3b 20 69 ndard options; i
0720: 66 0a 2e 5c 22 09 6f 6d 69 74 74 65 64 2c 20 64 f..\".omitted, d
0730: 65 66 61 75 6c 74 73 20 74 6f 20 22 6f 70 74 69 efaults to "opti
0740: 6f 6e 73 22 2e 20 54 68 65 20 6f 70 74 69 6f 6e ons". The option
0750: 73 20 66 6f 6c 6c 6f 77 20 6f 6e 20 73 75 63 63 s follow on succ
0760: 65 73 73 69 76 65 0a 2e 5c 22 09 6c 69 6e 65 73 essive..\".lines
0770: 2c 20 69 6e 20 74 68 72 65 65 20 63 6f 6c 75 6d , in three colum
0780: 6e 73 20 73 65 70 61 72 61 74 65 64 20 62 79 20 ns separated by
0790: 74 61 62 73 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e 53 tabs...\"..\" .S
07a0: 45 0a 2e 5c 22 09 45 6e 64 20 6f 66 20 6c 69 73 E..\".End of lis
07b0: 74 20 6f 66 20 73 74 61 6e 64 61 72 64 20 6f 70 t of standard op
07c0: 74 69 6f 6e 73 20 66 6f 72 20 61 20 54 6b 20 77 tions for a Tk w
07d0: 69 64 67 65 74 2e 0a 2e 5c 22 0a 2e 5c 22 20 2e idget...\"..\" .
07e0: 4f 50 20 63 6d 64 4e 61 6d 65 20 64 62 4e 61 6d OP cmdName dbNam
07f0: 65 20 64 62 43 6c 61 73 73 0a 2e 5c 22 09 53 74 e dbClass..\".St
0800: 61 72 74 20 6f 66 20 64 65 73 63 72 69 70 74 69 art of descripti
0810: 6f 6e 20 6f 66 20 61 20 73 70 65 63 69 66 69 63 on of a specific
0820: 20 6f 70 74 69 6f 6e 2e 20 20 63 6d 64 4e 61 6d option. cmdNam
0830: 65 20 67 69 76 65 73 20 74 68 65 0a 2e 5c 22 09 e gives the..\".
0840: 6f 70 74 69 6f 6e 27 73 20 6e 61 6d 65 20 61 73 option's name as
0850: 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 specified in th
0860: 65 20 63 6c 61 73 73 20 63 6f 6d 6d 61 6e 64 2c e class command,
0870: 20 64 62 4e 61 6d 65 20 67 69 76 65 73 0a 2e 5c dbName gives..\
0880: 22 09 74 68 65 20 6f 70 74 69 6f 6e 27 73 20 6e ".the option's n
0890: 61 6d 65 20 69 6e 20 74 68 65 20 6f 70 74 69 6f ame in the optio
08a0: 6e 20 64 61 74 61 62 61 73 65 2c 20 61 6e 64 20 n database, and
08b0: 64 62 43 6c 61 73 73 20 67 69 76 65 73 0a 2e 5c dbClass gives..\
08c0: 22 09 74 68 65 20 6f 70 74 69 6f 6e 27 73 20 63 ".the option's c
08d0: 6c 61 73 73 20 69 6e 20 74 68 65 20 6f 70 74 69 lass in the opti
08e0: 6f 6e 20 64 61 74 61 62 61 73 65 2e 0a 2e 5c 22 on database...\"
08f0: 0a 2e 5c 22 20 2e 55 4c 20 61 72 67 31 20 61 72 ..\" .UL arg1 ar
0900: 67 32 0a 2e 5c 22 09 50 72 69 6e 74 20 61 72 67 g2..\".Print arg
0910: 31 20 75 6e 64 65 72 6c 69 6e 65 64 2c 20 74 68 1 underlined, th
0920: 65 6e 20 70 72 69 6e 74 20 61 72 67 32 20 6e 6f en print arg2 no
0930: 72 6d 61 6c 6c 79 2e 0a 2e 5c 22 0a 2e 5c 22 20 rmally...\"..\"
0940: 2e 51 57 20 61 72 67 31 20 3f 61 72 67 32 3f 0a .QW arg1 ?arg2?.
0950: 2e 5c 22 09 50 72 69 6e 74 20 61 72 67 31 20 69 .\".Print arg1 i
0960: 6e 20 71 75 6f 74 65 73 2c 20 74 68 65 6e 20 61 n quotes, then a
0970: 72 67 32 20 6e 6f 72 6d 61 6c 6c 79 20 28 66 6f rg2 normally (fo
0980: 72 20 74 72 61 69 6c 69 6e 67 20 70 75 6e 63 74 r trailing punct
0990: 75 61 74 69 6f 6e 29 2e 0a 2e 5c 22 0a 2e 5c 22 uation)...\"..\"
09a0: 20 2e 50 51 20 61 72 67 31 20 3f 61 72 67 32 3f .PQ arg1 ?arg2?
09b0: 0a 2e 5c 22 09 50 72 69 6e 74 20 61 6e 20 6f 70 ..\".Print an op
09c0: 65 6e 20 70 61 72 65 6e 74 68 65 73 69 73 2c 20 en parenthesis,
09d0: 61 72 67 31 20 69 6e 20 71 75 6f 74 65 73 2c 20 arg1 in quotes,
09e0: 74 68 65 6e 20 61 72 67 32 20 6e 6f 72 6d 61 6c then arg2 normal
09f0: 6c 79 0a 2e 5c 22 09 28 66 6f 72 20 74 72 61 69 ly..\".(for trai
0a00: 6c 69 6e 67 20 70 75 6e 63 74 75 61 74 69 6f 6e ling punctuation
0a10: 29 20 61 6e 64 20 74 68 65 6e 20 61 20 63 6c 6f ) and then a clo
0a20: 73 69 6e 67 20 70 61 72 65 6e 74 68 65 73 69 73 sing parenthesis
0a30: 2e 0a 2e 5c 22 0a 2e 5c 22 09 23 20 53 65 74 20 ...\"..\".# Set
0a40: 75 70 20 74 72 61 70 73 20 61 6e 64 20 6f 74 68 up traps and oth
0a50: 65 72 20 6d 69 73 63 65 6c 6c 61 6e 65 6f 75 73 er miscellaneous
0a60: 20 73 74 75 66 66 20 66 6f 72 20 54 63 6c 2f 54 stuff for Tcl/T
0a70: 6b 20 6d 61 6e 20 70 61 67 65 73 2e 0a 2e 69 66 k man pages...if
0a80: 20 74 20 2e 77 68 20 2d 31 2e 33 69 20 5e 42 0a t .wh -1.3i ^B.
0a90: 2e 6e 72 20 5e 6c 20 5c 6e 28 2e 6c 0a 2e 61 64 .nr ^l \n(.l..ad
0aa0: 20 62 0a 2e 5c 22 09 23 20 53 74 61 72 74 20 61 b..\".# Start a
0ab0: 6e 20 61 72 67 75 6d 65 6e 74 20 64 65 73 63 72 n argument descr
0ac0: 69 70 74 69 6f 6e 0a 2e 64 65 20 41 50 0a 2e 69 iption..de AP..i
0ad0: 65 20 21 22 5c 5c 24 34 22 22 20 2e 54 50 20 5c e !"\\$4"" .TP \
0ae0: 5c 24 34 0a 2e 65 6c 20 5c 7b 5c 0a 2e 20 20 20 \$4..el \{\..
0af0: 69 65 20 21 22 5c 5c 24 32 22 22 20 2e 54 50 20 ie !"\\$2"" .TP
0b00: 5c 5c 6e 28 29 43 75 0a 2e 20 20 20 65 6c 20 20 \\n()Cu.. el
0b10: 20 20 20 20 20 20 20 20 2e 54 50 20 31 35 0a 2e .TP 15..
0b20: 5c 7d 0a 2e 74 61 20 5c 5c 6e 28 29 41 75 20 5c \}..ta \\n()Au \
0b30: 5c 6e 28 29 42 75 0a 2e 69 65 20 21 22 5c 5c 24 \n()Bu..ie !"\\$
0b40: 33 22 22 20 5c 7b 5c 0a 5c 26 5c 5c 24 31 20 5c 3"" \{\.\&\\$1 \
0b50: 5c 66 49 5c 5c 24 32 5c 5c 66 50 20 28 5c 5c 24 \fI\\$2\\fP (\\$
0b60: 33 29 0a 2e 5c 22 2e 62 0a 2e 5c 7d 0a 2e 65 6c 3)..\".b..\}..el
0b70: 20 5c 7b 5c 0a 2e 62 72 0a 2e 69 65 20 21 22 5c \{\..br..ie !"\
0b80: 5c 24 32 22 22 20 5c 7b 5c 0a 5c 26 5c 5c 24 31 \$2"" \{\.\&\\$1
0b90: 09 5c 5c 66 49 5c 5c 24 32 5c 5c 66 50 0a 2e 5c .\\fI\\$2\\fP..\
0ba0: 7d 0a 2e 65 6c 20 5c 7b 5c 0a 5c 26 5c 5c 66 49 }..el \{\.\&\\fI
0bb0: 5c 5c 24 31 5c 5c 66 50 0a 2e 5c 7d 0a 2e 5c 7d \\$1\\fP..\}..\}
0bc0: 0a 2e 2e 0a 2e 5c 22 09 23 20 64 65 66 69 6e 65 .....\".# define
0bd0: 20 74 61 62 62 69 6e 67 20 76 61 6c 75 65 73 20 tabbing values
0be0: 66 6f 72 20 2e 41 50 0a 2e 64 65 20 41 53 0a 2e for .AP..de AS..
0bf0: 6e 72 20 29 41 20 31 30 6e 0a 2e 69 66 20 21 22 nr )A 10n..if !"
0c00: 5c 5c 24 31 22 22 20 2e 6e 72 20 29 41 20 5c 5c \\$1"" .nr )A \\
0c10: 77 27 5c 5c 24 31 27 75 2b 33 6e 0a 2e 6e 72 20 w'\\$1'u+3n..nr
0c20: 29 42 20 5c 5c 6e 28 29 41 75 2b 31 35 6e 0a 2e )B \\n()Au+15n..
0c30: 5c 22 0a 2e 69 66 20 21 22 5c 5c 24 32 22 22 20 \"..if !"\\$2""
0c40: 2e 6e 72 20 29 42 20 5c 5c 77 27 5c 5c 24 32 27 .nr )B \\w'\\$2'
0c50: 75 2b 5c 5c 6e 28 29 41 75 2b 33 6e 0a 2e 6e 72 u+\\n()Au+3n..nr
0c60: 20 29 43 20 5c 5c 6e 28 29 42 75 2b 5c 5c 77 27 )C \\n()Bu+\\w'
0c70: 28 69 6e 2f 6f 75 74 29 27 75 2b 32 6e 0a 2e 2e (in/out)'u+2n...
0c80: 0a 2e 41 53 20 54 63 6c 5f 49 6e 74 65 72 70 20 ..AS Tcl_Interp
0c90: 54 63 6c 5f 43 72 65 61 74 65 49 6e 74 65 72 70 Tcl_CreateInterp
0ca0: 20 69 6e 2f 6f 75 74 0a 2e 5c 22 09 23 20 42 53 in/out..\".# BS
0cb0: 20 2d 20 73 74 61 72 74 20 62 6f 78 65 64 20 74 - start boxed t
0cc0: 65 78 74 0a 2e 5c 22 09 23 20 5e 79 20 3d 20 73 ext..\".# ^y = s
0cd0: 74 61 72 74 69 6e 67 20 79 20 6c 6f 63 61 74 69 tarting y locati
0ce0: 6f 6e 0a 2e 5c 22 09 23 20 5e 62 20 3d 20 31 0a on..\".# ^b = 1.
0cf0: 2e 64 65 20 42 53 0a 2e 62 72 0a 2e 6d 6b 20 5e .de BS..br..mk ^
0d00: 79 0a 2e 6e 72 20 5e 62 20 31 75 0a 2e 69 66 20 y..nr ^b 1u..if
0d10: 6e 20 2e 6e 66 0a 2e 69 66 20 6e 20 2e 74 69 20 n .nf..if n .ti
0d20: 30 0a 2e 69 66 20 6e 20 5c 6c 27 5c 5c 6e 28 2e 0..if n \l'\\n(.
0d30: 6c 75 5c 28 75 6c 27 0a 2e 69 66 20 6e 20 2e 66 lu\(ul'..if n .f
0d40: 69 0a 2e 2e 0a 2e 5c 22 09 23 20 42 45 20 2d 20 i.....\".# BE -
0d50: 65 6e 64 20 62 6f 78 65 64 20 74 65 78 74 20 28 end boxed text (
0d60: 64 72 61 77 20 62 6f 78 20 6e 6f 77 29 0a 2e 64 draw box now)..d
0d70: 65 20 42 45 0a 2e 6e 66 0a 2e 74 69 20 30 0a 2e e BE..nf..ti 0..
0d80: 6d 6b 20 5e 74 0a 2e 69 65 20 6e 20 5c 6c 27 5c mk ^t..ie n \l'\
0d90: 5c 6e 28 5e 6c 75 5c 28 75 6c 27 0a 2e 65 6c 20 \n(^lu\(ul'..el
0da0: 5c 7b 5c 0a 2e 5c 22 09 44 72 61 77 20 66 6f 75 \{\..\".Draw fou
0db0: 72 2d 73 69 64 65 64 20 62 6f 78 20 6e 6f 72 6d r-sided box norm
0dc0: 61 6c 6c 79 2c 20 62 75 74 20 64 6f 6e 27 74 20 ally, but don't
0dd0: 64 72 61 77 20 74 6f 70 20 6f 66 0a 2e 5c 22 09 draw top of..\".
0de0: 62 6f 78 20 69 66 20 74 68 65 20 62 6f 78 20 73 box if the box s
0df0: 74 61 72 74 65 64 20 6f 6e 20 61 6e 20 65 61 72 tarted on an ear
0e00: 6c 69 65 72 20 70 61 67 65 2e 0a 2e 69 65 20 21 lier page...ie !
0e10: 5c 5c 6e 28 5e 62 2d 31 20 5c 7b 5c 0a 5c 68 27 \\n(^b-1 \{\.\h'
0e20: 2d 31 2e 35 6e 27 5c 4c 27 7c 5c 5c 6e 28 5e 79 -1.5n'\L'|\\n(^y
0e30: 75 2d 31 76 27 5c 6c 27 5c 5c 6e 28 5e 6c 75 2b u-1v'\l'\\n(^lu+
0e40: 33 6e 5c 28 75 6c 27 5c 4c 27 5c 5c 6e 28 5e 74 3n\(ul'\L'\\n(^t
0e50: 75 2b 31 76 2d 5c 5c 6e 28 5e 79 75 27 5c 6c 27 u+1v-\\n(^yu'\l'
0e60: 7c 30 75 2d 31 2e 35 6e 5c 28 75 6c 27 0a 2e 5c |0u-1.5n\(ul'..\
0e70: 7d 0a 2e 65 6c 20 5c 7d 5c 0a 5c 68 27 2d 31 2e }..el \}\.\h'-1.
0e80: 35 6e 27 5c 4c 27 7c 5c 5c 6e 28 5e 79 75 2d 31 5n'\L'|\\n(^yu-1
0e90: 76 27 5c 68 27 5c 5c 6e 28 5e 6c 75 2b 33 6e 27 v'\h'\\n(^lu+3n'
0ea0: 5c 4c 27 5c 5c 6e 28 5e 74 75 2b 31 76 2d 5c 5c \L'\\n(^tu+1v-\\
0eb0: 6e 28 5e 79 75 27 5c 6c 27 7c 30 75 2d 31 2e 35 n(^yu'\l'|0u-1.5
0ec0: 6e 5c 28 75 6c 27 0a 2e 5c 7d 0a 2e 5c 7d 0a 2e n\(ul'..\}..\}..
0ed0: 66 69 0a 2e 62 72 0a 2e 6e 72 20 5e 62 20 30 0a fi..br..nr ^b 0.
0ee0: 2e 2e 0a 2e 5c 22 09 23 20 56 53 20 2d 20 73 74 ....\".# VS - st
0ef0: 61 72 74 20 76 65 72 74 69 63 61 6c 20 73 69 64 art vertical sid
0f00: 65 62 61 72 0a 2e 5c 22 09 23 20 5e 59 20 3d 20 ebar..\".# ^Y =
0f10: 73 74 61 72 74 69 6e 67 20 79 20 6c 6f 63 61 74 starting y locat
0f20: 69 6f 6e 0a 2e 5c 22 09 23 20 5e 76 20 3d 20 31 ion..\".# ^v = 1
0f30: 20 28 66 6f 72 20 74 72 6f 66 66 3b 20 20 66 6f (for troff; fo
0f40: 72 20 6e 72 6f 66 66 20 74 68 69 73 20 64 6f 65 r nroff this doe
0f50: 73 6e 27 74 20 6d 61 74 74 65 72 29 0a 2e 64 65 sn't matter)..de
0f60: 20 56 53 0a 2e 69 66 20 21 22 5c 5c 24 32 22 22 VS..if !"\\$2""
0f70: 20 2e 62 72 0a 2e 6d 6b 20 5e 59 0a 2e 69 65 20 .br..mk ^Y..ie
0f80: 6e 20 27 6d 63 20 5c 73 31 32 5c 28 62 72 5c 73 n 'mc \s12\(br\s
0f90: 30 0a 2e 65 6c 20 2e 6e 72 20 5e 76 20 31 75 0a 0..el .nr ^v 1u.
0fa0: 2e 2e 0a 2e 5c 22 09 23 20 56 45 20 2d 20 65 6e ....\".# VE - en
0fb0: 64 20 6f 66 20 76 65 72 74 69 63 61 6c 20 73 69 d of vertical si
0fc0: 64 65 62 61 72 0a 2e 64 65 20 56 45 0a 2e 69 65 debar..de VE..ie
0fd0: 20 6e 20 27 6d 63 0a 2e 65 6c 20 5c 7b 5c 0a 2e n 'mc..el \{\..
0fe0: 65 76 20 32 0a 2e 6e 66 0a 2e 74 69 20 30 0a 2e ev 2..nf..ti 0..
0ff0: 6d 6b 20 5e 74 0a 5c 68 27 7c 5c 5c 6e 28 5e 6c mk ^t.\h'|\\n(^l
1000: 75 2b 33 6e 27 5c 4c 27 7c 5c 5c 6e 28 5e 59 75 u+3n'\L'|\\n(^Yu
1010: 2d 31 76 5c 28 62 76 27 5c 76 27 5c 5c 6e 28 5e -1v\(bv'\v'\\n(^
1020: 74 75 2b 31 76 2d 5c 5c 6e 28 5e 59 75 27 5c 68 tu+1v-\\n(^Yu'\h
1030: 27 2d 7c 5c 5c 6e 28 5e 6c 75 2b 33 6e 27 0a 2e '-|\\n(^lu+3n'..
1040: 73 70 20 2d 31 0a 2e 66 69 0a 2e 65 76 0a 2e 5c sp -1..fi..ev..\
1050: 7d 0a 2e 6e 72 20 5e 76 20 30 0a 2e 2e 0a 2e 5c }..nr ^v 0.....\
1060: 22 09 23 20 53 70 65 63 69 61 6c 20 6d 61 63 72 ".# Special macr
1070: 6f 20 74 6f 20 68 61 6e 64 6c 65 20 70 61 67 65 o to handle page
1080: 20 62 6f 74 74 6f 6d 3a 20 20 66 69 6e 69 73 68 bottom: finish
1090: 20 6f 66 66 20 63 75 72 72 65 6e 74 0a 2e 5c 22 off current..\"
10a0: 09 23 20 62 6f 78 2f 73 69 64 65 62 61 72 20 69 .# box/sidebar i
10b0: 66 20 69 6e 20 62 6f 78 2f 73 69 64 65 62 61 72 f in box/sidebar
10c0: 20 6d 6f 64 65 2c 20 74 68 65 6e 20 69 6e 76 6f mode, then invo
10d0: 6b 65 64 20 73 74 61 6e 64 61 72 64 0a 2e 5c 22 ked standard..\"
10e0: 09 23 20 70 61 67 65 20 62 6f 74 74 6f 6d 20 6d .# page bottom m
10f0: 61 63 72 6f 2e 0a 2e 64 65 20 5e 42 0a 2e 65 76 acro...de ^B..ev
1100: 20 32 0a 27 74 69 20 30 0a 27 6e 66 0a 2e 6d 6b 2.'ti 0.'nf..mk
1110: 20 5e 74 0a 2e 69 66 20 5c 5c 6e 28 5e 62 20 5c ^t..if \\n(^b \
1120: 7b 5c 0a 2e 5c 22 09 44 72 61 77 20 74 68 72 65 {\..\".Draw thre
1130: 65 2d 73 69 64 65 64 20 62 6f 78 20 69 66 20 74 e-sided box if t
1140: 68 69 73 20 69 73 20 74 68 65 20 62 6f 78 27 73 his is the box's
1150: 20 66 69 72 73 74 20 70 61 67 65 2c 0a 2e 5c 22 first page,..\"
1160: 09 64 72 61 77 20 74 77 6f 20 73 69 64 65 73 20 .draw two sides
1170: 62 75 74 20 6e 6f 20 74 6f 70 20 6f 74 68 65 72 but no top other
1180: 77 69 73 65 2e 0a 2e 69 65 20 21 5c 5c 6e 28 5e wise...ie !\\n(^
1190: 62 2d 31 20 5c 68 27 2d 31 2e 35 6e 27 5c 4c 27 b-1 \h'-1.5n'\L'
11a0: 7c 5c 5c 6e 28 5e 79 75 2d 31 76 27 5c 6c 27 5c |\\n(^yu-1v'\l'\
11b0: 5c 6e 28 5e 6c 75 2b 33 6e 5c 28 75 6c 27 5c 4c \n(^lu+3n\(ul'\L
11c0: 27 5c 5c 6e 28 5e 74 75 2b 31 76 2d 5c 5c 6e 28 '\\n(^tu+1v-\\n(
11d0: 5e 79 75 27 5c 68 27 7c 30 75 27 5c 63 0a 2e 65 ^yu'\h'|0u'\c..e
11e0: 6c 20 5c 68 27 2d 31 2e 35 6e 27 5c 4c 27 7c 5c l \h'-1.5n'\L'|\
11f0: 5c 6e 28 5e 79 75 2d 31 76 27 5c 68 27 5c 5c 6e \n(^yu-1v'\h'\\n
1200: 28 5e 6c 75 2b 33 6e 27 5c 4c 27 5c 5c 6e 28 5e (^lu+3n'\L'\\n(^
1210: 74 75 2b 31 76 2d 5c 5c 6e 28 5e 79 75 27 5c 68 tu+1v-\\n(^yu'\h
1220: 27 7c 30 75 27 5c 63 0a 2e 5c 7d 0a 2e 69 66 20 '|0u'\c..\}..if
1230: 5c 5c 6e 28 5e 76 20 5c 7b 5c 0a 2e 6e 72 20 5e \\n(^v \{\..nr ^
1240: 78 20 5c 5c 6e 28 5e 74 75 2b 31 76 2d 5c 5c 6e x \\n(^tu+1v-\\n
1250: 28 5e 59 75 0a 5c 6b 78 5c 68 27 2d 5c 5c 6e 78 (^Yu.\kx\h'-\\nx
1260: 75 27 5c 68 27 7c 5c 5c 6e 28 5e 6c 75 2b 33 6e u'\h'|\\n(^lu+3n
1270: 27 5c 6b 79 5c 4c 27 2d 5c 5c 6e 28 5e 78 75 27 '\ky\L'-\\n(^xu'
1280: 5c 76 27 5c 5c 6e 28 5e 78 75 27 5c 68 27 7c 30 \v'\\n(^xu'\h'|0
1290: 75 27 5c 63 0a 2e 5c 7d 0a 2e 62 70 0a 27 66 69 u'\c..\}..bp.'fi
12a0: 0a 2e 65 76 0a 2e 69 66 20 5c 5c 6e 28 5e 62 20 ..ev..if \\n(^b
12b0: 5c 7b 5c 0a 2e 6d 6b 20 5e 79 0a 2e 6e 72 20 5e \{\..mk ^y..nr ^
12c0: 62 20 32 0a 2e 5c 7d 0a 2e 69 66 20 5c 5c 6e 28 b 2..\}..if \\n(
12d0: 5e 76 20 5c 7b 5c 0a 2e 6d 6b 20 5e 59 0a 2e 5c ^v \{\..mk ^Y..\
12e0: 7d 0a 2e 2e 0a 2e 5c 22 09 23 20 44 53 20 2d 20 }.....\".# DS -
12f0: 62 65 67 69 6e 20 64 69 73 70 6c 61 79 0a 2e 64 begin display..d
1300: 65 20 44 53 0a 2e 52 53 0a 2e 6e 66 0a 2e 73 70 e DS..RS..nf..sp
1310: 0a 2e 2e 0a 2e 5c 22 09 23 20 44 45 20 2d 20 65 .....\".# DE - e
1320: 6e 64 20 64 69 73 70 6c 61 79 0a 2e 64 65 20 44 nd display..de D
1330: 45 0a 2e 66 69 0a 2e 52 45 0a 2e 73 70 0a 2e 2e E..fi..RE..sp...
1340: 0a 2e 5c 22 09 23 20 53 4f 20 2d 20 73 74 61 72 ..\".# SO - star
1350: 74 20 6f 66 20 6c 69 73 74 20 6f 66 20 73 74 61 t of list of sta
1360: 6e 64 61 72 64 20 6f 70 74 69 6f 6e 73 0a 2e 64 ndard options..d
1370: 65 20 53 4f 0a 27 69 65 20 27 5c 5c 24 31 27 27 e SO.'ie '\\$1''
1380: 20 2e 64 73 20 53 6f 20 5c 5c 66 42 6f 70 74 69 .ds So \\fBopti
1390: 6f 6e 73 5c 5c 66 52 0a 27 65 6c 20 2e 64 73 20 ons\\fR.'el .ds
13a0: 53 6f 20 5c 5c 66 42 5c 5c 24 31 5c 5c 66 52 0a So \\fB\\$1\\fR.
13b0: 2e 53 48 20 22 53 54 41 4e 44 41 52 44 20 4f 50 .SH "STANDARD OP
13c0: 54 49 4f 4e 53 22 0a 2e 4c 50 0a 2e 6e 66 0a 2e TIONS"..LP..nf..
13d0: 74 61 20 35 2e 35 63 20 31 31 63 0a 2e 66 74 20 ta 5.5c 11c..ft
13e0: 42 0a 2e 2e 0a 2e 5c 22 09 23 20 53 45 20 2d 20 B.....\".# SE -
13f0: 65 6e 64 20 6f 66 20 6c 69 73 74 20 6f 66 20 73 end of list of s
1400: 74 61 6e 64 61 72 64 20 6f 70 74 69 6f 6e 73 0a tandard options.
1410: 2e 64 65 20 53 45 0a 2e 66 69 0a 2e 66 74 20 52 .de SE..fi..ft R
1420: 0a 2e 4c 50 0a 53 65 65 20 74 68 65 20 5c 5c 2a ..LP.See the \\*
1430: 28 53 6f 20 6d 61 6e 75 61 6c 20 65 6e 74 72 79 (So manual entry
1440: 20 66 6f 72 20 64 65 74 61 69 6c 73 20 6f 6e 20 for details on
1450: 74 68 65 20 73 74 61 6e 64 61 72 64 20 6f 70 74 the standard opt
1460: 69 6f 6e 73 2e 0a 2e 2e 0a 2e 5c 22 09 23 20 4f ions......\".# O
1470: 50 20 2d 20 73 74 61 72 74 20 6f 66 20 66 75 6c P - start of ful
1480: 6c 20 64 65 73 63 72 69 70 74 69 6f 6e 20 66 6f l description fo
1490: 72 20 61 20 73 69 6e 67 6c 65 20 6f 70 74 69 6f r a single optio
14a0: 6e 0a 2e 64 65 20 4f 50 0a 2e 4c 50 0a 2e 6e 66 n..de OP..LP..nf
14b0: 0a 2e 74 61 20 34 63 0a 43 6f 6d 6d 61 6e 64 2d ..ta 4c.Command-
14c0: 4c 69 6e 65 20 4e 61 6d 65 3a 09 5c 5c 66 42 5c Line Name:.\\fB\
14d0: 5c 24 31 5c 5c 66 52 0a 44 61 74 61 62 61 73 65 \$1\\fR.Database
14e0: 20 4e 61 6d 65 3a 09 5c 5c 66 42 5c 5c 24 32 5c Name:.\\fB\\$2\
14f0: 5c 66 52 0a 44 61 74 61 62 61 73 65 20 43 6c 61 \fR.Database Cla
1500: 73 73 3a 09 5c 5c 66 42 5c 5c 24 33 5c 5c 66 52 ss:.\\fB\\$3\\fR
1510: 0a 2e 66 69 0a 2e 49 50 0a 2e 2e 0a 2e 5c 22 09 ..fi..IP.....\".
1520: 23 20 43 53 20 2d 20 62 65 67 69 6e 20 63 6f 64 # CS - begin cod
1530: 65 20 65 78 63 65 72 70 74 0a 2e 64 65 20 43 53 e excerpt..de CS
1540: 0a 2e 52 53 0a 2e 6e 66 0a 2e 74 61 20 2e 32 35 ..RS..nf..ta .25
1550: 69 20 2e 35 69 20 2e 37 35 69 20 31 69 0a 2e 2e i .5i .75i 1i...
1560: 0a 2e 5c 22 09 23 20 43 45 20 2d 20 65 6e 64 20 ..\".# CE - end
1570: 63 6f 64 65 20 65 78 63 65 72 70 74 0a 2e 64 65 code excerpt..de
1580: 20 43 45 0a 2e 66 69 0a 2e 52 45 0a 2e 2e 0a 2e CE..fi..RE.....
1590: 5c 22 09 23 20 55 4c 20 2d 20 75 6e 64 65 72 6c \".# UL - underl
15a0: 69 6e 65 20 77 6f 72 64 0a 2e 64 65 20 55 4c 0a ine word..de UL.
15b0: 5c 5c 24 31 5c 6c 27 7c 30 5c 28 75 6c 27 5c 5c \\$1\l'|0\(ul'\\
15c0: 24 32 0a 2e 2e 0a 2e 5c 22 09 23 20 51 57 20 2d $2.....\".# QW -
15d0: 20 61 70 70 6c 79 20 71 75 6f 74 61 74 69 6f 6e apply quotation
15e0: 20 6d 61 72 6b 73 20 74 6f 20 77 6f 72 64 0a 2e marks to word..
15f0: 64 65 20 51 57 0a 2e 69 65 20 27 5c 5c 2a 28 6c de QW..ie '\\*(l
1600: 71 27 22 27 20 60 60 5c 5c 24 31 27 27 5c 5c 24 q'"' ``\\$1''\\$
1610: 32 0a 2e 5c 22 22 20 66 69 78 20 65 6d 61 63 73 2..\"" fix emacs
1620: 20 68 69 67 68 6c 69 67 68 74 69 6e 67 0a 2e 65 highlighting..e
1630: 6c 20 5c 5c 2a 28 6c 71 5c 5c 24 31 5c 5c 2a 28 l \\*(lq\\$1\\*(
1640: 72 71 5c 5c 24 32 0a 2e 2e 0a 2e 5c 22 09 23 20 rq\\$2.....\".#
1650: 50 51 20 2d 20 61 70 70 6c 79 20 70 61 72 65 6e PQ - apply paren
1660: 73 20 61 6e 64 20 71 75 6f 74 61 74 69 6f 6e 20 s and quotation
1670: 6d 61 72 6b 73 20 74 6f 20 77 6f 72 64 0a 2e 64 marks to word..d
1680: 65 20 50 51 0a 2e 69 65 20 27 5c 5c 2a 28 6c 71 e PQ..ie '\\*(lq
1690: 27 22 27 20 28 60 60 5c 5c 24 31 27 27 5c 5c 24 '"' (``\\$1''\\$
16a0: 32 29 5c 5c 24 33 0a 2e 5c 22 22 20 66 69 78 20 2)\\$3..\"" fix
16b0: 65 6d 61 63 73 20 68 69 67 68 6c 69 67 68 74 69 emacs highlighti
16c0: 6e 67 0a 2e 65 6c 20 28 5c 5c 2a 28 6c 71 5c 5c ng..el (\\*(lq\\
16d0: 24 31 5c 5c 2a 28 72 71 5c 5c 24 32 29 5c 5c 24 $1\\*(rq\\$2)\\$
16e0: 33 0a 2e 2e 0a 2e 5c 22 09 23 20 51 52 20 2d 20 3.....\".# QR -
16f0: 71 75 6f 74 65 64 20 72 61 6e 67 65 0a 2e 64 65 quoted range..de
1700: 20 51 52 0a 2e 69 65 20 27 5c 5c 2a 28 6c 71 27 QR..ie '\\*(lq'
1710: 22 27 20 60 60 5c 5c 24 31 27 27 5c 5c 2d 60 60 "' ``\\$1''\\-``
1720: 5c 5c 24 32 27 27 5c 5c 24 33 0a 2e 5c 22 22 20 \\$2''\\$3..\""
1730: 66 69 78 20 65 6d 61 63 73 20 68 69 67 68 6c 69 fix emacs highli
1740: 67 68 74 69 6e 67 0a 2e 65 6c 20 5c 5c 2a 28 6c ghting..el \\*(l
1750: 71 5c 5c 24 31 5c 5c 2a 28 72 71 5c 5c 2d 5c 5c q\\$1\\*(rq\\-\\
1760: 2a 28 6c 71 5c 5c 24 32 5c 5c 2a 28 72 71 5c 5c *(lq\\$2\\*(rq\\
1770: 24 33 0a 2e 2e 0a 2e 5c 22 09 23 20 4d 54 20 2d $3.....\".# MT -
1780: 20 22 65 6d 70 74 79 22 20 73 74 72 69 6e 67 0a "empty" string.
1790: 2e 64 65 20 4d 54 0a 2e 51 57 20 22 22 0a 2e 2e .de MT..QW ""...
17a0: 0a 2e 42 53 0a 2e 53 48 20 4e 41 4d 45 0a 74 6c ..BS..SH NAME.tl
17b0: 73 20 5c 2d 20 62 69 6e 64 69 6e 67 20 74 6f 20 s \- binding to
17c0: 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 the OpenSSL libr
17d0: 61 72 79 20 66 6f 72 20 65 6e 63 72 79 70 74 65 ary for encrypte
17e0: 64 20 73 6f 63 6b 65 74 20 61 6e 64 20 49 2f 4f d socket and I/O
17f0: 20 63 68 61 6e 6e 65 6c 20 63 6f 6d 6d 75 6e 69 channel communi
1800: 63 61 74 69 6f 6e 73 0a 2e 53 48 20 53 59 4e 4f cations..SH SYNO
1810: 50 53 49 53 0a 70 61 63 6b 61 67 65 20 72 65 71 PSIS.package req
1820: 75 69 72 65 20 5c 66 42 54 63 6c 20 38 5c 26 2e uire \fBTcl 8\&.
1830: 35 2d 5c 66 52 0a 2e 73 70 0a 70 61 63 6b 61 67 5-\fR..sp.packag
1840: 65 20 72 65 71 75 69 72 65 20 5c 66 42 74 6c 73 e require \fBtls
1850: 20 32 5c 26 2e 30 62 31 5c 66 52 0a 2e 73 70 0a 2\&.0b1\fR..sp.
1860: 5c 66 42 74 6c 73 3a 3a 69 6e 69 74 5c 66 52 20 \fBtls::init\fR
1870: 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 3f 20 ?\fI-option\fR?
1880: 3f 5c 66 49 76 61 6c 75 65 5c 66 52 3f 20 3f 5c ?\fIvalue\fR? ?\
1890: 66 49 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 fI-option value
18a0: 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 0a 2e 73 \&.\&.\&.\fR?..s
18b0: 70 0a 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 p.\fBtls::socket
18c0: 5c 66 52 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c \fR ?\fI-option\
18d0: 66 52 3f 20 3f 5c 66 49 76 61 6c 75 65 5c 66 52 fR? ?\fIvalue\fR
18e0: 3f 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 20 76 61 ? ?\fI-option va
18f0: 6c 75 65 20 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 lue \&.\&.\&.\fR
1900: 3f 20 5c 66 49 68 6f 73 74 5c 66 52 20 5c 66 49 ? \fIhost\fR \fI
1910: 70 6f 72 74 5c 66 52 0a 2e 73 70 0a 5c 66 42 74 port\fR..sp.\fBt
1920: 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 52 20 5c 66 ls::socket\fR \f
1930: 42 2d 73 65 72 76 65 72 5c 66 52 20 5c 66 49 63 B-server\fR \fIc
1940: 6f 6d 6d 61 6e 64 5c 66 52 20 3f 5c 66 49 2d 6f ommand\fR ?\fI-o
1950: 70 74 69 6f 6e 5c 66 52 3f 20 3f 5c 66 49 76 61 ption\fR? ?\fIva
1960: 6c 75 65 5c 66 52 3f 20 3f 5c 66 49 2d 6f 70 74 lue\fR? ?\fI-opt
1970: 69 6f 6e 20 76 61 6c 75 65 20 5c 26 2e 5c 26 2e ion value \&.\&.
1980: 5c 26 2e 5c 66 52 3f 20 5c 66 49 70 6f 72 74 5c \&.\fR? \fIport\
1990: 66 52 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a 3a 69 fR..sp.\fBtls::i
19a0: 6d 70 6f 72 74 5c 66 52 20 5c 66 49 63 68 61 6e mport\fR \fIchan
19b0: 6e 65 6c 5c 66 52 20 3f 5c 66 49 2d 6f 70 74 69 nel\fR ?\fI-opti
19c0: 6f 6e 5c 66 52 3f 20 3f 5c 66 49 76 61 6c 75 65 on\fR? ?\fIvalue
19d0: 5c 66 52 3f 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e \fR? ?\fI-option
19e0: 20 76 61 6c 75 65 20 5c 26 2e 5c 26 2e 5c 26 2e value \&.\&.\&.
19f0: 5c 66 52 3f 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a \fR?..sp.\fBtls:
1a00: 3a 75 6e 69 6d 70 6f 72 74 5c 66 52 20 5c 66 49 :unimport\fR \fI
1a10: 63 68 61 6e 6e 65 6c 5c 66 52 0a 2e 73 70 0a 5c channel\fR..sp.\
1a20: 66 42 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 fBtls::handshake
1a30: 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 \fR \fIchannel\f
1a40: 52 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a 3a 73 74 R..sp.\fBtls::st
1a50: 61 74 75 73 5c 66 52 20 3f 5c 66 42 2d 6c 6f 63 atus\fR ?\fB-loc
1a60: 61 6c 5c 66 52 3f 20 5c 66 49 63 68 61 6e 6e 65 al\fR? \fIchanne
1a70: 6c 5c 66 52 0a 2e 73 70 0a 5c 66 42 74 6c 73 3a l\fR..sp.\fBtls:
1a80: 3a 63 6f 6e 6e 65 63 74 69 6f 6e 5c 66 52 20 5c :connection\fR \
1a90: 66 49 63 68 61 6e 6e 65 6c 5c 66 52 0a 2e 73 70 fIchannel\fR..sp
1aa0: 0a 5c 66 42 74 6c 73 3a 3a 63 69 70 68 65 72 73 .\fBtls::ciphers
1ab0: 5c 66 52 20 3f 5c 66 49 70 72 6f 74 6f 63 6f 6c \fR ?\fIprotocol
1ac0: 5c 66 52 3f 20 3f 5c 66 49 76 65 72 62 6f 73 65 \fR? ?\fIverbose
1ad0: 5c 66 52 3f 20 3f 5c 66 49 73 75 70 70 6f 72 74 \fR? ?\fIsupport
1ae0: 65 64 5c 66 52 3f 0a 2e 73 70 0a 5c 66 42 74 6c ed\fR?..sp.\fBtl
1af0: 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 5c 66 52 0a s::protocols\fR.
1b00: 2e 73 70 0a 5c 66 42 74 6c 73 3a 3a 76 65 72 73 .sp.\fBtls::vers
1b10: 69 6f 6e 5c 66 52 0a 2e 73 70 0a 2e 42 45 0a 2e ion\fR..sp..BE..
1b20: 53 48 20 44 45 53 43 52 49 50 54 49 4f 4e 0a 54 SH DESCRIPTION.T
1b30: 68 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 his extension pr
1b40: 6f 76 69 64 65 73 20 54 43 4c 20 73 63 72 69 70 ovides TCL scrip
1b50: 74 20 61 63 63 65 73 73 20 74 6f 20 73 65 63 75 t access to secu
1b60: 72 65 20 73 6f 63 6b 65 74 20 63 6f 6d 6d 75 6e re socket commun
1b70: 69 63 61 74 69 6f 6e 73 0a 75 73 69 6e 67 20 74 ications.using t
1b80: 68 65 20 54 72 61 6e 73 70 6f 72 74 20 4c 61 79 he Transport Lay
1b90: 65 72 20 53 65 63 75 72 69 74 79 20 28 54 4c 53 er Security (TLS
1ba0: 29 20 70 72 6f 74 6f 63 6f 6c 5c 26 2e 20 49 74 ) protocol\&. It
1bb0: 20 70 72 6f 76 69 64 65 73 20 61 20 67 65 6e 65 provides a gene
1bc0: 72 69 63 0a 62 69 6e 64 69 6e 67 20 74 6f 20 5c ric.binding to \
1bd0: 66 49 4f 70 65 6e 53 53 4c 5c 66 52 20 5b 68 74 fIOpenSSL\fR [ht
1be0: 74 70 73 3a 2f 2f 77 77 77 5c 26 2e 6f 70 65 6e tps://www\&.open
1bf0: 73 73 6c 5c 26 2e 6f 72 67 2f 5d 2c 20 75 74 69 ssl\&.org/], uti
1c00: 6c 69 7a 69 6e 67 20 74 68 65 0a 5c 66 42 54 63 lizing the.\fBTc
1c10: 6c 5f 53 74 61 63 6b 43 68 61 6e 6e 65 6c 5c 66 l_StackChannel\f
1c20: 52 20 41 50 49 20 69 6e 20 54 43 4c 20 38 5c 26 R API in TCL 8\&
1c30: 2e 34 20 61 6e 64 20 68 69 67 68 65 72 5c 26 2e .4 and higher\&.
1c40: 0a 54 68 65 73 65 20 73 6f 63 6b 65 74 73 20 62 .These sockets b
1c50: 65 68 61 76 65 20 65 78 61 63 74 6c 79 20 74 68 ehave exactly th
1c60: 65 20 73 61 6d 65 20 61 73 20 63 68 61 6e 6e 65 e same as channe
1c70: 6c 73 20 63 72 65 61 74 65 64 20 75 73 69 6e 67 ls created using
1c80: 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 0a 5c 66 the built-in.\f
1c90: 42 73 6f 63 6b 65 74 5c 66 52 20 63 6f 6d 6d 61 Bsocket\fR comma
1ca0: 6e 64 2c 20 61 6c 6f 6e 67 20 77 69 74 68 20 61 nd, along with a
1cb0: 64 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e dditional option
1cc0: 73 20 66 6f 72 20 63 6f 6e 74 72 6f 6c 6c 69 6e s for controllin
1cd0: 67 0a 74 68 65 20 53 53 4c 2f 54 4c 53 20 73 65 g.the SSL/TLS se
1ce0: 73 73 69 6f 6e 5c 26 2e 0a 2e 53 48 20 43 4f 4d ssion\&...SH COM
1cf0: 4d 41 4e 44 53 0a 54 79 70 69 63 61 6c 6c 79 20 MANDS.Typically
1d00: 6f 6e 65 20 77 6f 75 6c 64 20 75 73 65 20 74 68 one would use th
1d10: 65 20 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 e \fBtls::socket
1d20: 5c 66 52 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 63 \fR command to c
1d30: 72 65 61 74 65 20 61 20 6e 65 77 20 65 6e 63 72 reate a new encr
1d40: 79 70 74 65 64 0a 54 43 50 20 73 6f 63 6b 65 74 ypted.TCP socket
1d50: 5c 26 2e 20 49 74 20 69 73 20 63 6f 6d 70 61 74 \&. It is compat
1d60: 69 62 6c 65 20 77 69 74 68 20 74 68 65 20 6e 61 ible with the na
1d70: 74 69 76 65 20 54 43 4c 20 5c 66 42 3a 3a 73 6f tive TCL \fB::so
1d80: 63 6b 65 74 5c 66 52 20 63 6f 6d 6d 61 6e 64 5c cket\fR command\
1d90: 26 2e 0a 41 6c 74 65 72 6e 61 74 69 76 65 6c 79 &..Alternatively
1da0: 20 66 6f 72 20 61 6e 20 65 78 69 73 74 69 6e 67 for an existing
1db0: 20 54 43 50 20 73 6f 63 6b 65 74 2c 20 74 68 65 TCP socket, the
1dc0: 20 5c 66 42 74 6c 73 3a 3a 69 6d 70 6f 72 74 5c \fBtls::import\
1dd0: 66 52 20 63 6f 6d 6d 61 6e 64 20 63 61 6e 20 62 fR command can b
1de0: 65 0a 75 73 65 64 20 74 6f 20 73 74 61 72 74 20 e.used to start
1df0: 54 4c 53 20 6f 6e 20 74 68 65 20 63 6f 6e 6e 65 TLS on the conne
1e00: 63 74 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 ction\&...TP.\fB
1e10: 74 6c 73 3a 3a 69 6e 69 74 5c 66 52 20 3f 5c 66 tls::init\fR ?\f
1e20: 49 2d 6f 70 74 69 6f 6e 5c 66 52 3f 20 3f 5c 66 I-option\fR? ?\f
1e30: 49 76 61 6c 75 65 5c 66 52 3f 20 3f 5c 66 49 2d Ivalue\fR? ?\fI-
1e40: 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 5c 26 2e option value \&.
1e50: 5c 26 2e 5c 26 2e 5c 66 52 3f 0a 4f 70 74 69 6f \&.\&.\fR?.Optio
1e60: 6e 61 6c 20 66 75 6e 63 74 69 6f 6e 20 74 6f 20 nal function to
1e70: 73 65 74 20 74 68 65 20 64 65 66 61 75 6c 74 20 set the default
1e80: 6f 70 74 69 6f 6e 73 20 75 73 65 64 20 62 79 20 options used by
1e90: 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 \fBtls::socket\f
1ea0: 52 5c 26 2e 20 49 66 20 79 6f 75 0a 63 61 6c 6c R\&. If you.call
1eb0: 20 5c 66 42 74 6c 73 3a 3a 69 6d 70 6f 72 74 5c \fBtls::import\
1ec0: 66 52 20 64 69 72 65 63 74 6c 79 2c 20 74 68 69 fR directly, thi
1ed0: 73 20 63 6f 6d 6d 61 6e 64 20 68 61 73 20 6e 6f s command has no
1ee0: 20 65 66 66 65 63 74 5c 26 2e 20 54 68 69 73 20 effect\&. This
1ef0: 63 6f 6d 6d 61 6e 64 0a 73 75 70 70 6f 72 74 73 command.supports
1f00: 20 61 6c 6c 20 6f 66 20 74 68 65 20 73 61 6d 65 all of the same
1f10: 20 6f 70 74 69 6f 6e 73 20 61 73 20 74 68 65 20 options as the
1f20: 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 \fBtls::socket\f
1f30: 52 20 63 6f 6d 6d 61 6e 64 2c 20 74 68 6f 75 67 R command, thoug
1f40: 68 20 79 6f 75 0a 73 68 6f 75 6c 64 20 6c 69 6d h you.should lim
1f50: 69 74 20 79 6f 75 72 20 6f 70 74 69 6f 6e 73 20 it your options
1f60: 74 6f 20 6f 6e 6c 79 20 54 4c 53 20 72 65 6c 61 to only TLS rela
1f70: 74 65 64 20 6f 6e 65 73 5c 26 2e 0a 2e 54 50 0a ted ones\&...TP.
1f80: 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 5c 66 \fBtls::socket\f
1f90: 52 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 R ?\fI-option\fR
1fa0: 3f 20 3f 5c 66 49 76 61 6c 75 65 5c 66 52 3f 20 ? ?\fIvalue\fR?
1fb0: 3f 5c 66 49 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 ?\fI-option valu
1fc0: 65 20 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 20 e \&.\&.\&.\fR?
1fd0: 5c 66 49 68 6f 73 74 5c 66 52 20 5c 66 49 70 6f \fIhost\fR \fIpo
1fe0: 72 74 5c 66 52 0a 54 68 69 73 20 69 73 20 61 20 rt\fR.This is a
1ff0: 68 65 6c 70 65 72 20 66 75 6e 63 74 69 6f 6e 20 helper function
2000: 74 68 61 74 20 75 74 69 6c 69 7a 65 73 20 74 68 that utilizes th
2010: 65 20 75 6e 64 65 72 6c 79 69 6e 67 20 63 6f 6d e underlying com
2020: 6d 61 6e 64 73 20 5c 66 42 73 6f 63 6b 65 74 5c mands \fBsocket\
2030: 66 52 0a 61 6e 64 20 5c 66 42 74 6c 73 3a 3a 69 fR.and \fBtls::i
2040: 6d 70 6f 72 74 5c 66 52 20 74 6f 20 63 72 65 61 mport\fR to crea
2050: 74 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f te the connectio
2060: 6e 5c 26 2e 20 49 74 20 62 65 68 61 76 65 73 20 n\&. It behaves
2070: 74 68 65 20 73 61 6d 65 20 61 73 20 74 68 65 0a the same as the.
2080: 6e 61 74 69 76 65 20 54 43 4c 20 5c 66 42 73 6f native TCL \fBso
2090: 63 6b 65 74 5c 66 52 20 63 6f 6d 6d 61 6e 64 2c cket\fR command,
20a0: 20 62 75 74 20 61 6c 73 6f 20 73 75 70 70 6f 72 but also suppor
20b0: 74 73 20 74 68 65 20 5c 66 42 74 6c 73 3a 69 6d ts the \fBtls:im
20c0: 70 6f 72 74 5c 66 52 0a 63 6f 6d 6d 61 6e 64 20 port\fR.command
20d0: 6f 70 74 69 6f 6e 73 20 77 69 74 68 20 6f 6e 65 options with one
20e0: 20 61 64 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69 additional opti
20f0: 6f 6e 5c 26 2e 20 49 74 20 72 65 74 75 72 6e 73 on\&. It returns
2100: 20 74 68 65 20 63 68 61 6e 6e 65 6c 20 68 61 6e the channel han
2110: 64 6c 65 20 69 64 0a 66 6f 72 20 74 68 65 20 6e dle id.for the n
2120: 65 77 20 73 6f 63 6b 65 74 5c 26 2e 0a 2e 52 53 ew socket\&...RS
2130: 0a 2e 54 50 0a 5c 66 42 2d 61 75 74 6f 73 65 72 ..TP.\fB-autoser
2140: 76 65 72 6e 61 6d 65 5c 66 52 20 5c 66 49 62 6f vername\fR \fIbo
2150: 6f 6c 5c 66 52 0a 49 66 20 5c 66 42 74 72 75 65 ol\fR.If \fBtrue
2160: 5c 66 52 2c 20 61 75 74 6f 6d 61 74 69 63 61 6c \fR, automatical
2170: 6c 79 20 73 65 74 20 74 68 65 20 5c 66 42 2d 73 ly set the \fB-s
2180: 65 72 76 65 72 6e 61 6d 65 5c 66 52 20 61 72 67 ervername\fR arg
2190: 75 6d 65 6e 74 20 74 6f 20 74 68 65 0a 5c 66 49 ument to the.\fI
21a0: 68 6f 73 74 5c 66 52 20 61 72 67 75 6d 65 6e 74 host\fR argument
21b0: 5c 26 2e 20 50 72 69 6f 72 20 74 6f 20 54 63 6c \&. Prior to Tcl
21c0: 54 4c 53 20 32 5c 26 2e 30 2c 20 74 68 65 20 64 TLS 2\&.0, the d
21d0: 65 66 61 75 6c 74 20 69 73 20 5c 66 42 66 61 6c efault is \fBfal
21e0: 73 65 5c 66 52 5c 26 2e 0a 53 74 61 72 74 69 6e se\fR\&..Startin
21f0: 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 5c 26 2e g in TclTLS 2\&.
2200: 30 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20 69 0, the default i
2210: 73 20 5c 66 42 74 72 75 65 5c 66 52 20 75 6e 6c s \fBtrue\fR unl
2220: 65 73 73 20 5c 66 42 2d 73 65 72 76 65 72 6e 61 ess \fB-serverna
2230: 6d 65 5c 66 52 0a 69 73 20 61 6c 73 6f 20 73 70 me\fR.is also sp
2240: 65 63 69 66 69 65 64 5c 26 2e 0a 2e 52 45 0a 2e ecified\&...RE..
2250: 54 50 0a 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 TP.\fBtls::socke
2260: 74 5c 66 52 20 5c 66 42 2d 73 65 72 76 65 72 5c t\fR \fB-server\
2270: 66 52 20 5c 66 49 63 6f 6d 6d 61 6e 64 5c 66 52 fR \fIcommand\fR
2280: 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e 5c 66 52 3f ?\fI-option\fR?
2290: 20 3f 5c 66 49 76 61 6c 75 65 5c 66 52 3f 20 3f ?\fIvalue\fR? ?
22a0: 5c 66 49 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 \fI-option value
22b0: 20 5c 26 2e 5c 26 2e 5c 26 2e 5c 66 52 3f 20 5c \&.\&.\&.\fR? \
22c0: 66 49 70 6f 72 74 5c 66 52 0a 53 61 6d 65 20 61 fIport\fR.Same a
22d0: 73 20 70 72 65 76 69 6f 75 73 2c 20 62 75 74 20 s previous, but
22e0: 69 6e 73 74 65 61 64 20 63 72 65 61 74 65 73 20 instead creates
22f0: 61 20 73 65 72 76 65 72 20 73 6f 63 6b 65 74 20 a server socket
2300: 66 6f 72 20 63 6c 69 65 6e 74 73 20 74 6f 20 63 for clients to c
2310: 6f 6e 6e 65 63 74 20 74 6f 0a 6a 75 73 74 20 6c onnect to.just l
2320: 69 6b 65 20 74 68 65 20 54 63 6c 20 5c 66 42 73 ike the Tcl \fBs
2330: 6f 63 6b 65 74 20 2d 73 65 72 76 65 72 5c 66 52 ocket -server\fR
2340: 20 63 6f 6d 6d 61 6e 64 5c 26 2e 20 49 74 20 72 command\&. It r
2350: 65 74 75 72 6e 73 20 74 68 65 20 63 68 61 6e 6e eturns the chann
2360: 65 6c 0a 68 61 6e 64 6c 65 20 69 64 20 66 6f 72 el.handle id for
2370: 20 74 68 65 20 6e 65 77 20 73 6f 63 6b 65 74 5c the new socket\
2380: 26 2e 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 69 &...TP.\fBtls::i
2390: 6d 70 6f 72 74 5c 66 52 20 5c 66 49 63 68 61 6e mport\fR \fIchan
23a0: 6e 65 6c 5c 66 52 20 3f 5c 66 49 2d 6f 70 74 69 nel\fR ?\fI-opti
23b0: 6f 6e 5c 66 52 3f 20 3f 5c 66 49 76 61 6c 75 65 on\fR? ?\fIvalue
23c0: 5c 66 52 3f 20 3f 5c 66 49 2d 6f 70 74 69 6f 6e \fR? ?\fI-option
23d0: 20 76 61 6c 75 65 20 5c 26 2e 5c 26 2e 5c 26 2e value \&.\&.\&.
23e0: 5c 66 52 3f 0a 53 74 61 72 74 20 54 4c 53 20 65 \fR?.Start TLS e
23f0: 6e 63 72 79 70 74 69 6f 6e 20 6f 6e 20 54 43 4c ncryption on TCL
2400: 20 63 68 61 6e 6e 65 6c 20 5c 66 49 63 68 61 6e channel \fIchan
2410: 6e 65 6c 5c 66 52 20 76 69 61 20 61 20 73 74 61 nel\fR via a sta
2420: 63 6b 65 64 20 63 68 61 6e 6e 65 6c 5c 26 2e 20 cked channel\&.
2430: 49 74 0a 6e 65 65 64 20 6e 6f 74 20 62 65 20 61 It.need not be a
2440: 20 73 6f 63 6b 65 74 2c 20 62 75 74 20 6d 75 73 socket, but mus
2450: 74 20 70 72 6f 76 69 64 65 20 62 69 2d 64 69 72 t provide bi-dir
2460: 65 63 74 69 6f 6e 61 6c 20 66 6c 6f 77 5c 26 2e ectional flow\&.
2470: 20 41 6c 73 6f 20 73 65 74 73 20 73 65 73 73 69 Also sets sessi
2480: 6f 6e 0a 70 61 72 61 6d 65 74 65 72 73 20 66 6f on.parameters fo
2490: 72 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 5c r SSL handshake\
24a0: 26 2e 20 56 61 6c 69 64 20 6f 70 74 69 6f 6e 73 &. Valid options
24b0: 20 61 72 65 3a 0a 2e 52 53 0a 2e 54 50 0a 5c 66 are:..RS..TP.\f
24c0: 42 2d 61 6c 70 6e 5c 66 52 20 5c 66 49 6c 69 73 B-alpn\fR \fIlis
24d0: 74 5c 66 52 0a 4c 69 73 74 20 6f 66 20 70 72 6f t\fR.List of pro
24e0: 74 6f 63 6f 6c 73 20 74 6f 20 6f 66 66 65 72 20 tocols to offer
24f0: 64 75 72 69 6e 67 20 41 70 70 6c 69 63 61 74 69 during Applicati
2500: 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f on-Layer Protoco
2510: 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e 0a 28 41 l Negotiation.(A
2520: 4c 50 4e 29 5c 26 2e 20 46 6f 72 20 65 78 61 6d LPN)\&. For exam
2530: 70 6c 65 3a 20 5c 66 42 68 32 5c 66 52 20 61 6e ple: \fBh2\fR an
2540: 64 20 5c 66 42 68 74 74 70 2f 31 5c 26 2e 31 5c d \fBhttp/1\&.1\
2550: 66 52 2c 20 62 75 74 20 6e 6f 74 20 5c 66 42 68 fR, but not \fBh
2560: 33 5c 66 52 20 6f 72 0a 5c 66 42 71 75 69 63 5c 3\fR or.\fBquic\
2570: 66 52 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 61 fR\&...TP.\fB-ca
2580: 64 69 72 5c 66 52 20 5c 66 49 64 69 72 65 63 74 dir\fR \fIdirect
2590: 6f 72 79 5c 66 52 0a 53 70 65 63 69 66 69 65 73 ory\fR.Specifies
25a0: 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 20 77 the directory w
25b0: 68 65 72 65 20 74 68 65 20 43 65 72 74 69 66 69 here the Certifi
25c0: 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20 28 cate Authority (
25d0: 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65 73 CA) certificates
25e0: 20 61 72 65 0a 73 74 6f 72 65 64 5c 26 2e 20 54 are.stored\&. T
25f0: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 70 6c he default is pl
2600: 61 74 66 6f 72 6d 20 73 70 65 63 69 66 69 63 20 atform specific
2610: 61 6e 64 20 63 61 6e 20 62 65 20 73 65 74 20 61 and can be set a
2620: 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 5c 26 t compile time\&
2630: 2e 20 54 68 65 0a 64 65 66 61 75 6c 74 20 6c 6f . The.default lo
2640: 63 61 74 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76 cation can be ov
2650: 65 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 erridden by the
2660: 5c 66 42 53 53 4c 5f 43 45 52 54 5f 44 49 52 5c \fBSSL_CERT_DIR\
2670: 66 52 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 fR environment.v
2680: 61 72 69 61 62 6c 65 5c 26 2e 20 53 65 65 20 5c ariable\&. See \
2690: 66 42 43 65 72 74 69 66 69 63 61 74 65 20 56 61 fBCertificate Va
26a0: 6c 69 64 61 74 69 6f 6e 5c 66 52 20 66 6f 72 20 lidation\fR for
26b0: 6d 6f 72 65 20 64 65 74 61 69 6c 73 5c 26 2e 0a more details\&..
26c0: 2e 54 50 0a 5c 66 42 2d 63 61 66 69 6c 65 5c 66 .TP.\fB-cafile\f
26d0: 52 20 5c 66 49 66 69 6c 65 6e 61 6d 65 5c 66 52 R \fIfilename\fR
26e0: 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 20 66 .Specifies the f
26f0: 69 6c 65 20 77 69 74 68 20 74 68 65 20 43 65 72 ile with the Cer
2700: 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 tificate Authori
2710: 74 79 20 28 43 41 29 20 63 65 72 74 69 66 69 63 ty (CA) certific
2720: 61 74 65 73 20 74 6f 20 75 73 65 20 69 6e 0a 5c ates to use in.\
2730: 66 42 50 45 4d 5c 66 52 20 66 69 6c 65 20 66 6f fBPEM\fR file fo
2740: 72 6d 61 74 5c 26 2e 20 54 68 65 20 64 65 66 61 rmat\&. The defa
2750: 75 6c 74 20 69 73 20 22 5c 66 49 63 65 72 74 5c ult is "\fIcert\
2760: 26 2e 70 65 6d 5c 66 52 22 2c 20 69 6e 20 74 68 &.pem\fR", in th
2770: 65 20 4f 70 65 6e 53 53 4c 0a 64 69 72 65 63 74 e OpenSSL.direct
2780: 6f 72 79 5c 26 2e 20 54 68 65 20 64 65 66 61 75 ory\&. The defau
2790: 6c 74 20 66 69 6c 65 20 63 61 6e 20 62 65 20 6f lt file can be o
27a0: 76 65 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 verridden by the
27b0: 20 5c 66 42 53 53 4c 5f 43 45 52 54 5f 46 49 4c \fBSSL_CERT_FIL
27c0: 45 5c 66 52 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 E\fR environment
27d0: 0a 76 61 72 69 61 62 6c 65 5c 26 2e 20 53 65 65 .variable\&. See
27e0: 20 5c 66 42 43 65 72 74 69 66 69 63 61 74 65 20 \fBCertificate
27f0: 56 61 6c 69 64 61 74 69 6f 6e 5c 66 52 20 66 6f Validation\fR fo
2800: 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 5c 26 r more details\&
2810: 2e 0a 2e 54 50 0a 5c 66 42 2d 63 61 73 74 6f 72 ...TP.\fB-castor
2820: 65 5c 66 52 20 5c 66 49 55 52 49 5c 66 52 0a 53 e\fR \fIURI\fR.S
2830: 70 65 63 69 66 69 65 73 20 74 68 65 20 55 6e 69 pecifies the Uni
2840: 66 6f 72 6d 20 52 65 73 6f 75 72 63 65 20 49 64 form Resource Id
2850: 65 6e 74 69 66 69 65 72 20 28 55 52 49 29 20 66 entifier (URI) f
2860: 6f 72 20 74 68 65 20 43 65 72 74 69 66 69 63 61 or the Certifica
2870: 74 65 20 41 75 74 68 6f 72 69 74 79 0a 28 43 41 te Authority.(CA
2880: 29 20 73 74 6f 72 65 2c 20 77 68 69 63 68 20 6d ) store, which m
2890: 61 79 20 62 65 20 61 20 73 69 6e 67 6c 65 20 63 ay be a single c
28a0: 6f 6e 74 61 69 6e 65 72 20 6f 72 20 61 20 63 61 ontainer or a ca
28b0: 74 61 6c 6f 67 20 6f 66 20 63 6f 6e 74 61 69 6e talog of contain
28c0: 65 72 73 5c 26 2e 0a 53 74 61 72 74 69 6e 67 20 ers\&..Starting
28d0: 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 33 5c 26 with OpenSSL 3\&
28e0: 2e 32 20 6f 6e 20 4d 53 20 57 69 6e 64 6f 77 73 .2 on MS Windows
28f0: 2c 20 73 65 74 20 74 6f 20 22 5c 66 42 6f 72 67 , set to "\fBorg
2900: 5c 26 2e 6f 70 65 6e 73 73 6c 5c 26 2e 77 69 6e \&.openssl\&.win
2910: 73 74 6f 72 65 3a 2f 2f 5c 66 52 22 0a 74 6f 20 store://\fR".to
2920: 75 73 65 20 74 68 65 20 62 75 69 6c 74 2d 69 6e use the built-in
2930: 20 4d 53 20 57 69 6e 64 6f 77 73 20 43 65 72 74 MS Windows Cert
2940: 69 66 69 63 61 74 65 20 53 74 6f 72 65 5c 26 2e ificate Store\&.
2950: 20 53 65 65 0a 5c 66 42 43 65 72 74 69 66 69 63 See.\fBCertific
2960: 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 5c 66 ate Validation\f
2970: 52 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 R for more detai
2980: 6c 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 65 ls\&...TP.\fB-ce
2990: 72 74 66 69 6c 65 5c 66 52 20 5c 66 49 66 69 6c rtfile\fR \fIfil
29a0: 65 6e 61 6d 65 5c 66 52 0a 53 70 65 63 69 66 69 ename\fR.Specifi
29b0: 65 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 es the name of t
29c0: 68 65 20 66 69 6c 65 20 77 69 74 68 20 74 68 65 he file with the
29d0: 20 63 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 certificate to
29e0: 75 73 65 20 69 6e 20 50 45 4d 20 66 6f 72 6d 61 use in PEM forma
29f0: 74 0a 61 73 20 74 68 65 20 6c 6f 63 61 6c 20 28 t.as the local (
2a00: 63 6c 69 65 6e 74 20 6f 72 20 73 65 72 76 65 72 client or server
2a10: 29 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 2e ) certificate\&.
2a20: 20 49 74 20 61 6c 73 6f 20 63 6f 6e 74 61 69 6e It also contain
2a30: 73 20 74 68 65 20 70 75 62 6c 69 63 20 6b 65 79 s the public key
2a40: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 65 72 74 \&...TP.\fB-cert
2a50: 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 \fR \fIstring\fR
2a60: 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 20 63 .Specifies the c
2a70: 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 73 ertificate to us
2a80: 65 20 61 73 20 61 20 44 45 52 20 65 6e 63 6f 64 e as a DER encod
2a90: 65 64 20 73 74 72 69 6e 67 20 28 58 5c 26 2e 35 ed string (X\&.5
2aa0: 30 39 20 44 45 52 29 5c 26 2e 0a 2e 54 50 0a 5c 09 DER)\&...TP.\
2ab0: 66 42 2d 63 69 70 68 65 72 5c 66 52 20 5c 66 49 fB-cipher\fR \fI
2ac0: 73 74 72 69 6e 67 5c 66 52 0a 53 70 65 63 69 66 string\fR.Specif
2ad0: 69 65 73 20 74 68 65 20 6c 69 73 74 20 6f 66 20 ies the list of
2ae0: 63 69 70 68 65 72 73 20 74 6f 20 75 73 65 20 66 ciphers to use f
2af0: 6f 72 20 54 4c 53 20 31 5c 26 2e 32 20 61 6e 64 or TLS 1\&.2 and
2b00: 20 65 61 72 6c 69 65 72 20 63 6f 6e 6e 65 63 74 earlier connect
2b10: 69 6f 6e 73 5c 26 2e 0a 53 74 72 69 6e 67 20 69 ions\&..String i
2b20: 73 20 61 20 63 6f 6c 6f 6e 20 22 5c 66 42 3a 5c s a colon "\fB:\
2b30: 66 52 22 20 73 65 70 61 72 61 74 65 64 20 6c 69 fR" separated li
2b40: 73 74 20 6f 66 20 63 69 70 68 65 72 73 5c 26 2e st of ciphers\&.
2b50: 0a 43 69 70 68 65 72 73 20 63 61 6e 20 62 65 20 .Ciphers can be
2b60: 63 6f 6d 62 69 6e 65 64 20 75 73 69 6e 67 20 74 combined using t
2b70: 68 65 20 22 5c 66 42 2b 5c 66 52 22 20 63 68 61 he "\fB+\fR" cha
2b80: 72 61 63 74 65 72 5c 26 2e 0a 50 72 65 66 69 78 racter\&..Prefix
2b90: 65 73 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 es can be used t
2ba0: 6f 20 70 65 72 6d 61 6e 65 6e 74 6c 79 20 72 65 o permanently re
2bb0: 6d 6f 76 65 20 22 5c 66 42 21 5c 66 52 22 2c 20 move "\fB!\fR",
2bc0: 64 65 6c 65 74 65 20 22 5c 66 42 2d 5c 66 52 22 delete "\fB-\fR"
2bd0: 2c 20 6f 72 0a 6d 6f 76 65 20 74 6f 20 74 68 65 , or.move to the
2be0: 20 65 6e 64 20 22 5c 66 42 2b 5c 66 52 22 20 61 end "\fB+\fR" a
2bf0: 20 73 70 65 63 69 66 69 65 64 20 63 69 70 68 65 specified ciphe
2c00: 72 5c 26 2e 0a 4b 65 79 77 6f 72 64 73 20 5c 66 r\&..Keywords \f
2c10: 42 40 53 54 52 45 4e 47 54 48 5c 66 52 20 28 73 B@STRENGTH\fR (s
2c20: 6f 72 74 20 62 79 20 61 6c 67 6f 72 69 74 68 6d ort by algorithm
2c30: 20 6b 65 79 20 6c 65 6e 67 74 68 29 2c 0a 5c 66 key length),.\f
2c40: 42 40 53 45 43 4c 45 56 45 4c 3d 5c 66 52 5c 66 B@SECLEVEL=\fR\f
2c50: 49 6e 5c 66 52 20 28 73 65 74 20 73 65 63 75 72 In\fR (set secur
2c60: 69 74 79 20 6c 65 76 65 6c 20 74 6f 20 6e 29 2c ity level to n),
2c70: 20 61 6e 64 0a 5c 66 42 44 45 46 41 55 4c 54 5c and.\fBDEFAULT\
2c80: 66 52 20 28 75 73 65 20 64 65 66 61 75 6c 74 20 fR (use default
2c90: 63 69 70 68 65 72 20 6c 69 73 74 2c 20 61 74 20 cipher list, at
2ca0: 73 74 61 72 74 20 6f 6e 6c 79 29 20 63 61 6e 20 start only) can
2cb0: 61 6c 73 6f 20 62 65 20 73 70 65 63 69 66 69 65 also be specifie
2cc0: 64 5c 26 2e 0a 53 65 65 20 74 68 65 20 5c 66 49 d\&..See the \fI
2cd0: 4f 70 65 6e 53 53 4c 5c 66 52 20 5b 68 74 74 70 OpenSSL\fR [http
2ce0: 73 3a 2f 2f 64 6f 63 73 5c 26 2e 6f 70 65 6e 73 s://docs\&.opens
2cf0: 73 6c 5c 26 2e 6f 72 67 2f 6d 61 73 74 65 72 2f sl\&.org/master/
2d00: 6d 61 6e 31 2f 6f 70 65 6e 73 73 6c 2d 63 69 70 man1/openssl-cip
2d10: 68 65 72 73 2f 23 6f 70 74 69 6f 6e 73 5d 0a 64 hers/#options].d
2d20: 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 ocumentation for
2d30: 20 74 68 65 20 66 75 6c 6c 20 6c 69 73 74 20 6f the full list o
2d40: 66 20 76 61 6c 69 64 20 76 61 6c 75 65 73 5c 26 f valid values\&
2d50: 2e 0a 2e 54 50 0a 5c 66 42 2d 63 69 70 68 65 72 ...TP.\fB-cipher
2d60: 73 75 69 74 65 73 5c 66 52 20 5c 66 49 73 74 72 suites\fR \fIstr
2d70: 69 6e 67 5c 66 52 0a 53 70 65 63 69 66 69 65 73 ing\fR.Specifies
2d80: 20 74 68 65 20 6c 69 73 74 20 6f 66 20 63 69 70 the list of cip
2d90: 68 65 72 20 73 75 69 74 65 73 20 74 6f 20 75 73 her suites to us
2da0: 65 20 66 6f 72 20 54 4c 53 20 31 5c 26 2e 33 20 e for TLS 1\&.3
2db0: 61 73 20 61 20 63 6f 6c 6f 6e 0a 22 5c 66 42 3a as a colon."\fB:
2dc0: 5c 66 52 22 20 73 65 70 61 72 61 74 65 64 20 6c \fR" separated l
2dd0: 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 75 ist of cipher su
2de0: 69 74 65 20 6e 61 6d 65 73 5c 26 2e 20 53 65 65 ite names\&. See
2df0: 20 74 68 65 0a 5c 66 49 4f 70 65 6e 53 53 4c 5c the.\fIOpenSSL\
2e00: 66 52 20 5b 68 74 74 70 73 3a 2f 2f 64 6f 63 73 fR [https://docs
2e10: 5c 26 2e 6f 70 65 6e 73 73 6c 5c 26 2e 6f 72 67 \&.openssl\&.org
2e20: 2f 6d 61 73 74 65 72 2f 6d 61 6e 31 2f 6f 70 65 /master/man1/ope
2e30: 6e 73 73 6c 2d 63 69 70 68 65 72 73 2f 23 6f 70 nssl-ciphers/#op
2e40: 74 69 6f 6e 73 5d 0a 64 6f 63 75 6d 65 6e 74 61 tions].documenta
2e50: 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 66 75 6c tion for the ful
2e60: 6c 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 64 20 l list of valid
2e70: 76 61 6c 75 65 73 5c 26 2e 0a 2e 54 50 0a 5c 66 values\&...TP.\f
2e80: 42 2d 63 6f 6d 6d 61 6e 64 5c 66 52 20 5c 66 49 B-command\fR \fI
2e90: 63 61 6c 6c 62 61 63 6b 5c 66 52 0a 53 70 65 63 callback\fR.Spec
2ea0: 69 66 69 65 73 20 74 68 65 20 63 61 6c 6c 62 61 ifies the callba
2eb0: 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 62 65 ck command to be
2ec0: 20 69 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 65 invoked at seve
2ed0: 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 69 6e ral points durin
2ee0: 67 20 74 68 65 0a 68 61 6e 64 73 68 61 6b 65 20 g the.handshake
2ef0: 74 6f 20 70 61 73 73 20 65 72 72 6f 72 73 2c 20 to pass errors,
2f00: 74 72 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61 74 tracing informat
2f10: 69 6f 6e 2c 20 61 6e 64 20 70 72 6f 74 6f 63 6f ion, and protoco
2f20: 6c 20 6d 65 73 73 61 67 65 73 5c 26 2e 0a 53 65 l messages\&..Se
2f30: 65 20 5c 66 42 43 61 6c 6c 62 61 63 6b 20 4f 70 e \fBCallback Op
2f40: 74 69 6f 6e 73 5c 66 52 20 66 6f 72 20 6d 6f 72 tions\fR for mor
2f50: 65 20 69 6e 66 6f 5c 26 2e 0a 2e 54 50 0a 5c 66 e info\&...TP.\f
2f60: 42 2d 64 68 70 61 72 61 6d 73 5c 66 52 20 5c 66 B-dhparams\fR \f
2f70: 49 66 69 6c 65 6e 61 6d 65 5c 66 52 0a 53 70 65 Ifilename\fR.Spe
2f80: 63 69 66 69 65 73 20 74 68 65 20 44 69 66 66 69 cifies the Diffi
2f90: 65 2d 48 65 6c 6c 6d 61 6e 20 28 44 48 29 20 70 e-Hellman (DH) p
2fa0: 61 72 61 6d 65 74 65 72 73 20 66 69 6c 65 5c 26 arameters file\&
2fb0: 2e 0a 2e 54 50 0a 5c 66 42 2d 6b 65 79 66 69 6c ...TP.\fB-keyfil
2fc0: 65 5c 66 52 20 5c 66 49 66 69 6c 65 6e 61 6d 65 e\fR \fIfilename
2fd0: 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 \fR.Specifies th
2fe0: 65 20 70 72 69 76 61 74 65 20 6b 65 79 20 66 69 e private key fi
2ff0: 6c 65 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c le\&. The defaul
3000: 74 20 69 73 20 74 6f 20 75 73 65 20 74 68 65 20 t is to use the
3010: 66 69 6c 65 0a 73 70 65 63 69 66 69 65 64 20 62 file.specified b
3020: 79 20 74 68 65 20 5c 66 49 2d 63 65 72 74 66 69 y the \fI-certfi
3030: 6c 65 5c 66 52 20 6f 70 74 69 6f 6e 5c 26 2e 0a le\fR option\&..
3040: 2e 54 50 0a 5c 66 42 2d 6b 65 79 5c 66 52 20 5c .TP.\fB-key\fR \
3050: 66 49 73 74 72 69 6e 67 5c 66 52 0a 53 70 65 63 fIstring\fR.Spec
3060: 69 66 69 65 73 20 74 68 65 20 70 72 69 76 61 74 ifies the privat
3070: 65 20 6b 65 79 20 74 6f 20 75 73 65 20 61 73 20 e key to use as
3080: 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20 73 74 a DER encoded st
3090: 72 69 6e 67 20 28 50 4b 43 53 23 31 20 44 45 52 ring (PKCS#1 DER
30a0: 29 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 6d 6f 64 )\&...TP.\fB-mod
30b0: 65 6c 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c el\fR \fIchannel
30c0: 5c 66 52 0a 46 6f 72 63 65 20 74 68 69 73 20 63 \fR.Force this c
30d0: 68 61 6e 6e 65 6c 20 74 6f 20 73 68 61 72 65 20 hannel to share
30e0: 74 68 65 20 73 61 6d 65 20 5c 66 49 53 53 4c 5f the same \fISSL_
30f0: 43 54 58 5c 66 52 20 73 74 72 75 63 74 75 72 65 CTX\fR structure
3100: 20 61 73 20 74 68 65 0a 73 70 65 63 69 66 69 65 as the.specifie
3110: 64 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 2c d \fIchannel\fR,
3120: 20 61 6e 64 20 74 68 65 72 65 66 6f 72 65 20 73 and therefore s
3130: 68 61 72 65 20 63 6f 6e 66 69 67 2c 20 63 61 6c hare config, cal
3140: 6c 62 61 63 6b 73 2c 20 65 74 63 5c 26 2e 0a 2e lbacks, etc\&...
3150: 54 50 0a 5c 66 42 2d 70 61 73 73 77 6f 72 64 5c TP.\fB-password\
3160: 66 52 20 5c 66 49 63 61 6c 6c 62 61 63 6b 5c 66 fR \fIcallback\f
3170: 52 0a 53 70 65 63 69 66 69 65 73 20 74 68 65 20 R.Specifies the
3180: 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 callback command
3190: 20 74 6f 20 69 6e 76 6f 6b 65 20 77 68 65 6e 20 to invoke when
31a0: 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73 20 74 6f OpenSSL needs to
31b0: 20 6f 62 74 61 69 6e 20 61 0a 70 61 73 73 77 6f obtain a.passwo
31c0: 72 64 5c 26 2e 20 54 68 69 73 20 69 73 20 74 79 rd\&. This is ty
31d0: 70 69 63 61 6c 6c 79 20 75 73 65 64 20 74 6f 20 pically used to
31e0: 75 6e 6c 6f 63 6b 20 74 68 65 20 70 72 69 76 61 unlock the priva
31f0: 74 65 20 6b 65 79 20 6f 66 20 61 20 63 65 72 74 te key of a cert
3200: 69 66 69 63 61 74 65 5c 26 2e 0a 54 68 65 20 63 ificate\&..The c
3210: 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 allback should r
3220: 65 74 75 72 6e 20 61 20 70 61 73 73 77 6f 72 64 eturn a password
3230: 20 73 74 72 69 6e 67 5c 26 2e 20 53 65 65 20 5c string\&. See \
3240: 66 42 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f fBCallback Optio
3250: 6e 73 5c 66 52 0a 66 6f 72 20 6d 6f 72 65 20 69 ns\fR.for more i
3260: 6e 66 6f 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 70 nfo\&...TP.\fB-p
3270: 6f 73 74 5f 68 61 6e 64 73 68 61 6b 65 5c 66 52 ost_handshake\fR
3280: 20 5c 66 49 62 6f 6f 6c 5c 66 52 0a 41 6c 6c 6f \fIbool\fR.Allo
3290: 77 20 70 6f 73 74 2d 68 61 6e 64 73 68 61 6b 65 w post-handshake
32a0: 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 session ticket
32b0: 75 70 64 61 74 65 73 5c 26 2e 0a 2e 54 50 0a 5c updates\&...TP.\
32c0: 66 42 2d 72 65 71 75 65 73 74 5c 66 52 20 5c 66 fB-request\fR \f
32d0: 49 62 6f 6f 6c 5c 66 52 0a 52 65 71 75 65 73 74 Ibool\fR.Request
32e0: 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20 66 a certificate f
32f0: 72 6f 6d 20 74 68 65 20 70 65 65 72 20 64 75 72 rom the peer dur
3300: 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e 64 ing the SSL hand
3310: 73 68 61 6b 65 5c 26 2e 20 54 68 69 73 20 69 73 shake\&. This is
3320: 20 6e 65 65 64 65 64 0a 74 6f 20 64 6f 20 43 65 needed.to do Ce
3330: 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 rtificate Valida
3340: 74 69 6f 6e 5c 26 2e 20 53 74 61 72 74 69 6e 67 tion\&. Starting
3350: 20 69 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 in TclTLS 1\&.8
3360: 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 , the default is
3370: 0a 5c 66 42 74 72 75 65 5c 66 52 5c 26 2e 0a 53 .\fBtrue\fR\&..S
3380: 65 65 20 5c 66 42 43 65 72 74 69 66 69 63 61 74 ee \fBCertificat
3390: 65 20 56 61 6c 69 64 61 74 69 6f 6e 5c 66 52 20 e Validation\fR
33a0: 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 for more details
33b0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 72 65 71 75 \&...TP.\fB-requ
33c0: 69 72 65 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c 66 ire\fR \fIbool\f
33d0: 52 0a 52 65 71 75 69 72 65 20 61 20 76 61 6c 69 R.Require a vali
33e0: 64 20 63 65 72 74 69 66 69 63 61 74 65 20 66 72 d certificate fr
33f0: 6f 6d 20 74 68 65 20 70 65 65 72 20 64 75 72 69 om the peer duri
3400: 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e 64 73 ng the SSL hands
3410: 68 61 6b 65 5c 26 2e 20 49 66 20 74 68 69 73 20 hake\&. If this
3420: 69 73 0a 73 65 74 20 74 6f 20 74 72 75 65 2c 20 is.set to true,
3430: 74 68 65 6e 20 5c 66 42 2d 72 65 71 75 65 73 74 then \fB-request
3440: 5c 66 52 20 6d 75 73 74 20 61 6c 73 6f 20 62 65 \fR must also be
3450: 20 73 65 74 20 74 6f 20 74 72 75 65 20 61 6e 64 set to true and
3460: 20 61 20 65 69 74 68 65 72 0a 5c 66 42 2d 63 61 a either.\fB-ca
3470: 64 69 72 5c 66 52 2c 20 5c 66 42 2d 63 61 66 69 dir\fR, \fB-cafi
3480: 6c 65 5c 66 52 2c 20 5c 66 42 2d 63 61 73 74 6f le\fR, \fB-casto
3490: 72 65 5c 66 52 2c 20 6f 72 20 61 20 70 6c 61 74 re\fR, or a plat
34a0: 66 6f 72 6d 20 64 65 66 61 75 6c 74 0a 6d 75 73 form default.mus
34b0: 74 20 62 65 20 70 72 6f 76 69 64 65 64 20 69 6e t be provided in
34c0: 20 6f 72 64 65 72 20 74 6f 20 76 61 6c 69 64 61 order to valida
34d0: 74 65 20 61 67 61 69 6e 73 74 5c 26 2e 20 54 68 te against\&. Th
34e0: 65 20 64 65 66 61 75 6c 74 20 69 6e 20 54 63 6c e default in Tcl
34f0: 54 4c 53 20 31 5c 26 2e 38 20 61 6e 64 0a 65 61 TLS 1\&.8 and.ea
3500: 72 6c 69 65 72 20 76 65 72 73 69 6f 6e 73 20 69 rlier versions i
3510: 73 20 5c 66 42 66 61 6c 73 65 5c 66 52 20 73 69 s \fBfalse\fR si
3520: 6e 63 65 20 6e 6f 74 20 61 6c 6c 20 70 6c 61 74 nce not all plat
3530: 66 6f 72 6d 73 20 68 61 76 65 20 63 65 72 74 69 forms have certi
3540: 66 69 63 61 74 65 73 20 74 6f 0a 76 61 6c 69 64 ficates to.valid
3550: 61 74 65 20 61 67 61 69 6e 73 74 20 69 6e 20 61 ate against in a
3560: 20 66 6f 72 6d 20 63 6f 6d 70 61 74 69 62 6c 65 form compatible
3570: 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 5c 26 2e with OpenSSL\&.
3580: 0a 53 65 65 20 5c 66 42 43 65 72 74 69 66 69 63 .See \fBCertific
3590: 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 5c 66 ate Validation\f
35a0: 52 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 R for more detai
35b0: 6c 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 73 65 ls\&...TP.\fB-se
35c0: 63 75 72 69 74 79 5f 6c 65 76 65 6c 5c 66 52 20 curity_level\fR
35d0: 5c 66 49 69 6e 74 65 67 65 72 5c 66 52 0a 53 70 \fIinteger\fR.Sp
35e0: 65 63 69 66 69 65 73 20 74 68 65 20 73 65 63 75 ecifies the secu
35f0: 72 69 74 79 20 6c 65 76 65 6c 20 28 76 61 6c 75 rity level (valu
3600: 65 20 66 72 6f 6d 20 30 20 74 6f 20 35 29 5c 26 e from 0 to 5)\&
3610: 2e 20 54 68 65 20 73 65 63 75 72 69 74 79 20 6c . The security l
3620: 65 76 65 6c 20 61 66 66 65 63 74 73 0a 74 68 65 evel affects.the
3630: 20 61 6c 6c 6f 77 65 64 20 63 69 70 68 65 72 20 allowed cipher
3640: 73 75 69 74 65 20 65 6e 63 72 79 70 74 69 6f 6e suite encryption
3650: 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20 73 75 70 algorithms, sup
3660: 70 6f 72 74 65 64 20 45 43 43 20 63 75 72 76 65 ported ECC curve
3670: 73 2c 0a 73 75 70 70 6f 72 74 65 64 20 73 69 67 s,.supported sig
3680: 6e 61 74 75 72 65 20 61 6c 67 6f 72 69 74 68 6d nature algorithm
3690: 73 2c 20 44 48 20 70 61 72 61 6d 65 74 65 72 20 s, DH parameter
36a0: 73 69 7a 65 73 2c 20 63 65 72 74 69 66 69 63 61 sizes, certifica
36b0: 74 65 20 6b 65 79 20 73 69 7a 65 73 0a 61 6e 64 te key sizes.and
36c0: 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 signature algor
36d0: 69 74 68 6d 73 5c 26 2e 20 54 68 65 20 64 65 66 ithms\&. The def
36e0: 61 75 6c 74 20 69 73 20 31 20 70 72 69 6f 72 20 ault is 1 prior
36f0: 74 6f 20 4f 70 65 6e 53 53 4c 20 33 5c 26 2e 32 to OpenSSL 3\&.2
3700: 20 61 6e 64 20 32 0a 74 68 65 72 65 61 66 74 65 and 2.thereafte
3710: 72 5c 26 2e 20 4c 65 76 65 6c 20 33 20 61 6e 64 r\&. Level 3 and
3720: 20 68 69 67 68 65 72 20 64 69 73 61 62 6c 65 20 higher disable
3730: 73 75 70 70 6f 72 74 20 66 6f 72 20 73 65 73 73 support for sess
3740: 69 6f 6e 20 74 69 63 6b 65 74 73 20 61 6e 64 0a ion tickets and.
3750: 6f 6e 6c 79 20 61 63 63 65 70 74 20 63 69 70 68 only accept ciph
3760: 65 72 20 73 75 69 74 65 73 20 74 68 61 74 20 70 er suites that p
3770: 72 6f 76 69 64 65 20 66 6f 72 77 61 72 64 20 73 rovide forward s
3780: 65 63 72 65 63 79 5c 26 2e 0a 2e 54 50 0a 5c 66 ecrecy\&...TP.\f
3790: 42 2d 73 65 72 76 65 72 5c 66 52 20 5c 66 49 62 B-server\fR \fIb
37a0: 6f 6f 6c 5c 66 52 0a 53 70 65 63 69 66 69 65 73 ool\fR.Specifies
37b0: 20 77 68 65 74 68 65 72 20 74 6f 20 61 63 74 20 whether to act
37c0: 61 73 20 61 20 73 65 72 76 65 72 20 61 6e 64 20 as a server and
37d0: 72 65 73 70 6f 6e 64 20 77 69 74 68 20 61 20 73 respond with a s
37e0: 65 72 76 65 72 20 68 61 6e 64 73 68 61 6b 65 20 erver handshake
37f0: 77 68 65 6e 20 61 0a 63 6c 69 65 6e 74 20 63 6f when a.client co
3800: 6e 6e 65 63 74 73 20 61 6e 64 20 70 72 6f 76 69 nnects and provi
3810: 64 65 73 20 61 20 63 6c 69 65 6e 74 20 68 61 6e des a client han
3820: 64 73 68 61 6b 65 5c 26 2e 20 54 68 65 20 64 65 dshake\&. The de
3830: 66 61 75 6c 74 20 69 73 20 5c 66 42 66 61 6c 73 fault is \fBfals
3840: 65 5c 66 52 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d e\fR\&...TP.\fB-
3850: 73 65 72 76 65 72 6e 61 6d 65 5c 66 52 20 5c 66 servername\fR \f
3860: 49 68 6f 73 74 6e 61 6d 65 5c 66 52 0a 53 70 65 Ihostname\fR.Spe
3870: 63 69 66 79 20 74 68 65 20 70 65 65 72 27 73 20 cify the peer's
3880: 68 6f 73 74 6e 61 6d 65 5c 26 2e 20 54 68 69 73 hostname\&. This
3890: 20 69 73 20 75 73 65 64 20 74 6f 20 73 65 74 20 is used to set
38a0: 74 68 65 20 54 4c 53 20 53 65 72 76 65 72 20 4e the TLS Server N
38b0: 61 6d 65 20 49 6e 64 69 63 61 74 69 6f 6e 0a 28 ame Indication.(
38c0: 53 4e 49 29 20 65 78 74 65 6e 73 69 6f 6e 5c 26 SNI) extension\&
38d0: 2e 20 53 65 74 20 74 68 69 73 20 74 6f 20 74 68 . Set this to th
38e0: 65 20 65 78 70 65 63 74 65 64 20 73 65 72 76 65 e expected serve
38f0: 72 6e 61 6d 65 20 69 6e 20 74 68 65 20 73 65 72 rname in the ser
3900: 76 65 72 27 73 20 63 65 72 74 69 66 69 63 61 74 ver's certificat
3910: 65 0a 6f 72 20 6f 6e 65 20 6f 66 20 74 68 65 20 e.or one of the
3920: 53 75 62 6a 65 63 74 20 41 6c 74 65 72 6e 61 74 Subject Alternat
3930: 65 20 4e 61 6d 65 73 20 28 53 41 4e 29 5c 26 2e e Names (SAN)\&.
3940: 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c Starting in Tcl
3950: 54 4c 53 20 32 5c 26 2e 30 2c 20 74 68 69 73 20 TLS 2\&.0, this
3960: 77 69 6c 6c 0a 64 65 66 61 75 6c 74 20 74 6f 20 will.default to
3970: 74 68 65 20 68 6f 73 74 20 66 6f 72 20 74 68 65 the host for the
3980: 20 5c 66 42 74 6c 73 3a 3a 73 6f 63 6b 65 74 5c \fBtls::socket\
3990: 66 52 20 63 6f 6d 6d 61 6e 64 5c 26 2e 0a 2e 54 fR command\&...T
39a0: 50 0a 5c 66 42 2d 73 65 73 73 69 6f 6e 5f 69 64 P.\fB-session_id
39b0: 5c 66 52 20 5c 66 49 62 69 6e 61 72 79 5f 73 74 \fR \fIbinary_st
39c0: 72 69 6e 67 5c 66 52 0a 53 70 65 63 69 66 69 65 ring\fR.Specifie
39d0: 73 20 74 68 65 20 73 65 73 73 69 6f 6e 20 69 64 s the session id
39e0: 20 74 6f 20 72 65 73 75 6d 65 20 61 20 73 65 73 to resume a ses
39f0: 73 69 6f 6e 5c 26 2e 20 4e 6f 74 20 73 75 70 70 sion\&. Not supp
3a00: 6f 72 74 65 64 20 79 65 74 5c 26 2e 0a 2e 54 50 orted yet\&...TP
3a10: 0a 5c 66 42 2d 73 73 6c 32 5c 66 52 20 5c 66 49 .\fB-ssl2\fR \fI
3a20: 62 6f 6f 6c 5c 66 52 0a 45 6e 61 62 6c 65 20 75 bool\fR.Enable u
3a30: 73 65 20 6f 66 20 53 53 4c 20 76 32 5c 26 2e 20 se of SSL v2\&.
3a40: 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 5c The default is \
3a50: 66 42 66 61 6c 73 65 5c 66 52 5c 26 2e 20 4e 6f fBfalse\fR\&. No
3a60: 74 65 3a 20 52 65 63 65 6e 74 20 76 65 72 73 69 te: Recent versi
3a70: 6f 6e 73 20 6f 66 0a 4f 70 65 6e 53 53 4c 20 6e ons of.OpenSSL n
3a80: 6f 20 6c 6f 6e 67 65 72 20 73 75 70 70 6f 72 74 o longer support
3a90: 20 53 53 4c 76 32 2c 20 73 6f 20 74 68 69 73 20 SSLv2, so this
3aa0: 6d 61 79 20 6e 6f 74 20 68 61 76 65 20 61 6e 79 may not have any
3ab0: 20 65 66 66 65 63 74 5c 26 2e 20 53 65 65 20 74 effect\&. See t
3ac0: 68 65 0a 5c 66 42 74 6c 73 3a 3a 70 72 6f 74 6f he.\fBtls::proto
3ad0: 63 6f 6c 73 5c 66 52 20 63 6f 6d 6d 61 6e 64 20 cols\fR command
3ae0: 66 6f 72 20 73 75 70 70 6f 72 74 65 64 20 70 72 for supported pr
3af0: 6f 74 6f 63 6f 6c 73 5c 26 2e 0a 2e 54 50 0a 5c otocols\&...TP.\
3b00: 66 42 2d 73 73 6c 33 5c 66 52 20 5c 66 49 62 6f fB-ssl3\fR \fIbo
3b10: 6f 6c 5c 66 52 0a 45 6e 61 62 6c 65 20 75 73 65 ol\fR.Enable use
3b20: 20 6f 66 20 53 53 4c 20 76 33 5c 26 2e 20 54 68 of SSL v3\&. Th
3b30: 65 20 64 65 66 61 75 6c 74 20 69 73 20 5c 66 42 e default is \fB
3b40: 66 61 6c 73 65 5c 66 52 5c 26 2e 20 4e 6f 74 65 false\fR\&. Note
3b50: 3a 20 52 65 63 65 6e 74 20 76 65 72 73 69 6f 6e : Recent version
3b60: 73 0a 6f 66 20 4f 70 65 6e 53 53 4c 20 6d 61 79 s.of OpenSSL may
3b70: 20 68 61 76 65 20 74 68 69 73 20 64 69 73 61 62 have this disab
3b80: 6c 65 64 20 61 74 20 63 6f 6d 70 69 6c 65 20 74 led at compile t
3b90: 69 6d 65 2c 20 73 6f 20 74 68 69 73 20 6d 61 79 ime, so this may
3ba0: 20 6e 6f 74 20 68 61 76 65 20 61 6e 79 0a 65 66 not have any.ef
3bb0: 66 65 63 74 5c 26 2e 20 53 65 65 20 74 68 65 20 fect\&. See the
3bc0: 5c 66 42 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c \fBtls::protocol
3bd0: 73 5c 66 52 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 s\fR command for
3be0: 20 73 75 70 70 6f 72 74 65 64 20 70 72 6f 74 6f supported proto
3bf0: 63 6f 6c 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d cols\&...TP.\fB-
3c00: 74 6c 73 31 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c tls1\fR \fIbool\
3c10: 66 52 0a 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 fR.Enable use of
3c20: 20 54 4c 53 20 76 31 5c 26 2e 20 54 68 65 20 64 TLS v1\&. The d
3c30: 65 66 61 75 6c 74 20 69 73 20 5c 66 42 74 72 75 efault is \fBtru
3c40: 65 5c 66 52 5c 26 2e 20 4e 6f 74 65 3a 20 54 4c e\fR\&. Note: TL
3c50: 53 20 31 5c 26 2e 30 20 6e 65 65 64 73 0a 53 48 S 1\&.0 needs.SH
3c60: 41 31 20 74 6f 20 6f 70 65 72 61 74 65 2c 20 77 A1 to operate, w
3c70: 68 69 63 68 20 69 73 20 6f 6e 6c 79 20 61 76 61 hich is only ava
3c80: 69 6c 61 62 6c 65 20 69 6e 20 73 65 63 75 72 69 ilable in securi
3c90: 74 79 20 6c 65 76 65 6c 20 30 20 66 6f 72 20 4f ty level 0 for O
3ca0: 70 65 6e 20 53 53 4c 20 33 5c 26 2e 30 2b 5c 26 pen SSL 3\&.0+\&
3cb0: 2e 0a 53 65 65 20 74 68 65 20 5c 66 49 2d 73 65 ..See the \fI-se
3cc0: 63 75 72 69 74 79 5f 6c 65 76 65 6c 5c 66 52 20 curity_level\fR
3cd0: 6f 70 74 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 option\&...TP.\f
3ce0: 42 2d 74 6c 73 31 5c 26 2e 31 5c 66 52 20 5c 66 B-tls1\&.1\fR \f
3cf0: 49 62 6f 6f 6c 5c 66 52 0a 45 6e 61 62 6c 65 20 Ibool\fR.Enable
3d00: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 5c 26 2e use of TLS v1\&.
3d10: 31 5c 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 1\&. The default
3d20: 20 69 73 20 5c 66 42 74 72 75 65 5c 66 52 5c 26 is \fBtrue\fR\&
3d30: 2e 20 4e 6f 74 65 3a 20 54 4c 53 20 31 5c 26 2e . Note: TLS 1\&.
3d40: 31 20 6e 65 65 64 73 0a 53 48 41 31 20 74 6f 20 1 needs.SHA1 to
3d50: 6f 70 65 72 61 74 65 2c 20 77 68 69 63 68 20 69 operate, which i
3d60: 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 s only available
3d70: 20 69 6e 20 73 65 63 75 72 69 74 79 20 6c 65 76 in security lev
3d80: 65 6c 20 30 20 66 6f 72 20 4f 70 65 6e 20 53 53 el 0 for Open SS
3d90: 4c 20 33 5c 26 2e 30 2b 5c 26 2e 0a 53 65 65 20 L 3\&.0+\&..See
3da0: 74 68 65 20 5c 66 49 2d 73 65 63 75 72 69 74 79 the \fI-security
3db0: 5f 6c 65 76 65 6c 5c 66 52 20 6f 70 74 69 6f 6e _level\fR option
3dc0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 74 6c 73 31 \&...TP.\fB-tls1
3dd0: 5c 26 2e 32 5c 66 52 20 5c 66 49 62 6f 6f 6c 5c \&.2\fR \fIbool\
3de0: 66 52 0a 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 fR.Enable use of
3df0: 20 54 4c 53 20 76 31 5c 26 2e 32 5c 26 2e 20 54 TLS v1\&.2\&. T
3e00: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 5c 66 he default is \f
3e10: 42 74 72 75 65 5c 66 52 5c 26 2e 0a 2e 54 50 0a Btrue\fR\&...TP.
3e20: 5c 66 42 2d 74 6c 73 31 5c 26 2e 33 5c 66 52 20 \fB-tls1\&.3\fR
3e30: 5c 66 49 62 6f 6f 6c 5c 66 52 0a 45 6e 61 62 6c \fIbool\fR.Enabl
3e40: 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 5c e use of TLS v1\
3e50: 26 2e 33 5c 26 2e 20 54 68 65 20 64 65 66 61 75 &.3\&. The defau
3e60: 6c 74 20 69 73 20 5c 66 42 74 72 75 65 5c 66 52 lt is \fBtrue\fR
3e70: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 76 61 6c 69 \&...TP.\fB-vali
3e80: 64 61 74 65 63 6f 6d 6d 61 6e 64 5c 66 52 20 5c datecommand\fR \
3e90: 66 49 63 61 6c 6c 62 61 63 6b 5c 66 52 0a 53 70 fIcallback\fR.Sp
3ea0: 65 63 69 66 69 65 73 20 74 68 65 20 63 61 6c 6c ecifies the call
3eb0: 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 back command to
3ec0: 69 6e 76 6f 6b 65 20 74 6f 20 76 61 6c 69 64 61 invoke to valida
3ed0: 74 65 20 74 68 65 20 70 65 65 72 20 63 65 72 74 te the peer cert
3ee0: 69 66 69 63 61 74 65 73 0a 61 6e 64 20 6f 74 68 ificates.and oth
3ef0: 65 72 20 63 6f 6e 66 69 67 20 69 6e 66 6f 20 64 er config info d
3f00: 75 72 69 6e 67 20 74 68 65 20 70 72 6f 74 6f 63 uring the protoc
3f10: 6f 6c 20 6e 65 67 6f 74 69 61 74 69 6f 6e 20 70 ol negotiation p
3f20: 68 61 73 65 5c 26 2e 20 54 68 69 73 20 63 61 6e hase\&. This can
3f30: 20 62 65 20 75 73 65 64 0a 62 79 20 54 43 4c 20 be used.by TCL
3f40: 73 63 72 69 70 74 73 20 74 6f 20 70 65 72 66 6f scripts to perfo
3f50: 72 6d 20 74 68 65 69 72 20 6f 77 6e 20 43 65 72 rm their own Cer
3f60: 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 tificate Validat
3f70: 69 6f 6e 20 74 6f 20 73 75 70 70 6c 65 6d 65 6e ion to supplemen
3f80: 74 20 74 68 65 0a 64 65 66 61 75 6c 74 20 76 61 t the.default va
3f90: 6c 69 64 61 74 69 6f 6e 20 70 72 6f 76 69 64 65 lidation provide
3fa0: 64 20 62 79 20 4f 70 65 6e 53 53 4c 5c 26 2e 20 d by OpenSSL\&.
3fb0: 54 68 65 20 73 63 72 69 70 74 20 6d 75 73 74 20 The script must
3fc0: 72 65 74 75 72 6e 20 61 20 62 6f 6f 6c 65 61 6e return a boolean
3fd0: 20 74 72 75 65 0a 74 6f 20 63 6f 6e 74 69 6e 75 true.to continu
3fe0: 65 20 74 68 65 20 6e 65 67 6f 74 69 61 74 69 6f e the negotiatio
3ff0: 6e 5c 26 2e 20 53 65 65 20 5c 66 42 43 61 6c 6c n\&. See \fBCall
4000: 62 61 63 6b 20 4f 70 74 69 6f 6e 73 5c 66 52 20 back Options\fR
4010: 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 5c 26 2e for more info\&.
4020: 0a 2e 52 45 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a ..RE..TP.\fBtls:
4030: 3a 75 6e 69 6d 70 6f 72 74 5c 66 52 20 5c 66 49 :unimport\fR \fI
4040: 63 68 61 6e 6e 65 6c 5c 66 52 0a 43 6f 6d 70 6c channel\fR.Compl
4050: 69 6d 65 6e 74 20 74 6f 20 5c 66 42 74 6c 73 3a iment to \fBtls:
4060: 3a 69 6d 70 6f 72 74 5c 66 52 5c 26 2e 20 55 73 :import\fR\&. Us
4070: 65 64 20 74 6f 20 72 65 6d 6f 76 65 20 74 68 65 ed to remove the
4080: 20 74 6f 70 20 6c 65 76 65 6c 20 73 74 61 63 6b top level stack
4090: 65 64 20 63 68 61 6e 6e 65 6c 0a 66 72 6f 6d 20 ed channel.from
40a0: 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 52 5c 26 2e \fIchannel\fR\&.
40b0: 20 54 68 69 73 20 75 6e 73 74 61 63 6b 73 20 74 This unstacks t
40c0: 68 65 20 65 6e 63 72 79 70 74 69 6f 6e 20 6f 66 he encryption of
40d0: 20 61 20 72 65 67 75 6c 61 72 20 54 43 4c 20 63 a regular TCL c
40e0: 68 61 6e 6e 65 6c 5c 26 2e 20 41 6e 0a 65 72 72 hannel\&. An.err
40f0: 6f 72 20 69 73 20 74 68 72 6f 77 6e 20 69 66 20 or is thrown if
4100: 54 4c 53 20 69 73 20 6e 6f 74 20 74 68 65 20 74 TLS is not the t
4110: 6f 70 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e op stacked chann
4120: 65 6c 20 74 79 70 65 5c 26 2e 0a 2e 54 50 0a 5c el type\&...TP.\
4130: 66 42 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 fBtls::handshake
4140: 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 5c 66 \fR \fIchannel\f
4150: 52 0a 46 6f 72 63 65 73 20 74 68 65 20 54 4c 53 R.Forces the TLS
4160: 20 6e 65 67 6f 74 69 61 74 69 6f 6e 20 68 61 6e negotiation han
4170: 64 73 68 61 6b 65 20 74 6f 20 74 61 6b 65 20 70 dshake to take p
4180: 6c 61 63 65 20 69 6d 6d 65 64 69 61 74 65 6c 79 lace immediately
4190: 2c 20 61 6e 64 20 72 65 74 75 72 6e 73 20 30 0a , and returns 0.
41a0: 69 66 20 68 61 6e 64 73 68 61 6b 65 20 69 73 20 if handshake is
41b0: 73 74 69 6c 6c 20 69 6e 20 70 72 6f 67 72 65 73 still in progres
41c0: 73 20 28 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 29 s (non-blocking)
41d0: 2c 20 6f 72 20 31 20 69 66 20 74 68 65 20 68 61 , or 1 if the ha
41e0: 6e 64 73 68 61 6b 65 20 77 61 73 0a 73 75 63 63 ndshake was.succ
41f0: 65 73 73 66 75 6c 5c 26 2e 20 49 66 20 74 68 65 essful\&. If the
4200: 20 68 61 6e 64 73 68 61 6b 65 20 66 61 69 6c 65 handshake faile
4210: 64 2c 20 61 6e 20 65 72 72 6f 72 20 77 69 6c 6c d, an error will
4220: 20 62 65 20 72 65 74 75 72 6e 65 64 5c 26 2e 0a be returned\&..
4230: 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 73 74 61 74 .TP.\fBtls::stat
4240: 75 73 5c 66 52 20 3f 5c 66 42 2d 6c 6f 63 61 6c us\fR ?\fB-local
4250: 5c 66 52 3f 20 5c 66 49 63 68 61 6e 6e 65 6c 5c \fR? \fIchannel\
4260: 66 52 0a 52 65 74 75 72 6e 73 20 74 68 65 20 63 fR.Returns the c
4270: 75 72 72 65 6e 74 20 73 74 61 74 75 73 20 6f 66 urrent status of
4280: 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 5c an SSL channel\
4290: 26 2e 20 54 68 65 20 72 65 73 75 6c 74 20 69 73 &. The result is
42a0: 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 a list of key-v
42b0: 61 6c 75 65 0a 70 61 69 72 73 20 64 65 73 63 72 alue.pairs descr
42c0: 69 62 69 6e 67 20 74 68 65 20 53 53 4c 2c 20 63 ibing the SSL, c
42d0: 65 72 74 69 66 69 63 61 74 65 2c 20 61 6e 64 20 ertificate, and
42e0: 63 65 72 74 69 66 69 63 61 74 65 20 76 65 72 69 certificate veri
42f0: 66 69 63 61 74 69 6f 6e 20 73 74 61 74 75 73 5c fication status\
4300: 26 2e 20 49 66 0a 74 68 65 20 53 53 4c 20 68 61 &. If.the SSL ha
4310: 6e 64 73 68 61 6b 65 20 68 61 73 20 6e 6f 74 20 ndshake has not
4320: 79 65 74 20 63 6f 6d 70 6c 65 74 65 64 2c 20 61 yet completed, a
4330: 6e 20 65 6d 70 74 79 20 6c 69 73 74 20 69 73 20 n empty list is
4340: 72 65 74 75 72 6e 65 64 5c 26 2e 20 49 66 20 74 returned\&. If t
4350: 68 65 0a 5c 66 42 2d 6c 6f 63 61 6c 5c 66 52 20 he.\fB-local\fR
4360: 6f 70 74 69 6f 6e 20 69 73 20 73 70 65 63 69 66 option is specif
4370: 69 65 64 2c 20 74 68 65 6e 20 74 68 65 20 6c 6f ied, then the lo
4380: 63 61 6c 20 63 65 72 74 69 66 69 63 61 74 65 20 cal certificate
4390: 69 73 20 75 73 65 64 5c 26 2e 20 52 65 74 75 72 is used\&. Retur
43a0: 6e 65 64 0a 76 61 6c 75 65 73 20 69 6e 63 6c 75 ned.values inclu
43b0: 64 65 3a 0a 2e 73 70 0a 53 53 4c 20 53 74 61 74 de:..sp.SSL Stat
43c0: 75 73 0a 2e 52 53 0a 2e 54 50 0a 5c 66 42 61 6c us..RS..TP.\fBal
43d0: 70 6e 5c 66 52 20 5c 66 49 70 72 6f 74 6f 63 6f pn\fR \fIprotoco
43e0: 6c 5c 66 52 0a 54 68 65 20 70 72 6f 74 6f 63 6f l\fR.The protoco
43f0: 6c 20 73 65 6c 65 63 74 65 64 20 61 66 74 65 72 l selected after
4400: 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 Application-Lay
4410: 65 72 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f er Protocol Nego
4420: 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29 5c 26 tiation (ALPN)\&
4430: 2e 0a 2e 54 50 0a 5c 66 42 63 69 70 68 65 72 5c ...TP.\fBcipher\
4440: 66 52 20 5c 66 49 63 69 70 68 65 72 5c 66 52 0a fR \fIcipher\fR.
4450: 54 68 65 20 63 75 72 72 65 6e 74 20 63 69 70 68 The current ciph
4460: 65 72 20 69 6e 20 75 73 65 20 66 6f 72 20 74 68 er in use for th
4470: 65 20 73 65 73 73 69 6f 6e 5c 26 2e 0a 2e 54 50 e session\&...TP
4480: 0a 5c 66 42 70 65 65 72 6e 61 6d 65 5c 66 52 20 .\fBpeername\fR
4490: 5c 66 49 6e 61 6d 65 5c 66 52 0a 54 68 65 20 70 \fIname\fR.The p
44a0: 65 65 72 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65 eername from the
44b0: 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 2e 0a certificate\&..
44c0: 2e 54 50 0a 5c 66 42 70 72 6f 74 6f 63 6f 6c 5c .TP.\fBprotocol\
44d0: 66 52 20 5c 66 49 76 65 72 73 69 6f 6e 5c 66 52 fR \fIversion\fR
44e0: 0a 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 .The protocol ve
44f0: 72 73 69 6f 6e 20 75 73 65 64 20 66 6f 72 20 74 rsion used for t
4500: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a 20 53 he connection: S
4510: 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c SL2, SSL3, TLS1,
4520: 20 54 4c 53 31 5c 26 2e 31 2c 20 54 4c 53 31 5c TLS1\&.1, TLS1\
4530: 26 2e 32 2c 20 54 4c 53 31 5c 26 2e 33 2c 20 6f &.2, TLS1\&.3, o
4540: 72 20 75 6e 6b 6e 6f 77 6e 5c 26 2e 0a 2e 54 50 r unknown\&...TP
4550: 0a 5c 66 42 73 62 69 74 73 5c 66 52 20 5c 66 49 .\fBsbits\fR \fI
4560: 6e 5c 66 52 0a 54 68 65 20 6e 75 6d 62 65 72 20 n\fR.The number
4570: 6f 66 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 of bits used for
4580: 20 74 68 65 20 73 65 73 73 69 6f 6e 20 6b 65 79 the session key
4590: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 69 67 6e 61 \&...TP.\fBsigna
45a0: 74 75 72 65 48 61 73 68 41 6c 67 6f 72 69 74 68 tureHashAlgorith
45b0: 6d 5c 66 52 20 5c 66 49 61 6c 67 6f 72 69 74 68 m\fR \fIalgorith
45c0: 6d 5c 66 52 0a 54 68 65 20 73 69 67 6e 61 74 75 m\fR.The signatu
45d0: 72 65 20 68 61 73 68 20 61 6c 67 6f 72 69 74 68 re hash algorith
45e0: 6d 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 69 67 6e m\&...TP.\fBsign
45f0: 61 74 75 72 65 54 79 70 65 5c 66 52 20 5c 66 49 atureType\fR \fI
4600: 74 79 70 65 5c 66 52 0a 54 68 65 20 73 69 67 6e type\fR.The sign
4610: 61 74 75 72 65 20 74 79 70 65 20 76 61 6c 75 65 ature type value
4620: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 76 65 72 69 66 \&...TP.\fBverif
4630: 79 44 65 70 74 68 5c 66 52 20 5c 66 49 6e 5c 66 yDepth\fR \fIn\f
4640: 52 0a 4d 61 78 69 6d 75 6d 20 64 65 70 74 68 20 R.Maximum depth
4650: 66 6f 72 20 74 68 65 20 63 65 72 74 69 66 69 63 for the certific
4660: 61 74 65 20 63 68 61 69 6e 20 76 65 72 69 66 69 ate chain verifi
4670: 63 61 74 69 6f 6e 5c 26 2e 20 44 65 66 61 75 6c cation\&. Defaul
4680: 74 20 69 73 20 2d 31 2c 20 74 6f 20 63 68 65 63 t is -1, to chec
4690: 6b 20 61 6c 6c 5c 26 2e 0a 2e 54 50 0a 5c 66 42 k all\&...TP.\fB
46a0: 76 65 72 69 66 79 4d 6f 64 65 5c 66 52 20 5c 66 verifyMode\fR \f
46b0: 49 6c 69 73 74 5c 66 52 0a 4c 69 73 74 20 6f 66 Ilist\fR.List of
46c0: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 65 72 certificate ver
46d0: 69 66 69 63 61 74 69 6f 6e 20 6d 6f 64 65 73 5c ification modes\
46e0: 26 2e 0a 2e 54 50 0a 5c 66 42 76 65 72 69 66 79 &...TP.\fBverify
46f0: 52 65 73 75 6c 74 5c 66 52 20 5c 66 49 72 65 73 Result\fR \fIres
4700: 75 6c 74 5c 66 52 0a 43 65 72 74 69 66 69 63 61 ult\fR.Certifica
4710: 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 te verification
4720: 72 65 73 75 6c 74 5c 26 2e 0a 2e 54 50 0a 5c 66 result\&...TP.\f
4730: 42 63 61 5f 6e 61 6d 65 73 5c 66 52 20 5c 66 49 Bca_names\fR \fI
4740: 6c 69 73 74 5c 66 52 0a 4c 69 73 74 20 6f 66 20 list\fR.List of
4750: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 the Certificate
4760: 41 75 74 68 6f 72 69 74 69 65 73 20 75 73 65 64 Authorities used
4770: 20 74 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 to create the c
4780: 65 72 74 69 66 69 63 61 74 65 5c 26 2e 0a 2e 52 ertificate\&...R
4790: 45 0a 2e 49 50 0a 43 65 72 74 69 66 69 63 61 74 E..IP.Certificat
47a0: 65 20 53 74 61 74 75 73 0a 2e 52 53 0a 2e 54 50 e Status..RS..TP
47b0: 0a 5c 66 42 61 6c 6c 5c 66 52 20 5c 66 49 73 74 .\fBall\fR \fIst
47c0: 72 69 6e 67 5c 66 52 0a 44 75 6d 70 20 6f 66 20 ring\fR.Dump of
47d0: 61 6c 6c 20 63 65 72 74 69 66 69 63 61 74 65 20 all certificate
47e0: 69 6e 66 6f 5c 26 2e 0a 2e 54 50 0a 5c 66 42 76 info\&...TP.\fBv
47f0: 65 72 73 69 6f 6e 5c 66 52 20 5c 66 49 76 61 6c ersion\fR \fIval
4800: 75 65 5c 66 52 0a 54 68 65 20 63 65 72 74 69 66 ue\fR.The certif
4810: 69 63 61 74 65 20 76 65 72 73 69 6f 6e 5c 26 2e icate version\&.
4820: 0a 2e 54 50 0a 5c 66 42 73 65 72 69 61 6c 4e 75 ..TP.\fBserialNu
4830: 6d 62 65 72 5c 66 52 20 5c 66 49 73 74 72 69 6e mber\fR \fIstrin
4840: 67 5c 66 52 0a 54 68 65 20 73 65 72 69 61 6c 20 g\fR.The serial
4850: 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 63 65 number of the ce
4860: 72 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68 rtificate as a h
4870: 65 78 20 73 74 72 69 6e 67 5c 26 2e 0a 2e 54 50 ex string\&...TP
4880: 0a 5c 66 42 73 69 67 6e 61 74 75 72 65 5c 66 52 .\fBsignature\fR
4890: 20 5c 66 49 61 6c 67 6f 72 69 74 68 6d 5c 66 52 \fIalgorithm\fR
48a0: 0a 43 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68 .Cipher algorith
48b0: 6d 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 69 m used for certi
48c0: 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 ficate signature
48d0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 69 73 73 75 65 \&...TP.\fBissue
48e0: 72 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 r\fR \fIstring\f
48f0: 52 0a 54 68 65 20 64 69 73 74 69 6e 67 75 69 73 R.The distinguis
4900: 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 hed name (DN) of
4910: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
4920: 20 69 73 73 75 65 72 5c 26 2e 0a 2e 54 50 0a 5c issuer\&...TP.\
4930: 66 42 6e 6f 74 42 65 66 6f 72 65 5c 66 52 20 5c fBnotBefore\fR \
4940: 66 49 64 61 74 65 5c 66 52 0a 54 68 65 20 62 65 fIdate\fR.The be
4950: 67 69 6e 6e 69 6e 67 20 64 61 74 65 20 6f 66 20 ginning date of
4960: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
4970: 76 61 6c 69 64 69 74 79 5c 26 2e 0a 2e 54 50 0a validity\&...TP.
4980: 5c 66 42 6e 6f 74 41 66 74 65 72 5c 66 52 20 5c \fBnotAfter\fR \
4990: 66 49 64 61 74 65 5c 66 52 0a 54 68 65 20 65 78 fIdate\fR.The ex
49a0: 70 69 72 61 74 69 6f 6e 20 64 61 74 65 20 6f 66 piration date of
49b0: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
49c0: 20 76 61 6c 69 64 69 74 79 5c 26 2e 0a 2e 54 50 validity\&...TP
49d0: 0a 5c 66 42 73 75 62 6a 65 63 74 5c 66 52 20 5c .\fBsubject\fR \
49e0: 66 49 73 74 72 69 6e 67 5c 66 52 0a 54 68 65 20 fIstring\fR.The
49f0: 64 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61 distinguished na
4a00: 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63 me (DN) of the c
4a10: 65 72 74 69 66 69 63 61 74 65 20 73 75 62 6a 65 ertificate subje
4a20: 63 74 5c 26 2e 20 46 69 65 6c 64 73 20 69 6e 63 ct\&. Fields inc
4a30: 6c 75 64 65 3a 20 43 6f 6d 6d 6f 6e 0a 4e 61 6d lude: Common.Nam
4a40: 65 20 28 43 4e 29 2c 20 4f 72 67 61 6e 69 7a 61 e (CN), Organiza
4a50: 74 69 6f 6e 20 28 4f 29 2c 20 4c 6f 63 61 6c 69 tion (O), Locali
4a60: 74 79 20 6f 72 20 43 69 74 79 20 28 4c 29 2c 20 ty or City (L),
4a70: 53 74 61 74 65 20 6f 72 20 50 72 6f 76 69 6e 63 State or Provinc
4a80: 65 20 28 53 29 2c 20 61 6e 64 0a 43 6f 75 6e 74 e (S), and.Count
4a90: 72 79 20 4e 61 6d 65 20 28 43 29 5c 26 2e 0a 2e ry Name (C)\&...
4aa0: 54 50 0a 5c 66 42 69 73 73 75 65 72 55 6e 69 71 TP.\fBissuerUniq
4ab0: 75 65 49 44 5c 66 52 20 5c 66 49 73 74 72 69 6e ueID\fR \fIstrin
4ac0: 67 5c 66 52 0a 54 68 65 20 69 73 73 75 65 72 20 g\fR.The issuer
4ad0: 75 6e 69 71 75 65 20 69 64 5c 26 2e 0a 2e 54 50 unique id\&...TP
4ae0: 0a 5c 66 42 73 75 62 6a 65 63 74 55 6e 69 71 75 .\fBsubjectUniqu
4af0: 65 49 44 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 eID\fR \fIstring
4b00: 5c 66 52 0a 54 68 65 20 73 75 62 6a 65 63 74 20 \fR.The subject
4b10: 75 6e 69 71 75 65 20 69 64 5c 26 2e 0a 2e 54 50 unique id\&...TP
4b20: 0a 5c 66 42 6e 75 6d 5f 65 78 74 65 6e 73 69 6f .\fBnum_extensio
4b30: 6e 73 5c 66 52 20 5c 66 49 6e 5c 66 52 0a 4e 75 ns\fR \fIn\fR.Nu
4b40: 6d 62 65 72 20 6f 66 20 63 65 72 74 69 66 69 63 mber of certific
4b50: 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 73 5c 26 ate extensions\&
4b60: 2e 0a 2e 54 50 0a 5c 66 42 65 78 74 65 6e 73 69 ...TP.\fBextensi
4b70: 6f 6e 73 5c 66 52 20 5c 66 49 6c 69 73 74 5c 66 ons\fR \fIlist\f
4b80: 52 0a 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 R.List of certif
4b90: 69 63 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 20 icate extension
4ba0: 6e 61 6d 65 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 names\&...TP.\fB
4bb0: 61 75 74 68 6f 72 69 74 79 4b 65 79 49 64 65 6e authorityKeyIden
4bc0: 74 69 66 69 65 72 5c 66 52 20 5c 66 49 73 74 72 tifier\fR \fIstr
4bd0: 69 6e 67 5c 66 52 0a 41 75 74 68 6f 72 69 74 79 ing\fR.Authority
4be0: 20 4b 65 79 20 49 64 65 6e 74 69 66 69 65 72 20 Key Identifier
4bf0: 28 41 4b 49 29 20 6f 66 20 74 68 65 20 49 73 73 (AKI) of the Iss
4c00: 75 69 6e 67 20 43 41 20 63 65 72 74 69 66 69 63 uing CA certific
4c10: 61 74 65 20 74 68 61 74 20 73 69 67 6e 65 64 20 ate that signed
4c20: 74 68 65 0a 53 53 4c 20 63 65 72 74 69 66 69 63 the.SSL certific
4c30: 61 74 65 20 61 73 20 61 20 68 65 78 20 73 74 72 ate as a hex str
4c40: 69 6e 67 5c 26 2e 20 54 68 69 73 20 76 61 6c 75 ing\&. This valu
4c50: 65 20 6d 61 74 63 68 65 73 20 74 68 65 20 53 4b e matches the SK
4c60: 49 20 76 61 6c 75 65 20 6f 66 20 74 68 65 0a 49 I value of the.I
4c70: 6e 74 65 72 6d 65 64 69 61 74 65 20 43 41 20 63 ntermediate CA c
4c80: 65 72 74 69 66 69 63 61 74 65 5c 26 2e 0a 2e 54 ertificate\&...T
4c90: 50 0a 5c 66 42 73 75 62 6a 65 63 74 4b 65 79 49 P.\fBsubjectKeyI
4ca0: 64 65 6e 74 69 66 69 65 72 5c 66 52 20 5c 66 49 dentifier\fR \fI
4cb0: 73 74 72 69 6e 67 5c 66 52 0a 53 75 62 6a 65 63 string\fR.Subjec
4cc0: 74 20 4b 65 79 20 49 64 65 6e 74 69 66 69 65 72 t Key Identifier
4cd0: 20 28 53 4b 49 29 20 68 61 73 68 20 6f 66 20 74 (SKI) hash of t
4ce0: 68 65 20 70 75 62 6c 69 63 20 6b 65 79 20 69 6e he public key in
4cf0: 73 69 64 65 20 74 68 65 20 63 65 72 74 69 66 69 side the certifi
4d00: 63 61 74 65 20 61 73 20 61 0a 68 65 78 20 73 74 cate as a.hex st
4d10: 72 69 6e 67 5c 26 2e 20 55 73 65 64 20 74 6f 20 ring\&. Used to
4d20: 69 64 65 6e 74 69 66 79 20 63 65 72 74 69 66 69 identify certifi
4d30: 63 61 74 65 73 20 74 68 61 74 20 63 6f 6e 74 61 cates that conta
4d40: 69 6e 20 61 20 70 61 72 74 69 63 75 6c 61 72 20 in a particular
4d50: 70 75 62 6c 69 63 20 6b 65 79 5c 26 2e 0a 2e 54 public key\&...T
4d60: 50 0a 5c 66 42 73 75 62 6a 65 63 74 41 6c 74 4e P.\fBsubjectAltN
4d70: 61 6d 65 5c 66 52 20 5c 66 49 6c 69 73 74 5c 66 ame\fR \fIlist\f
4d80: 52 0a 4c 69 73 74 20 6f 66 20 61 6c 6c 20 6f 66 R.List of all of
4d90: 20 74 68 65 20 53 75 62 6a 65 63 74 20 41 6c 74 the Subject Alt
4da0: 65 72 6e 61 74 69 76 65 20 4e 61 6d 65 73 20 28 ernative Names (
4db0: 53 41 4e 29 20 69 6e 63 6c 75 64 69 6e 67 20 64 SAN) including d
4dc0: 6f 6d 61 69 6e 20 6e 61 6d 65 73 2c 20 73 75 62 omain names, sub
4dd0: 0a 64 6f 6d 61 69 6e 73 2c 20 61 6e 64 20 49 50 .domains, and IP
4de0: 20 61 64 64 72 65 73 73 65 73 20 74 68 61 74 20 addresses that
4df0: 61 72 65 20 73 65 63 75 72 65 64 20 62 79 20 74 are secured by t
4e00: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 5c 26 he certificate\&
4e10: 2e 0a 2e 54 50 0a 5c 66 42 6f 63 73 70 5c 66 52 ...TP.\fBocsp\fR
4e20: 20 5c 66 49 6c 69 73 74 5c 66 52 0a 4c 69 73 74 \fIlist\fR.List
4e30: 20 6f 66 20 61 6c 6c 20 4f 6e 6c 69 6e 65 20 43 of all Online C
4e40: 65 72 74 69 66 69 63 61 74 65 20 53 74 61 74 75 ertificate Statu
4e50: 73 20 50 72 6f 74 6f 63 6f 6c 20 28 4f 43 53 50 s Protocol (OCSP
4e60: 29 20 55 52 4c 73 20 74 68 61 74 20 63 61 6e 20 ) URLs that can
4e70: 62 65 20 75 73 65 64 20 74 6f 0a 63 68 65 63 6b be used to.check
4e80: 20 74 68 65 20 76 61 6c 69 64 69 74 79 20 6f 66 the validity of
4e90: 20 74 68 69 73 20 63 65 72 74 69 66 69 63 61 74 this certificat
4ea0: 65 5c 26 2e 0a 2e 54 50 0a 5c 66 42 63 65 72 74 e\&...TP.\fBcert
4eb0: 69 66 69 63 61 74 65 5c 66 52 20 5c 66 49 63 65 ificate\fR \fIce
4ec0: 72 74 5c 66 52 0a 54 68 65 20 50 45 4d 20 65 6e rt\fR.The PEM en
4ed0: 63 6f 64 65 64 20 63 65 72 74 69 66 69 63 61 74 coded certificat
4ee0: 65 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 69 67 6e e\&...TP.\fBsign
4ef0: 61 74 75 72 65 41 6c 67 6f 72 69 74 68 6d 5c 66 atureAlgorithm\f
4f00: 52 20 5c 66 49 61 6c 67 6f 72 69 74 68 6d 5c 66 R \fIalgorithm\f
4f10: 52 0a 43 69 70 68 65 72 20 61 6c 67 6f 72 69 74 R.Cipher algorit
4f20: 68 6d 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 hm used for the
4f30: 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e certificate sign
4f40: 61 74 75 72 65 5c 26 2e 0a 2e 54 50 0a 5c 66 42 ature\&...TP.\fB
4f50: 73 69 67 6e 61 74 75 72 65 56 61 6c 75 65 5c 66 signatureValue\f
4f60: 52 20 5c 66 49 73 74 72 69 6e 67 5c 66 52 0a 43 R \fIstring\fR.C
4f70: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 ertificate signa
4f80: 74 75 72 65 20 61 73 20 61 20 68 65 78 20 73 74 ture as a hex st
4f90: 72 69 6e 67 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 ring\&...TP.\fBs
4fa0: 69 67 6e 61 74 75 72 65 44 69 67 65 73 74 5c 66 ignatureDigest\f
4fb0: 52 20 5c 66 49 76 65 72 73 69 6f 6e 5c 66 52 0a R \fIversion\fR.
4fc0: 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e Certificate sign
4fd0: 69 6e 67 20 64 69 67 65 73 74 20 61 73 20 61 20 ing digest as a
4fe0: 68 65 78 20 73 74 72 69 6e 67 5c 26 2e 0a 2e 54 hex string\&...T
4ff0: 50 0a 5c 66 42 70 75 62 6c 69 63 4b 65 79 41 6c P.\fBpublicKeyAl
5000: 67 6f 72 69 74 68 6d 5c 66 52 20 5c 66 49 61 6c gorithm\fR \fIal
5010: 67 6f 72 69 74 68 6d 5c 66 52 0a 43 65 72 74 69 gorithm\fR.Certi
5020: 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 ficate signature
5030: 20 70 75 62 6c 69 63 20 6b 65 79 20 61 6c 67 6f public key algo
5040: 72 69 74 68 6d 5c 26 2e 0a 2e 54 50 0a 5c 66 42 rithm\&...TP.\fB
5050: 70 75 62 6c 69 63 4b 65 79 5c 66 52 20 5c 66 49 publicKey\fR \fI
5060: 73 74 72 69 6e 67 5c 66 52 0a 43 65 72 74 69 66 string\fR.Certif
5070: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 icate signature
5080: 70 75 62 6c 69 63 20 6b 65 79 20 61 73 20 61 20 public key as a
5090: 68 65 78 20 73 74 72 69 6e 67 5c 26 2e 0a 2e 54 hex string\&...T
50a0: 50 0a 5c 66 42 62 69 74 73 5c 66 52 20 5c 66 49 P.\fBbits\fR \fI
50b0: 6e 5c 66 52 0a 4e 75 6d 62 65 72 20 6f 66 20 62 n\fR.Number of b
50c0: 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 65 72 its used for cer
50d0: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 tificate signatu
50e0: 72 65 20 6b 65 79 5c 26 2e 0a 2e 54 50 0a 5c 66 re key\&...TP.\f
50f0: 42 73 65 6c 66 5f 73 69 67 6e 65 64 5c 66 52 20 Bself_signed\fR
5100: 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a 57 68 \fIboolean\fR.Wh
5110: 65 74 68 65 72 20 74 68 65 20 63 65 72 74 69 66 ether the certif
5120: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 icate signature
5130: 69 73 20 73 65 6c 66 20 73 69 67 6e 65 64 5c 26 is self signed\&
5140: 2e 0a 2e 54 50 0a 5c 66 42 73 68 61 31 5f 68 61 ...TP.\fBsha1_ha
5150: 73 68 5c 66 52 20 5c 66 49 68 61 73 68 5c 66 52 sh\fR \fIhash\fR
5160: 0a 54 68 65 20 53 48 41 31 20 68 61 73 68 20 6f .The SHA1 hash o
5170: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 f the certificat
5180: 65 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e e as a hex strin
5190: 67 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 68 61 32 g\&...TP.\fBsha2
51a0: 35 36 5f 68 61 73 68 5c 66 52 20 5c 66 49 68 61 56_hash\fR \fIha
51b0: 73 68 5c 66 52 0a 54 68 65 20 53 48 41 32 35 36 sh\fR.The SHA256
51c0: 20 68 61 73 68 20 6f 66 20 74 68 65 20 63 65 72 hash of the cer
51d0: 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68 65 tificate as a he
51e0: 78 20 73 74 72 69 6e 67 5c 26 2e 0a 2e 52 45 0a x string\&...RE.
51f0: 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 63 6f 6e 6e .TP.\fBtls::conn
5200: 65 63 74 69 6f 6e 5c 66 52 20 5c 66 49 63 68 61 ection\fR \fIcha
5210: 6e 6e 65 6c 5c 66 52 0a 52 65 74 75 72 6e 73 20 nnel\fR.Returns
5220: 74 68 65 20 63 75 72 72 65 6e 74 20 63 6f 6e 6e the current conn
5230: 65 63 74 69 6f 6e 20 73 74 61 74 75 73 20 6f 66 ection status of
5240: 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 5c an SSL channel\
5250: 26 2e 20 54 68 65 20 72 65 73 75 6c 74 20 69 73 &. The result is
5260: 20 61 20 6c 69 73 74 0a 6f 66 20 6b 65 79 2d 76 a list.of key-v
5270: 61 6c 75 65 20 70 61 69 72 73 20 64 65 73 63 72 alue pairs descr
5280: 69 62 69 6e 67 20 74 68 65 20 63 6f 6e 6e 65 63 ibing the connec
5290: 74 69 6f 6e 5c 26 2e 20 52 65 74 75 72 6e 65 64 tion\&. Returned
52a0: 20 76 61 6c 75 65 73 20 69 6e 63 6c 75 64 65 3a values include:
52b0: 0a 2e 73 70 0a 53 53 4c 20 53 74 61 74 75 73 0a ..sp.SSL Status.
52c0: 2e 52 53 0a 2e 54 50 0a 5c 66 42 73 74 61 74 65 .RS..TP.\fBstate
52d0: 5c 66 52 20 5c 66 49 73 74 61 74 65 5c 66 52 0a \fR \fIstate\fR.
52e0: 53 74 61 74 65 20 6f 66 20 74 68 65 20 63 6f 6e State of the con
52f0: 6e 65 63 74 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c nection\&...TP.\
5300: 66 42 73 65 72 76 65 72 6e 61 6d 65 5c 66 52 20 fBservername\fR
5310: 5c 66 49 6e 61 6d 65 5c 66 52 0a 54 68 65 20 6e \fIname\fR.The n
5320: 61 6d 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 ame of the conne
5330: 63 74 65 64 20 74 6f 20 73 65 72 76 65 72 5c 26 cted to server\&
5340: 2e 0a 2e 54 50 0a 5c 66 42 70 72 6f 74 6f 63 6f ...TP.\fBprotoco
5350: 6c 5c 66 52 20 5c 66 49 76 65 72 73 69 6f 6e 5c l\fR \fIversion\
5360: 66 52 0a 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 fR.The protocol
5370: 76 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f 72 version used for
5380: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a the connection:
5390: 20 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 SSL2, SSL3, TLS
53a0: 31 2c 20 54 4c 53 31 5c 26 2e 31 2c 20 54 4c 53 1, TLS1\&.1, TLS
53b0: 31 5c 26 2e 32 2c 20 54 4c 53 31 5c 26 2e 33 2c 1\&.2, TLS1\&.3,
53c0: 20 6f 72 20 75 6e 6b 6e 6f 77 6e 5c 26 2e 0a 2e or unknown\&...
53d0: 54 50 0a 5c 66 42 72 65 6e 65 67 6f 74 69 61 74 TP.\fBrenegotiat
53e0: 69 6f 6e 5f 61 6c 6c 6f 77 65 64 5c 66 52 20 5c ion_allowed\fR \
53f0: 66 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a 57 68 65 fIboolean\fR.Whe
5400: 74 68 65 72 20 70 72 6f 74 6f 63 6f 6c 20 72 65 ther protocol re
5410: 6e 65 67 6f 74 69 61 74 69 6f 6e 20 69 73 20 73 negotiation is s
5420: 75 70 70 6f 72 74 65 64 20 6f 72 20 6e 6f 74 5c upported or not\
5430: 26 2e 0a 2e 54 50 0a 5c 66 42 73 65 63 75 72 69 &...TP.\fBsecuri
5440: 74 79 5f 6c 65 76 65 6c 5c 66 52 20 5c 66 49 6c ty_level\fR \fIl
5450: 65 76 65 6c 5c 66 52 0a 54 68 65 20 73 65 63 75 evel\fR.The secu
5460: 72 69 74 79 20 6c 65 76 65 6c 20 75 73 65 64 20 rity level used
5470: 66 6f 72 20 73 65 6c 65 63 74 69 6f 6e 20 6f 66 for selection of
5480: 20 63 69 70 68 65 72 73 2c 20 6b 65 79 20 73 69 ciphers, key si
5490: 7a 65 2c 20 65 74 63 5c 26 2e 0a 2e 54 50 0a 5c ze, etc\&...TP.\
54a0: 66 42 73 65 73 73 69 6f 6e 5f 72 65 75 73 65 64 fBsession_reused
54b0: 5c 66 52 20 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 \fR \fIboolean\f
54c0: 52 0a 57 68 65 74 68 65 72 20 74 68 65 20 73 65 R.Whether the se
54d0: 73 73 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 72 ssion has been r
54e0: 65 75 73 65 64 20 6f 72 20 6e 6f 74 5c 26 2e 0a eused or not\&..
54f0: 2e 54 50 0a 5c 66 42 69 73 5f 73 65 72 76 65 72 .TP.\fBis_server
5500: 5c 66 52 20 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 \fR \fIboolean\f
5510: 52 0a 57 68 65 74 68 65 72 20 74 68 65 20 63 6f R.Whether the co
5520: 6e 6e 65 63 74 69 6f 6e 20 69 73 20 63 6f 6e 66 nnection is conf
5530: 69 67 75 72 65 64 20 61 73 20 61 20 73 65 72 76 igured as a serv
5540: 65 72 20 28 31 29 20 6f 72 20 63 6c 69 65 6e 74 er (1) or client
5550: 20 28 30 29 5c 26 2e 0a 2e 54 50 0a 5c 66 42 63 (0)\&...TP.\fBc
5560: 6f 6d 70 72 65 73 73 69 6f 6e 5c 66 52 20 5c 66 ompression\fR \f
5570: 49 6d 6f 64 65 5c 66 52 0a 43 6f 6d 70 72 65 73 Imode\fR.Compres
5580: 73 69 6f 6e 20 6d 65 74 68 6f 64 5c 26 2e 0a 2e sion method\&...
5590: 54 50 0a 5c 66 42 65 78 70 61 6e 73 69 6f 6e 5c TP.\fBexpansion\
55a0: 66 52 20 5c 66 49 6d 6f 64 65 5c 66 52 0a 45 78 fR \fImode\fR.Ex
55b0: 70 61 6e 73 69 6f 6e 20 6d 65 74 68 6f 64 5c 26 pansion method\&
55c0: 2e 0a 2e 54 50 0a 5c 66 42 63 61 4c 69 73 74 5c ...TP.\fBcaList\
55d0: 66 52 20 5c 66 49 6c 69 73 74 5c 66 52 0a 4c 69 fR \fIlist\fR.Li
55e0: 73 74 20 6f 66 20 43 65 72 74 69 66 69 63 61 74 st of Certificat
55f0: 65 20 41 75 74 68 6f 72 69 74 69 65 73 20 28 43 e Authorities (C
5600: 41 29 20 66 6f 72 20 58 5c 26 2e 35 30 39 20 63 A) for X\&.509 c
5610: 65 72 74 69 66 69 63 61 74 65 5c 26 2e 0a 2e 52 ertificate\&...R
5620: 45 0a 2e 49 50 0a 43 69 70 68 65 72 20 49 6e 66 E..IP.Cipher Inf
5630: 6f 0a 2e 52 53 0a 2e 54 50 0a 5c 66 42 63 69 70 o..RS..TP.\fBcip
5640: 68 65 72 5c 66 52 20 5c 66 49 63 69 70 68 65 72 her\fR \fIcipher
5650: 5c 66 52 0a 54 68 65 20 63 75 72 72 65 6e 74 20 \fR.The current
5660: 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 66 6f cipher in use fo
5670: 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e r the connection
5680: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 74 61 6e 64 \&...TP.\fBstand
5690: 61 72 64 5f 6e 61 6d 65 5c 66 52 20 5c 66 49 6e ard_name\fR \fIn
56a0: 61 6d 65 5c 66 52 0a 54 68 65 20 73 74 61 6e 64 ame\fR.The stand
56b0: 61 72 64 20 52 46 43 20 6e 61 6d 65 20 6f 66 20 ard RFC name of
56c0: 63 69 70 68 65 72 5c 26 2e 0a 2e 54 50 0a 5c 66 cipher\&...TP.\f
56d0: 42 61 6c 67 6f 72 69 74 68 6d 5f 62 69 74 73 5c Balgorithm_bits\
56e0: 66 52 20 5c 66 49 6e 5c 66 52 0a 54 68 65 20 6e fR \fIn\fR.The n
56f0: 75 6d 62 65 72 20 6f 66 20 70 72 6f 63 65 73 73 umber of process
5700: 65 64 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 ed bits used for
5710: 20 63 69 70 68 65 72 5c 26 2e 0a 2e 54 50 0a 5c cipher\&...TP.\
5720: 66 42 73 65 63 72 65 74 5f 62 69 74 73 5c 66 52 fBsecret_bits\fR
5730: 20 5c 66 49 6e 5c 66 52 0a 54 68 65 20 6e 75 6d \fIn\fR.The num
5740: 62 65 72 20 6f 66 20 73 65 63 72 65 74 20 62 69 ber of secret bi
5750: 74 73 20 75 73 65 64 20 66 6f 72 20 63 69 70 68 ts used for ciph
5760: 65 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 6d 69 6e er\&...TP.\fBmin
5770: 5f 76 65 72 73 69 6f 6e 5c 66 52 20 5c 66 49 76 _version\fR \fIv
5780: 65 72 73 69 6f 6e 5c 66 52 0a 54 68 65 20 6d 69 ersion\fR.The mi
5790: 6e 69 6d 75 6d 20 70 72 6f 74 6f 63 6f 6c 20 76 nimum protocol v
57a0: 65 72 73 69 6f 6e 20 66 6f 72 20 63 69 70 68 65 ersion for ciphe
57b0: 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 63 69 70 68 r\&...TP.\fBciph
57c0: 65 72 5f 69 73 5f 61 65 61 64 5c 66 52 20 5c 66 er_is_aead\fR \f
57d0: 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a 57 68 65 74 Iboolean\fR.Whet
57e0: 68 65 72 20 74 68 65 20 63 69 70 68 65 72 20 69 her the cipher i
57f0: 73 20 41 75 74 68 65 6e 74 69 63 61 74 65 64 20 s Authenticated
5800: 45 6e 63 72 79 70 74 69 6f 6e 20 77 69 74 68 20 Encryption with
5810: 41 73 73 6f 63 69 61 74 65 64 20 44 61 74 61 20 Associated Data
5820: 28 41 45 41 44 29 5c 26 2e 0a 2e 54 50 0a 5c 66 (AEAD)\&...TP.\f
5830: 42 63 69 70 68 65 72 5f 69 64 5c 66 52 20 5c 66 Bcipher_id\fR \f
5840: 49 69 64 5c 66 52 0a 54 68 65 20 4f 70 65 6e 53 Iid\fR.The OpenS
5850: 53 4c 20 63 69 70 68 65 72 20 69 64 5c 26 2e 0a SL cipher id\&..
5860: 2e 54 50 0a 5c 66 42 64 65 73 63 72 69 70 74 69 .TP.\fBdescripti
5870: 6f 6e 5c 66 52 20 5c 66 49 73 74 72 69 6e 67 5c on\fR \fIstring\
5880: 66 52 0a 41 20 74 65 78 74 20 64 65 73 63 72 69 fR.A text descri
5890: 70 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 69 70 ption of the cip
58a0: 68 65 72 5c 26 2e 0a 2e 54 50 0a 5c 66 42 68 61 her\&...TP.\fBha
58b0: 6e 64 73 68 61 6b 65 5f 64 69 67 65 73 74 5c 66 ndshake_digest\f
58c0: 52 20 5c 66 49 62 6f 6f 6c 65 61 6e 5c 66 52 0a R \fIboolean\fR.
58d0: 44 69 67 65 73 74 20 75 73 65 64 20 64 75 72 69 Digest used duri
58e0: 6e 67 20 68 61 6e 64 73 68 61 6b 65 5c 26 2e 0a ng handshake\&..
58f0: 2e 52 45 0a 2e 49 50 0a 53 65 73 73 69 6f 6e 20 .RE..IP.Session
5900: 49 6e 66 6f 0a 2e 52 53 0a 2e 54 50 0a 5c 66 42 Info..RS..TP.\fB
5910: 61 6c 70 6e 5c 66 52 20 5c 66 49 70 72 6f 74 6f alpn\fR \fIproto
5920: 63 6f 6c 5c 66 52 0a 54 68 65 20 70 72 6f 74 6f col\fR.The proto
5930: 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 66 74 col selected aft
5940: 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c er Application-L
5950: 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 ayer Protocol Ne
5960: 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29 gotiation (ALPN)
5970: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 72 65 73 75 6d \&...TP.\fBresum
5980: 61 62 6c 65 5c 66 52 20 5c 66 49 62 6f 6f 6c 65 able\fR \fIboole
5990: 61 6e 5c 66 52 0a 57 68 65 74 68 65 72 20 74 68 an\fR.Whether th
59a0: 65 20 73 65 73 73 69 6f 6e 20 63 61 6e 20 62 65 e session can be
59b0: 20 72 65 73 75 6d 65 64 20 6f 72 20 6e 6f 74 5c resumed or not\
59c0: 26 2e 0a 2e 54 50 0a 5c 66 42 73 74 61 72 74 5f &...TP.\fBstart_
59d0: 74 69 6d 65 5c 66 52 20 5c 66 49 73 65 63 6f 6e time\fR \fIsecon
59e0: 64 73 5c 66 52 0a 54 69 6d 65 20 73 69 6e 63 65 ds\fR.Time since
59f0: 20 73 65 73 73 69 6f 6e 20 73 74 61 72 74 65 64 session started
5a00: 20 69 6e 20 73 65 63 6f 6e 64 73 20 73 69 6e 63 in seconds sinc
5a10: 65 20 65 70 6f 63 68 5c 26 2e 0a 2e 54 50 0a 5c e epoch\&...TP.\
5a20: 66 42 74 69 6d 65 6f 75 74 5c 66 52 20 5c 66 49 fBtimeout\fR \fI
5a30: 73 65 63 6f 6e 64 73 5c 66 52 0a 4d 61 78 20 64 seconds\fR.Max d
5a40: 75 72 61 74 69 6f 6e 20 6f 66 20 73 65 73 73 69 uration of sessi
5a50: 6f 6e 20 69 6e 20 73 65 63 6f 6e 64 73 20 62 65 on in seconds be
5a60: 66 6f 72 65 20 74 69 6d 65 2d 6f 75 74 5c 26 2e fore time-out\&.
5a70: 0a 2e 54 50 0a 5c 66 42 6c 69 66 65 74 69 6d 65 ..TP.\fBlifetime
5a80: 5c 66 52 20 5c 66 49 73 65 63 6f 6e 64 73 5c 66 \fR \fIseconds\f
5a90: 52 0a 53 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 R.Session ticket
5aa0: 20 6c 69 66 65 74 69 6d 65 20 68 69 6e 74 20 69 lifetime hint i
5ab0: 6e 20 73 65 63 6f 6e 64 73 5c 26 2e 0a 2e 54 50 n seconds\&...TP
5ac0: 0a 5c 66 42 73 65 73 73 69 6f 6e 5f 69 64 5c 66 .\fBsession_id\f
5ad0: 52 20 5c 66 49 62 69 6e 61 72 79 5f 73 74 72 69 R \fIbinary_stri
5ae0: 6e 67 5c 66 52 0a 55 6e 69 71 75 65 20 73 65 73 ng\fR.Unique ses
5af0: 73 69 6f 6e 20 69 64 20 66 6f 72 20 75 73 65 20 sion id for use
5b00: 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65 20 in resuming the
5b10: 73 65 73 73 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c session\&...TP.\
5b20: 66 42 73 65 73 73 69 6f 6e 5f 74 69 63 6b 65 74 fBsession_ticket
5b30: 5c 66 52 20 5c 66 49 62 69 6e 61 72 79 5f 73 74 \fR \fIbinary_st
5b40: 72 69 6e 67 5c 66 52 0a 55 6e 69 71 75 65 20 73 ring\fR.Unique s
5b50: 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 66 6f ession ticket fo
5b60: 72 20 75 73 65 20 69 6e 20 72 65 73 75 6d 69 6e r use in resumin
5b70: 67 20 74 68 65 20 73 65 73 73 69 6f 6e 5c 26 2e g the session\&.
5b80: 0a 2e 54 50 0a 5c 66 42 74 69 63 6b 65 74 5f 61 ..TP.\fBticket_a
5b90: 70 70 5f 64 61 74 61 5c 66 52 20 5c 66 49 62 69 pp_data\fR \fIbi
5ba0: 6e 61 72 79 5f 73 74 72 69 6e 67 5c 66 52 0a 55 nary_string\fR.U
5bb0: 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 74 69 nique session ti
5bc0: 63 6b 65 74 20 61 70 70 6c 69 63 61 74 69 6f 6e cket application
5bd0: 20 64 61 74 61 5c 26 2e 0a 2e 54 50 0a 5c 66 42 data\&...TP.\fB
5be0: 6d 61 73 74 65 72 5f 6b 65 79 5c 66 52 20 5c 66 master_key\fR \f
5bf0: 49 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 5c 66 Ibinary_string\f
5c00: 52 0a 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e R.Unique session
5c10: 20 6d 61 73 74 65 72 20 6b 65 79 5c 26 2e 0a 2e master key\&...
5c20: 54 50 0a 5c 66 42 73 65 73 73 69 6f 6e 5f 63 61 TP.\fBsession_ca
5c30: 63 68 65 5f 6d 6f 64 65 5c 66 52 20 5c 66 49 6d che_mode\fR \fIm
5c40: 6f 64 65 5c 66 52 0a 53 65 72 76 65 72 20 63 61 ode\fR.Server ca
5c50: 63 68 65 20 6d 6f 64 65 20 28 63 6c 69 65 6e 74 che mode (client
5c60: 2c 20 73 65 72 76 65 72 2c 20 6f 72 20 62 6f 74 , server, or bot
5c70: 68 29 5c 26 2e 0a 2e 52 45 0a 2e 54 50 0a 5c 66 h)\&...RE..TP.\f
5c80: 42 74 6c 73 3a 3a 63 69 70 68 65 72 73 5c 66 52 Btls::ciphers\fR
5c90: 20 3f 5c 66 49 70 72 6f 74 6f 63 6f 6c 5c 66 52 ?\fIprotocol\fR
5ca0: 3f 20 3f 5c 66 49 76 65 72 62 6f 73 65 5c 66 52 ? ?\fIverbose\fR
5cb0: 3f 20 3f 5c 66 49 73 75 70 70 6f 72 74 65 64 5c ? ?\fIsupported\
5cc0: 66 52 3f 0a 57 69 74 68 6f 75 74 20 61 6e 79 20 fR?.Without any
5cd0: 61 72 67 73 2c 20 72 65 74 75 72 6e 73 20 61 20 args, returns a
5ce0: 6c 69 73 74 20 6f 66 20 61 6c 6c 20 73 79 6d 6d list of all symm
5cf0: 65 74 72 69 63 20 63 69 70 68 65 72 73 20 66 6f etric ciphers fo
5d00: 72 20 75 73 65 20 77 69 74 68 20 74 68 65 0a 5c r use with the.\
5d10: 66 49 2d 63 69 70 68 65 72 5c 66 52 20 6f 70 74 fI-cipher\fR opt
5d20: 69 6f 6e 5c 26 2e 20 57 69 74 68 20 5c 66 49 70 ion\&. With \fIp
5d30: 72 6f 74 6f 63 6f 6c 5c 66 52 2c 20 6f 6e 6c 79 rotocol\fR, only
5d40: 20 74 68 65 20 63 69 70 68 65 72 73 20 73 75 70 the ciphers sup
5d50: 70 6f 72 74 65 64 20 66 6f 72 20 74 68 61 74 0a ported for that.
5d60: 70 72 6f 74 6f 63 6f 6c 20 61 72 65 20 72 65 74 protocol are ret
5d70: 75 72 6e 65 64 5c 26 2e 20 53 65 65 20 74 68 65 urned\&. See the
5d80: 20 5c 66 42 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f \fBtls::protoco
5d90: 6c 73 5c 66 52 20 63 6f 6d 6d 61 6e 64 20 66 6f ls\fR command fo
5da0: 72 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 0a r the supported.
5db0: 70 72 6f 74 6f 63 6f 6c 73 5c 26 2e 20 49 66 20 protocols\&. If
5dc0: 5c 66 49 76 65 72 62 6f 73 65 5c 66 52 20 69 73 \fIverbose\fR is
5dd0: 20 73 70 65 63 69 66 69 65 64 20 61 73 20 74 72 specified as tr
5de0: 75 65 20 74 68 65 6e 20 61 20 76 65 72 62 6f 73 ue then a verbos
5df0: 65 2c 20 68 75 6d 61 6e 20 72 65 61 64 61 62 6c e, human readabl
5e00: 65 0a 6c 69 73 74 20 69 73 20 72 65 74 75 72 6e e.list is return
5e10: 65 64 20 77 69 74 68 20 61 64 64 69 74 69 6f 6e ed with addition
5e20: 61 6c 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f al information o
5e30: 6e 20 74 68 65 20 63 69 70 68 65 72 5c 26 2e 20 n the cipher\&.
5e40: 49 66 20 5c 66 49 73 75 70 70 6f 72 74 65 64 5c If \fIsupported\
5e50: 66 52 0a 69 73 20 73 70 65 63 69 66 69 65 64 20 fR.is specified
5e60: 61 73 20 74 72 75 65 2c 20 74 68 65 6e 20 6f 6e as true, then on
5e70: 6c 79 20 74 68 65 20 63 69 70 68 65 72 73 20 73 ly the ciphers s
5e80: 75 70 70 6f 72 74 65 64 20 66 6f 72 20 70 72 6f upported for pro
5e90: 74 6f 63 6f 6c 20 77 69 6c 6c 20 62 65 20 6c 69 tocol will be li
5ea0: 73 74 65 64 5c 26 2e 0a 2e 54 50 0a 5c 66 42 74 sted\&...TP.\fBt
5eb0: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 5c 66 52 ls::protocols\fR
5ec0: 0a 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 .Returns a list
5ed0: 6f 66 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 of the supported
5ee0: 20 53 53 4c 2f 54 4c 53 20 70 72 6f 74 6f 63 6f SSL/TLS protoco
5ef0: 6c 73 5c 26 2e 20 56 61 6c 69 64 20 76 61 6c 75 ls\&. Valid valu
5f00: 65 73 20 61 72 65 3a 0a 5c 66 42 73 73 6c 32 5c es are:.\fBssl2\
5f10: 66 52 2c 20 5c 66 42 73 73 6c 33 5c 66 52 2c 20 fR, \fBssl3\fR,
5f20: 5c 66 42 74 6c 73 31 5c 66 52 2c 20 5c 66 42 74 \fBtls1\fR, \fBt
5f30: 6c 73 31 5c 26 2e 31 5c 66 52 2c 20 5c 66 42 74 ls1\&.1\fR, \fBt
5f40: 6c 73 31 5c 26 2e 32 5c 66 52 2c 20 61 6e 64 0a ls1\&.2\fR, and.
5f50: 5c 66 42 74 6c 73 31 5c 26 2e 33 5c 66 52 5c 26 \fBtls1\&.3\fR\&
5f60: 2e 20 45 78 61 63 74 20 6c 69 73 74 20 64 65 70 . Exact list dep
5f70: 65 6e 64 73 20 6f 6e 20 4f 70 65 6e 53 53 4c 20 ends on OpenSSL
5f80: 76 65 72 73 69 6f 6e 20 61 6e 64 20 63 6f 6d 70 version and comp
5f90: 69 6c 65 20 74 69 6d 65 20 66 6c 61 67 73 5c 26 ile time flags\&
5fa0: 2e 0a 2e 54 50 0a 5c 66 42 74 6c 73 3a 3a 76 65 ...TP.\fBtls::ve
5fb0: 72 73 69 6f 6e 5c 66 52 0a 52 65 74 75 72 6e 73 rsion\fR.Returns
5fc0: 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 76 65 72 the OpenSSL ver
5fd0: 73 69 6f 6e 20 73 74 72 69 6e 67 5c 26 2e 0a 2e sion string\&...
5fe0: 50 50 0a 2e 53 48 20 22 43 45 52 54 49 46 49 43 PP..SH "CERTIFIC
5ff0: 41 54 45 20 56 41 4c 49 44 41 54 49 4f 4e 22 0a ATE VALIDATION".
6000: 2e 53 53 20 22 50 4b 49 20 41 4e 44 20 43 45 52 .SS "PKI AND CER
6010: 54 49 46 49 43 41 54 45 53 22 0a 55 73 69 6e 67 TIFICATES".Using
6020: 20 74 68 65 20 50 75 62 6c 69 63 20 4b 65 79 20 the Public Key
6030: 49 6e 66 72 61 73 74 72 75 63 74 75 72 65 20 28 Infrastructure (
6040: 50 4b 49 29 2c 20 65 61 63 68 20 75 73 65 72 20 PKI), each user
6050: 63 72 65 61 74 65 73 20 61 20 70 72 69 76 61 74 creates a privat
6060: 65 20 6b 65 79 20 74 68 61 74 0a 6f 6e 6c 79 20 e key that.only
6070: 74 68 65 79 20 6b 6e 6f 77 20 61 62 6f 75 74 20 they know about
6080: 61 6e 64 20 61 20 70 75 62 6c 69 63 20 6b 65 79 and a public key
6090: 20 74 68 65 79 20 63 61 6e 20 65 78 63 68 61 6e they can exchan
60a0: 67 65 20 77 69 74 68 20 6f 74 68 65 72 73 20 66 ge with others f
60b0: 6f 72 20 75 73 65 20 69 6e 0a 65 6e 63 72 79 70 or use in.encryp
60c0: 74 69 6e 67 20 61 6e 64 20 64 65 63 72 79 70 74 ting and decrypt
60d0: 69 6e 67 20 64 61 74 61 5c 26 2e 20 54 68 65 20 ing data\&. The
60e0: 70 72 6f 63 65 73 73 20 69 73 20 74 68 65 20 73 process is the s
60f0: 65 6e 64 65 72 20 65 6e 63 72 79 70 74 73 20 74 ender encrypts t
6100: 68 65 69 72 20 64 61 74 61 0a 75 73 69 6e 67 20 heir data.using
6110: 74 68 65 69 72 20 70 72 69 76 61 74 65 20 6b 65 their private ke
6120: 79 20 61 6e 64 20 74 68 65 20 72 65 63 65 69 76 y and the receiv
6130: 65 72 27 73 20 70 75 62 6c 69 63 20 6b 65 79 5c er's public key\
6140: 26 2e 20 54 68 65 20 64 61 74 61 20 69 73 20 74 &. The data is t
6150: 68 65 6e 20 73 65 6e 74 0a 74 6f 20 74 68 65 20 hen sent.to the
6160: 72 65 63 65 69 76 65 72 5c 26 2e 20 49 6e 20 61 receiver\&. In a
6170: 20 73 69 6d 69 6c 61 72 20 6d 61 6e 6e 65 72 2c similar manner,
6180: 20 74 68 65 20 72 65 63 65 69 76 65 72 20 75 73 the receiver us
6190: 65 73 20 74 68 65 69 72 20 70 72 69 76 61 74 65 es their private
61a0: 20 6b 65 79 20 61 6e 64 0a 74 68 65 20 73 65 6e key and.the sen
61b0: 64 65 72 27 73 20 70 75 62 6c 69 63 20 6b 65 79 der's public key
61c0: 20 74 6f 20 64 65 63 72 79 70 74 20 74 68 65 20 to decrypt the
61d0: 64 61 74 61 5c 26 2e 20 54 68 69 73 20 70 72 6f data\&. This pro
61e0: 76 69 64 65 73 20 64 61 74 61 20 69 6e 74 65 67 vides data integ
61f0: 72 69 74 79 2c 20 74 6f 0a 65 6e 73 75 72 65 20 rity, to.ensure
6200: 74 68 65 20 64 61 74 61 20 63 61 6e 27 74 20 62 the data can't b
6210: 65 20 76 69 65 77 65 64 20 6f 72 20 61 6c 74 65 e viewed or alte
6220: 72 65 64 20 64 75 72 69 6e 67 20 74 72 61 6e 73 red during trans
6230: 70 6f 72 74 5c 26 2e 20 53 65 65 20 74 68 65 0a port\&. See the.
6240: 5c 66 42 2d 6b 65 79 5c 66 52 20 61 6e 64 20 5c \fB-key\fR and \
6250: 66 42 2d 6b 65 79 66 69 6c 65 5c 66 52 20 6f 70 fB-keyfile\fR op
6260: 74 69 6f 6e 73 20 66 6f 72 20 68 6f 77 20 74 6f tions for how to
6270: 20 73 70 65 63 69 66 79 20 74 68 65 20 70 72 69 specify the pri
6280: 76 61 74 65 20 6b 65 79 5c 26 2e 0a 41 6c 73 6f vate key\&..Also
6290: 20 73 65 65 20 74 68 65 20 5c 66 42 2d 70 61 73 see the \fB-pas
62a0: 73 77 6f 72 64 5c 66 52 20 6f 70 74 69 6f 6e 20 sword\fR option
62b0: 66 6f 72 20 68 6f 77 20 74 6f 20 70 72 6f 76 69 for how to provi
62c0: 64 65 20 74 68 65 20 70 61 73 73 77 6f 72 64 5c de the password\
62d0: 26 2e 0a 2e 50 50 0a 49 6e 20 6f 72 64 65 72 20 &...PP.In order
62e0: 74 6f 20 70 72 6f 76 69 64 65 20 61 75 74 68 65 to provide authe
62f0: 6e 74 69 63 61 74 69 6f 6e 2c 20 69 5c 26 2e 65 ntication, i\&.e
6300: 5c 26 2e 20 65 6e 73 75 72 69 6e 67 20 73 6f 6d \&. ensuring som
6310: 65 6f 6e 65 20 69 73 20 77 68 6f 20 74 68 65 79 eone is who they
6320: 20 73 61 79 20 74 68 65 79 0a 61 72 65 2c 20 74 say they.are, t
6330: 68 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61 6e he public key an
6340: 64 20 75 73 65 72 20 69 64 65 6e 74 69 66 69 63 d user identific
6350: 61 74 69 6f 6e 20 69 6e 66 6f 20 69 73 20 73 74 ation info is st
6360: 6f 72 65 64 20 69 6e 20 61 20 58 5c 26 2e 35 30 ored in a X\&.50
6370: 39 0a 63 65 72 74 69 66 69 63 61 74 65 20 61 6e 9.certificate an
6380: 64 20 74 68 61 74 20 63 65 72 74 69 66 69 63 61 d that certifica
6390: 74 65 20 69 73 20 61 75 74 68 65 6e 74 69 63 61 te is authentica
63a0: 74 65 64 20 28 69 5c 26 2e 65 5c 26 2e 20 73 69 ted (i\&.e\&. si
63b0: 67 6e 65 64 29 20 62 79 20 61 20 43 65 72 74 69 gned) by a Certi
63c0: 66 69 63 61 74 65 0a 41 75 74 68 6f 72 69 74 79 ficate.Authority
63d0: 20 28 43 41 29 5c 26 2e 20 55 73 65 72 73 20 63 (CA)\&. Users c
63e0: 61 6e 20 74 68 65 6e 20 65 78 63 68 61 6e 67 65 an then exchange
63f0: 20 74 68 65 73 65 20 63 65 72 74 69 66 69 63 61 these certifica
6400: 74 65 73 20 64 75 72 69 6e 67 20 74 68 65 20 54 tes during the T
6410: 4c 53 0a 69 6e 69 74 69 61 6c 69 7a 61 74 69 6f LS.initializatio
6420: 6e 20 70 72 6f 63 65 73 73 20 61 6e 64 20 63 68 n process and ch
6430: 65 63 6b 20 74 68 65 6d 20 61 67 61 69 6e 73 74 eck them against
6440: 20 74 68 65 20 72 6f 6f 74 20 43 41 20 63 65 72 the root CA cer
6450: 74 69 66 69 63 61 74 65 73 20 74 6f 20 65 6e 73 tificates to ens
6460: 75 72 65 0a 74 68 65 79 20 61 72 65 20 76 61 6c ure.they are val
6470: 69 64 5c 26 2e 20 54 68 69 73 20 69 73 20 68 61 id\&. This is ha
6480: 6e 64 6c 65 64 20 62 79 20 4f 70 65 6e 53 53 4c ndled by OpenSSL
6490: 20 76 69 61 20 74 68 65 20 5c 66 42 2d 72 65 71 via the \fB-req
64a0: 75 65 73 74 5c 66 52 20 61 6e 64 0a 5c 66 42 2d uest\fR and.\fB-
64b0: 72 65 71 75 69 72 65 5c 66 52 20 6f 70 74 69 6f require\fR optio
64c0: 6e 73 5c 26 2e 20 53 65 65 20 74 68 65 20 5c 66 ns\&. See the \f
64d0: 42 2d 63 61 64 69 72 5c 66 52 2c 20 5c 66 42 2d B-cadir\fR, \fB-
64e0: 63 61 64 69 72 5c 66 52 2c 20 61 6e 64 0a 5c 66 cadir\fR, and.\f
64f0: 42 2d 63 61 73 74 6f 72 65 5c 66 52 20 6f 70 74 B-castore\fR opt
6500: 69 6f 6e 73 20 66 6f 72 20 68 6f 77 20 74 70 20 ions for how tp
6510: 73 70 65 63 69 66 79 20 77 68 65 72 65 20 74 6f specify where to
6520: 20 66 69 6e 64 20 74 68 65 20 43 41 20 63 65 72 find the CA cer
6530: 74 69 66 69 63 61 74 65 73 5c 26 2e 0a 4f 70 74 tificates\&..Opt
6540: 69 6f 6e 61 6c 6c 79 2c 20 69 6e 20 61 20 66 75 ionally, in a fu
6550: 74 75 72 65 20 72 65 6c 65 61 73 65 2c 20 74 68 ture release, th
6560: 65 79 20 63 61 6e 20 61 6c 73 6f 20 62 65 20 63 ey can also be c
6570: 68 65 63 6b 65 64 20 61 67 61 69 6e 73 74 20 74 hecked against t
6580: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 0a 52 he Certificate.R
6590: 65 76 6f 63 61 74 69 6f 6e 20 4c 69 73 74 20 28 evocation List (
65a0: 43 52 4c 29 20 6f 66 20 72 65 76 6f 6b 65 64 20 CRL) of revoked
65b0: 63 65 72 74 69 66 69 63 61 74 65 73 5c 26 2e 20 certificates\&.
65c0: 43 65 72 74 69 66 69 63 61 74 65 73 20 63 61 6e Certificates can
65d0: 20 61 6c 73 6f 20 62 65 0a 73 65 6c 66 2d 73 69 also be.self-si
65e0: 67 6e 65 64 2c 20 62 75 74 20 74 68 65 79 20 61 gned, but they a
65f0: 72 65 20 62 79 20 64 65 66 61 75 6c 74 20 6e 6f re by default no
6600: 74 20 74 72 75 73 74 65 64 20 75 6e 6c 65 73 73 t trusted unless
6610: 20 79 6f 75 20 61 64 64 20 74 68 65 6d 20 74 6f you add them to
6620: 20 79 6f 75 72 0a 63 65 72 74 69 66 69 63 61 74 your.certificat
6630: 65 20 73 74 6f 72 65 5c 26 2e 0a 2e 50 50 0a 54 e store\&...PP.T
6640: 79 70 69 63 61 6c 6c 79 20 77 68 65 6e 20 76 69 ypically when vi
6650: 73 69 74 69 6e 67 20 77 65 62 20 73 69 74 65 73 siting web sites
6660: 2c 20 6f 6e 6c 79 20 74 68 65 20 63 6c 69 65 6e , only the clien
6670: 74 20 6e 65 65 64 73 20 74 6f 20 63 68 65 63 6b t needs to check
6680: 20 74 68 65 20 73 65 72 76 65 72 27 73 0a 63 65 the server's.ce
6690: 72 74 69 66 69 63 61 74 65 20 74 6f 20 65 6e 73 rtificate to ens
66a0: 75 72 65 20 69 74 20 69 73 20 76 61 6c 69 64 5c ure it is valid\
66b0: 26 2e 20 54 68 65 20 73 65 72 76 65 72 20 64 6f &. The server do
66c0: 65 73 6e 27 74 20 6e 65 65 64 20 74 6f 20 63 68 esn't need to ch
66d0: 65 63 6b 20 74 68 65 20 63 6c 69 65 6e 74 0a 63 eck the client.c
66e0: 65 72 74 69 66 69 63 61 74 65 20 75 6e 6c 65 73 ertificate unles
66f0: 73 20 79 6f 75 20 6e 65 65 64 20 74 6f 20 61 75 s you need to au
6700: 74 68 65 6e 74 69 63 61 74 65 20 77 69 74 68 20 thenticate with
6710: 74 68 65 6d 20 74 6f 20 6c 6f 67 69 6e 2c 20 65 them to login, e
6720: 74 63 5c 26 2e 20 53 65 65 20 74 68 65 0a 5c 66 tc\&. See the.\f
6730: 42 2d 63 65 72 74 5c 66 52 20 61 6e 64 20 5c 66 B-cert\fR and \f
6740: 42 2d 63 65 72 74 66 69 6c 65 5c 66 52 20 6f 70 B-certfile\fR op
6750: 74 69 6f 6e 73 20 69 66 20 79 6f 75 20 6e 65 65 tions if you nee
6760: 64 20 74 6f 20 70 72 6f 76 69 64 65 20 61 20 63 d to provide a c
6770: 65 72 74 69 66 69 63 61 74 65 5c 26 2e 0a 2e 53 ertificate\&...S
6780: 53 20 22 53 55 4d 4d 41 52 59 20 4f 46 20 43 4f S "SUMMARY OF CO
6790: 4d 4d 41 4e 44 20 4c 49 4e 45 20 4f 50 54 49 4f MMAND LINE OPTIO
67a0: 4e 53 22 0a 54 68 65 20 66 6f 6c 6c 6f 77 69 6e NS".The followin
67b0: 67 20 6f 70 74 69 6f 6e 73 20 61 72 65 20 75 73 g options are us
67c0: 65 64 20 66 6f 72 20 70 65 65 72 20 63 65 72 74 ed for peer cert
67d0: 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 74 69 ificate validati
67e0: 6f 6e 3a 0a 2e 54 50 0a 5c 66 42 2d 63 61 64 69 on:..TP.\fB-cadi
67f0: 72 5c 66 52 20 5c 66 49 64 69 72 65 63 74 6f 72 r\fR \fIdirector
6800: 79 5c 66 52 0a 53 70 65 63 69 66 69 65 73 20 74 y\fR.Specifies t
6810: 68 65 20 64 69 72 65 63 74 6f 72 79 20 77 68 65 he directory whe
6820: 72 65 20 74 68 65 20 43 65 72 74 69 66 69 63 61 re the Certifica
6830: 74 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 te Authority (CA
6840: 29 20 63 65 72 74 69 66 69 63 61 74 65 73 20 61 ) certificates a
6850: 72 65 0a 73 74 6f 72 65 64 5c 26 2e 20 54 68 65 re.stored\&. The
6860: 20 64 65 66 61 75 6c 74 20 69 73 20 70 6c 61 74 default is plat
6870: 66 6f 72 6d 20 73 70 65 63 69 66 69 63 2c 20 62 form specific, b
6880: 75 74 20 69 73 20 75 73 75 61 6c 6c 79 20 22 5c ut is usually "\
6890: 66 49 2f 65 74 63 2f 73 73 6c 2f 63 65 72 74 73 fI/etc/ssl/certs
68a0: 5c 66 52 22 20 6f 6e 0a 4c 69 6e 75 78 2f 55 6e \fR" on.Linux/Un
68b0: 69 78 20 73 79 73 74 65 6d 73 5c 26 2e 20 54 68 ix systems\&. Th
68c0: 65 20 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 69 e default locati
68d0: 6f 6e 20 63 61 6e 20 62 65 20 6f 76 65 72 72 69 on can be overri
68e0: 64 64 65 6e 20 62 79 20 74 68 65 0a 5c 66 42 53 dden by the.\fBS
68f0: 53 4c 5f 43 45 52 54 5f 44 49 52 5c 66 52 20 65 SL_CERT_DIR\fR e
6900: 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 nvironment varia
6910: 62 6c 65 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 63 ble\&...TP.\fB-c
6920: 61 66 69 6c 65 5c 66 52 20 5c 66 49 66 69 6c 65 afile\fR \fIfile
6930: 6e 61 6d 65 5c 66 52 0a 53 70 65 63 69 66 69 65 name\fR.Specifie
6940: 73 20 74 68 65 20 66 69 6c 65 20 77 69 74 68 20 s the file with
6950: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 the Certificate
6960: 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63 Authority (CA) c
6970: 65 72 74 69 66 69 63 61 74 65 73 20 74 6f 20 75 ertificates to u
6980: 73 65 20 69 6e 0a 5c 66 42 50 45 4d 5c 66 52 20 se in.\fBPEM\fR
6990: 66 69 6c 65 20 66 6f 72 6d 61 74 5c 26 2e 20 54 file format\&. T
69a0: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 22 5c he default is "\
69b0: 66 49 63 65 72 74 5c 26 2e 70 65 6d 5c 66 52 22 fIcert\&.pem\fR"
69c0: 2c 20 69 6e 20 74 68 65 20 4f 70 65 6e 53 53 4c , in the OpenSSL
69d0: 0a 64 69 72 65 63 74 6f 72 79 5c 26 2e 20 4f 6e .directory\&. On
69e0: 20 4c 69 6e 75 78 2f 55 6e 69 78 20 73 79 73 74 Linux/Unix syst
69f0: 65 6d 73 2c 20 74 68 69 73 20 69 73 20 75 73 75 ems, this is usu
6a00: 61 6c 6c 79 20 22 5c 66 49 2f 65 74 63 2f 73 73 ally "\fI/etc/ss
6a10: 6c 2f 63 61 2d 62 75 6e 64 6c 65 5c 26 2e 70 65 l/ca-bundle\&.pe
6a20: 6d 5c 66 52 22 5c 26 2e 0a 54 68 65 20 64 65 66 m\fR"\&..The def
6a30: 61 75 6c 74 20 66 69 6c 65 20 63 61 6e 20 62 65 ault file can be
6a40: 20 6f 76 65 72 72 69 64 64 65 6e 20 62 79 20 74 overridden by t
6a50: 68 65 20 5c 66 42 53 53 4c 5f 43 45 52 54 5f 46 he \fBSSL_CERT_F
6a60: 49 4c 45 5c 66 52 20 65 6e 76 69 72 6f 6e 6d 65 ILE\fR environme
6a70: 6e 74 0a 76 61 72 69 61 62 6c 65 5c 26 2e 0a 2e nt.variable\&...
6a80: 54 50 0a 5c 66 42 2d 63 61 73 74 6f 72 65 5c 66 TP.\fB-castore\f
6a90: 52 20 5c 66 49 55 52 49 5c 66 52 0a 53 70 65 63 R \fIURI\fR.Spec
6aa0: 69 66 69 65 73 20 74 68 65 20 55 6e 69 66 6f 72 ifies the Unifor
6ab0: 6d 20 52 65 73 6f 75 72 63 65 20 49 64 65 6e 74 m Resource Ident
6ac0: 69 66 69 65 72 20 28 55 52 49 29 20 66 6f 72 20 ifier (URI) for
6ad0: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 the Certificate
6ae0: 41 75 74 68 6f 72 69 74 79 0a 28 43 41 29 20 73 Authority.(CA) s
6af0: 74 6f 72 65 2c 20 77 68 69 63 68 20 6d 61 79 20 tore, which may
6b00: 62 65 20 61 20 73 69 6e 67 6c 65 20 63 6f 6e 74 be a single cont
6b10: 61 69 6e 65 72 20 6f 72 20 61 20 63 61 74 61 6c ainer or a catal
6b20: 6f 67 20 6f 66 20 63 6f 6e 74 61 69 6e 65 72 73 og of containers
6b30: 5c 26 2e 0a 53 74 61 72 74 69 6e 67 20 77 69 74 \&..Starting wit
6b40: 68 20 4f 70 65 6e 53 53 4c 20 33 5c 26 2e 32 20 h OpenSSL 3\&.2
6b50: 6f 6e 20 4d 53 20 57 69 6e 64 6f 77 73 2c 20 73 on MS Windows, s
6b60: 65 74 20 74 6f 20 22 5c 66 42 6f 72 67 5c 26 2e et to "\fBorg\&.
6b70: 6f 70 65 6e 73 73 6c 5c 26 2e 77 69 6e 73 74 6f openssl\&.winsto
6b80: 72 65 3a 2f 2f 5c 66 52 22 0a 74 6f 20 75 73 65 re://\fR".to use
6b90: 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 20 4d 53 the built-in MS
6ba0: 20 57 69 6e 64 6f 77 73 20 43 65 72 74 69 66 69 Windows Certifi
6bb0: 63 61 74 65 20 53 74 6f 72 65 5c 26 2e 0a 54 68 cate Store\&..Th
6bc0: 69 73 20 73 74 6f 72 65 20 6f 6e 6c 79 20 73 75 is store only su
6bd0: 70 70 6f 72 74 73 20 72 6f 6f 74 20 63 65 72 74 pports root cert
6be0: 69 66 69 63 61 74 65 20 73 74 6f 72 65 73 5c 26 ificate stores\&
6bf0: 2e 20 53 65 65 0a 5c 66 42 43 65 72 74 69 66 69 . See.\fBCertifi
6c00: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 5c cate Validation\
6c10: 66 52 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 fR for more deta
6c20: 69 6c 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 2d 72 ils\&...TP.\fB-r
6c30: 65 71 75 65 73 74 5c 66 52 20 5c 66 49 62 6f 6f equest\fR \fIboo
6c40: 6c 5c 66 52 0a 52 65 71 75 65 73 74 20 61 20 63 l\fR.Request a c
6c50: 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20 ertificate from
6c60: 74 68 65 20 70 65 65 72 20 64 75 72 69 6e 67 20 the peer during
6c70: 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b the SSL handshak
6c80: 65 5c 26 2e 20 54 68 69 73 20 69 73 20 6e 65 65 e\&. This is nee
6c90: 64 65 64 0a 74 6f 20 64 6f 20 43 65 72 74 69 66 ded.to do Certif
6ca0: 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e icate Validation
6cb0: 5c 26 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 \&. Starting in
6cc0: 54 63 6c 54 4c 53 20 31 5c 26 2e 38 2c 20 74 68 TclTLS 1\&.8, th
6cd0: 65 20 64 65 66 61 75 6c 74 20 69 73 0a 5c 66 42 e default is.\fB
6ce0: 74 72 75 65 5c 66 52 5c 26 2e 20 49 6e 20 61 64 true\fR\&. In ad
6cf0: 64 69 74 69 6f 6e 2c 20 74 68 65 20 63 6c 69 65 dition, the clie
6d00: 6e 74 20 63 61 6e 20 6d 61 6e 75 61 6c 6c 79 20 nt can manually
6d10: 69 6e 73 70 65 63 74 20 61 6e 64 20 61 63 63 65 inspect and acce
6d20: 70 74 20 6f 72 20 72 65 6a 65 63 74 0a 65 61 63 pt or reject.eac
6d30: 68 20 63 65 72 74 69 66 69 63 61 74 65 20 75 73 h certificate us
6d40: 69 6e 67 20 74 68 65 20 5c 66 49 2d 76 61 6c 69 ing the \fI-vali
6d50: 64 61 74 65 63 6f 6d 6d 61 6e 64 5c 66 52 20 6f datecommand\fR o
6d60: 70 74 69 6f 6e 5c 26 2e 0a 2e 54 50 0a 5c 66 42 ption\&...TP.\fB
6d70: 2d 72 65 71 75 69 72 65 5c 66 52 20 5c 66 49 62 -require\fR \fIb
6d80: 6f 6f 6c 5c 66 52 0a 52 65 71 75 69 72 65 20 61 ool\fR.Require a
6d90: 20 76 61 6c 69 64 20 63 65 72 74 69 66 69 63 61 valid certifica
6da0: 74 65 20 66 72 6f 6d 20 74 68 65 20 70 65 65 72 te from the peer
6db0: 20 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c 20 during the SSL
6dc0: 68 61 6e 64 73 68 61 6b 65 5c 26 2e 20 49 66 20 handshake\&. If
6dd0: 74 68 69 73 20 69 73 0a 73 65 74 20 74 6f 20 74 this is.set to t
6de0: 72 75 65 2c 20 74 68 65 6e 20 5c 66 42 2d 72 65 rue, then \fB-re
6df0: 71 75 65 73 74 5c 66 52 20 6d 75 73 74 20 61 6c quest\fR must al
6e00: 73 6f 20 62 65 20 73 65 74 20 74 6f 20 74 72 75 so be set to tru
6e10: 65 20 61 6e 64 20 61 20 65 69 74 68 65 72 0a 5c e and a either.\
6e20: 66 42 2d 63 61 64 69 72 5c 66 52 2c 20 5c 66 42 fB-cadir\fR, \fB
6e30: 2d 63 61 66 69 6c 65 5c 66 52 2c 20 5c 66 42 2d -cafile\fR, \fB-
6e40: 63 61 73 74 6f 72 65 5c 66 52 2c 20 6f 72 20 61 castore\fR, or a
6e50: 20 70 6c 61 74 66 6f 72 6d 20 64 65 66 61 75 6c platform defaul
6e60: 74 0a 6d 75 73 74 20 62 65 20 70 72 6f 76 69 64 t.must be provid
6e70: 65 64 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 76 ed in order to v
6e80: 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74 5c alidate against\
6e90: 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 &. The default i
6ea0: 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 20 61 n TclTLS 1\&.8 a
6eb0: 6e 64 0a 65 61 72 6c 69 65 72 20 76 65 72 73 69 nd.earlier versi
6ec0: 6f 6e 73 20 69 73 20 5c 66 42 66 61 6c 73 65 5c ons is \fBfalse\
6ed0: 66 52 20 73 69 6e 63 65 20 6e 6f 74 20 61 6c 6c fR since not all
6ee0: 20 70 6c 61 74 66 6f 72 6d 73 20 68 61 76 65 20 platforms have
6ef0: 63 65 72 74 69 66 69 63 61 74 65 73 20 74 6f 0a certificates to.
6f00: 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74 validate against
6f10: 20 69 6e 20 61 20 66 6f 72 6d 20 63 6f 6d 70 61 in a form compa
6f20: 74 69 62 6c 65 20 77 69 74 68 20 4f 70 65 6e 53 tible with OpenS
6f30: 53 4c 5c 26 2e 0a 2e 50 50 0a 2e 53 53 20 22 57 SL\&...PP..SS "W
6f40: 48 45 4e 20 41 52 45 20 43 4f 4d 4d 41 4e 44 20 HEN ARE COMMAND
6f50: 4c 49 4e 45 20 4f 50 54 49 4f 4e 53 20 4e 45 45 LINE OPTIONS NEE
6f60: 44 45 44 3f 22 0a 49 6e 20 54 63 6c 54 4c 53 20 DED?".In TclTLS
6f70: 31 5c 26 2e 38 20 61 6e 64 20 65 61 72 6c 69 65 1\&.8 and earlie
6f80: 72 20 76 65 72 73 69 6f 6e 73 2c 20 63 65 72 74 r versions, cert
6f90: 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 74 69 ificate validati
6fa0: 6f 6e 20 69 73 0a 5c 66 49 4e 4f 54 5c 66 52 20 on is.\fINOT\fR
6fb0: 65 6e 61 62 6c 65 64 20 62 79 20 64 65 66 61 75 enabled by defau
6fc0: 6c 74 5c 26 2e 20 54 68 69 73 20 6c 69 6d 69 74 lt\&. This limit
6fd0: 61 74 69 6f 6e 20 69 73 20 64 75 65 20 74 6f 20 ation is due to
6fe0: 74 68 65 20 6c 61 63 6b 20 6f 66 20 61 20 63 6f the lack of a co
6ff0: 6d 6d 6f 6e 0a 63 72 6f 73 73 20 70 6c 61 74 66 mmon.cross platf
7000: 6f 72 6d 20 64 61 74 61 62 61 73 65 20 6f 66 20 orm database of
7010: 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 Certificate Auth
7020: 6f 72 69 74 79 20 28 43 41 29 20 70 72 6f 76 69 ority (CA) provi
7030: 64 65 64 20 63 65 72 74 69 66 69 63 61 74 65 73 ded certificates
7040: 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 67 61 to.validate aga
7050: 69 6e 73 74 5c 26 2e 20 4d 61 6e 79 20 4c 69 6e inst\&. Many Lin
7060: 75 78 20 73 79 73 74 65 6d 73 20 6e 61 74 69 76 ux systems nativ
7070: 65 6c 79 20 73 75 70 70 6f 72 74 20 4f 70 65 6e ely support Open
7080: 53 53 4c 20 61 6e 64 20 74 68 75 73 20 68 61 76 SSL and thus hav
7090: 65 0a 74 68 65 73 65 20 63 65 72 74 69 66 69 63 e.these certific
70a0: 61 74 65 73 20 69 6e 73 74 61 6c 6c 65 64 20 61 ates installed a
70b0: 73 20 70 61 72 74 20 6f 66 20 74 68 65 20 4f 53 s part of the OS
70c0: 2c 20 62 75 74 20 4d 61 63 4f 53 20 61 6e 64 20 , but MacOS and
70d0: 4d 53 20 57 69 6e 64 6f 77 73 20 64 6f 20 6e 6f MS Windows do no
70e0: 74 5c 26 2e 0a 49 6e 20 6f 72 64 65 72 20 74 6f t\&..In order to
70f0: 20 75 73 65 20 74 68 65 20 5c 66 42 2d 72 65 71 use the \fB-req
7100: 75 69 72 65 5c 66 52 20 6f 70 74 69 6f 6e 2c 20 uire\fR option,
7110: 6f 6e 65 20 6f 66 20 74 68 65 20 66 6f 6c 6c 6f one of the follo
7120: 77 69 6e 67 0a 6d 75 73 74 20 62 65 20 74 72 75 wing.must be tru
7130: 65 3a 0a 2e 49 50 20 5c 28 62 75 0a 4f 6e 20 4c e:..IP \(bu.On L
7140: 69 6e 75 78 20 61 6e 64 20 55 6e 69 78 20 73 79 inux and Unix sy
7150: 73 74 65 6d 73 20 77 69 74 68 20 4f 70 65 6e 53 stems with OpenS
7160: 53 4c 20 61 6c 72 65 61 64 79 20 69 6e 73 74 61 SL already insta
7170: 6c 6c 65 64 20 6f 72 20 69 66 20 74 68 65 20 43 lled or if the C
7180: 41 0a 63 65 72 74 69 66 69 63 61 74 65 73 20 61 A.certificates a
7190: 72 65 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 re available in
71a0: 50 45 4d 20 66 6f 72 6d 61 74 2c 20 61 6e 64 20 PEM format, and
71b0: 69 66 20 74 68 65 79 20 61 72 65 20 73 74 6f 72 if they are stor
71c0: 65 64 20 69 6e 20 74 68 65 0a 73 74 61 6e 64 61 ed in the.standa
71d0: 72 64 20 6c 6f 63 61 74 69 6f 6e 73 2c 20 6f 72 rd locations, or
71e0: 20 69 66 20 74 68 65 20 5c 66 42 53 53 4c 5f 43 if the \fBSSL_C
71f0: 45 52 54 5f 44 49 52 5c 66 52 20 6f 72 20 5c 66 ERT_DIR\fR or \f
7200: 42 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 5c 66 BSSL_CERT_FILE\f
7210: 52 0a 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 R.environment va
7220: 72 69 61 62 6c 65 73 20 61 72 65 20 73 65 74 2c riables are set,
7230: 20 74 68 65 6e 20 5c 66 42 2d 63 61 64 69 72 5c then \fB-cadir\
7240: 66 52 2c 20 5c 66 42 2d 63 61 64 69 72 5c 66 52 fR, \fB-cadir\fR
7250: 2c 0a 61 6e 64 20 5c 66 42 2d 63 61 73 74 6f 72 ,.and \fB-castor
7260: 65 5c 66 52 20 61 72 65 6e 27 74 20 6e 65 65 64 e\fR aren't need
7270: 65 64 5c 26 2e 0a 2e 49 50 20 5c 28 62 75 0a 49 ed\&...IP \(bu.I
7280: 66 20 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f 74 f OpenSSL is not
7290: 20 69 6e 73 74 61 6c 6c 65 64 20 69 6e 20 74 68 installed in th
72a0: 65 20 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 69 e default locati
72b0: 6f 6e 2c 20 6f 72 20 77 68 65 6e 20 75 73 69 6e on, or when usin
72c0: 67 20 4d 61 63 20 4f 53 0a 6f 72 20 4d 53 20 57 g Mac OS.or MS W
72d0: 69 6e 64 6f 77 73 20 61 6e 64 20 4f 70 65 6e 53 indows and OpenS
72e0: 53 4c 20 69 73 20 69 6e 73 74 61 6c 6c 65 64 2c SL is installed,
72f0: 20 74 68 65 20 5c 66 42 53 53 4c 5f 43 45 52 54 the \fBSSL_CERT
7300: 5f 44 49 52 5c 66 52 20 61 6e 64 2f 6f 72 0a 5c _DIR\fR and/or.\
7310: 66 42 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 5c fBSSL_CERT_FILE\
7320: 66 52 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 fR environment v
7330: 61 72 69 61 62 6c 65 73 20 6f 72 20 74 68 65 20 ariables or the
7340: 6f 6e 65 20 6f 66 20 74 68 65 20 5c 66 42 2d 63 one of the \fB-c
7350: 61 64 69 72 5c 66 52 2c 0a 5c 66 42 2d 63 61 64 adir\fR,.\fB-cad
7360: 69 72 5c 66 52 2c 20 6f 72 20 5c 66 42 2d 63 61 ir\fR, or \fB-ca
7370: 73 74 6f 72 65 5c 66 52 20 6f 70 74 69 6f 6e 73 store\fR options
7380: 20 6d 75 73 74 20 62 65 20 64 65 66 69 6e 65 64 must be defined
7390: 5c 26 2e 0a 2e 49 50 20 5c 28 62 75 0a 4f 6e 20 \&...IP \(bu.On
73a0: 4d 53 20 57 69 6e 64 6f 77 73 2c 20 73 74 61 72 MS Windows, star
73b0: 74 69 6e 67 20 69 6e 20 4f 70 65 6e 53 53 4c 20 ting in OpenSSL
73c0: 33 5c 26 2e 32 2c 20 69 74 20 69 73 20 6e 6f 77 3\&.2, it is now
73d0: 20 70 6f 73 73 69 62 6c 65 20 74 6f 20 61 63 63 possible to acc
73e0: 65 73 73 20 74 68 65 0a 62 75 69 6c 74 2d 69 6e ess the.built-in
73f0: 20 57 69 6e 64 6f 77 73 20 43 65 72 74 69 66 69 Windows Certifi
7400: 63 61 74 65 20 53 74 6f 72 65 20 66 72 6f 6d 20 cate Store from
7410: 4f 70 65 6e 53 53 4c 5c 26 2e 20 54 68 69 73 20 OpenSSL\&. This
7420: 63 61 6e 20 75 74 69 6c 69 7a 65 64 20 62 79 0a can utilized by.
7430: 73 65 74 74 69 6e 67 20 74 68 65 20 5c 66 42 2d setting the \fB-
7440: 63 61 73 74 6f 72 65 5c 66 52 20 6f 70 74 69 6f castore\fR optio
7450: 6e 20 74 6f 20 22 5c 66 42 6f 72 67 5c 26 2e 6f n to "\fBorg\&.o
7460: 70 65 6e 73 73 6c 5c 26 2e 77 69 6e 73 74 6f 72 penssl\&.winstor
7470: 65 3a 2f 2f 5c 66 52 22 5c 26 2e 0a 2e 49 50 20 e://\fR"\&...IP
7480: 5c 28 62 75 0a 49 66 20 4f 70 65 6e 53 53 4c 20 \(bu.If OpenSSL
7490: 69 73 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 65 64 is not installed
74a0: 20 6f 72 20 74 68 65 20 43 41 20 63 65 72 74 69 or the CA certi
74b0: 66 69 63 61 74 65 73 20 61 72 65 20 6e 6f 74 20 ficates are not
74c0: 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 50 45 4d available in PEM
74d0: 0a 66 6f 72 6d 61 74 2c 20 74 68 65 20 43 41 20 .format, the CA
74e0: 63 65 72 74 69 66 69 63 61 74 65 73 20 6d 75 73 certificates mus
74f0: 74 20 62 65 20 64 6f 77 6e 6c 6f 61 64 65 64 20 t be downloaded
7500: 61 6e 64 20 69 6e 73 74 61 6c 6c 65 64 20 77 69 and installed wi
7510: 74 68 20 74 68 65 20 75 73 65 72 0a 73 6f 66 74 th the user.soft
7520: 77 61 72 65 5c 26 2e 20 54 68 65 20 43 55 52 4c ware\&. The CURL
7530: 20 74 65 61 6d 20 6d 61 6b 65 73 20 74 68 65 6d team makes them
7540: 20 61 76 61 69 6c 61 62 6c 65 20 61 74 0a 5c 66 available at.\f
7550: 49 43 41 20 63 65 72 74 69 66 69 63 61 74 65 73 ICA certificates
7560: 20 65 78 74 72 61 63 74 65 64 0a 66 72 6f 6d 20 extracted.from
7570: 4d 6f 7a 69 6c 6c 61 5c 66 52 20 5b 68 74 74 70 Mozilla\fR [http
7580: 73 3a 2f 2f 63 75 72 6c 5c 26 2e 73 65 2f 64 6f s://curl\&.se/do
7590: 63 73 2f 63 61 65 78 74 72 61 63 74 5c 26 2e 68 cs/caextract\&.h
75a0: 74 6d 6c 5d 20 69 6e 20 74 68 65 20 22 5c 66 49 tml] in the "\fI
75b0: 63 61 63 65 72 74 5c 26 2e 70 65 6d 5c 66 52 22 cacert\&.pem\fR"
75c0: 20 66 69 6c 65 5c 26 2e 20 59 6f 75 20 6d 75 73 file\&. You mus
75d0: 74 20 74 68 65 6e 20 65 69 74 68 65 72 20 73 65 t then either se
75e0: 74 20 74 68 65 0a 5c 66 42 53 53 4c 5f 43 45 52 t the.\fBSSL_CER
75f0: 54 5f 44 49 52 5c 66 52 20 61 6e 64 2f 6f 72 20 T_DIR\fR and/or
7600: 5c 66 42 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 \fBSSL_CERT_FILE
7610: 5c 66 52 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 \fR environment
7620: 76 61 72 69 61 62 6c 65 73 20 6f 72 20 74 68 65 variables or the
7630: 0a 5c 66 42 2d 63 61 64 69 72 5c 66 52 20 6f 72 .\fB-cadir\fR or
7640: 20 5c 66 42 2d 63 61 66 69 6c 65 5c 66 52 20 6f \fB-cafile\fR o
7650: 70 74 69 6f 6e 73 20 74 6f 20 74 68 65 20 43 41 ptions to the CA
7660: 20 63 65 72 74 20 66 69 6c 65 27 73 20 69 6e 73 cert file's ins
7670: 74 61 6c 6c 0a 6c 6f 63 61 74 69 6f 6e 5c 26 2e tall.location\&.
7680: 20 49 74 20 69 73 20 79 6f 75 72 20 72 65 73 70 It is your resp
7690: 6f 6e 73 69 62 69 6c 69 74 79 20 74 6f 20 6b 65 onsibility to ke
76a0: 65 70 20 74 68 69 73 20 66 69 6c 65 20 75 70 20 ep this file up
76b0: 74 6f 20 64 61 74 65 5c 26 2e 0a 2e 50 50 0a 2e to date\&...PP..
76c0: 53 48 20 22 43 41 4c 4c 42 41 43 4b 20 4f 50 54 SH "CALLBACK OPT
76d0: 49 4f 4e 53 22 0a 41 73 20 70 72 65 76 69 6f 75 IONS".As previou
76e0: 73 6c 79 20 64 65 73 63 72 69 62 65 64 2c 20 65 sly described, e
76f0: 61 63 68 20 63 68 61 6e 6e 65 6c 20 63 61 6e 20 ach channel can
7700: 62 65 20 67 69 76 65 6e 20 74 68 65 69 72 20 6f be given their o
7710: 77 6e 20 63 61 6c 6c 62 61 63 6b 73 0a 74 6f 20 wn callbacks.to
7720: 68 61 6e 64 6c 65 20 69 6e 74 65 72 6d 65 64 69 handle intermedi
7730: 61 74 65 20 70 72 6f 63 65 73 73 69 6e 67 20 62 ate processing b
7740: 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 y the OpenSSL li
7750: 62 72 61 72 79 2c 20 75 73 69 6e 67 20 74 68 65 brary, using the
7760: 0a 5c 66 42 2d 63 6f 6d 6d 61 6e 64 5c 66 52 2c .\fB-command\fR,
7770: 20 5c 66 42 2d 70 61 73 73 77 6f 72 64 5c 66 52 \fB-password\fR
7780: 2c 20 61 6e 64 20 5c 66 42 2d 76 61 6c 69 64 61 , and \fB-valida
7790: 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 52 20 6f 70 te_command\fR op
77a0: 74 69 6f 6e 73 0a 70 61 73 73 65 64 20 74 6f 20 tions.passed to
77b0: 65 69 74 68 65 72 20 6f 66 20 5c 66 42 74 6c 73 either of \fBtls
77c0: 3a 3a 73 6f 63 6b 65 74 5c 66 52 20 6f 72 20 5c ::socket\fR or \
77d0: 66 42 74 6c 73 3a 3a 69 6d 70 6f 72 74 5c 66 52 fBtls::import\fR
77e0: 5c 26 2e 0a 55 6e 6c 69 6b 65 20 70 72 65 76 69 \&..Unlike previ
77f0: 6f 75 73 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 ous versions of
7800: 54 63 6c 54 4c 53 2c 20 6f 6e 6c 79 20 69 66 20 TclTLS, only if
7810: 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 67 65 6e the callback gen
7820: 65 72 61 74 65 73 20 61 6e 20 65 72 72 6f 72 2c erates an error,
7830: 0a 77 69 6c 6c 20 74 68 65 20 5c 66 42 62 67 65 .will the \fBbge
7840: 72 72 6f 72 5c 66 52 20 63 6f 6d 6d 61 6e 64 20 rror\fR command
7850: 62 65 20 69 6e 76 6f 6b 65 64 20 77 69 74 68 20 be invoked with
7860: 74 68 65 20 65 72 72 6f 72 20 69 6e 66 6f 72 6d the error inform
7870: 61 74 69 6f 6e 5c 26 2e 0a 2e 53 53 20 22 56 41 ation\&...SS "VA
7880: 4c 55 45 53 20 46 4f 52 20 43 4f 4d 4d 41 4e 44 LUES FOR COMMAND
7890: 20 43 41 4c 4c 42 41 43 4b 22 0a 54 68 65 20 63 CALLBACK".The c
78a0: 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20 allback for the
78b0: 5c 66 42 2d 63 6f 6d 6d 61 6e 64 5c 66 52 20 6f \fB-command\fR o
78c0: 70 74 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64 ption is invoked
78d0: 20 61 74 20 73 65 76 65 72 61 6c 20 70 6f 69 6e at several poin
78e0: 74 73 20 64 75 72 69 6e 67 20 74 68 65 0a 4f 70 ts during the.Op
78f0: 65 6e 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 20 enSSL handshake
7900: 61 6e 64 20 64 75 72 69 6e 67 20 72 6f 75 74 69 and during routi
7910: 6e 65 20 6f 70 65 72 61 74 69 6f 6e 73 5c 26 2e ne operations\&.
7920: 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 See below for t
7930: 68 65 20 70 6f 73 73 69 62 6c 65 0a 61 72 67 75 he possible.argu
7940: 6d 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f 20 ments passed to
7950: 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 the callback scr
7960: 69 70 74 5c 26 2e 20 56 61 6c 75 65 73 20 72 65 ipt\&. Values re
7970: 74 75 72 6e 65 64 20 66 72 6f 6d 20 74 68 65 20 turned from the
7980: 63 61 6c 6c 62 61 63 6b 20 61 72 65 0a 69 67 6e callback are.ign
7990: 6f 72 65 64 5c 26 2e 0a 2e 54 50 0a 5c 66 42 65 ored\&...TP.\fBe
79a0: 72 72 6f 72 5c 66 52 20 5c 66 49 63 68 61 6e 6e rror\fR \fIchann
79b0: 65 6c 49 64 20 6d 65 73 73 61 67 65 5c 66 52 0a elId message\fR.
79c0: 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c This form of cal
79d0: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 lback is invoked
79e0: 20 77 68 65 6e 65 76 65 72 20 61 6e 20 65 72 72 whenever an err
79f0: 6f 72 20 6f 63 63 75 72 73 20 64 75 72 69 6e 67 or occurs during
7a00: 20 74 68 65 20 69 6e 69 74 69 61 6c 0a 63 6f 6e the initial.con
7a10: 6e 65 63 74 69 6f 6e 2c 20 68 61 6e 64 73 68 61 nection, handsha
7a20: 6b 65 2c 20 6f 72 20 49 2f 4f 20 6f 70 65 72 61 ke, or I/O opera
7a30: 74 69 6f 6e 73 5c 26 2e 20 54 68 65 20 5c 66 49 tions\&. The \fI
7a40: 6d 65 73 73 61 67 65 5c 66 52 20 61 72 67 75 6d message\fR argum
7a50: 65 6e 74 20 63 61 6e 20 62 65 0a 66 72 6f 6d 20 ent can be.from
7a60: 74 68 65 20 54 63 6c 5f 45 72 72 6e 6f 4d 73 67 the Tcl_ErrnoMsg
7a70: 2c 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 , OpenSSL functi
7a80: 6f 6e 20 5c 66 42 45 52 52 5f 72 65 61 73 6f 6e on \fBERR_reason
7a90: 5f 65 72 72 6f 72 5f 73 74 72 69 6e 67 28 29 5c _error_string()\
7aa0: 66 52 2c 0a 6f 72 20 61 20 63 75 73 74 6f 6d 20 fR,.or a custom
7ab0: 6d 65 73 73 61 67 65 5c 26 2e 20 54 68 69 73 20 message\&. This
7ac0: 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 callback is new
7ad0: 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 for TclTLS 1\&.8
7ae0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 69 6e 66 6f 5c \&...TP.\fBinfo\
7af0: 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 fR \fIchannelId
7b00: 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20 6d 65 73 73 major minor mess
7b10: 61 67 65 20 74 79 70 65 5c 66 52 0a 54 68 69 73 age type\fR.This
7b20: 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 form of callbac
7b30: 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 k is invoked by
7b40: 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 the OpenSSL func
7b50: 74 69 6f 6e 0a 5c 66 42 53 53 4c 5f 73 65 74 5f tion.\fBSSL_set_
7b60: 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 29 5c info_callback()\
7b70: 66 52 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e fR during the in
7b80: 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e itial connection
7b90: 20 61 6e 64 20 68 61 6e 64 73 68 61 6b 65 0a 6f and handshake.o
7ba0: 70 65 72 61 74 69 6f 6e 73 5c 26 2e 20 54 68 65 perations\&. The
7bb0: 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 0a arguments are:.
7bc0: 2e 52 53 0a 2e 54 50 0a 5c 66 49 6d 61 6a 6f 72 .RS..TP.\fImajor
7bd0: 5c 66 52 0a 4d 61 6a 6f 72 20 63 61 74 65 67 6f \fR.Major catego
7be0: 72 79 20 66 6f 72 20 65 72 72 6f 72 5c 26 2e 20 ry for error\&.
7bf0: 56 61 6c 69 64 20 65 6e 75 6d 73 20 61 72 65 3a Valid enums are:
7c00: 20 5c 66 42 68 61 6e 64 73 68 61 6b 65 5c 66 52 \fBhandshake\fR
7c10: 2c 20 5c 66 42 61 6c 65 72 74 5c 66 52 2c 0a 5c , \fBalert\fR,.\
7c20: 66 42 63 6f 6e 6e 65 63 74 5c 66 52 2c 20 5c 66 fBconnect\fR, \f
7c30: 42 61 63 63 65 70 74 5c 66 52 5c 26 2e 0a 2e 54 Baccept\fR\&...T
7c40: 50 0a 5c 66 49 6d 69 6e 6f 72 5c 66 52 0a 4d 69 P.\fIminor\fR.Mi
7c50: 6e 6f 72 20 63 61 74 65 67 6f 72 79 20 66 6f 72 nor category for
7c60: 20 65 72 72 6f 72 5c 26 2e 20 56 61 6c 69 64 20 error\&. Valid
7c70: 65 6e 75 6d 73 20 61 72 65 3a 20 5c 66 42 73 74 enums are: \fBst
7c80: 61 72 74 5c 66 52 2c 20 5c 66 42 64 6f 6e 65 5c art\fR, \fBdone\
7c90: 66 52 2c 20 5c 66 42 72 65 61 64 5c 66 52 2c 0a fR, \fBread\fR,.
7ca0: 5c 66 42 77 72 69 74 65 5c 66 52 2c 20 5c 66 42 \fBwrite\fR, \fB
7cb0: 6c 6f 6f 70 5c 66 52 2c 20 5c 66 42 65 78 69 74 loop\fR, \fBexit
7cc0: 5c 66 52 5c 26 2e 0a 2e 54 50 0a 5c 66 49 6d 65 \fR\&...TP.\fIme
7cd0: 73 73 61 67 65 5c 66 52 0a 44 65 73 63 72 69 70 ssage\fR.Descrip
7ce0: 74 69 76 65 20 6d 65 73 73 61 67 65 20 73 74 72 tive message str
7cf0: 69 6e 67 20 77 68 69 63 68 20 6d 61 79 20 62 65 ing which may be
7d00: 20 67 65 6e 65 72 61 74 65 64 20 65 69 74 68 65 generated eithe
7d10: 72 20 62 79 0a 5c 66 42 53 53 4c 5f 73 74 61 74 r by.\fBSSL_stat
7d20: 65 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 5c e_string_long()\
7d30: 66 52 20 6f 72 20 5c 66 42 53 53 4c 5f 61 6c 65 fR or \fBSSL_ale
7d40: 72 74 5f 64 65 73 63 5f 73 74 72 69 6e 67 5f 6c rt_desc_string_l
7d50: 6f 6e 67 28 29 5c 66 52 2c 0a 64 65 70 65 6e 64 ong()\fR,.depend
7d60: 69 6e 67 20 6f 6e 20 74 68 65 20 63 6f 6e 74 65 ing on the conte
7d70: 78 74 5c 26 2e 0a 2e 54 50 0a 5c 66 49 74 79 70 xt\&...TP.\fItyp
7d80: 65 5c 66 52 0a 46 6f 72 20 61 6c 65 72 74 73 2c e\fR.For alerts,
7d90: 20 74 68 65 20 70 6f 73 73 69 62 6c 65 20 76 61 the possible va
7da0: 6c 75 65 73 20 61 72 65 3a 20 5c 66 42 77 61 72 lues are: \fBwar
7db0: 6e 69 6e 67 5c 66 52 2c 0a 5c 66 42 66 61 74 61 ning\fR,.\fBfata
7dc0: 6c 5c 66 52 2c 20 61 6e 64 20 5c 66 42 75 6e 6b l\fR, and \fBunk
7dd0: 6e 6f 77 6e 5c 66 52 5c 26 2e 20 46 6f 72 20 6f nown\fR\&. For o
7de0: 74 68 65 72 73 2c 20 5c 66 42 69 6e 66 6f 5c 66 thers, \fBinfo\f
7df0: 52 20 69 73 20 75 73 65 64 5c 26 2e 0a 54 68 69 R is used\&..Thi
7e00: 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 s argument is ne
7e10: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 w for TclTLS 1\&
7e20: 2e 38 5c 26 2e 0a 2e 52 45 0a 2e 54 50 0a 5c 66 .8\&...RE..TP.\f
7e30: 42 6d 65 73 73 61 67 65 5c 66 52 20 5c 66 49 63 Bmessage\fR \fIc
7e40: 68 61 6e 6e 65 6c 49 64 20 64 69 72 65 63 74 69 hannelId directi
7e50: 6f 6e 20 76 65 72 73 69 6f 6e 20 63 6f 6e 74 65 on version conte
7e60: 6e 74 5f 74 79 70 65 20 6d 65 73 73 61 67 65 5c nt_type message\
7e70: 66 52 0a 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 fR.This form of
7e80: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f callback is invo
7e90: 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 ked by the OpenS
7ea0: 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 5c 66 42 53 SL function.\fBS
7eb0: 53 4c 5f 73 65 74 5f 6d 73 67 5f 63 61 6c 6c 62 SL_set_msg_callb
7ec0: 61 63 6b 28 29 5c 66 52 20 77 68 65 6e 65 76 65 ack()\fR wheneve
7ed0: 72 20 61 20 6d 65 73 73 61 67 65 20 69 73 20 73 r a message is s
7ee0: 65 6e 74 20 6f 72 20 72 65 63 65 69 76 65 64 20 ent or received
7ef0: 64 75 72 69 6e 67 20 74 68 65 0a 69 6e 69 74 69 during the.initi
7f00: 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 al connection, h
7f10: 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f 4f andshake, or I/O
7f20: 20 6f 70 65 72 61 74 69 6f 6e 73 5c 26 2e 20 49 operations\&. I
7f30: 74 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 t is only availa
7f40: 62 6c 65 20 77 68 65 6e 0a 4f 70 65 6e 53 53 4c ble when.OpenSSL
7f50: 20 69 73 20 63 6f 6d 70 6c 69 65 64 20 77 69 74 is complied wit
7f60: 68 20 74 68 65 20 5c 66 42 65 6e 61 62 6c 65 2d h the \fBenable-
7f70: 73 73 6c 2d 74 72 61 63 65 5c 66 52 20 6f 70 74 ssl-trace\fR opt
7f80: 69 6f 6e 5c 26 2e 20 54 68 69 73 20 63 61 6c 6c ion\&. This call
7f90: 62 61 63 6b 20 69 73 0a 6e 65 77 20 66 6f 72 20 back is.new for
7fa0: 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 20 TclTLS 1\&.8\&.
7fb0: 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61 72 The arguments ar
7fc0: 65 3a 0a 2e 52 53 0a 2e 54 50 0a 5c 66 49 64 69 e:..RS..TP.\fIdi
7fd0: 72 65 63 74 69 6f 6e 5c 66 52 0a 44 69 72 65 63 rection\fR.Direc
7fe0: 74 69 6f 6e 20 69 73 20 65 69 74 68 65 72 20 5c tion is either \
7ff0: 66 42 53 65 6e 74 5c 66 52 20 6f 72 20 5c 66 42 fBSent\fR or \fB
8000: 52 65 63 65 69 76 65 64 5c 66 52 5c 26 2e 0a 2e Received\fR\&...
8010: 54 50 0a 5c 66 49 76 65 72 73 69 6f 6e 5c 66 52 TP.\fIversion\fR
8020: 0a 56 65 72 73 69 6f 6e 20 69 73 20 74 68 65 20 .Version is the
8030: 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e protocol version
8040: 5c 26 2e 0a 2e 54 50 0a 5c 66 49 63 6f 6e 74 65 \&...TP.\fIconte
8050: 6e 74 5f 74 79 70 65 5c 66 52 0a 43 6f 6e 74 65 nt_type\fR.Conte
8060: 6e 74 20 74 79 70 65 20 69 73 20 74 68 65 20 6d nt type is the m
8070: 65 73 73 61 67 65 20 63 6f 6e 74 65 6e 74 20 74 essage content t
8080: 79 70 65 5c 26 2e 0a 2e 54 50 0a 5c 66 49 6d 65 ype\&...TP.\fIme
8090: 73 73 61 67 65 5c 66 52 0a 4d 65 73 73 61 67 65 ssage\fR.Message
80a0: 20 69 73 20 6d 6f 72 65 20 69 6e 66 6f 20 66 72 is more info fr
80b0: 6f 6d 20 74 68 65 20 5c 66 42 53 53 4c 5f 74 72 om the \fBSSL_tr
80c0: 61 63 65 5c 66 52 20 41 50 49 5c 26 2e 0a 2e 52 ace\fR API\&...R
80d0: 45 0a 2e 54 50 0a 5c 66 42 73 65 73 73 69 6f 6e E..TP.\fBsession
80e0: 5c 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 \fR \fIchannelId
80f0: 20 73 65 73 73 69 6f 6e 5f 69 64 20 73 65 73 73 session_id sess
8100: 69 6f 6e 5f 74 69 63 6b 65 74 20 6c 69 66 65 74 ion_ticket lifet
8110: 69 6d 65 5c 66 52 0a 54 68 69 73 20 66 6f 72 6d ime\fR.This form
8120: 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 of callback is
8130: 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f invoked by the O
8140: 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a penSSL function.
8150: 5c 66 42 53 53 4c 5f 43 54 58 5f 73 65 73 73 5f \fBSSL_CTX_sess_
8160: 73 65 74 5f 6e 65 77 5f 63 62 28 29 5c 66 52 20 set_new_cb()\fR
8170: 77 68 65 6e 65 76 65 72 20 61 20 6e 65 77 20 73 whenever a new s
8180: 65 73 73 69 6f 6e 20 69 64 20 69 73 20 73 65 6e ession id is sen
8190: 74 20 62 79 20 74 68 65 0a 73 65 72 76 65 72 20 t by the.server
81a0: 64 75 72 69 6e 67 20 74 68 65 20 69 6e 69 74 69 during the initi
81b0: 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 61 6e al connection an
81c0: 64 20 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 20 d handshake and
81d0: 61 6c 73 6f 20 64 75 72 69 6e 67 20 74 68 65 20 also during the
81e0: 73 65 73 73 69 6f 6e 0a 69 66 20 74 68 65 20 5c session.if the \
81f0: 66 42 2d 70 6f 73 74 5f 68 61 6e 64 73 68 61 6b fB-post_handshak
8200: 65 5c 66 52 20 6f 70 74 69 6f 6e 20 69 73 20 73 e\fR option is s
8210: 65 74 20 74 6f 20 74 72 75 65 5c 26 2e 20 54 68 et to true\&. Th
8220: 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e is callback is n
8230: 65 77 20 66 6f 72 0a 54 63 6c 54 4c 53 20 31 5c ew for.TclTLS 1\
8240: 26 2e 38 5c 26 2e 20 54 68 65 20 61 72 67 75 6d &.8\&. The argum
8250: 65 6e 74 73 20 61 72 65 3a 0a 2e 52 53 0a 2e 54 ents are:..RS..T
8260: 50 0a 5c 66 49 73 65 73 73 69 6f 6e 5f 69 64 5c P.\fIsession_id\
8270: 66 52 0a 53 65 73 73 69 6f 6e 20 49 64 20 69 73 fR.Session Id is
8280: 20 74 68 65 20 63 75 72 72 65 6e 74 20 73 65 73 the current ses
8290: 73 69 6f 6e 20 69 64 65 6e 74 69 66 69 65 72 0a sion identifier.
82a0: 2e 54 50 0a 5c 66 49 73 65 73 73 69 6f 6e 5f 74 .TP.\fIsession_t
82b0: 69 63 6b 65 74 5c 66 52 0a 54 69 63 6b 65 74 20 icket\fR.Ticket
82c0: 69 73 20 74 68 65 20 73 65 73 73 69 6f 6e 20 74 is the session t
82d0: 69 63 6b 65 74 20 69 6e 66 6f 0a 2e 54 50 0a 5c icket info..TP.\
82e0: 66 49 6c 69 66 65 74 69 6d 65 5c 66 52 0a 4c 69 fIlifetime\fR.Li
82f0: 66 65 74 69 6d 65 20 69 73 20 74 68 65 20 74 69 fetime is the ti
8300: 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 69 6e cket lifetime in
8310: 20 73 65 63 6f 6e 64 73 5c 26 2e 0a 2e 52 45 0a seconds\&...RE.
8320: 2e 54 50 0a 5c 66 42 76 65 72 69 66 79 5c 66 52 .TP.\fBverify\fR
8330: 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 64 65 \fIchannelId de
8340: 70 74 68 20 63 65 72 74 20 73 74 61 74 75 73 20 pth cert status
8350: 65 72 72 6f 72 5c 66 52 0a 54 68 69 73 20 63 61 error\fR.This ca
8360: 6c 6c 62 61 63 6b 20 77 61 73 20 6d 6f 76 65 64 llback was moved
8370: 20 74 6f 20 5c 66 42 2d 76 61 6c 69 64 61 74 65 to \fB-validate
8380: 63 6f 6d 6d 61 6e 64 5c 66 52 20 69 6e 20 54 63 command\fR in Tc
8390: 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e 0a 2e 50 lTLS 1\&.8\&...P
83a0: 50 0a 2e 53 53 20 22 56 41 4c 55 45 53 20 46 4f P..SS "VALUES FO
83b0: 52 20 50 41 53 53 57 4f 52 44 20 43 41 4c 4c 42 R PASSWORD CALLB
83c0: 41 43 4b 22 0a 54 68 65 20 63 61 6c 6c 62 61 63 ACK".The callbac
83d0: 6b 20 66 6f 72 20 74 68 65 20 5c 66 42 2d 70 61 k for the \fB-pa
83e0: 73 73 77 6f 72 64 5c 66 52 20 6f 70 74 69 6f 6e ssword\fR option
83f0: 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 54 is invoked by T
8400: 63 6c 54 4c 53 20 77 68 65 6e 65 76 65 72 20 4f clTLS whenever O
8410: 70 65 6e 53 53 4c 20 6e 65 65 64 73 0a 74 6f 20 penSSL needs.to
8420: 6f 62 74 61 69 6e 20 61 20 70 61 73 73 77 6f 72 obtain a passwor
8430: 64 5c 26 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 d\&. See below f
8440: 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 20 or the possible
8450: 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65 64 arguments passed
8460: 20 74 6f 20 74 68 65 0a 63 61 6c 6c 62 61 63 6b to the.callback
8470: 20 73 63 72 69 70 74 5c 26 2e 20 54 68 65 20 75 script\&. The u
8480: 73 65 72 20 70 72 6f 76 69 64 65 64 20 70 61 73 ser provided pas
8490: 73 77 6f 72 64 20 69 73 20 65 78 70 65 63 74 65 sword is expecte
84a0: 64 20 74 6f 20 62 65 20 72 65 74 75 72 6e 65 64 d to be returned
84b0: 20 62 79 20 74 68 65 0a 63 61 6c 6c 62 61 63 6b by the.callback
84c0: 5c 26 2e 0a 2e 54 50 0a 5c 66 42 70 61 73 73 77 \&...TP.\fBpassw
84d0: 6f 72 64 5c 66 52 20 5c 66 49 72 77 66 6c 61 67 ord\fR \fIrwflag
84e0: 20 73 69 7a 65 5c 66 52 0a 49 6e 76 6f 6b 65 64 size\fR.Invoked
84f0: 20 77 68 65 6e 20 6c 6f 61 64 69 6e 67 20 6f 72 when loading or
8500: 20 73 74 6f 72 69 6e 67 20 61 6e 20 65 6e 63 72 storing an encr
8510: 79 70 74 65 64 20 50 45 4d 20 63 65 72 74 69 66 ypted PEM certif
8520: 69 63 61 74 65 5c 26 2e 20 54 68 65 20 61 72 67 icate\&. The arg
8530: 75 6d 65 6e 74 73 20 61 72 65 3a 0a 2e 52 53 0a uments are:..RS.
8540: 2e 54 50 0a 5c 66 49 72 77 66 6c 61 67 5c 66 52 .TP.\fIrwflag\fR
8550: 0a 54 68 65 20 72 65 61 64 2f 77 72 69 74 65 20 .The read/write
8560: 66 6c 61 67 20 69 73 20 30 20 66 6f 72 20 72 65 flag is 0 for re
8570: 61 64 69 6e 67 2f 64 65 63 72 79 70 74 69 6f 6e ading/decryption
8580: 20 6f 72 20 31 20 66 6f 72 20 77 72 69 74 69 6e or 1 for writin
8590: 67 2f 65 6e 63 72 79 70 74 69 6f 6e 5c 26 2e 0a g/encryption\&..
85a0: 54 68 65 20 6c 61 74 74 65 72 20 63 61 6e 20 62 The latter can b
85b0: 65 20 75 73 65 64 20 74 6f 20 64 65 74 65 72 6d e used to determ
85c0: 69 6e 65 20 77 68 65 6e 20 74 6f 20 70 72 6f 6d ine when to prom
85d0: 70 74 20 74 68 65 20 75 73 65 72 20 74 6f 20 63 pt the user to c
85e0: 6f 6e 66 69 72 6d 5c 26 2e 0a 54 68 69 73 20 61 onfirm\&..This a
85f0: 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 77 20 66 rgument is new f
8600: 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c or TclTLS 1\&.8\
8610: 26 2e 0a 2e 54 50 0a 5c 66 49 73 69 7a 65 5c 66 &...TP.\fIsize\f
8620: 52 0a 54 68 65 20 73 69 7a 65 20 69 73 20 74 68 R.The size is th
8630: 65 20 6d 61 78 69 6d 75 6d 20 6c 65 6e 67 74 68 e maximum length
8640: 20 6f 66 20 74 68 65 20 70 61 73 73 77 6f 72 64 of the password
8650: 20 69 6e 20 62 79 74 65 73 5c 26 2e 0a 54 68 69 in bytes\&..Thi
8660: 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 s argument is ne
8670: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 5c 26 w for TclTLS 1\&
8680: 2e 38 5c 26 2e 0a 2e 52 45 0a 2e 50 50 0a 2e 53 .8\&...RE..PP..S
8690: 53 20 22 56 41 4c 55 45 53 20 46 4f 52 20 56 41 S "VALUES FOR VA
86a0: 4c 49 44 41 54 45 20 43 4f 4d 4d 41 4e 44 20 43 LIDATE COMMAND C
86b0: 41 4c 4c 42 41 43 4b 22 0a 54 68 65 20 63 61 6c ALLBACK".The cal
86c0: 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20 5c 66 lback for the \f
86d0: 42 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e B-validatecomman
86e0: 64 5c 66 52 20 6f 70 74 69 6f 6e 20 69 73 20 69 d\fR option is i
86f0: 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 74 68 nvoked during th
8700: 65 20 68 61 6e 64 73 68 61 6b 65 0a 70 72 6f 63 e handshake.proc
8710: 65 73 73 20 69 6e 20 6f 72 64 65 72 20 66 6f 72 ess in order for
8720: 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e the application
8730: 20 74 6f 20 76 61 6c 69 64 61 74 65 20 74 68 65 to validate the
8740: 20 70 72 6f 76 69 64 65 64 20 76 61 6c 75 65 28 provided value(
8750: 73 29 5c 26 2e 20 53 65 65 0a 62 65 6c 6f 77 20 s)\&. See.below
8760: 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 for the possible
8770: 20 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65 arguments passe
8780: 64 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 63 d to the callbac
8790: 6b 20 73 63 72 69 70 74 5c 26 2e 20 49 66 20 6e k script\&. If n
87a0: 6f 74 0a 73 70 65 63 69 66 69 65 64 2c 20 4f 70 ot.specified, Op
87b0: 65 6e 53 53 4c 20 77 69 6c 6c 20 61 63 63 65 70 enSSL will accep
87c0: 74 20 61 6c 6c 20 76 61 6c 69 64 20 63 65 72 74 t all valid cert
87d0: 69 66 69 63 61 74 65 73 20 61 6e 64 20 65 78 74 ificates and ext
87e0: 65 6e 73 69 6f 6e 73 5c 26 2e 20 54 6f 20 72 65 ensions\&. To re
87f0: 6a 65 63 74 0a 74 68 65 20 76 61 6c 75 65 20 61 ject.the value a
8800: 6e 64 20 61 62 6f 72 74 20 74 68 65 20 63 6f 6e nd abort the con
8810: 6e 65 63 74 69 6f 6e 2c 20 74 68 65 20 63 61 6c nection, the cal
8820: 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 74 lback should ret
8830: 75 72 6e 20 30 5c 26 2e 20 54 6f 20 61 63 63 65 urn 0\&. To acce
8840: 70 74 20 74 68 65 0a 76 61 6c 75 65 20 61 6e 64 pt the.value and
8850: 20 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 6f continue the co
8860: 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73 68 6f nnection, it sho
8870: 75 6c 64 20 72 65 74 75 72 6e 20 31 5c 26 2e 20 uld return 1\&.
8880: 54 6f 20 72 65 6a 65 63 74 20 74 68 65 20 76 61 To reject the va
8890: 6c 75 65 2c 20 62 75 74 0a 63 6f 6e 74 69 6e 75 lue, but.continu
88a0: 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e e the connection
88b0: 2c 20 69 74 20 73 68 6f 75 6c 64 20 72 65 74 75 , it should retu
88c0: 72 6e 20 32 5c 26 2e 20 54 68 69 73 20 63 61 6c rn 2\&. This cal
88d0: 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 lback is new for
88e0: 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c 26 2e TclTLS 1\&.8\&.
88f0: 0a 2e 54 50 0a 5c 66 42 61 6c 70 6e 5c 66 52 20 ..TP.\fBalpn\fR
8900: 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 70 72 6f \fIchannelId pro
8910: 74 6f 63 6f 6c 20 6d 61 74 63 68 5c 66 52 0a 46 tocol match\fR.F
8920: 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 73 or servers, this
8930: 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 form of callbac
8940: 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 k is invoked whe
8950: 6e 20 74 68 65 20 63 6c 69 65 6e 74 20 41 4c 50 n the client ALP
8960: 4e 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 0a 72 N extension is.r
8970: 65 63 65 69 76 65 64 5c 26 2e 20 49 66 20 5c 66 eceived\&. If \f
8980: 49 6d 61 74 63 68 5c 66 52 20 69 73 20 74 72 75 Imatch\fR is tru
8990: 65 2c 20 74 68 65 6e 20 5c 66 49 70 72 6f 74 6f e, then \fIproto
89a0: 63 6f 6c 5c 66 52 20 69 73 20 74 68 65 20 66 69 col\fR is the fi
89b0: 72 73 74 0a 5c 66 42 2d 61 6c 70 6e 5c 66 52 20 rst.\fB-alpn\fR
89c0: 70 72 6f 74 6f 63 6f 6c 20 6f 70 74 69 6f 6e 20 protocol option
89d0: 69 6e 20 63 6f 6d 6d 6f 6e 20 74 6f 20 62 6f 74 in common to bot
89e0: 68 20 74 68 65 20 63 6c 69 65 6e 74 20 61 6e 64 h the client and
89f0: 20 73 65 72 76 65 72 5c 26 2e 0a 49 66 20 6e 6f server\&..If no
8a00: 74 2c 20 74 68 65 20 66 69 72 73 74 20 63 6c 69 t, the first cli
8a10: 65 6e 74 20 73 70 65 63 69 66 69 65 64 20 70 72 ent specified pr
8a20: 6f 74 6f 63 6f 6c 20 69 73 20 75 73 65 64 5c 26 otocol is used\&
8a30: 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 . This callback
8a40: 69 73 20 63 61 6c 6c 65 64 0a 61 66 74 65 72 20 is called.after
8a50: 74 68 65 20 48 65 6c 6c 6f 20 61 6e 64 20 41 4c the Hello and AL
8a60: 50 4e 20 63 61 6c 6c 62 61 63 6b 73 5c 26 2e 0a PN callbacks\&..
8a70: 2e 54 50 0a 5c 66 42 68 65 6c 6c 6f 5c 66 52 20 .TP.\fBhello\fR
8a80: 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 73 65 72 \fIchannelId ser
8a90: 76 65 72 6e 61 6d 65 5c 66 52 0a 46 6f 72 20 73 vername\fR.For s
8aa0: 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 ervers, this for
8ab0: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 m of callback is
8ac0: 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 invoked during
8ad0: 63 6c 69 65 6e 74 20 68 65 6c 6c 6f 20 6d 65 73 client hello mes
8ae0: 73 61 67 65 0a 70 72 6f 63 65 73 73 69 6e 67 5c sage.processing\
8af0: 26 2e 20 54 68 65 20 70 75 72 70 6f 73 65 20 69 &. The purpose i
8b00: 73 20 73 6f 20 74 68 65 20 73 65 72 76 65 72 20 s so the server
8b10: 63 61 6e 20 73 65 6c 65 63 74 20 74 68 65 20 61 can select the a
8b20: 70 70 72 6f 70 72 69 61 74 65 20 63 65 72 74 69 ppropriate certi
8b30: 66 69 63 61 74 65 0a 74 6f 20 70 72 65 73 65 6e ficate.to presen
8b40: 74 20 74 6f 20 74 68 65 20 63 6c 69 65 6e 74 2c t to the client,
8b50: 20 61 6e 64 20 74 6f 20 6d 61 6b 65 20 6f 74 68 and to make oth
8b60: 65 72 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e er configuration
8b70: 20 61 64 6a 75 73 74 6d 65 6e 74 73 20 72 65 6c adjustments rel
8b80: 65 76 61 6e 74 0a 74 6f 20 74 68 61 74 20 73 65 evant.to that se
8b90: 72 76 65 72 20 6e 61 6d 65 20 61 6e 64 20 69 74 rver name and it
8ba0: 73 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 5c s configuration\
8bb0: 26 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 64 20 &. It is called
8bc0: 62 65 66 6f 72 65 20 74 68 65 20 53 4e 49 20 61 before the SNI a
8bd0: 6e 64 20 41 4c 50 4e 0a 63 61 6c 6c 62 61 63 6b nd ALPN.callback
8be0: 73 5c 26 2e 0a 2e 54 50 0a 5c 66 42 73 6e 69 5c s\&...TP.\fBsni\
8bf0: 66 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 fR \fIchannelId
8c00: 73 65 72 76 65 72 6e 61 6d 65 5c 66 52 0a 46 6f servername\fR.Fo
8c10: 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 r servers, this
8c20: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b form of callback
8c30: 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e is invoked when
8c40: 20 74 68 65 20 53 65 72 76 65 72 20 4e 61 6d 65 the Server Name
8c50: 20 49 6e 64 69 63 61 74 69 6f 6e 0a 28 53 4e 49 Indication.(SNI
8c60: 29 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 72 ) extension is r
8c70: 65 63 65 69 76 65 64 5c 26 2e 20 54 68 65 20 5c eceived\&. The \
8c80: 66 49 73 65 72 76 65 72 6e 61 6d 65 5c 66 52 20 fIservername\fR
8c90: 61 72 67 75 6d 65 6e 74 20 69 73 20 74 68 65 20 argument is the
8ca0: 63 6c 69 65 6e 74 0a 70 72 6f 76 69 64 65 64 20 client.provided
8cb0: 73 65 72 76 65 72 20 6e 61 6d 65 20 73 70 65 63 server name spec
8cc0: 69 66 69 65 64 20 69 6e 20 74 68 65 20 5c 66 42 ified in the \fB
8cd0: 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e 5c -servername</b>\
8ce0: 66 52 20 6f 70 74 69 6f 6e 5c 26 2e 20 54 68 65 fR option\&. The
8cf0: 0a 70 75 72 70 6f 73 65 20 69 73 20 73 6f 20 77 .purpose is so w
8d00: 68 65 6e 20 61 20 73 65 72 76 65 72 20 73 75 70 hen a server sup
8d10: 70 6f 72 74 73 20 6d 75 6c 74 69 70 6c 65 20 6e ports multiple n
8d20: 61 6d 65 73 2c 20 74 68 65 20 72 69 67 68 74 20 ames, the right
8d30: 63 65 72 74 69 66 69 63 61 74 65 0a 63 61 6e 20 certificate.can
8d40: 62 65 20 75 73 65 64 5c 26 2e 20 49 74 20 69 73 be used\&. It is
8d50: 20 63 61 6c 6c 65 64 20 61 66 74 65 72 20 74 68 called after th
8d60: 65 20 68 65 6c 6c 6f 20 63 61 6c 6c 62 61 63 6b e hello callback
8d70: 20 62 75 74 20 62 65 66 6f 72 65 20 74 68 65 20 but before the
8d80: 41 4c 50 4e 0a 63 61 6c 6c 62 61 63 6b 5c 26 2e ALPN.callback\&.
8d90: 0a 2e 54 50 0a 5c 66 42 76 65 72 69 66 79 5c 66 ..TP.\fBverify\f
8da0: 52 20 5c 66 49 63 68 61 6e 6e 65 6c 49 64 20 64 R \fIchannelId d
8db0: 65 70 74 68 20 63 65 72 74 20 73 74 61 74 75 73 epth cert status
8dc0: 20 65 72 72 6f 72 5c 66 52 0a 54 68 69 73 20 66 error\fR.This f
8dd0: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 orm of callback
8de0: 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 4f 70 is invoked by Op
8df0: 65 6e 53 53 4c 20 77 68 65 6e 20 61 20 6e 65 77 enSSL when a new
8e00: 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 20 certificate is
8e10: 72 65 63 65 69 76 65 64 0a 66 72 6f 6d 20 74 68 received.from th
8e20: 65 20 70 65 65 72 5c 26 2e 20 49 74 20 61 6c 6c e peer\&. It all
8e30: 6f 77 73 20 74 68 65 20 63 6c 69 65 6e 74 20 74 ows the client t
8e40: 6f 20 63 68 65 63 6b 20 74 68 65 20 63 65 72 74 o check the cert
8e50: 69 66 69 63 61 74 65 20 76 65 72 69 66 69 63 61 ificate verifica
8e60: 74 69 6f 6e 0a 72 65 73 75 6c 74 73 20 61 6e 64 tion.results and
8e70: 20 63 68 6f 6f 73 65 20 77 68 65 74 68 65 72 20 choose whether
8e80: 74 6f 20 63 6f 6e 74 69 6e 75 65 20 6f 72 20 6e to continue or n
8e90: 6f 74 5c 26 2e 20 49 74 20 69 73 20 63 61 6c 6c ot\&. It is call
8ea0: 65 64 20 66 6f 72 20 65 61 63 68 0a 63 65 72 74 ed for each.cert
8eb0: 69 66 69 63 61 74 65 20 69 6e 20 74 68 65 20 63 ificate in the c
8ec0: 65 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e ertificate chain
8ed0: 5c 26 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 \&. This callbac
8ee0: 6b 20 77 61 73 20 6d 6f 76 65 64 20 66 72 6f 6d k was moved from
8ef0: 0a 5c 66 42 2d 63 6f 6d 6d 61 6e 64 5c 66 52 20 .\fB-command\fR
8f00: 69 6e 20 54 63 6c 54 4c 53 20 31 5c 26 2e 38 5c in TclTLS 1\&.8\
8f10: 26 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 &. The arguments
8f20: 20 61 72 65 3a 0a 2e 52 53 0a 2e 54 50 0a 5c 66 are:..RS..TP.\f
8f30: 49 64 65 70 74 68 5c 66 52 0a 54 68 65 20 64 65 Idepth\fR.The de
8f40: 70 74 68 20 69 73 20 74 68 65 20 69 6e 74 65 67 pth is the integ
8f50: 65 72 20 64 65 70 74 68 20 6f 66 20 74 68 65 20 er depth of the
8f60: 63 65 72 74 69 66 69 63 61 74 65 20 69 6e 20 74 certificate in t
8f70: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63 he certificate c
8f80: 68 61 69 6e 2c 0a 77 68 65 72 65 20 30 20 69 73 hain,.where 0 is
8f90: 20 74 68 65 20 70 65 65 72 20 63 65 72 74 69 66 the peer certif
8fa0: 69 63 61 74 65 20 61 6e 64 20 68 69 67 68 65 72 icate and higher
8fb0: 20 76 61 6c 75 65 73 20 67 6f 69 6e 67 20 75 70 values going up
8fc0: 20 74 6f 20 74 68 65 20 43 65 72 74 69 66 69 63 to the Certific
8fd0: 61 74 65 0a 41 75 74 68 6f 72 69 74 79 20 28 43 ate.Authority (C
8fe0: 41 29 5c 26 2e 0a 2e 54 50 0a 5c 66 49 63 65 72 A)\&...TP.\fIcer
8ff0: 74 5c 66 52 0a 54 68 65 20 63 65 72 74 20 61 72 t\fR.The cert ar
9000: 67 75 6d 65 6e 74 20 69 73 20 61 20 6c 69 73 74 gument is a list
9010: 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 of key-value pa
9020: 69 72 73 20 73 69 6d 69 6c 61 72 20 74 6f 20 74 irs similar to t
9030: 68 6f 73 65 20 72 65 74 75 72 6e 65 64 20 62 79 hose returned by
9040: 0a 5c 66 42 74 6c 73 3a 3a 73 74 61 74 75 73 5c .\fBtls::status\
9050: 66 52 5c 26 2e 0a 2e 54 50 0a 5c 66 49 73 74 61 fR\&...TP.\fIsta
9060: 74 75 73 5c 66 52 0a 54 68 65 20 73 74 61 74 75 tus\fR.The statu
9070: 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74 68 s argument is th
9080: 65 20 62 6f 6f 6c 65 61 6e 20 76 61 6c 69 64 69 e boolean validi
9090: 74 79 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e ty of the curren
90a0: 74 20 63 65 72 74 69 66 69 63 61 74 65 20 77 68 t certificate wh
90b0: 65 72 65 20 30 0a 69 73 20 69 6e 76 61 6c 69 64 ere 0.is invalid
90c0: 20 61 6e 64 20 31 20 69 73 20 76 61 6c 69 64 5c and 1 is valid\
90d0: 26 2e 0a 2e 54 50 0a 5c 66 49 65 72 72 6f 72 5c &...TP.\fIerror\
90e0: 66 52 0a 54 68 65 20 65 72 72 6f 72 20 61 72 67 fR.The error arg
90f0: 75 6d 65 6e 74 20 69 73 20 74 68 65 20 65 72 72 ument is the err
9100: 6f 72 20 6d 65 73 73 61 67 65 2c 20 69 66 20 61 or message, if a
9110: 6e 79 2c 20 67 65 6e 65 72 61 74 65 64 20 62 79 ny, generated by
9120: 0a 5c 66 42 58 35 30 39 5f 53 54 4f 52 45 5f 43 .\fBX509_STORE_C
9130: 54 58 5f 67 65 74 5f 65 72 72 6f 72 28 29 5c 66 TX_get_error()\f
9140: 52 5c 26 2e 0a 2e 52 45 0a 2e 50 50 0a 52 65 66 R\&...RE..PP.Ref
9150: 65 72 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e 74 erence implement
9160: 61 74 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 20 ations of these
9170: 63 61 6c 6c 62 61 63 6b 73 20 61 72 65 20 70 72 callbacks are pr
9180: 6f 76 69 64 65 64 20 69 6e 20 22 5c 66 49 74 6c ovided in "\fItl
9190: 73 5c 26 2e 74 63 6c 5c 66 52 22 0a 61 73 20 5c s\&.tcl\fR".as \
91a0: 66 42 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 5c fBtls::callback\
91b0: 66 52 2c 20 5c 66 42 74 6c 73 3a 3a 70 61 73 73 fR, \fBtls::pass
91c0: 77 6f 72 64 5c 66 52 2c 20 61 6e 64 20 5c 66 42 word\fR, and \fB
91d0: 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f tls::validate_co
91e0: 6d 6d 61 6e 64 5c 66 52 0a 72 65 73 70 65 63 74 mmand\fR.respect
91f0: 69 76 65 6c 79 5c 26 2e 20 4e 6f 74 65 20 74 68 ively\&. Note th
9200: 61 74 20 74 68 65 73 65 20 61 72 65 20 6f 6e 6c at these are onl
9210: 79 20 5c 66 49 73 61 6d 70 6c 65 5c 66 52 20 69 y \fIsample\fR i
9220: 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 5c 26 mplementations\&
9230: 2e 20 49 6e 20 61 20 6d 6f 72 65 0a 72 65 61 6c . In a more.real
9240: 69 73 74 69 63 20 64 65 70 6c 6f 79 6d 65 6e 74 istic deployment
9250: 20 79 6f 75 20 77 6f 75 6c 64 20 73 70 65 63 69 you would speci
9260: 66 79 20 79 6f 75 72 20 6f 77 6e 20 63 61 6c 6c fy your own call
9270: 62 61 63 6b 20 73 63 72 69 70 74 73 20 6f 6e 20 back scripts on
9280: 65 61 63 68 20 54 4c 53 0a 63 68 61 6e 6e 65 6c each TLS.channel
9290: 20 75 73 69 6e 67 20 74 68 65 20 5c 66 42 2d 63 using the \fB-c
92a0: 6f 6d 6d 61 6e 64 5c 66 52 2c 20 5c 66 42 2d 70 ommand\fR, \fB-p
92b0: 61 73 73 77 6f 72 64 5c 66 52 2c 20 61 6e 64 0a assword\fR, and.
92c0: 5c 66 42 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d \fB-validate_com
92d0: 6d 61 6e 64 5c 66 52 20 6f 70 74 69 6f 6e 73 5c mand\fR options\
92e0: 26 2e 0a 2e 50 50 0a 54 68 65 20 64 65 66 61 75 &...PP.The defau
92f0: 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 65 6e lt behavior when
9300: 20 74 68 65 20 5c 66 42 2d 63 6f 6d 6d 61 6e 64 the \fB-command
9310: 5c 66 52 20 61 6e 64 20 5c 66 42 2d 76 61 6c 69 \fR and \fB-vali
9320: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 52 0a date_command\fR.
9330: 6f 70 74 69 6f 6e 73 20 61 72 65 20 6e 6f 74 20 options are not
9340: 73 70 65 63 69 66 69 65 64 2c 20 69 73 20 66 6f specified, is fo
9350: 72 20 54 63 6c 54 4c 53 20 74 6f 20 70 72 6f 63 r TclTLS to proc
9360: 65 73 73 20 74 68 65 20 61 73 73 6f 63 69 61 74 ess the associat
9370: 65 64 20 6c 69 62 72 61 72 79 0a 63 61 6c 6c 62 ed library.callb
9380: 61 63 6b 73 20 69 6e 74 65 72 6e 61 6c 6c 79 5c acks internally\
9390: 26 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 62 &. The default b
93a0: 65 68 61 76 69 6f 72 20 77 68 65 6e 20 74 68 65 ehavior when the
93b0: 20 5c 66 42 2d 70 61 73 73 77 6f 72 64 5c 66 52 \fB-password\fR
93c0: 20 6f 70 74 69 6f 6e 0a 69 73 20 6e 6f 74 20 73 option.is not s
93d0: 70 65 63 69 66 69 65 64 20 69 73 20 66 6f 72 20 pecified is for
93e0: 54 63 6c 54 4c 53 20 74 6f 20 70 72 6f 63 65 73 TclTLS to proces
93f0: 73 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 s the associated
9400: 20 6c 69 62 72 61 72 79 20 63 61 6c 6c 62 61 63 library callbac
9410: 6b 73 20 62 79 0a 61 74 74 65 6d 70 74 69 6e 67 ks by.attempting
9420: 20 74 6f 20 63 61 6c 6c 20 5c 66 42 74 6c 73 3a to call \fBtls:
9430: 3a 70 61 73 73 77 6f 72 64 5c 66 52 5c 26 2e 20 :password\fR\&.
9440: 54 68 65 20 64 69 66 66 65 72 65 6e 63 65 20 62 The difference b
9450: 65 74 77 65 65 6e 20 74 68 65 73 65 20 74 77 6f etween these two
9460: 0a 62 65 68 61 76 69 6f 72 73 20 69 73 20 61 20 .behaviors is a
9470: 63 6f 6e 73 65 71 75 65 6e 63 65 20 6f 66 20 6d consequence of m
9480: 61 69 6e 74 61 69 6e 69 6e 67 20 63 6f 6d 70 61 aintaining compa
9490: 74 69 62 69 6c 69 74 79 20 77 69 74 68 20 65 61 tibility with ea
94a0: 72 6c 69 65 72 0a 69 6d 70 6c 65 6d 65 6e 74 61 rlier.implementa
94b0: 74 69 6f 6e 73 5c 26 2e 0a 2e 50 50 0a 5c 66 49 tions\&...PP.\fI
94c0: 54 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 72 The use of the r
94d0: 65 66 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 63 eference callbac
94e0: 6b 73 20 5c 66 42 74 6c 73 3a 3a 63 61 6c 6c 62 ks \fBtls::callb
94f0: 61 63 6b 5c 66 52 2c 20 5c 66 42 74 6c 73 3a 3a ack\fR, \fBtls::
9500: 70 61 73 73 77 6f 72 64 5c 66 52 2c 0a 61 6e 64 password\fR,.and
9510: 20 5c 66 42 74 6c 73 3a 3a 76 61 6c 69 64 61 74 \fBtls::validat
9520: 65 5f 63 6f 6d 6d 61 6e 64 5c 66 52 20 69 73 20 e_command\fR is
9530: 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 5c not recommended\
9540: 26 2e 20 54 68 65 79 20 6d 61 79 20 62 65 20 72 &. They may be r
9550: 65 6d 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 emoved from futu
9560: 72 65 20 72 65 6c 65 61 73 65 73 5c 26 2e 5c 66 re releases\&.\f
9570: 52 0a 2e 53 48 20 44 45 42 55 47 0a 46 6f 72 20 R..SH DEBUG.For
9580: 6d 6f 73 74 20 64 65 62 75 67 67 69 6e 67 20 6e most debugging n
9590: 65 65 64 73 2c 20 74 68 65 20 5c 66 42 2d 63 61 eeds, the \fB-ca
95a0: 6c 6c 62 61 63 6b 5c 66 52 20 6f 70 74 69 6f 6e llback\fR option
95b0: 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 can be used to
95c0: 70 72 6f 76 69 64 65 0a 73 75 66 66 69 63 69 65 provide.sufficie
95d0: 6e 74 20 69 6e 73 69 67 68 74 20 61 6e 64 20 69 nt insight and i
95e0: 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 nformation on th
95f0: 65 20 54 4c 53 20 68 61 6e 64 73 68 61 6b 65 20 e TLS handshake
9600: 61 6e 64 20 70 72 6f 67 72 65 73 73 5c 26 2e 20 and progress\&.
9610: 49 66 0a 66 75 72 74 68 65 72 20 74 72 6f 75 62 If.further troub
9620: 6c 65 73 68 6f 6f 74 69 6e 67 20 69 6e 73 69 67 leshooting insig
9630: 68 74 20 69 73 20 6e 65 65 64 65 64 2c 20 74 68 ht is needed, th
9640: 65 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 6f e compile time o
9650: 70 74 69 6f 6e 0a 5c 66 42 2d 2d 65 6e 61 62 6c ption.\fB--enabl
9660: 65 2d 64 65 62 75 67 5c 66 52 20 63 61 6e 20 62 e-debug\fR can b
9670: 65 20 75 73 65 64 20 74 6f 20 67 65 74 20 64 65 e used to get de
9680: 74 61 69 6c 65 64 20 65 78 65 63 75 74 69 6f 6e tailed execution
9690: 20 66 6c 6f 77 20 73 74 61 74 75 73 5c 26 2e 0a flow status\&..
96a0: 2e 50 50 0a 54 4c 53 20 6b 65 79 20 6c 6f 67 67 .PP.TLS key logg
96b0: 69 6e 67 20 63 61 6e 20 62 65 20 65 6e 61 62 6c ing can be enabl
96c0: 65 64 20 62 79 20 73 65 74 74 69 6e 67 20 74 68 ed by setting th
96d0: 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 e environment va
96e0: 72 69 61 62 6c 65 0a 5c 66 42 53 53 4c 4b 45 59 riable.\fBSSLKEY
96f0: 4c 4f 47 46 49 4c 45 5c 66 52 20 74 6f 20 74 68 LOGFILE\fR to th
9700: 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 66 69 e name of the fi
9710: 6c 65 20 74 6f 20 6c 6f 67 20 74 6f 5c 26 2e 20 le to log to\&.
9720: 54 68 65 6e 20 77 68 65 6e 65 76 65 72 20 54 4c Then whenever TL
9730: 53 20 6b 65 79 0a 6d 61 74 65 72 69 61 6c 20 69 S key.material i
9740: 73 20 67 65 6e 65 72 61 74 65 64 20 6f 72 20 72 s generated or r
9750: 65 63 65 69 76 65 64 20 69 74 20 77 69 6c 6c 20 eceived it will
9760: 62 65 20 6c 6f 67 67 65 64 20 74 6f 20 74 68 65 be logged to the
9770: 20 66 69 6c 65 5c 26 2e 20 54 68 69 73 20 69 73 file\&. This is
9780: 20 75 73 65 66 75 6c 0a 66 6f 72 20 6c 6f 67 67 useful.for logg
9790: 69 6e 67 20 6b 65 79 20 64 61 74 61 20 66 6f 72 ing key data for
97a0: 20 6e 65 74 77 6f 72 6b 20 6c 6f 67 67 69 6e 67 network logging
97b0: 20 74 6f 6f 6c 73 20 74 6f 20 75 73 65 20 74 6f tools to use to
97c0: 20 64 65 63 72 79 70 74 20 74 68 65 20 64 61 74 decrypt the dat
97d0: 61 5c 26 2e 0a 2e 50 50 0a 54 68 65 20 5c 66 42 a\&...PP.The \fB
97e0: 74 6c 73 3a 3a 64 65 62 75 67 5c 66 52 20 76 61 tls::debug\fR va
97f0: 72 69 61 62 6c 65 20 70 72 6f 76 69 64 65 73 20 riable provides
9800: 73 6f 6d 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 some additional
9810: 63 6f 6e 74 72 6f 6c 20 6f 76 65 72 20 74 68 65 control over the
9820: 0a 64 65 62 75 67 20 6c 6f 67 67 69 6e 67 20 69 .debug logging i
9830: 6e 20 74 68 65 20 5c 66 42 74 6c 73 3a 3a 63 61 n the \fBtls::ca
9840: 6c 6c 62 61 63 6b 5c 66 52 2c 20 5c 66 42 74 6c llback\fR, \fBtl
9850: 73 3a 3a 70 61 73 73 77 6f 72 64 5c 66 52 2c 20 s::password\fR,
9860: 61 6e 64 0a 5c 66 42 74 6c 73 3a 3a 76 61 6c 69 and.\fBtls::vali
9870: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 52 20 date_command\fR
9880: 64 65 66 61 75 6c 74 20 68 61 6e 64 6c 65 72 73 default handlers
9890: 20 69 6e 20 22 5c 66 49 74 6c 73 5c 26 2e 74 63 in "\fItls\&.tc
98a0: 6c 5c 66 52 22 5c 26 2e 0a 54 68 65 20 64 65 66 l\fR"\&..The def
98b0: 61 75 6c 74 20 76 61 6c 75 65 20 69 73 20 30 20 ault value is 0
98c0: 77 69 74 68 20 68 69 67 68 65 72 20 76 61 6c 75 with higher valu
98d0: 65 73 20 70 72 6f 64 75 63 69 6e 67 20 6d 6f 72 es producing mor
98e0: 65 20 64 69 61 67 6e 6f 73 74 69 63 20 6f 75 74 e diagnostic out
98f0: 70 75 74 2c 0a 61 6e 64 20 77 69 6c 6c 20 61 6c put,.and will al
9900: 73 6f 20 66 6f 72 63 65 20 74 68 65 20 76 65 72 so force the ver
9910: 69 66 79 20 6d 65 74 68 6f 64 20 69 6e 20 5c 66 ify method in \f
9920: 42 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 5c 66 Btls::callback\f
9930: 52 20 74 6f 20 61 63 63 65 70 74 20 74 68 65 0a R to accept the.
9940: 63 65 72 74 69 66 69 63 61 74 65 2c 20 65 76 65 certificate, eve
9950: 6e 20 69 66 20 69 74 20 69 73 20 69 6e 76 61 6c n if it is inval
9960: 69 64 20 77 68 65 6e 20 74 68 65 20 5c 66 42 2d id when the \fB-
9970: 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 5c validatecommand\
9980: 66 52 0a 6f 70 74 69 6f 6e 20 69 73 20 73 65 74 fR.option is set
9990: 20 74 6f 20 5c 66 42 74 6c 73 3a 3a 76 61 6c 69 to \fBtls::vali
99a0: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5c 66 52 5c date_command\fR\
99b0: 26 2e 0a 2e 50 50 0a 5c 66 49 54 68 65 20 75 73 &...PP.\fIThe us
99c0: 65 20 6f 66 20 74 68 65 20 76 61 72 69 61 62 6c e of the variabl
99d0: 65 20 5c 66 42 74 6c 73 3a 3a 64 65 62 75 67 5c e \fBtls::debug\
99e0: 66 52 20 69 73 20 6e 6f 74 20 72 65 63 6f 6d 6d fR is not recomm
99f0: 65 6e 64 65 64 5c 26 2e 0a 49 74 20 6d 61 79 20 ended\&..It may
9a00: 62 65 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d 20 be removed from
9a10: 66 75 74 75 72 65 20 72 65 6c 65 61 73 65 73 5c future releases\
9a20: 26 2e 5c 66 52 0a 2e 53 48 20 22 48 54 54 50 20 &.\fR..SH "HTTP
9a30: 50 41 43 4b 41 47 45 20 45 58 41 4d 50 4c 45 53 PACKAGE EXAMPLES
9a40: 22 0a 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 ".The following
9a50: 61 72 65 20 65 78 61 6d 70 6c 65 20 73 63 72 69 are example scri
9a60: 70 74 73 20 74 6f 20 64 6f 77 6e 6c 6f 61 64 20 pts to download
9a70: 61 20 77 65 62 70 61 67 65 20 61 6e 64 20 66 69 a webpage and fi
9a80: 6c 65 20 75 73 69 6e 67 20 74 68 65 0a 68 74 74 le using the.htt
9a90: 70 20 70 61 63 6b 61 67 65 5c 26 2e 20 53 65 65 p package\&. See
9aa0: 20 5c 66 42 43 65 72 74 69 66 69 63 61 74 65 20 \fBCertificate
9ab0: 56 61 6c 69 64 61 74 69 6f 6e 5c 66 52 20 66 6f Validation\fR fo
9ac0: 72 20 77 68 65 74 68 65 72 20 74 68 65 0a 5c 66 r whether the.\f
9ad0: 42 2d 63 61 64 69 72 5c 66 52 2c 20 5c 66 42 2d B-cadir\fR, \fB-
9ae0: 63 61 66 69 6c 65 5c 66 52 2c 20 61 6e 64 20 5c cafile\fR, and \
9af0: 66 42 2d 63 61 73 74 6f 72 65 5c 66 52 20 6f 70 fB-castore\fR op
9b00: 74 69 6f 6e 73 20 61 72 65 20 61 6c 73 6f 0a 6e tions are also.n
9b10: 65 65 64 65 64 5c 26 2e 20 53 65 65 20 74 68 65 eeded\&. See the
9b20: 20 64 65 6d 6f 73 20 64 69 72 65 63 74 6f 72 79 demos directory
9b30: 20 66 6f 72 20 6d 6f 72 65 20 65 78 61 6d 70 6c for more exampl
9b40: 65 20 73 63 72 69 70 74 73 5c 26 2e 0a 2e 50 50 e scripts\&...PP
9b50: 0a 45 78 61 6d 70 6c 65 20 23 31 3a 20 44 6f 77 .Example #1: Dow
9b60: 6e 6c 6f 61 64 20 61 20 77 65 62 20 70 61 67 65 nload a web page
9b70: 0a 2e 43 53 0a 0a 0a 0a 70 61 63 6b 61 67 65 20 ..CS....package
9b80: 72 65 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 require http.pac
9b90: 6b 61 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 kage require tls
9ba0: 0a 0a 73 65 74 20 75 72 6c 20 22 68 74 74 70 73 ..set url "https
9bb0: 3a 2f 2f 77 77 77 5c 26 2e 74 63 6c 5c 26 2e 74 ://www\&.tcl\&.t
9bc0: 6b 2f 22 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 k/".http::regist
9bd0: 65 72 20 68 74 74 70 73 20 34 34 33 20 5b 6c 69 er https 443 [li
9be0: 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 st ::tls::socket
9bf0: 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 -autoservername
9c00: 20 31 20 2d 72 65 71 75 69 72 65 20 31 5d 0a 0a 1 -require 1]..
9c10: 23 20 47 65 74 20 55 52 4c 0a 73 65 74 20 74 6f # Get URL.set to
9c20: 6b 65 6e 20 5b 68 74 74 70 3a 3a 67 65 74 75 72 ken [http::getur
9c30: 6c 20 24 75 72 6c 5d 0a 0a 23 20 43 68 65 63 6b l $url]..# Check
9c40: 20 66 6f 72 20 65 72 72 6f 72 0a 69 66 20 7b 5b for error.if {[
9c50: 68 74 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f http::status $to
9c60: 6b 65 6e 5d 20 6e 65 20 22 6f 6b 22 7d 20 7b 0a ken] ne "ok"} {.
9c70: 20 20 20 20 70 75 74 73 20 5b 66 6f 72 6d 61 74 puts [format
9c80: 20 22 45 72 72 6f 72 20 25 73 22 20 5b 68 74 74 "Error %s" [htt
9c90: 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e p::status $token
9ca0: 5d 5d 0a 7d 0a 0a 23 20 53 61 76 65 20 77 65 62 ]].}..# Save web
9cb0: 20 70 61 67 65 20 74 6f 20 66 69 6c 65 0a 73 65 page to file.se
9cc0: 74 20 63 68 20 5b 6f 70 65 6e 20 65 78 61 6d 70 t ch [open examp
9cd0: 6c 65 5c 26 2e 68 74 6d 6c 20 77 62 5d 0a 70 75 le\&.html wb].pu
9ce0: 74 73 20 24 63 68 20 5b 68 74 74 70 3a 3a 64 61 ts $ch [http::da
9cf0: 74 61 20 24 74 6f 6b 65 6e 5d 0a 63 6c 6f 73 65 ta $token].close
9d00: 20 24 63 68 0a 0a 23 20 43 6c 65 61 6e 75 70 0a $ch..# Cleanup.
9d10: 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 ::http::cleanup
9d20: 24 74 6f 6b 65 6e 0a 0a 2e 43 45 0a 45 78 61 6d $token...CE.Exam
9d30: 70 6c 65 20 23 32 3a 20 44 6f 77 6e 6c 6f 61 64 ple #2: Download
9d40: 20 61 20 66 69 6c 65 0a 2e 43 53 0a 0a 0a 0a 70 a file..CS....p
9d50: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 ackage require h
9d60: 74 74 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 ttp.package requ
9d70: 69 72 65 20 74 6c 73 0a 0a 73 65 74 20 75 72 6c ire tls..set url
9d80: 20 22 68 74 74 70 73 3a 2f 2f 77 69 6b 69 5c 26 "https://wiki\&
9d90: 2e 74 63 6c 2d 6c 61 6e 67 5c 26 2e 6f 72 67 2f .tcl-lang\&.org/
9da0: 73 69 74 65 6d 61 70 5c 26 2e 78 6d 6c 22 0a 68 sitemap\&.xml".h
9db0: 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 ttp::register ht
9dc0: 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a tps 443 [list ::
9dd0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 tls::socket -aut
9de0: 6f 73 65 72 76 65 72 6e 61 6d 65 20 31 20 2d 72 oservername 1 -r
9df0: 65 71 75 69 72 65 20 31 5d 0a 0a 23 20 4f 70 65 equire 1]..# Ope
9e00: 6e 20 6f 75 74 70 75 74 20 66 69 6c 65 0a 73 65 n output file.se
9e10: 74 20 66 69 6c 65 6e 61 6d 65 20 5b 66 69 6c 65 t filename [file
9e20: 20 74 61 69 6c 20 24 75 72 6c 5d 0a 73 65 74 20 tail $url].set
9e30: 63 68 20 5b 6f 70 65 6e 20 24 66 69 6c 65 6e 61 ch [open $filena
9e40: 6d 65 20 77 62 5d 0a 0a 23 20 47 65 74 20 66 69 me wb]..# Get fi
9e50: 6c 65 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 3a 3a le.set token [::
9e60: 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 24 75 72 http::geturl $ur
9e70: 6c 20 2d 62 6c 6f 63 6b 73 69 7a 65 20 36 35 35 l -blocksize 655
9e80: 33 36 20 2d 63 68 61 6e 6e 65 6c 20 24 63 68 5d 36 -channel $ch]
9e90: 0a 0a 23 20 43 68 65 63 6b 20 66 6f 72 20 65 72 ..# Check for er
9ea0: 72 6f 72 0a 69 66 20 7b 5b 68 74 74 70 3a 3a 73 ror.if {[http::s
9eb0: 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 tatus $token] ne
9ec0: 20 22 6f 6b 22 7d 20 7b 0a 20 20 20 20 70 75 74 "ok"} {. put
9ed0: 73 20 5b 66 6f 72 6d 61 74 20 22 45 72 72 6f 72 s [format "Error
9ee0: 20 25 73 22 20 5b 68 74 74 70 3a 3a 73 74 61 74 %s" [http::stat
9ef0: 75 73 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 0a 23 us $token]].}..#
9f00: 20 43 6c 65 61 6e 75 70 0a 63 6c 6f 73 65 20 24 Cleanup.close $
9f10: 63 68 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e ch.::http::clean
9f20: 75 70 20 24 74 6f 6b 65 6e 0a 0a 2e 43 45 0a 2e up $token...CE..
9f30: 53 48 20 22 53 50 45 43 49 41 4c 20 43 4f 4e 53 SH "SPECIAL CONS
9f40: 49 44 45 52 41 54 49 4f 4e 53 22 0a 54 68 65 20 IDERATIONS".The
9f50: 63 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20 capabilities of
9f60: 74 68 69 73 20 70 61 63 6b 61 67 65 20 63 61 6e this package can
9f70: 20 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c 79 vary enormously
9f80: 20 62 61 73 65 64 20 75 70 6f 6e 20 68 6f 77 20 based upon how
9f90: 74 68 65 0a 6c 69 6e 6b 65 64 20 74 6f 20 4f 70 the.linked to Op
9fa0: 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 20 77 61 enSSL library wa
9fb0: 73 20 63 6f 6e 66 69 67 75 72 65 64 20 61 6e 64 s configured and
9fc0: 20 62 75 69 6c 74 5c 26 2e 20 4e 65 77 20 76 65 built\&. New ve
9fd0: 72 73 69 6f 6e 73 20 6d 61 79 20 6f 62 73 6f 6c rsions may obsol
9fe0: 65 74 65 0a 6f 6c 64 65 72 20 70 72 6f 74 6f 63 ete.older protoc
9ff0: 6f 6c 20 76 65 72 73 69 6f 6e 73 2c 20 61 64 64 ol versions, add
a000: 20 6f 72 20 72 65 6d 6f 76 65 20 63 69 70 68 65 or remove ciphe
a010: 72 73 2c 20 63 68 61 6e 67 65 20 64 65 66 61 75 rs, change defau
a020: 6c 74 20 76 61 6c 75 65 73 2c 20 65 74 63 5c 26 lt values, etc\&
a030: 2e 0a 55 73 65 20 74 68 65 20 5c 66 42 74 6c 73 ..Use the \fBtls
a040: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 5c 66 52 20 63 ::protocols\fR c
a050: 6f 6d 6d 61 6e 64 73 20 74 6f 20 6f 62 74 61 69 ommands to obtai
a060: 6e 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 0a n the supported.
a070: 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e protocol version
a080: 73 5c 26 2e 0a 2e 53 48 20 22 53 45 45 20 41 4c s\&...SH "SEE AL
a090: 53 4f 22 0a 5c 66 49 4f 70 65 6e 53 53 4c 5c 66 SO".\fIOpenSSL\f
a0a0: 52 20 5b 68 74 74 70 73 3a 2f 2f 77 77 77 5c 26 R [https://www\&
a0b0: 2e 6f 70 65 6e 73 73 6c 5c 26 2e 6f 72 67 2f 5d .openssl\&.org/]
a0c0: 2c 20 68 74 74 70 2c 20 73 6f 63 6b 65 74 0a 2e , http, socket..
a0d0: 53 48 20 4b 45 59 57 4f 52 44 53 0a 49 2f 4f 2c SH KEYWORDS.I/O,
a0e0: 20 49 50 20 41 64 64 72 65 73 73 2c 20 4f 70 65 IP Address, Ope
a0f0: 6e 53 53 4c 2c 20 53 53 4c 2c 20 54 43 50 2c 20 nSSL, SSL, TCP,
a100: 54 4c 53 2c 20 54 63 6c 54 4c 53 2c 20 61 73 79 TLS, TclTLS, asy
a110: 6e 63 68 72 6f 6e 6f 75 73 20 49 2f 4f 2c 20 62 nchronous I/O, b
a120: 69 6e 64 2c 20 63 65 72 74 69 66 69 63 61 74 65 ind, certificate
a130: 2c 20 63 68 61 6e 6e 65 6c 2c 20 63 6f 6e 6e 65 , channel, conne
a140: 63 74 69 6f 6e 2c 20 64 6f 6d 61 69 6e 20 6e 61 ction, domain na
a150: 6d 65 2c 20 68 6f 73 74 2c 20 68 74 74 70 73 2c me, host, https,
a160: 20 6e 65 74 77 6f 72 6b 2c 20 6e 65 74 77 6f 72 network, networ
a170: 6b 20 61 64 64 72 65 73 73 2c 20 73 6f 63 6b 65 k address, socke
a180: 74 2c 20 74 6c 73 0a 2e 53 48 20 43 41 54 45 47 t, tls..SH CATEG
a190: 4f 52 59 0a 74 6c 73 0a 2e 53 48 20 43 4f 50 59 ORY.tls..SH COPY
a1a0: 52 49 47 48 54 0a 2e 6e 66 0a 43 6f 70 79 72 69 RIGHT..nf.Copyri
a1b0: 67 68 74 20 28 63 29 20 31 39 39 39 20 4d 61 74 ght (c) 1999 Mat
a1c0: 74 20 4e 65 77 6d 61 6e 0a 43 6f 70 79 72 69 67 t Newman.Copyrig
a1d0: 68 74 20 28 63 29 20 32 30 30 34 20 53 74 61 72 ht (c) 2004 Star
a1e0: 66 69 73 68 20 53 79 73 74 65 6d 73 0a 43 6f 70 fish Systems.Cop
a1f0: 79 72 69 67 68 74 20 28 63 29 20 32 30 32 34 20 yright (c) 2024
a200: 42 72 69 61 6e 20 4f 27 48 61 67 61 6e 0a 0a 2e Brian O'Hagan...
a210: 66 69 0a fi.