File: secure.inc

package info (click to toggle)
tcllib 1.19-dfsg-2
  • links: PTS
  • area: main
  • in suites: buster
  • size: 67,328 kB
  • sloc: tcl: 208,371; ansic: 14,215; sh: 2,846; xml: 1,766; yacc: 1,145; pascal: 583; makefile: 106; perl: 84; f90: 84; python: 33; ruby: 13; php: 11
file content (18 lines) | stat: -rw-r--r-- 547 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[section {Secure connections}]

One way to secure connections made by objects of this package is to
require the package [package tls] and then configure the option
[option -socketcmd] to force the use of command [cmd tls::socket] to
open the socket.

[example_begin]
    # Load and initialize tls
    package require tls
    tls::init -cafile /path/to/ca/cert -keyfile ...

    # Create a connector with secure socket setup,
    [vset OBJCREATE] -socketcmd tls::socket ...
    ...
[example_end]

[include ../../common-text/tls-security-notes.inc]