158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
|
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
-
+
-
-
+
-
-
-
|
# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
# and TEA_LOAD_TCLCONFIG macros above.
#--------------------------------------------------------------------
TEA_MAKE_LIB
#--------------------------------------------------------------------
# If the variable OPENSSL is set, we will build with the OpenSSL
# This marco includes the TCL TLS specific functions to set the
# libraries. If it is not set, then we will use RSA BSAFE SSL-C
# libraries instead of the default OpenSSL libaries.
# OpenSSL or LibreSSL config.
#--------------------------------------------------------------------
OPENSSL="1"
AC_SUBST(OPENSSL,"1")
TCLTLS_SSL_OPENSSL
# Temp work-around
SSL_DIR="/usr"
SSL_LIB_DIR=${SSL_DIR}/lib64
SSL_INCLUDE_DIR=${SSL_DIR}/include/openssl
|
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
|
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
-
-
+
-
-
-
-
-
-
+
+
-
-
-
-
|
if test "$GCC" = "yes"; then
TEA_ADD_INCLUDES([-I${SSL_INCLUDE_DIR_NATIVE}])
TEA_ADD_LIBS([-L${SSL_LIB_DIR_NATIVE}])
else
TEA_ADD_INCLUDES([-include:${SSL_INCLUDE_DIR_NATIVE}])
TEA_ADD_LIBS([-libpath:${SSL_LIB_DIR_NATIVE}])
fi
if test -n "${OPENSSL}"; then
TEA_ADD_LIBS([libcrypto.lib libssl.lib])
TEA_ADD_LIBS([libcrypto.lib libssl.lib])
else
TEA_ADD_LIBS([sslc32.lib])
fi
else
# Subst runtime dir here, use -R and -L where necessary. [Bug 1742859]
LIB_RUNTIME_DIR=${SSL_LIB_DIR}
eval "LD_SEARCH_FLAGS=\"${LD_SEARCH_FLAGS}\""
if test -n "${OPENSSL}"; then
TEA_ADD_INCLUDES([-I${SSL_INCLUDE_DIR}])
TEA_ADD_LIBS([${LD_SEARCH_FLAGS} -L${SSL_LIB_DIR} -lssl -lcrypto ${GCCPATH} ${GCCLIB}])
TEA_ADD_INCLUDES([-I${SSL_INCLUDE_DIR}])
TEA_ADD_LIBS([${LD_SEARCH_FLAGS} -L${SSL_LIB_DIR} -lssl -lcrypto ${GCCPATH} ${GCCLIB}])
else
TEA_ADD_INCLUDES([-I${SSL_INCLUDE_DIR}])
TEA_ADD_LIBS([${LD_SEARCH_FLAGS} -L${SSL_LIB_DIR} -lsslc])
fi
fi
#--------------------------------------------------------------------
# Determine the name of the tclsh and/or wish executables in the
# Tcl and Tk build directories or the location they were installed
# into. These paths are used to support running test cases only,
# the Makefile should not be making use of these paths to generate
|
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
|
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
|
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
|
#AC_SUBST(SAMPLE_VAR)
#--------------------------------------------------------------------
# Custom
#--------------------------------------------------------------------
dnl Disable support for TLS 1.0
AC_ARG_ENABLE([tls1], AS_HELP_STRING([--disable-tls1], [disable TLS1 support]), [
dnl Disable support for TLS 1.0 protocol
AC_ARG_ENABLE([tls1], AS_HELP_STRING([--disable-tls1], [disable TLS1 protocol]), [
if test "${enableval}" = "no"; then
AC_DEFINE([NO_TLS1], [1], [Disable TLS1 support])
AC_DEFINE([NO_TLS1], [1], [Disable TLS1 protocol])
fi
])
dnl Disable support for TLS 1.1
AC_ARG_ENABLE([tls1_1], AS_HELP_STRING([--disable-tls1_1], [disable TLS1.1 support]), [
dnl Disable support for TLS 1.1 protocol
AC_ARG_ENABLE([tls1_1], AS_HELP_STRING([--disable-tls1_1], [disable TLS1.1 protocol]), [
if test "${enableval}" = "no"; then
AC_DEFINE([NO_TLS1_1], [1], [Disable TLS1.1 support])
AC_DEFINE([NO_TLS1_1], [1], [Disable TLS1.1 protocol])
fi
])
dnl Disable support for TLS 1.2
AC_ARG_ENABLE([tls1_2], AS_HELP_STRING([--disable-tls1_2], [disable TLS1.2 support]), [
dnl Disable support for TLS 1.2 protocol
AC_ARG_ENABLE([tls1_2], AS_HELP_STRING([--disable-tls1_2], [disable TLS1.2 protocol]), [
if test "${enableval}" = "no"; then
AC_DEFINE([NO_TLS1_2], [1], [Disable TLS1.2 support])
AC_DEFINE([NO_TLS1_2], [1], [Disable TLS1.2 protocol])
fi
])
dnl Disable support for TLS 1.3
AC_ARG_ENABLE([tls1_3], AS_HELP_STRING([--disable-tls1_3], [disable TLS1.3 support]), [
dnl Disable support for TLS 1.3 protocol
AC_ARG_ENABLE([tls1_3], AS_HELP_STRING([--disable-tls1_3], [disable TLS1.3 protocol]), [
if test "${enableval}" = "no"; then
AC_DEFINE([NO_TLS1_3], [1], [Disable TLS1.3 support])
AC_DEFINE([NO_TLS1_3], [1], [Disable TLS1.3 protocol])
fi
])
dnl Enable support for building the same library every time
tcltls_deterministic='false'
AC_ARG_ENABLE([deterministic], AS_HELP_STRING([--enable-deterministic], [enable deterministic parameters]), [
AC_ARG_ENABLE([deterministic], AS_HELP_STRING([--enable-deterministic], [enable deterministic DH parameters]), [
if test "$enableval" = "yes"; then
tcltls_deterministic='true'
fi
])
if test "$tcltls_deterministic" = 'true'; then
GEN_DH_PARAMS_ARGS='fallback'
else
|