Fossil SCM

Make fossil compilable with (externally-built) openssl-1.1.0. Still compiles/runs with openssl 1.1.2 equally well (actual switch is not made yet)

jan.nijtmans 2016-09-08 09:08 trunk
Commit 460d5628a366f03121cb5c5a1de8c6aac509b65e
+2 -2
--- auto.def
+++ auto.def
@@ -194,11 +194,11 @@
194194
# Helper for OpenSSL checking
195195
proc check-for-openssl {msg {cflags {}} {libs {-lssl -lcrypto}}} {
196196
msg-checking "Checking for $msg..."
197197
set rc 0
198198
if {[is_mingw]} {
199
- lappend libs -lgdi32 -lwsock32
199
+ lappend libs -lgdi32 -lwsock32 -lcrypt32
200200
}
201201
if {[info exists ::zlib_lib]} {
202202
lappend libs $::zlib_lib
203203
}
204204
msg-quiet cc-with [list -cflags $cflags -libs $libs] {
@@ -313,11 +313,11 @@
313313
}
314314
if {[info exists ::zlib_lib]} {
315315
define-append LIBS $::zlib_lib
316316
}
317317
if {[is_mingw]} {
318
- define-append LIBS -lgdi32 -lwsock32
318
+ define-append LIBS -lgdi32 -lwsock32 -lcrypt32
319319
}
320320
msg-result "HTTPS support enabled"
321321
322322
# Silence OpenSSL deprecation warnings on Mac OS X 10.7.
323323
if {[string match *-darwin* [get-define host]]} {
324324
--- auto.def
+++ auto.def
@@ -194,11 +194,11 @@
194 # Helper for OpenSSL checking
195 proc check-for-openssl {msg {cflags {}} {libs {-lssl -lcrypto}}} {
196 msg-checking "Checking for $msg..."
197 set rc 0
198 if {[is_mingw]} {
199 lappend libs -lgdi32 -lwsock32
200 }
201 if {[info exists ::zlib_lib]} {
202 lappend libs $::zlib_lib
203 }
204 msg-quiet cc-with [list -cflags $cflags -libs $libs] {
@@ -313,11 +313,11 @@
313 }
314 if {[info exists ::zlib_lib]} {
315 define-append LIBS $::zlib_lib
316 }
317 if {[is_mingw]} {
318 define-append LIBS -lgdi32 -lwsock32
319 }
320 msg-result "HTTPS support enabled"
321
322 # Silence OpenSSL deprecation warnings on Mac OS X 10.7.
323 if {[string match *-darwin* [get-define host]]} {
324
--- auto.def
+++ auto.def
@@ -194,11 +194,11 @@
194 # Helper for OpenSSL checking
195 proc check-for-openssl {msg {cflags {}} {libs {-lssl -lcrypto}}} {
196 msg-checking "Checking for $msg..."
197 set rc 0
198 if {[is_mingw]} {
199 lappend libs -lgdi32 -lwsock32 -lcrypt32
200 }
201 if {[info exists ::zlib_lib]} {
202 lappend libs $::zlib_lib
203 }
204 msg-quiet cc-with [list -cflags $cflags -libs $libs] {
@@ -313,11 +313,11 @@
313 }
314 if {[info exists ::zlib_lib]} {
315 define-append LIBS $::zlib_lib
316 }
317 if {[is_mingw]} {
318 define-append LIBS -lgdi32 -lwsock32 -lcrypt32
319 }
320 msg-result "HTTPS support enabled"
321
322 # Silence OpenSSL deprecation warnings on Mac OS X 10.7.
323 if {[string match *-darwin* [get-define host]]} {
324
+2 -2
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -294,11 +294,11 @@
294294
295295
SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY);
296296
297297
if( !pUrlData->useProxy ){
298298
BIO_set_conn_hostname(iBio, pUrlData->name);
299
- BIO_set_conn_int_port(iBio, &pUrlData->port);
299
+ BIO_ctrl(iBio,BIO_C_SET_CONNECT,3,(char *)&pUrlData->port);
300300
if( BIO_do_connect(iBio)<=0 ){
301301
ssl_set_errmsg("SSL: cannot connect to host %s:%d (%s)",
302302
pUrlData->name, pUrlData->port, ERR_reason_error_string(ERR_get_error()));
303303
ssl_close();
304304
return 1;
@@ -389,11 +389,11 @@
389389
** This is used to populate the ipaddr column of the rcvfrom table,
390390
** if any files are received from the server.
391391
*/
392392
{
393393
/* IPv4 only code */
394
- const unsigned char *ip = (const unsigned char *) BIO_get_conn_ip(iBio);
394
+ const unsigned char *ip = (const unsigned char *) BIO_ptr_ctrl(iBio,BIO_C_GET_CONNECT,2);
395395
g.zIpAddr = mprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
396396
}
397397
398398
X509_free(cert);
399399
return 0;
400400
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -294,11 +294,11 @@
294
295 SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY);
296
297 if( !pUrlData->useProxy ){
298 BIO_set_conn_hostname(iBio, pUrlData->name);
299 BIO_set_conn_int_port(iBio, &pUrlData->port);
300 if( BIO_do_connect(iBio)<=0 ){
301 ssl_set_errmsg("SSL: cannot connect to host %s:%d (%s)",
302 pUrlData->name, pUrlData->port, ERR_reason_error_string(ERR_get_error()));
303 ssl_close();
304 return 1;
@@ -389,11 +389,11 @@
389 ** This is used to populate the ipaddr column of the rcvfrom table,
390 ** if any files are received from the server.
391 */
392 {
393 /* IPv4 only code */
394 const unsigned char *ip = (const unsigned char *) BIO_get_conn_ip(iBio);
395 g.zIpAddr = mprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
396 }
397
398 X509_free(cert);
399 return 0;
400
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -294,11 +294,11 @@
294
295 SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY);
296
297 if( !pUrlData->useProxy ){
298 BIO_set_conn_hostname(iBio, pUrlData->name);
299 BIO_ctrl(iBio,BIO_C_SET_CONNECT,3,(char *)&pUrlData->port);
300 if( BIO_do_connect(iBio)<=0 ){
301 ssl_set_errmsg("SSL: cannot connect to host %s:%d (%s)",
302 pUrlData->name, pUrlData->port, ERR_reason_error_string(ERR_get_error()));
303 ssl_close();
304 return 1;
@@ -389,11 +389,11 @@
389 ** This is used to populate the ipaddr column of the rcvfrom table,
390 ** if any files are received from the server.
391 */
392 {
393 /* IPv4 only code */
394 const unsigned char *ip = (const unsigned char *) BIO_ptr_ctrl(iBio,BIO_C_GET_CONNECT,2);
395 g.zIpAddr = mprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
396 }
397
398 X509_free(cert);
399 return 0;
400
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -855,11 +855,11 @@
855855
endif
856856
857857
#### OpenSSL: Add the necessary libraries required, if enabled.
858858
#
859859
ifdef FOSSIL_ENABLE_SSL
860
-LIB += -lssl -lcrypto -lgdi32
860
+LIB += -lssl -lcrypto -lgdi32 -lcrypt32
861861
endif
862862
863863
#### Tcl: Add the necessary libraries required, if enabled.
864864
#
865865
ifdef FOSSIL_ENABLE_TCL
@@ -1499,11 +1499,11 @@
14991499
SSLLIBDIR = $(SSLDIR)\out32dll
15001500
!else
15011501
SSLLIBDIR = $(SSLDIR)\out32
15021502
!endif
15031503
SSLLFLAGS = /nologo /opt:ref /debug
1504
-SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib
1504
+SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib crypt32.lib
15051505
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
15061506
!message Using 'x64' platform for OpenSSL...
15071507
# BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
15081508
# SSLCONFIG = VC-WIN64A no-asm no-ssl2 no-ssl3
15091509
SSLCONFIG = VC-WIN64A no-asm
15101510
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -855,11 +855,11 @@
855 endif
856
857 #### OpenSSL: Add the necessary libraries required, if enabled.
858 #
859 ifdef FOSSIL_ENABLE_SSL
860 LIB += -lssl -lcrypto -lgdi32
861 endif
862
863 #### Tcl: Add the necessary libraries required, if enabled.
864 #
865 ifdef FOSSIL_ENABLE_TCL
@@ -1499,11 +1499,11 @@
1499 SSLLIBDIR = $(SSLDIR)\out32dll
1500 !else
1501 SSLLIBDIR = $(SSLDIR)\out32
1502 !endif
1503 SSLLFLAGS = /nologo /opt:ref /debug
1504 SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib
1505 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1506 !message Using 'x64' platform for OpenSSL...
1507 # BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
1508 # SSLCONFIG = VC-WIN64A no-asm no-ssl2 no-ssl3
1509 SSLCONFIG = VC-WIN64A no-asm
1510
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -855,11 +855,11 @@
855 endif
856
857 #### OpenSSL: Add the necessary libraries required, if enabled.
858 #
859 ifdef FOSSIL_ENABLE_SSL
860 LIB += -lssl -lcrypto -lgdi32 -lcrypt32
861 endif
862
863 #### Tcl: Add the necessary libraries required, if enabled.
864 #
865 ifdef FOSSIL_ENABLE_TCL
@@ -1499,11 +1499,11 @@
1499 SSLLIBDIR = $(SSLDIR)\out32dll
1500 !else
1501 SSLLIBDIR = $(SSLDIR)\out32
1502 !endif
1503 SSLLFLAGS = /nologo /opt:ref /debug
1504 SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib crypt32.lib
1505 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1506 !message Using 'x64' platform for OpenSSL...
1507 # BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
1508 # SSLCONFIG = VC-WIN64A no-asm no-ssl2 no-ssl3
1509 SSLCONFIG = VC-WIN64A no-asm
1510
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -364,11 +364,11 @@
364364
endif
365365
366366
#### OpenSSL: Add the necessary libraries required, if enabled.
367367
#
368368
ifdef FOSSIL_ENABLE_SSL
369
-LIB += -lssl -lcrypto -lgdi32
369
+LIB += -lssl -lcrypto -lgdi32 -lcrypt32
370370
endif
371371
372372
#### Tcl: Add the necessary libraries required, if enabled.
373373
#
374374
ifdef FOSSIL_ENABLE_TCL
375375
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -364,11 +364,11 @@
364 endif
365
366 #### OpenSSL: Add the necessary libraries required, if enabled.
367 #
368 ifdef FOSSIL_ENABLE_SSL
369 LIB += -lssl -lcrypto -lgdi32
370 endif
371
372 #### Tcl: Add the necessary libraries required, if enabled.
373 #
374 ifdef FOSSIL_ENABLE_TCL
375
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -364,11 +364,11 @@
364 endif
365
366 #### OpenSSL: Add the necessary libraries required, if enabled.
367 #
368 ifdef FOSSIL_ENABLE_SSL
369 LIB += -lssl -lcrypto -lgdi32 -lcrypt32
370 endif
371
372 #### Tcl: Add the necessary libraries required, if enabled.
373 #
374 ifdef FOSSIL_ENABLE_TCL
375
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -364,11 +364,11 @@
364364
endif
365365
366366
#### OpenSSL: Add the necessary libraries required, if enabled.
367367
#
368368
ifdef FOSSIL_ENABLE_SSL
369
-LIB += -lssl -lcrypto -lgdi32
369
+LIB += -lssl -lcrypto -lgdi32 -lcrypt32
370370
endif
371371
372372
#### Tcl: Add the necessary libraries required, if enabled.
373373
#
374374
ifdef FOSSIL_ENABLE_TCL
375375
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -364,11 +364,11 @@
364 endif
365
366 #### OpenSSL: Add the necessary libraries required, if enabled.
367 #
368 ifdef FOSSIL_ENABLE_SSL
369 LIB += -lssl -lcrypto -lgdi32
370 endif
371
372 #### Tcl: Add the necessary libraries required, if enabled.
373 #
374 ifdef FOSSIL_ENABLE_TCL
375
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -364,11 +364,11 @@
364 endif
365
366 #### OpenSSL: Add the necessary libraries required, if enabled.
367 #
368 ifdef FOSSIL_ENABLE_SSL
369 LIB += -lssl -lcrypto -lgdi32 -lcrypt32
370 endif
371
372 #### Tcl: Add the necessary libraries required, if enabled.
373 #
374 ifdef FOSSIL_ENABLE_TCL
375
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -106,11 +106,11 @@
106106
SSLLIBDIR = $(SSLDIR)\out32dll
107107
!else
108108
SSLLIBDIR = $(SSLDIR)\out32
109109
!endif
110110
SSLLFLAGS = /nologo /opt:ref /debug
111
-SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib
111
+SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib crypt32.lib
112112
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
113113
!message Using 'x64' platform for OpenSSL...
114114
# BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
115115
# SSLCONFIG = VC-WIN64A no-asm no-ssl2 no-ssl3
116116
SSLCONFIG = VC-WIN64A no-asm
117117
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -106,11 +106,11 @@
106 SSLLIBDIR = $(SSLDIR)\out32dll
107 !else
108 SSLLIBDIR = $(SSLDIR)\out32
109 !endif
110 SSLLFLAGS = /nologo /opt:ref /debug
111 SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib
112 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
113 !message Using 'x64' platform for OpenSSL...
114 # BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
115 # SSLCONFIG = VC-WIN64A no-asm no-ssl2 no-ssl3
116 SSLCONFIG = VC-WIN64A no-asm
117
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -106,11 +106,11 @@
106 SSLLIBDIR = $(SSLDIR)\out32dll
107 !else
108 SSLLIBDIR = $(SSLDIR)\out32
109 !endif
110 SSLLFLAGS = /nologo /opt:ref /debug
111 SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib crypt32.lib
112 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
113 !message Using 'x64' platform for OpenSSL...
114 # BUGBUG (OpenSSL): Using "no-ssl*" here breaks the build.
115 # SSLCONFIG = VC-WIN64A no-asm no-ssl2 no-ssl3
116 SSLCONFIG = VC-WIN64A no-asm
117

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button