File: secure.inc

package info (click to toggle)
tcllib 1.12-dfsg-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 25,336 kB
  • ctags: 7,235
  • sloc: tcl: 126,727; ansic: 10,090; sh: 9,855; xml: 1,766; yacc: 753; makefile: 127; perl: 84; f90: 84; pascal: 74; python: 33; ruby: 13; php: 11
file content (16 lines) | stat: -rw-r--r-- 495 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[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]