From e3d9ac526209ef00277e527e8476527d0e27e367 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Tue, 8 Jun 2010 10:36:47 -0300 Subject: Bug#34236: Various possibly related SSL crashes The problem was that the bundled yaSSL library was being built without thread safety support regardless of the thread safeness of the compoments linked with it. The solution is to enable yaSSL thread safety support if any component (server or client) is to be built with thread support. Also, generate new certificates for yaSSL's test suite. config/ac-macros/yassl.m4: Enable yaSSL thread safety if linking with the server or a thread safe client library. Avoids building a thread safe yaSSL when only building a non-thread safe client library. extra/yassl/CMakeLists.txt: Always enable for Windows builds. extra/yassl/certs/ca-cert.pem: New certificate, previous one expired. extra/yassl/certs/client-cert.der: New certificate, previous one expired. extra/yassl/certs/client-cert.pem: New certificate, previous one expired. extra/yassl/certs/dsa-cert.pem: New certificate, previous one expired. extra/yassl/certs/server-cert.pem: New certificate, previous one expired. extra/yassl/include/lock.hpp: Rename MULTI_THREAD to YASSL_THREAD_SAFE. extra/yassl/src/Makefile.am: Use CXXFLAGS to set thread related definitions as the lock header (lock.hpp) has no local dependencies. extra/yassl/src/lock.cpp: Rename MULTI_THREAD to YASSL_THREAD_SAFE. extra/yassl/taocrypt/CMakeLists.txt: Always enable for Windows builds. extra/yassl/taocrypt/benchmark/Makefile.am: Pass thread related CXXFLAGS. extra/yassl/taocrypt/src/Makefile.am: Pass thread related CXXFLAGS. extra/yassl/taocrypt/test/Makefile.am: Pass thread related CXXFLAGS. extra/yassl/taocrypt/test/memory.cpp: Rename MULTI_THREAD to YASSL_THREAD_SAFE. extra/yassl/testsuite/Makefile.am: Pass thread related CXXFLAGS. --- extra/yassl/CMakeLists.txt | 2 +- extra/yassl/certs/ca-cert.pem | 42 ++++++++++++++--------------- extra/yassl/certs/client-cert.der | Bin 699 -> 699 bytes extra/yassl/certs/client-cert.pem | 18 ++++++------- extra/yassl/certs/dsa-cert.pem | 18 ++++++------- extra/yassl/certs/server-cert.pem | 20 +++++++------- extra/yassl/include/lock.hpp | 6 ++--- extra/yassl/src/Makefile.am | 2 +- extra/yassl/src/lock.cpp | 4 +-- extra/yassl/taocrypt/CMakeLists.txt | 2 ++ extra/yassl/taocrypt/benchmark/Makefile.am | 2 +- extra/yassl/taocrypt/src/Makefile.am | 3 ++- extra/yassl/taocrypt/test/Makefile.am | 2 +- extra/yassl/taocrypt/test/memory.cpp | 2 +- extra/yassl/testsuite/Makefile.am | 2 +- 15 files changed, 64 insertions(+), 61 deletions(-) (limited to 'extra') diff --git a/extra/yassl/CMakeLists.txt b/extra/yassl/CMakeLists.txt index 26e682cbb0c..981f679f785 100755 --- a/extra/yassl/CMakeLists.txt +++ b/extra/yassl/CMakeLists.txt @@ -17,7 +17,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extra/yassl/include ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL) -ADD_DEFINITIONS("-D_LIB -DYASSL_PREFIX") +ADD_DEFINITIONS("-D_LIB -DYASSL_PREFIX -DYASSL_THREAD_SAFE") SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp src/handshake.cpp src/lock.cpp src/log.cpp src/socket_wrapper.cpp src/ssl.cpp src/timer.cpp src/yassl_error.cpp diff --git a/extra/yassl/certs/ca-cert.pem b/extra/yassl/certs/ca-cert.pem index 981dd004fc6..e353d118712 100644 --- a/extra/yassl/certs/ca-cert.pem +++ b/extra/yassl/certs/ca-cert.pem @@ -5,49 +5,49 @@ Certificate: Signature Algorithm: md5WithRSAEncryption Issuer: C=US, ST=Oregon, L=Portland, O=sawtooth, CN=www.sawtooth-consulting.com/emailAddress=info@yassl.com Validity - Not Before: Jan 18 20:12:32 2005 GMT - Not After : Oct 15 20:12:32 2007 GMT + Not Before: Mar 7 03:10:11 2005 GMT + Not After : Apr 1 03:10:11 2046 GMT Subject: C=US, ST=Oregon, L=Portland, O=sawtooth, CN=www.sawtooth-consulting.com/emailAddress=info@yassl.com Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (512 bit) Modulus (512 bit): - 00:cf:2b:14:00:b0:3c:df:6f:9e:91:40:ec:c8:f6: - 90:b2:5b:b4:70:80:a5:a4:0a:73:c7:44:f3:2a:26: - c4:2f:f1:3a:f1:c3:c4:ac:fc:c3:d2:c3:bf:f5:d7: - 6a:38:42:ad:22:ab:c8:c4:4b:4c:1d:16:af:05:34: - 7d:79:97:5e:e1 + 00:ef:c1:e3:9a:3c:6e:6e:cb:26:6f:05:be:e0:cb: + 57:a0:4b:68:e6:1b:f9:95:db:01:92:aa:6e:a6:b5: + 2d:b1:2b:50:fd:db:13:f2:c5:d8:b8:4f:75:28:53: + 72:e8:e5:11:9d:bb:c3:4f:4f:09:fd:4c:e7:46:d5: + 1d:bb:35:02:af Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - CB:0F:1F:E9:A2:76:71:C9:E6:E8:23:A6:C1:18:B7:CC:44:CF:B9:84 + 1D:EF:A1:B8:81:78:12:47:E8:57:06:08:74:18:F7:D3:AA:D8:F7:BD X509v3 Authority Key Identifier: - keyid:CB:0F:1F:E9:A2:76:71:C9:E6:E8:23:A6:C1:18:B7:CC:44:CF:B9:84 + keyid:1D:EF:A1:B8:81:78:12:47:E8:57:06:08:74:18:F7:D3:AA:D8:F7:BD DirName:/C=US/ST=Oregon/L=Portland/O=sawtooth/CN=www.sawtooth-consulting.com/emailAddress=info@yassl.com serial:00 X509v3 Basic Constraints: CA:TRUE Signature Algorithm: md5WithRSAEncryption - 27:f7:3d:fb:39:6f:73:a4:86:f3:a0:48:22:60:84:e9:5c:3d: - 28:36:05:16:44:98:07:87:e1:5d:b5:f3:a7:bc:33:5f:f4:29: - a9:5f:87:33:df:e6:8e:bd:e2:f3:0a:c8:00:69:ae:3d:41:47: - 03:ea:0b:4c:67:45:4b:ab:f3:39 + d9:77:e3:07:d9:2e:ec:2f:9b:8e:9e:ca:b4:00:0b:ef:c7:74: + cb:f4:f6:44:2f:02:75:17:a5:74:3e:26:b2:26:fd:1f:ab:3a: + df:d5:e3:05:14:08:d0:8c:1d:c9:3e:e1:59:6f:b3:38:5d:af: + 78:60:e3:c5:6a:69:96:80:7d:00 -----BEGIN CERTIFICATE----- MIIC7zCCApmgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBiTELMAkGA1UEBhMCVVMx DzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxhbmQxETAPBgNVBAoTCHNh d3Rvb3RoMSQwIgYDVQQDExt3d3cuc2F3dG9vdGgtY29uc3VsdGluZy5jb20xHTAb -BgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTA1MDExODIwMTIzMloXDTA3 -MTAxNTIwMTIzMlowgYkxCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZPcmVnb24xETAP +BgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTA1MDMwNzAzMTAxMVoXDTQ2 +MDQwMTAzMTAxMVowgYkxCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZPcmVnb24xETAP BgNVBAcTCFBvcnRsYW5kMREwDwYDVQQKEwhzYXd0b290aDEkMCIGA1UEAxMbd3d3 LnNhd3Rvb3RoLWNvbnN1bHRpbmcuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlh -c3NsLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDPKxQAsDzfb56RQOzI9pCy -W7RwgKWkCnPHRPMqJsQv8Trxw8Ss/MPSw7/112o4Qq0iq8jES0wdFq8FNH15l17h -AgMBAAGjgekwgeYwHQYDVR0OBBYEFMsPH+midnHJ5ugjpsEYt8xEz7mEMIG2BgNV -HSMEga4wgauAFMsPH+midnHJ5ugjpsEYt8xEz7mEoYGPpIGMMIGJMQswCQYDVQQG +c3NsLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDvweOaPG5uyyZvBb7gy1eg +S2jmG/mV2wGSqm6mtS2xK1D92xPyxdi4T3UoU3Lo5RGdu8NPTwn9TOdG1R27NQKv +AgMBAAGjgekwgeYwHQYDVR0OBBYEFB3vobiBeBJH6FcGCHQY99Oq2Pe9MIG2BgNV +HSMEga4wgauAFB3vobiBeBJH6FcGCHQY99Oq2Pe9oYGPpIGMMIGJMQswCQYDVQQG EwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDERMA8GA1UE ChMIc2F3dG9vdGgxJDAiBgNVBAMTG3d3dy5zYXd0b290aC1jb25zdWx0aW5nLmNv bTEdMBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb22CAQAwDAYDVR0TBAUwAwEB -/zANBgkqhkiG9w0BAQQFAANBACf3Pfs5b3OkhvOgSCJghOlcPSg2BRZEmAeH4V21 -86e8M1/0KalfhzPf5o694vMKyABprj1BRwPqC0xnRUur8zk= +/zANBgkqhkiG9w0BAQQFAANBANl34wfZLuwvm46eyrQAC+/HdMv09kQvAnUXpXQ+ +JrIm/R+rOt/V4wUUCNCMHck+4Vlvszhdr3hg48VqaZaAfQA= -----END CERTIFICATE----- diff --git a/extra/yassl/certs/client-cert.der b/extra/yassl/certs/client-cert.der index b28e2753376..c2a75119e54 100644 Binary files a/extra/yassl/certs/client-cert.der and b/extra/yassl/certs/client-cert.der differ diff --git a/extra/yassl/certs/client-cert.pem b/extra/yassl/certs/client-cert.pem index 81110f17252..4d2bbff7ca5 100644 --- a/extra/yassl/certs/client-cert.pem +++ b/extra/yassl/certs/client-cert.pem @@ -5,8 +5,8 @@ Certificate: Signature Algorithm: md5WithRSAEncryption Issuer: C=US, ST=Oregon, L=Portland, O=yaSSL, CN=www.yassl.com/emailAddress=info@yassl.com Validity - Not Before: Jan 18 19:33:15 2005 GMT - Not After : Oct 15 19:33:15 2007 GMT + Not Before: Mar 7 03:00:31 2005 GMT + Not After : Apr 1 03:00:31 2046 GMT Subject: C=US, ST=Oregon, L=Portland, O=yaSSL, CN=www.yassl.com/emailAddress=info@yassl.com Subject Public Key Info: Public Key Algorithm: rsaEncryption @@ -29,15 +29,15 @@ Certificate: X509v3 Basic Constraints: CA:TRUE Signature Algorithm: md5WithRSAEncryption - c5:82:26:0c:1f:61:01:14:b0:ce:18:99:64:91:0e:f1:f8:90: - 3e:a3:0e:be:38:7c:97:ba:05:c9:2a:dc:dd:62:2d:12:61:79: - 7a:86:b1:97:5d:1e:e8:f7:e8:32:34:f7:8f:b1:08:3d:13:71: - a6:3c:15:91:85:12:35:6e:78:87 + 59:19:ae:1b:4e:65:9e:ca:f1:b8:3d:ff:c7:5e:15:86:10:97: + 8c:3e:22:32:ab:4e:75:a7:70:83:f2:fb:2f:af:fe:26:28:e9: + 4f:d4:c9:49:7c:6f:51:7e:2a:ff:a0:5b:25:45:2e:66:d9:0d: + 92:94:e5:b8:60:c6:67:1a:f3:03 -----BEGIN CERTIFICATE----- MIICtzCCAmGgAwIBAgIBADANBgkqhkiG9w0BAQQFADB4MQswCQYDVQQGEwJVUzEP MA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDEOMAwGA1UEChMFeWFT U0wxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEWDmluZm9A -eWFzc2wuY29tMB4XDTA1MDExODE5MzMxNVoXDTA3MTAxNTE5MzMxNVoweDELMAkG +eWFzc2wuY29tMB4XDTA1MDMwNzAzMDAzMVoXDTQ2MDQwMTAzMDAzMVoweDELMAkG A1UEBhMCVVMxDzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxhbmQxDjAM BgNVBAoTBXlhU1NMMRYwFAYDVQQDEw13d3cueWFzc2wuY29tMR0wGwYJKoZIhvcN AQkBFg5pbmZvQHlhc3NsLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDNH3hH @@ -47,6 +47,6 @@ wP/OtbStMIGiBgNVHSMEgZowgZeAFK4lXvpNo1srh97xKvVCwP/OtbStoXykejB4 MQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFu ZDEOMAwGA1UEChMFeWFTU0wxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkq hkiG9w0BCQEWDmluZm9AeWFzc2wuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZI -hvcNAQEEBQADQQDFgiYMH2EBFLDOGJlkkQ7x+JA+ow6+OHyXugXJKtzdYi0SYXl6 -hrGXXR7o9+gyNPePsQg9E3GmPBWRhRI1bniH +hvcNAQEEBQADQQBZGa4bTmWeyvG4Pf/HXhWGEJeMPiIyq051p3CD8vsvr/4mKOlP +1MlJfG9Rfir/oFslRS5m2Q2SlOW4YMZnGvMD -----END CERTIFICATE----- diff --git a/extra/yassl/certs/dsa-cert.pem b/extra/yassl/certs/dsa-cert.pem index ecca18dae82..788d263bb9f 100644 --- a/extra/yassl/certs/dsa-cert.pem +++ b/extra/yassl/certs/dsa-cert.pem @@ -5,8 +5,8 @@ Certificate: Signature Algorithm: dsaWithSHA1 Issuer: C=US, ST=Oregon, L=Portland, O=yaSSL DSA, CN=yaSSL DSA/emailAddress=info@yassl.com Validity - Not Before: Jan 23 22:54:51 2005 GMT - Not After : Oct 20 22:54:51 2007 GMT + Not Before: Mar 7 03:22:00 2005 GMT + Not After : Apr 1 03:22:00 2046 GMT Subject: C=US, ST=Oregon, L=Portland, O=yaSSL DSA, CN=yaSSL DSA/emailAddress=info@yassl.com Subject Public Key Info: Public Key Algorithm: dsaEncryption @@ -43,14 +43,14 @@ Certificate: X509v3 Basic Constraints: CA:TRUE Signature Algorithm: dsaWithSHA1 - 30:2b:02:14:74:46:9f:91:7b:24:17:3b:ee:0f:10:e3:76:62: - f4:dc:81:e6:fd:fe:02:13:08:f4:87:0a:ab:ba:9c:de:3a:69: - 72:59:b8:ec:e9:57:f4:bf:37 + 30:2c:02:14:7e:5e:94:fc:7f:ca:81:ab:b3:32:f7:21:83:48: + 48:5f:0a:f1:13:ca:02:14:73:54:32:14:51:22:bf:0b:ec:d7: + 6a:6a:fa:a7:1d:46:b4:c2:a3:b5 -----BEGIN CERTIFICATE----- -MIIDMTCCAvKgAwIBAgIBADAJBgcqhkjOOAQDMHgxCzAJBgNVBAYTAlVTMQ8wDQYD +MIIDMjCCAvKgAwIBAgIBADAJBgcqhkjOOAQDMHgxCzAJBgNVBAYTAlVTMQ8wDQYD VQQIEwZPcmVnb24xETAPBgNVBAcTCFBvcnRsYW5kMRIwEAYDVQQKEwl5YVNTTCBE U0ExEjAQBgNVBAMTCXlhU1NMIERTQTEdMBsGCSqGSIb3DQEJARYOaW5mb0B5YXNz -bC5jb20wHhcNMDUwMTIzMjI1NDUxWhcNMDcxMDIwMjI1NDUxWjB4MQswCQYDVQQG +bC5jb20wHhcNMDUwMzA3MDMyMjAwWhcNNDYwNDAxMDMyMjAwWjB4MQswCQYDVQQG EwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDESMBAGA1UE ChMJeWFTU0wgRFNBMRIwEAYDVQQDEwl5YVNTTCBEU0ExHTAbBgkqhkiG9w0BCQEW DmluZm9AeWFzc2wuY29tMIHwMIGoBgcqhkjOOAQBMIGcAkEAmSlpgMk8mGhFqYL+ @@ -63,6 +63,6 @@ IeRhRHPp4jCBogYDVR0jBIGaMIGXgBS++Yxd1hy07oHdNlYKIeRhRHPp4qF8pHow eDELMAkGA1UEBhMCVVMxDzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxh bmQxEjAQBgNVBAoTCXlhU1NMIERTQTESMBAGA1UEAxMJeWFTU0wgRFNBMR0wGwYJ KoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbYIBADAMBgNVHRMEBTADAQH/MAkGByqG -SM44BAMDLgAwKwIUdEafkXskFzvuDxDjdmL03IHm/f4CEwj0hwqrupzeOmlyWbjs -6Vf0vzc= +SM44BAMDLwAwLAIUfl6U/H/KgauzMvchg0hIXwrxE8oCFHNUMhRRIr8L7Ndqavqn +HUa0wqO1 -----END CERTIFICATE----- diff --git a/extra/yassl/certs/server-cert.pem b/extra/yassl/certs/server-cert.pem index 403dabdf5fa..30608f5f65b 100644 --- a/extra/yassl/certs/server-cert.pem +++ b/extra/yassl/certs/server-cert.pem @@ -5,8 +5,8 @@ Certificate: Signature Algorithm: md5WithRSAEncryption Issuer: C=US, ST=Oregon, L=Portland, O=sawtooth, CN=www.sawtooth-consulting.com/emailAddress=info@yassl.com Validity - Not Before: Jan 18 20:50:59 2005 GMT - Not After : Oct 15 20:50:59 2007 GMT + Not Before: Mar 8 03:00:47 2005 GMT + Not After : Apr 2 03:00:47 2046 GMT Subject: C=US, ST=Oregon, L=Portland, O=taoSoftDev, CN=www.taosoftdev.com/emailAddress=info@yassl.com Subject Public Key Info: Public Key Algorithm: rsaEncryption @@ -19,20 +19,20 @@ Certificate: f2:25:93:22:e7 Exponent: 65537 (0x10001) Signature Algorithm: md5WithRSAEncryption - 08:36:07:8c:3a:7f:f9:91:0a:82:d1:6a:c1:34:be:bc:2d:b2: - 20:98:dc:45:50:53:9c:66:e6:26:71:bd:fa:d2:b4:91:d3:53: - c0:20:05:c0:b6:84:9a:5f:3f:61:75:f5:fd:c6:ec:e2:f6:9f: - a2:13:17:a9:b7:83:60:cc:cb:eb + 36:72:12:3b:ac:e4:58:83:09:86:4f:71:2a:3a:0d:8a:05:27: + 75:f3:3e:62:4f:ab:b8:70:20:cd:ad:70:ab:91:11:68:f8:82: + 33:e2:78:85:a8:16:f5:66:bd:68:2c:5a:26:15:12:1e:6e:83: + c7:6d:62:b9:c3:ff:e1:86:e4:e6 -----BEGIN CERTIFICATE----- MIIB9zCCAaECAQEwDQYJKoZIhvcNAQEEBQAwgYkxCzAJBgNVBAYTAlVTMQ8wDQYD VQQIEwZPcmVnb24xETAPBgNVBAcTCFBvcnRsYW5kMREwDwYDVQQKEwhzYXd0b290 aDEkMCIGA1UEAxMbd3d3LnNhd3Rvb3RoLWNvbnN1bHRpbmcuY29tMR0wGwYJKoZI -hvcNAQkBFg5pbmZvQHlhc3NsLmNvbTAeFw0wNTAxMTgyMDUwNTlaFw0wNzEwMTUy -MDUwNTlaMIGCMQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQH +hvcNAQkBFg5pbmZvQHlhc3NsLmNvbTAeFw0wNTAzMDgwMzAwNDdaFw00NjA0MDIw +MzAwNDdaMIGCMQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQH EwhQb3J0bGFuZDETMBEGA1UEChMKdGFvU29mdERldjEbMBkGA1UEAxMSd3d3LnRh b3NvZnRkZXYuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTBcMA0G CSqGSIb3DQEBAQUAA0sAMEgCQQCkaLu8tydfPPV4xhqvuZX8fmEfqIEKykOImgPg 0KZ5cBY0uXx1VMpwGWY4vm4ofqX/azyDLzlCwxXzvfIlkyLnAgMBAAEwDQYJKoZI -hvcNAQEEBQADQQAINgeMOn/5kQqC0WrBNL68LbIgmNxFUFOcZuYmcb360rSR01PA -IAXAtoSaXz9hdfX9xuzi9p+iExept4NgzMvr +hvcNAQEEBQADQQA2chI7rORYgwmGT3EqOg2KBSd18z5iT6u4cCDNrXCrkRFo+IIz +4niFqBb1Zr1oLFomFRIeboPHbWK5w//hhuTm -----END CERTIFICATE----- diff --git a/extra/yassl/include/lock.hpp b/extra/yassl/include/lock.hpp index 0525943e45d..7ce656522df 100644 --- a/extra/yassl/include/lock.hpp +++ b/extra/yassl/include/lock.hpp @@ -27,7 +27,7 @@ namespace yaSSL { -#ifdef MULTI_THREADED +#ifdef YASSL_THREAD_SAFE #ifdef _WIN32 #include @@ -69,7 +69,7 @@ namespace yaSSL { }; #endif // _WIN32 -#else // MULTI_THREADED (WE'RE SINGLE) +#else // YASSL_THREAD_SAFE (WE'RE SINGLE) class Mutex { public: @@ -79,7 +79,7 @@ namespace yaSSL { }; }; -#endif // MULTI_THREADED +#endif // YASSL_THREAD_SAFE diff --git a/extra/yassl/src/Makefile.am b/extra/yassl/src/Makefile.am index bc57e7d05ba..d192eb03b49 100644 --- a/extra/yassl/src/Makefile.am +++ b/extra/yassl/src/Makefile.am @@ -5,7 +5,7 @@ libyassl_la_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.cpp \ handshake.cpp lock.cpp log.cpp socket_wrapper.cpp ssl.cpp \ template_instnt.cpp timer.cpp yassl_imp.cpp yassl_error.cpp yassl_int.cpp EXTRA_DIST = $(wildcard ../include/*.hpp) $(wildcard ../include/openssl/*.h) -AM_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX +AM_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX @yassl_thread_cxxflags@ # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/extra/yassl/src/lock.cpp b/extra/yassl/src/lock.cpp index 6d8e9c17477..6e85fefa14d 100644 --- a/extra/yassl/src/lock.cpp +++ b/extra/yassl/src/lock.cpp @@ -26,7 +26,7 @@ namespace yaSSL { -#ifdef MULTI_THREADED +#ifdef YASSL_THREAD_SAFE #ifdef _WIN32 Mutex::Mutex() @@ -79,7 +79,7 @@ namespace yaSSL { #endif // _WIN32 -#endif // MULTI_THREADED +#endif // YASSL_THREAD_SAFE diff --git a/extra/yassl/taocrypt/CMakeLists.txt b/extra/yassl/taocrypt/CMakeLists.txt index e91fa021de5..c8faeac3b77 100755 --- a/extra/yassl/taocrypt/CMakeLists.txt +++ b/extra/yassl/taocrypt/CMakeLists.txt @@ -16,6 +16,8 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include) +ADD_DEFINITIONS("-DYASSL_THREAD_SAFE") + SET(TAOCRYPT_SOURCES src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp src/asn.cpp src/coding.cpp src/des.cpp src/dh.cpp src/dsa.cpp src/file.cpp src/hash.cpp src/integer.cpp src/md2.cpp src/md4.cpp src/md5.cpp src/misc.cpp src/random.cpp src/ripemd.cpp src/rsa.cpp src/sha.cpp diff --git a/extra/yassl/taocrypt/benchmark/Makefile.am b/extra/yassl/taocrypt/benchmark/Makefile.am index 2fe1c90c90d..1f082f22f40 100644 --- a/extra/yassl/taocrypt/benchmark/Makefile.am +++ b/extra/yassl/taocrypt/benchmark/Makefile.am @@ -2,7 +2,7 @@ INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL noinst_PROGRAMS = benchmark benchmark_SOURCES = benchmark.cpp benchmark_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la -benchmark_CXXFLAGS = -DYASSL_PURE_C +benchmark_CXXFLAGS = -DYASSL_PURE_C @yassl_thread_cxxflags@ EXTRA_DIST = benchmark.dsp rsa1024.der dh1024.der dsa1024.der make.bat # Don't update the files from bitkeeper diff --git a/extra/yassl/taocrypt/src/Makefile.am b/extra/yassl/taocrypt/src/Makefile.am index 61032d4c381..6ca969ad686 100644 --- a/extra/yassl/taocrypt/src/Makefile.am +++ b/extra/yassl/taocrypt/src/Makefile.am @@ -8,7 +8,8 @@ libtaocrypt_la_SOURCES = aes.cpp aestables.cpp algebra.cpp arc4.cpp \ random.cpp ripemd.cpp rsa.cpp sha.cpp template_instnt.cpp \ tftables.cpp twofish.cpp -libtaocrypt_la_CXXFLAGS = @yassl_taocrypt_extra_cxxflags@ -DYASSL_PURE_C +libtaocrypt_la_CXXFLAGS = @yassl_taocrypt_extra_cxxflags@ -DYASSL_PURE_C \ + @yassl_thread_cxxflags@ EXTRA_DIST = $(wildcard ../include/*.hpp) diff --git a/extra/yassl/taocrypt/test/Makefile.am b/extra/yassl/taocrypt/test/Makefile.am index 73e7f729bdb..aa325ff9b75 100644 --- a/extra/yassl/taocrypt/test/Makefile.am +++ b/extra/yassl/taocrypt/test/Makefile.am @@ -2,7 +2,7 @@ INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL noinst_PROGRAMS = test test_SOURCES = test.cpp test_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la -test_CXXFLAGS = -DYASSL_PURE_C +test_CXXFLAGS = -DYASSL_PURE_C @yassl_thread_cxxflags@ EXTRA_DIST = make.bat # Don't update the files from bitkeeper diff --git a/extra/yassl/taocrypt/test/memory.cpp b/extra/yassl/taocrypt/test/memory.cpp index 726c9c0ef54..a879a497800 100644 --- a/extra/yassl/taocrypt/test/memory.cpp +++ b/extra/yassl/taocrypt/test/memory.cpp @@ -13,7 +13,7 @@ To use MemoryTracker merely add this file to your project No need to instantiate anything -If your app is multi threaded define MULTI_THREADED +If your app is multi threaded define YASSL_THREAD_SAFE *********************************************************************/ diff --git a/extra/yassl/testsuite/Makefile.am b/extra/yassl/testsuite/Makefile.am index cae34e7bbc0..e626b1822ec 100644 --- a/extra/yassl/testsuite/Makefile.am +++ b/extra/yassl/testsuite/Makefile.am @@ -4,7 +4,7 @@ testsuite_SOURCES = testsuite.cpp ../taocrypt/test/test.cpp \ ../examples/client/client.cpp ../examples/server/server.cpp \ ../examples/echoclient/echoclient.cpp \ ../examples/echoserver/echoserver.cpp -testsuite_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX -DNO_MAIN_DRIVER +testsuite_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX -DNO_MAIN_DRIVER @yassl_thread_cxxflags@ testsuite_LDADD = $(top_builddir)/extra/yassl/src/libyassl.la \ $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la EXTRA_DIST = testsuite.dsp test.hpp input quit make.bat -- cgit v1.2.1 From 41297909aded820350afaecf64a4aee888bd369c Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Wed, 9 Jun 2010 21:30:41 -0300 Subject: Bug#34236: Various possibly related SSL crashes Addendum: Work around a compilation failure on Windows due to windows.h not being added to the global namespace. extra/yassl/include/lock.hpp: Move windows.h inclusion into the global namespace. --- extra/yassl/include/lock.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'extra') diff --git a/extra/yassl/include/lock.hpp b/extra/yassl/include/lock.hpp index 7ce656522df..99829b0b6de 100644 --- a/extra/yassl/include/lock.hpp +++ b/extra/yassl/include/lock.hpp @@ -23,13 +23,21 @@ #ifndef yaSSL_LOCK_HPP #define yaSSL_LOCK_HPP +/* + Visual Studio Source Annotations header (sourceannotations.h) fails + to compile if outside of the global namespace. +*/ +#ifdef YASSL_THREAD_SAFE +#ifdef _WIN32 +#include +#endif +#endif namespace yaSSL { #ifdef YASSL_THREAD_SAFE #ifdef _WIN32 - #include class Mutex { CRITICAL_SECTION cs_; -- cgit v1.2.1 From 6f3a540c37bd1d84139c32a4b74844ff648c3b0c Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Thu, 10 Jun 2010 17:16:43 -0300 Subject: Bug#42733: Type-punning warnings when compiling MySQL -- strict aliasing violations. Essentially, the problem is that large parts of the server were developed in simpler times (last decades, pre C99 standard) when strict aliasing and compilers supporting such optimizations were rare to non-existent. Thus, when compiling the server with a modern compiler that uses strict aliasing rules to perform optimizations, there are several places in the code that might trigger undefined behavior. As evinced by some recent bugs, GCC does a somewhat good of job misoptimizing such code, but on the other hand also gives warnings about suspicious code. One problem is that the warnings aren't always accurate, yet we can't afford to just shut them off as we might miss real cases. False-positive cases are aggravated mostly by casts that are likely to trigger undefined behavior. The solution is to start a cleanup process focused on fixing and reducing the amount of strict-aliasing related warnings produced by GCC and others compilers. A good deal of noise reduction can be achieved by just removing useless casts that are product of historical cruft and are likely to trigger undefined behavior if dereferenced. client/mysql.cc: Remove now-unnecessary casts. Break up large strings. client/mysql_upgrade.c: Remove now-unnecessary casts. client/mysqladmin.cc: Remove now-unnecessary casts. Break up large strings. client/mysqlbinlog.cc: Remove now-unnecessary casts. client/mysqlcheck.c: Remove now-unnecessary casts. client/mysqldump.c: Remove now-unnecessary casts. client/mysqlimport.c: Remove now-unnecessary casts. client/mysqlshow.c: Remove now-unnecessary casts. client/mysqlslap.c: Remove now-unnecessary casts. client/mysqltest.cc: Remove now-unnecessary casts. extra/comp_err.c: Remove now-unnecessary casts. extra/my_print_defaults.c: Remove now-unnecessary casts. Break up large strings. extra/mysql_waitpid.c: Remove now-unnecessary casts. extra/perror.c: Remove now-unnecessary casts. extra/resolve_stack_dump.c: Remove now-unnecessary casts. extra/resolveip.c: Remove now-unnecessary casts. include/my_getopt.h: Use a void pointer type as the opaque type to avoid problems with type incompatibility -- GCC issues warnings when the type name is not type compatible with a operand. As a side bonus, a explicit cast won't be necessary anymore. include/sslopt-longopts.h: Remove now-unnecessary casts. Break up large strings. mysys/my_getopt.c: Update opaque type and introduce a type definition for the argument to my_getopt_register_get_addr. server-tools/instance-manager/options.cc: Remove now-unnecessary casts. sql/mysqld.cc: Remove now-unnecessary casts. Break up large strings. Update mysql_getopt_value prototype (the old prototype was different from the definition anyway). sql/sql_plugin.cc: The type of a pointer to a function must be compatible with the pointed-to function type, otherwise the behavior is undefined. sql/table.cc: The variable buf pointer to pointer to pointer to constant char could improperly alias a incompatible type in call to fix_type_ pointers. Since this was actually dead code, it is simply removed. sql/unireg.cc: Remove call to get_form_pos. The code creates a new FRM file which is always truncated and writes the form position as 0. Hence, no need to retrieve it, we now for sure it is 0. storage/archive/archive_reader.c: Remove now-unnecessary casts. storage/myisam/ft_nlq_search.c: Read weight directly from the buffer. storage/myisam/fulltext.h: Add explanation about the type duality of a key buffer. Add accessor macro to retrieve a FT float value. storage/myisam/mi_test1.c: Remove now-unnecessary casts. storage/myisam/myisam_ftdump.c: Read weight directly from the buffer. storage/myisam/myisamchk.c: Remove now-unnecessary casts. storage/myisam/myisamlog.c: A pointer to char was used to alias a pointer to pointer to unsigned char, thus violating strict aliasing rules. storage/myisam/myisampack.c: Remove now-unnecessary casts. strings/decimal.c: Remove aliasing violation, printing the value is enough for debugging purposes. tests/mysql_client_test.c: Remove now-unnecessary casts. --- extra/comp_err.c | 32 +++++++++++++++----------------- extra/my_print_defaults.c | 27 ++++++++++++++++----------- extra/mysql_waitpid.c | 2 +- extra/perror.c | 10 +++++----- extra/resolve_stack_dump.c | 6 +++--- extra/resolveip.c | 2 +- 6 files changed, 41 insertions(+), 38 deletions(-) (limited to 'extra') diff --git a/extra/comp_err.c b/extra/comp_err.c index 9326444ade9..bd03f20a755 100644 --- a/extra/comp_err.c +++ b/extra/comp_err.c @@ -99,31 +99,29 @@ static struct my_option my_long_options[]= {"debug", '#', "This is a non-debug version. Catch this and exit", 0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, #else - {"debug", '#', "Output debug log", (uchar**) & default_dbug_option, - (uchar**) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, + {"debug", '#', "Output debug log", &default_dbug_option, + &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"debug-info", 'T', "Print some debug info at exit.", (uchar**) & info_flag, - (uchar**) & info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"debug-info", 'T', "Print some debug info at exit.", &info_flag, + &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"help", '?', "Displays this help and exits.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"version", 'V', "Prints version", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"charset", 'C', "Charset dir", (uchar**) & charsets_dir, - (uchar**) & charsets_dir, + {"charset", 'C', "Charset dir", &charsets_dir, &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"in_file", 'F', "Input file", (uchar**) & TXTFILE, (uchar**) & TXTFILE, + {"in_file", 'F', "Input file", &TXTFILE, &TXTFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"out_dir", 'D', "Output base directory", (uchar**) & DATADIRECTORY, - (uchar**) & DATADIRECTORY, + {"out_dir", 'D', "Output base directory", &DATADIRECTORY, &DATADIRECTORY, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"out_file", 'O', "Output filename (errmsg.sys)", (uchar**) & OUTFILE, - (uchar**) & OUTFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"header_file", 'H', "mysqld_error.h file ", (uchar**) & HEADERFILE, - (uchar**) & HEADERFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"name_file", 'N', "mysqld_ername.h file ", (uchar**) & NAMEFILE, - (uchar**) & NAMEFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"state_file", 'S', "sql_state.h file", (uchar**) & STATEFILE, - (uchar**) & STATEFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"out_file", 'O', "Output filename (errmsg.sys)", &OUTFILE, + &OUTFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"header_file", 'H', "mysqld_error.h file ", &HEADERFILE, + &HEADERFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"name_file", 'N', "mysqld_ername.h file ", &NAMEFILE, + &NAMEFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"state_file", 'S', "sql_state.h file", &STATEFILE, + &STATEFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c index 06f7e51c380..cc74208b783 100644 --- a/extra/my_print_defaults.c +++ b/extra/my_print_defaults.c @@ -46,31 +46,36 @@ static struct my_option my_long_options[] = searched for a file of this name (and standard filename extensions are added if the file has no extension) */ - {"config-file", 'c', "Deprecated, please use --defaults-file instead. Name of config file to read; if no extension is given, default extension (e.g., .ini or .cnf) will be added", - (uchar**) &config_file, (uchar**) &config_file, 0, GET_STR, REQUIRED_ARG, + {"config-file", 'c', "Deprecated, please use --defaults-file instead. " + "Name of config file to read; if no extension is given, default " + "extension (e.g., .ini or .cnf) will be added", + &config_file, &config_file, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, #ifdef DBUG_OFF {"debug", '#', "This is a non-debug version. Catch this and exit", 0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, #else - {"debug", '#', "Output debug log", (uchar**) &default_dbug_option, - (uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, + {"debug", '#', "Output debug log", &default_dbug_option, + &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"defaults-file", 'c', "Like --config-file, except: if first option, then read this file only, do not read global or per-user config files; should be the first option", - (uchar**) &config_file, (uchar**) &config_file, 0, GET_STR, REQUIRED_ARG, + {"defaults-file", 'c', "Like --config-file, except: if first option, " + "then read this file only, do not read global or per-user config " + "files; should be the first option", + &config_file, &config_file, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"defaults-extra-file", 'e', - "Read this file after the global config file and before the config file in the users home directory; should be the first option", - (uchar**) &my_defaults_extra_file, (uchar**) &my_defaults_extra_file, 0, + "Read this file after the global config file and before the config " + "file in the users home directory; should be the first option", + &my_defaults_extra_file, &my_defaults_extra_file, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"defaults-group-suffix", 'g', "In addition to the given groups, read also groups with this suffix", - (uchar**) &my_defaults_group_suffix, (uchar**) &my_defaults_group_suffix, + &my_defaults_group_suffix, &my_defaults_group_suffix, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"extra-file", 'e', "Deprecated. Synonym for --defaults-extra-file.", - (uchar**) &my_defaults_extra_file, - (uchar**) &my_defaults_extra_file, 0, GET_STR, + &my_defaults_extra_file, + &my_defaults_extra_file, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"no-defaults", 'n', "Return an empty string (useful for scripts).", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, diff --git a/extra/mysql_waitpid.c b/extra/mysql_waitpid.c index 42465998862..e5c06ac9857 100644 --- a/extra/mysql_waitpid.c +++ b/extra/mysql_waitpid.c @@ -38,7 +38,7 @@ static struct my_option my_long_options[] = 0, 0, 0, 0, 0}, {"verbose", 'v', "Be more verbose. Give a warning, if kill can't handle signal 0.", - (uchar**) &verbose, (uchar**) &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + &verbose, &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"version", 'V', "Print version information and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} diff --git a/extra/perror.c b/extra/perror.c index a98a4fc3d1b..c32ad2bc791 100644 --- a/extra/perror.c +++ b/extra/perror.c @@ -60,18 +60,18 @@ static struct my_option my_long_options[] = {"info", 'I', "Synonym for --help.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE - {"ndb", 257, "Ndbcluster storage engine specific error codes.", (uchar**) &ndb_code, - (uchar**) &ndb_code, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"ndb", 257, "Ndbcluster storage engine specific error codes.", &ndb_code, + &ndb_code, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, #endif #ifdef HAVE_SYS_ERRLIST {"all", 'a', "Print all the error messages and the number.", - (uchar**) &print_all_codes, (uchar**) &print_all_codes, 0, GET_BOOL, NO_ARG, + &print_all_codes, &print_all_codes, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, #endif {"silent", 's', "Only print the error message.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"verbose", 'v', "Print error code and message (default).", (uchar**) &verbose, - (uchar**) &verbose, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, + {"verbose", 'v', "Print error code and message (default).", &verbose, + &verbose, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, {"version", 'V', "Displays version information and exits.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} diff --git a/extra/resolve_stack_dump.c b/extra/resolve_stack_dump.c index 447d63890bd..4faca1653b2 100644 --- a/extra/resolve_stack_dump.c +++ b/extra/resolve_stack_dump.c @@ -53,10 +53,10 @@ static struct my_option my_long_options[] = 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"symbols-file", 's', "Use specified symbols file.", (uchar**) &sym_fname, - (uchar**) &sym_fname, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"symbols-file", 's', "Use specified symbols file.", &sym_fname, + &sym_fname, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"numeric-dump-file", 'n', "Read the dump from specified file.", - (uchar**) &dump_fname, (uchar**) &dump_fname, 0, GET_STR, REQUIRED_ARG, + &dump_fname, &dump_fname, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; diff --git a/extra/resolveip.c b/extra/resolveip.c index 5f2a9269f62..90fda977848 100644 --- a/extra/resolveip.c +++ b/extra/resolveip.c @@ -45,7 +45,7 @@ static struct my_option my_long_options[] = 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"info", 'I', "Synonym for --help.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"silent", 's', "Be more silent.", (uchar**) &silent, (uchar**) &silent, + {"silent", 's', "Be more silent.", &silent, &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"version", 'V', "Displays version information and exits.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, -- cgit v1.2.1