Changeset 788
- Timestamp:
- Oct 10, 2010, 9:22:38 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/README.OS2
r760 r788 69 69 70 70 http://web.os2power.com/download/lib/pthread-20100217-os2.zip 71 72 - OpenSSL 0.9.8o or later to support OpenSSL in Qt. The OpenSSL libraries are 73 available at: 74 75 http://rpm.netlabs.org/experimental/00/i386/i386/openssl-devel-1.0.0a-1.i386.rpm 76 http://rpm.netlabs.org/experimental/00/i386/i386/openssl-1.0.0a-1.i386.rpm 77 78 or 79 80 http://bauxite.sakura.ne.jp/tmp/os2/openssl-1.0.0a-os2knix-20100706-dev.zip 81 http://bauxite.sakura.ne.jp/tmp/os2/openssl-1.0.0a-os2knix-20100706-runtime.zip 82 71 83 72 84 … … 93 105 for applications based on qmake project files which most of them are). If you 94 106 go that way, you may skip the rest of this section and proceed directly to 95 section called "USING OFFICIAL BINARY QT ARCHIVES" or further.107 section "USING OFFICIAL BINARY QT ARCHIVES" below. 96 108 97 109 If you use the full source code ZIP distribution of the Qt library or work … … 156 168 You will also need to make sure that pthread.lib is placed somewhere in your 157 169 system library path so that the compiler can find it. 170 171 - Unzip the OpenSSL libraries to some directory and set the following 172 environment variables to tell the Qt configure script its location: 173 174 set OPENSSL_INCLUDEPATH=X:\<path_to_OpenSSL>\include 175 set OPENSSL_LIBS= 176 177 Note that you will also need to place OpenSSL DLLs to BEGINLIBPATH (if they 178 are not already in your LIBPATH) so that Qt applications can find them at 179 runtime: 180 181 set BEGINLIBPATH=X:\<path_to_OpenSSL>\dll;%BEGINLIBPATH% 158 182 159 183 -
trunk/configure.cmd
r772 r788 288 288 G.CFG_QGTKSTYLE = "auto" 289 289 G.CFG_OPENSSL = "auto" 290 G.CFG_OPENSSL_LIBS = ""291 290 G.CFG_DBUS = "auto" 292 291 G.CFG_LARGEFILE = "auto" … … 599 598 600 599 /* detect the CUPS support */ 601 602 600 G.CUPS_INCLUDEPATH = GetEnv('CUPS_INCLUDEPATH') 603 601 G.CUPS_LIBS = GetEnv('CUPS_LIBS') … … 618 616 drop G.CUPS. 619 617 end 620 if (G.CUPS_ LIBS \== '')then do618 if (G.CUPS_INCLUDEPATH \== '' & G.CUPS_LIBS \== '') then do 621 619 call SayVerbose 'CUPS include path : 'G.CUPS_INCLUDEPATH 622 620 call SayVerbose 'CUPS libraries : 'G.CUPS_LIBS 621 call SayVerbose 623 622 G.CFG_CUPS = 'yes' 624 623 end 625 624 else do 626 call SayVerbose 'CUPS libraries are not specified, CUPS support is disabled.' 625 call SayVerbose 'WARNING: CUPS libraries are not specified, CUPS support is disabled.' 626 call SayVerbose 'Use CUPS_INCLUDEPATH and CUPS_LIBS environment variables to specify' 627 call SayVerbose 'the location of the libraries.' 628 call SayVerbose 627 629 G.CFG_CUPS = 'no' 628 630 end … … 632 634 call SayLog 'WARNING: Printing support is completely disabled due to', 633 635 'disabled CUPS support.' 636 call SayLog 634 637 G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_PRINTER") 638 end 639 640 /* detect OpenSSL libraries */ 641 G.OPENSSL_INCLUDEPATH = GetEnv('OPENSSL_INCLUDEPATH') 642 G.OPENSSL_LIBS = GetEnv('OPENSSL_LIBS') 643 if (G.OPENSSL_INCLUDEPATH \== '') then do 644 call SayVerbose 'OpenSSL include path : 'G.OPENSSL_INCLUDEPATH 645 call SayVerbose 'OpenSSL libraries : 'G.OPENSSL_LIBS 646 call SayVerbose 647 G.CFG_OPENSSL = 'yes' 648 end 649 else do 650 call SayVerbose 'WARNING: OpenSSL libraries are not specified, OpenSSL support is disabled.' 651 call SayVerbose 'Use OPENSSL_INCLUDEPATH and OPENSSL_LIBS environment variables to specify' 652 call SayVerbose 'the location of the libraries.' 653 call SayVerbose 654 G.CFG_OPENSSL = 'no' 635 655 end 636 656 … … 651 671 G.CFG_NIS = "no" 652 672 G.CFG_DBUS = "no" 653 G.CFG_OPENSSL = "no"654 673 G.CFG_QGTKSTYLE = "no" 655 674 G.CFG_LARGEFILE = "no" … … 1166 1185 if (G.CFG_GSTREAMER == "yes") then 1167 1186 G.QT_CONFIG = Join(G.QT_CONFIG, "gstreamer") 1168 if (G.CFG_DBUS == "linked") then1169 G.QT_CONFIG = Join(G.QT_CONFIG dbus, "dbus-linked")1170 1187 if (G.CFG_NAS == "system") then 1171 1188 G.QT_CONFIG = Join(G.QT_CONFIG, "nas") 1172 if (G.CFG_OPENSSL == "linked") then1173 G.QT_CONFIG = Join(G.QT_CONFIG, "openssl-linked")1174 1189 */ 1175 1190 if (G.CFG_OPENSSL == "yes") then 1176 1191 G.QT_CONFIG = Join(G.QT_CONFIG, "openssl") 1192 if (G.CFG_OPENSSL == "linked") then 1193 G.QT_CONFIG = Join(G.QT_CONFIG, "openssl-linked") 1177 1194 if (G.CFG_DBUS == "yes") then 1178 1195 G.QT_CONFIG = Join(G.QT_CONFIG, "dbus") 1196 if (G.CFG_DBUS == "linked") then 1197 G.QT_CONFIG = Join(G.QT_CONFIG, "dbus dbus-linked") 1179 1198 1180 1199 if (G.D_FLAGS \== "") then … … 1461 1480 if (G.CFG_OPENSSL \== "yes") then 1462 1481 G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_OPENSSL") 1482 if (G.CFG_OPENSSL == "linked") then 1483 G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_LINKED_OPENSSL") 1463 1484 if (G.CFG_DBUS \== "yes") then 1464 1485 G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_DBUS") … … 1496 1517 if (G.CFG_NAS == "no") then 1497 1518 G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_NAS") 1498 if (G.CFG_OPENSSL == "linked") then1499 G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_LINKED_OPENSSL")1500 1519 */ 1501 1520 … … 1734 1753 call charout qmake_cache_new, 'DEFINES *= QT_EDITION=QT_EDITION_DESKTOP' 1735 1754 1736 /* dump in the OPENSSL_LIBS info */1737 OPENSSL_LIBS = GetEnv("OPENSSL_LIBS")1738 if (OPENSSL_LIBS \== "") then1739 call lineout qmake_cache_new, 'OPENSSL_LIBS = 'OPENSSL_LIBS1740 else if (G.CFG_OPENSSL == "linked") then1741 call lineout qmake_cache_new, 'OPENSSL_LIBS = -lssl -lcrypto'1742 1743 1755 /* dump CUPS_INCLUDEPATH and friends */ 1744 1756 if (G.CFG_CUPS == "yes") then do … … 1747 1759 if (G.CUPS_LIBS \== "") then 1748 1760 call lineout qmake_cache_new, 'CUPS_LIBS = 'G.CUPS_LIBS 1761 end 1762 1763 /* dump in the OPENSSL_LIBS info */ 1764 if (G.CFG_OPENSSL == "yes") then do 1765 if (G.OPENSSL_INCLUDEPATH \== "") then 1766 call lineout qmake_cache_new, 'OPENSSL_INCLUDEPATH = 'G.OPENSSL_INCLUDEPATH 1767 if (G.OPENSSL_LIBS \== "") then 1768 call lineout qmake_cache_new, 'OPENSSL_LIBS = 'G.OPENSSL_LIBS 1749 1769 end 1750 1770 … … 1934 1954 "or compile needed modules into the library."G.EOL||, 1935 1955 G.EOL 1936 if (G.CFG_OPENSSL == "linked" & OPENSSL_LIBS == "") then 1956 1957 if (G.CFG_OPENSSL == "linked" & G.OPENSSL_LIBS == "") then 1937 1958 call SayLog,, 1938 1959 G.EOL||, 1939 "NOTE: When linking against OpenSSL, you can override the default"G.EOL||, 1940 "library names through OPENSSL_LIBS."G.EOL||, 1941 "For example:"G.EOL||, 1942 " configure -openssl-linked OPENSSL_LIBS='-L/path/to/lib -lssl -lcrypto'"G.EOL||, 1960 "WARNING: You are linking against OpenSSL but didn't specify the OpenSSL library"G.EOL||, 1961 "names, so the build will most likely fail. You may fix this by setting the"G.EOL||, 1962 "OPENSSL_LIBS environment variable."G.EOL||, 1943 1963 G.EOL 1944 1964 -
trunk/src/network/ssl/qsslsocket_openssl.cpp
r769 r788 188 188 else if (protoString == QLatin1String("TLSv1")) 189 189 ciph.d->protocol = QSsl::TlsV1; 190 190 191 191 if (descriptionList.at(2).startsWith(QLatin1String("Kx="))) 192 192 ciph.d->keyExchangeMethod = descriptionList.at(2).mid(3); … … 341 341 if (configuration.peerVerifyDepth != 0) 342 342 q_SSL_CTX_set_verify_depth(ctx, configuration.peerVerifyDepth); 343 343 344 344 // Create and initialize SSL session 345 345 if (!(ssl = q_SSL_new(ctx))) { … … 425 425 do { 426 426 if (attempts < 500) { 427 #if def Q_OS_UNIX427 #if defined(Q_OS_UNIX) || defined(Q_OS_OS2) 428 428 struct timespec ts = {0, 33333333}; 429 429 nanosleep(&ts, 0); … … 534 534 do { 535 535 transmitting = false; 536 536 537 537 // If the connection is secure, we can transfer data from the write 538 538 // buffer (in plain text) to the write BIO through SSL_write. -
trunk/src/network/ssl/qsslsocket_openssl_symbols.cpp
r769 r788 262 262 if (!(_q_##func = _q_PTR_##func(lib->resolve(#ordinal)))) \ 263 263 qWarning("QSslSocket: cannot resolve "#func); 264 #elif defined(Q_OS_OS2) 265 #define RESOLVEFUNC(func) \ 266 if (!(_q_##func = _q_PTR_##func(libs.first->resolve("_"#func))) \ 267 && !(_q_##func = _q_PTR_##func(libs.second->resolve("_"#func)))) \ 268 qWarning("QSslSocket: cannot resolve "#func); 264 269 #else 265 270 #define RESOLVEFUNC(func) \ … … 462 467 libssl = libcrypto = 0; 463 468 return pair; 464 469 # elif defined(Q_OS_OS2) 470 // note: the k* versions of libraries were in use once; support them for 471 // backward compatibility 472 static const char *ssl_dll[] = { "ssl10", "kssl10" }; 473 static const char *crypto_dll[] = { "crypto10", "kcrypt10" }; 474 475 QLibrary *libssl; 476 for (size_t i = 0; i < sizeof(ssl_dll)/sizeof(ssl_dll[0]); ++i) { 477 libssl = new QLibrary(QLatin1String(ssl_dll[i])); 478 if (libssl->load()) 479 break; 480 delete libssl; 481 libssl = 0; 482 } 483 if (!libssl) { 484 return pair; 485 } 486 487 QLibrary *libcrypto; 488 for (size_t i = 0; i < sizeof(crypto_dll)/sizeof(crypto_dll[0]); ++i) { 489 libcrypto = new QLibrary(QLatin1String(crypto_dll[i])); 490 if (libcrypto->load()) 491 break; 492 delete libcrypto; 493 libcrypto = 0; 494 } 495 if (!libcrypto) { 496 delete libssl; 497 return pair; 498 } 499 500 pair.first = libssl; 501 pair.second = libcrypto; 502 return pair; 465 503 # else 466 504 // not implemented for this platform yet … … 535 573 RESOLVEFUNC(sk_free, 2571, libs.second ) 536 574 RESOLVEFUNC(sk_num, 2576, libs.second ) 537 RESOLVEFUNC(sk_pop_free, 2578, libs.second ) 575 RESOLVEFUNC(sk_pop_free, 2578, libs.second ) 538 576 RESOLVEFUNC(sk_value, 2585, libs.second ) 539 577 RESOLVEFUNC(SSL_CIPHER_description, 11, libs.first ) -
trunk/src/network/ssl/ssl.pri
r561 r788 37 37 # Add optional SSL libs 38 38 LIBS_PRIVATE += $$OPENSSL_LIBS 39 40 os2 { 41 # Add SSL include path 42 INCLUDEPATH *= $$OPENSSL_INCLUDEPATH 43 } 39 44 }
Note:
See TracChangeset
for help on using the changeset viewer.