Check-in [0ebb44402a]
Overview
Comment:Added demos directory with example scripts to download web pages and files using TLS.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | main
Files: files | file ages | folders
SHA3-256: 0ebb44402a4536ebe882809b042e0604d49d020c770d7715865fae737dcbe7b9
User & Date: bohagan on 2025-01-01 22:38:30
Other Links: branch diff | manifest | tags
Context
2025-01-01
23:32
Moved debug script examples from docs to demos directory check-in: 65f827b5f9 user: bohagan tags: trunk, main
22:38
Added demos directory with example scripts to download web pages and files using TLS. check-in: 0ebb44402a user: bohagan tags: trunk, main
2024-12-31
04:12
More comment updates and changes for fast path option check-in: c61a46b561 user: bohagan tags: trunk, main
Changes
768
769
770
771
772
773
774
775


776
777
778
779
780
781
782
768
769
770
771
772
773
774

775
776
777
778
779
780
781
782
783







-
+
+







<b class="option">-validatecommand</b> option is set to <b class="cmd">tls::validate_command</b>.</p>
<p><em>The use of the variable <b class="variable">tls::debug</b> is not recommended.
It may be removed from future releases.</em></p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Debug Examples</a></h2>
<p>These examples use the default Unix platform SSL certificates. For standard
installations, -cadir and -cafile should not be needed. If your certificates
are in non-standard locations, specify -cadir or -cafile as needed.</p>
are in non-standard locations, specify -cadir or -cafile as needed. See the
demos directory for more elaborate examples.</p>
<p>Example #1: Use HTTP package</p>
<pre class="doctools_example">
package require http
package require tls
set url &quot;https://www.tcl.tk/&quot;
http::register https 443 [list ::tls::socket -autoservername 1 -require 1  -command ::tls::callback -password ::tls::password  -validatecommand ::tls::validate_command]
# Check for error
860
861
862
863
864
865
866
867


868
869
870
871
872
873
874
860
861
862
863
864
865
866

867
868
869
870
871
872
873
874
875







-
+
+







[emph "The use of the variable [var tls::debug] is not recommended.
It may be removed from future releases."]

[section "Debug Examples"]

These examples use the default Unix platform SSL certificates. For standard
installations, -cadir and -cafile should not be needed. If your certificates
are in non-standard locations, specify -cadir or -cafile as needed.
are in non-standard locations, specify -cadir or -cafile as needed. See the
demos directory for more elaborate examples.

[para]

Example #1: Use HTTP package

[example {

Modified doc/tls.n from [b5c12e6dd7] to [c33044612f].
1053
1054
1055
1056
1057
1058
1059
1060


1061
1062
1063
1064
1065
1066
1067
1053
1054
1055
1056
1057
1058
1059

1060
1061
1062
1063
1064
1065
1066
1067
1068







-
+
+







\fB-validatecommand\fR option is set to \fBtls::validate_command\fR\&.
.PP
\fIThe use of the variable \fBtls::debug\fR is not recommended\&.
It may be removed from future releases\&.\fR
.SH "DEBUG EXAMPLES"
These examples use the default Unix platform SSL certificates\&. For standard
installations, -cadir and -cafile should not be needed\&. If your certificates
are in non-standard locations, specify -cadir or -cafile as needed\&.
are in non-standard locations, specify -cadir or -cafile as needed\&. See the
demos directory for more elaborate examples\&.
.PP
Example #1: Use HTTP package
.CS



package require http
136
137
138
139
140
141
142
143

144
145
146
147
148
149
150
136
137
138
139
140
141
142

143
144
145
146
147
148
149
150







-
+







	@copy $(WIN_DIR)\tlsUuid.h.in+$(TMP_DIR)\manifest.uuid $(TMP_DIR)\tlsUuid.h
	@echo: >>$(TMP_DIR)\tlsUuid.h

# The default install target only installs binaries and scripts so add
# an additional target for our documentation. Note this *adds* a target
# since no commands are listed after it. The original targets for
# install (from targets.vc) will remain.
install: pkgindex default-install default-install-docs-html
install: pkgindex default-install default-install-docs-html default-install-demos
!IF EXIST($(SSL_INSTALL_FOLDER)\bin\libcrypto-*-x64.dll)
	@xcopy /c /y "$(SSL_INSTALL_FOLDER)\bin\libcrypto-*-x64.dll" "$(PRJ_INSTALL_DIR)"
!ENDIF
!IF EXIST($(SSL_INSTALL_FOLDER)\bin\libssl-*-x64.dll)
	@xcopy /c /y "$(SSL_INSTALL_FOLDER)\bin\libssl-*-x64.dll" "$(PRJ_INSTALL_DIR)"
!ENDIF