2011-10-04 9 views
5

यह वास्तव में SSL के बारे में एक प्रश्न है, और सॉकेट-निशान नीचे हैं, इसलिए पढ़ने के लिए शर्मिंदा न हों, भले ही आपने कभी नहीं पढ़ा पहले MySQL इस्तेमाल किया। वैसे भी हम इतनी के रूप में, MySqlConnection का उपयोग कर (दोनों .NET 2.0 & 4.0, संस्करण कोई फर्क नहीं पड़ता) SSL पर ने MySQL-सर्वर से कनेक्ट करने (एक ग्राहक .PFX प्रमाण पत्र के साथ) की कोशिश कर रहे:MySQL कनेक्शन (.NET) का उपयोग SSL से MySQL सर्वर से कनेक्ट कुछ क्लाइंट से विफल रहता है

using (MySqlConnection con = new MySqlConnection(@"server=xxx.yyy.zzz.uuu;database=whopper;user=Username;password=Secret;Certificate Store Location=CurrentUser;Pooling=false;SSL Mode=Required;Certificate Thumbprint=NNNN;Keepalive=60")) { 
    con.Open(); 
} 

प्रमाणपत्र व्यक्तिगत स्टोर में स्थापित है, और यह पूरी बात पर कुछ मशीनों पर काम करती है; लेकिन दूसरों पर नहीं। StackTrace:

System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream. 
    at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count) 
    at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 
    at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 
    at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 
    at MySql.Data.MySqlClient.NativeDriver.StartSSL() in D:\Downloads\mysql-connector-net-6.4.4-src\Source\MySql.Data\NativeDriver.cs:line 353 
    at MySql.Data.MySqlClient.NativeDriver.Open() in D:\Downloads\mysql-connector-net-6.4.4-src\Source\MySql.Data\NativeDriver.cs:line 267 
    at MySql.Data.MySqlClient.Driver.Open() in D:\Downloads\mysql-connector-net-6.4.4-src\Source\MySql.Data\Driver.cs:line 211 
    at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) in D:\Downloads\mysql-connector-net-6.4.4-src\Source\MySql.Data\Driver.cs:line 199 
    at MySql.Data.MySqlClient.MySqlConnection.Open() in D:\Downloads\mysql-connector-net-6.4.4-src\Source\MySql.Data\Connection.cs:line 489 
    at ConsoleApplication1.Program.Main(String[] args) in D:\Downloads\mysql-connector-net-6.4.4-src\Source\ConsoleApplication1\Program.cs:line 14 

अब, यह मैं MySqlConnection के नवीनतम src डाउनलोड किया है डिबग करने के लिए, तो मैं AuthenticateAsClient करने के लिए कॉल जब तक सब कुछ का पालन कर सकते हैं - जहां MySqlConnection SSL कनेक्शन सेटअप करने के लिए .NET फ़्रेमवर्क कहता है। अगला मैं अपने app.config के लिए निम्न जोड़ा (एक सॉकेट ट्रेस प्राप्त हो सकता है और जांच जारी रखने के लिए):

System.Net.Sockets Verbose: 0 : [5000] Socket#29190913::Socket(InterNetwork#2) 
System.Net.Sockets Verbose: 0 : [5000] Exiting Socket#29190913::Socket() 
System.Net.Sockets Verbose: 0 : [5000] Socket#29190913::BeginConnect(142:3306#-1905378776) 
System.Net.Sockets Verbose: 0 : [5000] Socket#29190913::BeginConnectEx() 
System.Net.Sockets Verbose: 0 : [5000] Socket#29190913::InternalBind(0:0#0) 
System.Net.Sockets Verbose: 0 : [5000] Exiting Socket#29190913::InternalBind() 
System.Net.Sockets Verbose: 0 : [5000] Exiting Socket#29190913::BeginConnectEx() -> ConnectOverlappedAsyncResult#9029417 
System.Net.Sockets Verbose: 0 : [5000] Socket#29190913::EndConnect(ConnectOverlappedAsyncResult#9029417) 
System.Net.Sockets Verbose: 0 : [5000] Exiting Socket#29190913::EndConnect() 
System.Net.Sockets Verbose: 0 : [5000] Socket#29190913::Receive() 
System.Net.Sockets Verbose: 0 : [5000] Data from Socket#29190913::Receive 
System.Net.Sockets Verbose: 0 : [5000] 00000000 : 3D 00 00 00 0A 35 2E 31-2E 35 34 2D 31 75 62 75 : =....5.1.54-1ubu 
System.Net.Sockets Verbose: 0 : [5000] 00000010 : 6E 74 75 34 00 5E 04 00-00 2F 32 4C 69 4D 26 73 : ntu4.^.../2LiM&s 
System.Net.Sockets Verbose: 0 : [5000] 00000020 : 32 00 FF FF 08 02 00 00-00 00 00 00 00 00 00 00 : 2............... 
System.Net.Sockets Verbose: 0 : [5000] 00000030 : 00 00 00 00 3E 23 31 6B-4B 75 2B 72 7D 3F 60 48 : ....>#1kKu+r}?`H 
System.Net.Sockets Verbose: 0 : [5000] 00000040 : 00            : . 
System.Net.Sockets Verbose: 0 : [5000] Exiting Socket#29190913::Receive() -> 65#65 
System.Net.Sockets Verbose: 0 : [5000] Socket#29190913::Send() 
System.Net.Sockets Verbose: 0 : [5000] Data from Socket#29190913::Send 
System.Net.Sockets Verbose: 0 : [5000] 00000000 : 04 00 00 01 8F AA 03 00-      : ........ 
System.Net.Sockets Verbose: 0 : [5000] Exiting Socket#29190913::Send() -> 8#8 
System.Net.Sockets Verbose: 0 : [5000] Socket#29190913::Send() 
System.Net.Sockets Verbose: 0 : [5000] Data from Socket#29190913::Send 
System.Net.Sockets Verbose: 0 : [5000] 00000000 : 16 03 01 00 5A 01 00 00-56 03 01 4E 89 D2 2C 88 : ....Z...V..N..,. 
System.Net.Sockets Verbose: 0 : [5000] 00000010 : 6E E9 57 C7 A0 A2 83 59-DC B1 1D 11 01 F6 32 F0 : n.W....Y......2. 
System.Net.Sockets Verbose: 0 : [5000] 00000020 : E0 50 63 37 BD EE AD A2-07 3B CC 00 00 18 00 2F : .Pc7.....;...../ 
System.Net.Sockets Verbose: 0 : [5000] 00000030 : 00 35 00 05 00 0A C0 13-C0 14 C0 09 C0 0A 00 32 : .5.............2 
System.Net.Sockets Verbose: 0 : [5000] 00000040 : 00 38 00 13 00 04 01 00-00 15 FF 01 00 01 00 00 : .8.............. 
System.Net.Sockets Verbose: 0 : [5000] 00000050 : 0A 00 06 00 04 00 17 00-18 00 0B 00 02 01 00 : ............... 
System.Net.Sockets Verbose: 0 : [5000] Exiting Socket#29190913::Send() -> 95#95 
System.Net.Sockets Verbose: 0 : [5000] Socket#29190913::Receive() 
System.Net.Sockets Verbose: 0 : [5000] Data from Socket#29190913::Receive 
System.Net.Sockets Verbose: 0 : [5000] 00000000 : 16 03 01 00 4A         : ....J 
System.Net.Sockets Verbose: 0 : [5000] Exiting Socket#29190913::Receive() -> 5#5 
System.Net.Sockets Verbose: 0 : [5000] Socket#29190913::Receive() 
System.Net.Sockets Verbose: 0 : [5000] Data from Socket#29190913::Receive 
System.Net.Sockets Verbose: 0 : [5000] 00000005 : 02 00 00 46 03 01 D3 49-C4 02 A3 F4 60 21 C1 F0 : ...F...I....`!.. 
System.Net.Sockets Verbose: 0 : [5000] 00000015 : 19 06 33 F1 F2 9B D1 8D-65 C6 A6 EF C8 C8 21 BC : ..3.....e.....!. 
System.Net.Sockets Verbose: 0 : [5000] 00000025 : C4 80 AC 9D 0D 0C 20 D9-5D A0 92 8A F5 70 D8 B0 : ...... .]....p.. 
System.Net.Sockets Verbose: 0 : [5000] 00000035 : 9A EB 86 26 2E AD 0B EC-EF FB EE AB B7 4F 74 BC : ...&.........Ot. 
System.Net.Sockets Verbose: 0 : [5000] 00000045 : F3 31 E0 2A 0F 9F EB 00-35 00     : .1.*....5. 
System.Net.Sockets Verbose: 0 : [5000] Exiting Socket#29190913::Receive() -> 74#74 
System.Net.Sockets Verbose: 0 : [5000] Socket#29190913::Receive() 
System.Net.Sockets Verbose: 0 : [5000] Data from Socket#29190913::Receive 
System.Net.Sockets Verbose: 0 : [5000] 00000000 : 16 03 01 03 AC         : ..... 
System.Net.Sockets Verbose: 0 : [5000] Exiting Socket#29190913::Receive() -> 5#5 
System.Net.Sockets Verbose: 0 : [5000] Socket#29190913::Receive() 
System.Net.Sockets Verbose: 0 : [5000] Data from Socket#29190913::Receive 
[server certificate received here. identical in both dumps] 
System.Net.Sockets Verbose: 0 : [5000] Exiting Socket#29190913::Receive() -> 940#940 
System.Net.Sockets Verbose: 0 : [5000] Socket#29190913::Receive() 
System.Net.Sockets Verbose: 0 : [5000] Data from Socket#29190913::Receive 
System.Net.Sockets Verbose: 0 : [5000] 00000000 : 16 03 01 00 09         : ..... 
System.Net.Sockets Verbose: 0 : [5000] Exiting Socket#29190913::Receive() -> 5#5 
System.Net.Sockets Verbose: 0 : [5000] Socket#29190913::Receive() 
System.Net.Sockets Verbose: 0 : [5000] Data from Socket#29190913::Receive 
System.Net.Sockets Verbose: 0 : [5000] 00000005 : 0D 00 00 05 02 01 02 00-00      : ......... 
System.Net.Sockets Verbose: 0 : [5000] Exiting Socket#29190913::Receive() -> 9#9 
System.Net.Sockets Verbose: 0 : [5000] Socket#29190913::Receive() 
System.Net.Sockets Verbose: 0 : [5000] Data from Socket#29190913::Receive 
System.Net.Sockets Verbose: 0 : [5000] 00000000 : 16 03 01 00 04         : ..... 
System.Net.Sockets Verbose: 0 : [5000] Exiting Socket#29190913::Receive() -> 5#5 
System.Net.Sockets Verbose: 0 : [5000] Socket#29190913::Receive() 
System.Net.Sockets Verbose: 0 : [5000] Data from Socket#29190913::Receive 
System.Net.Sockets Verbose: 0 : [5000] 00000005 : 0E 00 00 00          : .... 
System.Net.Sockets Verbose: 0 : [5000] Exiting Socket#29190913::Receive() -> 4#4 
System.Net.Sockets Verbose: 0 : [5000] Socket#29190913::Send() 
System.Net.Sockets Verbose: 0 : [5000] Data from Socket#29190913::Send 
[everything seems encrypted here] 
:

<?xml version="1.0"?> 
<configuration> 
    <system.diagnostics> 
     <sources> 
      <source name="System.Net.Sockets"> 
       <listeners> 
        <add name="Sockets"/> 
       </listeners> 
      </source> 
     </sources> 
     <switches> 
      <add name="System.Net.Sockets" value="31"/> 
     </switches> 
     <sharedListeners> 
      <add name="Sockets" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\socketdump.log"/> 
     </sharedListeners> 
     <trace autoflush="true"/> 
    </system.diagnostics> 
</configuration> 

क्लाइंट मशीन जहां कनेक्शन accually सफल होता है पर, उस फ़ाइल के साथ शुरू होता

और मशीन जहां स्थापित करने में विफल रहता है एसएसएल पर, उस फ़ाइल के साथ शुरू होता (न BeginConnectEx() मन के रूप में यह इस जब ThreadPool में एक धागे से बुला .NET फ़्रेमवर्क द्वारा किया जाता है की तरह लगता है):

System.Net.Sockets Verbose: 0 : [3880] Socket#39785641::Socket(InterNetwork#2) 
System.Net.Sockets Verbose: 0 : [3880] Exiting Socket#39785641::Socket() 
System.Net.Sockets Verbose: 0 : [3880] Socket#39785641::BeginConnect(142:3306#-1905378776) 



System.Net.Sockets Verbose: 0 : [3880] Exiting Socket#39785641::BeginConnect() -> ConnectAsyncResult#45523402 
System.Net.Sockets Verbose: 0 : [3880] Socket#39785641::EndConnect(ConnectAsyncResult#45523402) 
System.Net.Sockets Verbose: 0 : [3880] Exiting Socket#39785641::EndConnect() 
System.Net.Sockets Verbose: 0 : [3880] Socket#39785641::Receive() 
System.Net.Sockets Verbose: 0 : [3880] Data from Socket#39785641::Receive 
System.Net.Sockets Verbose: 0 : [3880] 00000000 : 3D 00 00 00 0A 35 2E 31-2E 35 34 2D 31 75 62 75 : =....5.1.54-1ubu 
System.Net.Sockets Verbose: 0 : [3880] 00000010 : 6E 74 75 34 00 62 04 00-00 7A 27 51 43 3C 43 7B : ntu4.b...z'QC<C{ 
System.Net.Sockets Verbose: 0 : [3880] 00000020 : 64 00 FF FF 08 02 00 00-00 00 00 00 00 00 00 00 : d............... 
System.Net.Sockets Verbose: 0 : [3880] 00000030 : 00 00 00 00 63 44 68 61-2E 5C 69 79 46 32 65 29 : ....cDha.\iyF2e) 
System.Net.Sockets Verbose: 0 : [3880] 00000040 : 00            : . 
System.Net.Sockets Verbose: 0 : [3880] Exiting Socket#39785641::Receive() -> 65#65 
System.Net.Sockets Verbose: 0 : [3880] Socket#39785641::Send() 
System.Net.Sockets Verbose: 0 : [3880] Data from Socket#39785641::Send 
System.Net.Sockets Verbose: 0 : [3880] 00000000 : 04 00 00 01 8F AA 03 00-      : ........ 
System.Net.Sockets Verbose: 0 : [3880] Exiting Socket#39785641::Send() -> 8#8 
System.Net.Sockets Verbose: 0 : [3880] Socket#39785641::Send() 
System.Net.Sockets Verbose: 0 : [3880] Data from Socket#39785641::Send 
System.Net.Sockets Verbose: 0 : [3880] 00000000 : 16 03 01 00 5A 01 00 00-56 03 01 4E 89 D1 92 4C : ....Z...V..N...L 
System.Net.Sockets Verbose: 0 : [3880] 00000010 : 61 0C 93 9D 9F 7C 45 39-71 8C 0A 6E 29 7C D9 32 : a....|E9q..n)|.2 
System.Net.Sockets Verbose: 0 : [3880] 00000020 : 89 CF 7B D8 1E 33 4F 90-A1 2C 27 00 00 18 00 2F : ..{..3O..,'..../ 
System.Net.Sockets Verbose: 0 : [3880] 00000030 : 00 35 00 05 00 0A C0 13-C0 14 C0 09 C0 0A 00 32 : .5.............2 
System.Net.Sockets Verbose: 0 : [3880] 00000040 : 00 38 00 13 00 04 01 00-00 15 FF 01 00 01 00 00 : .8.............. 
System.Net.Sockets Verbose: 0 : [3880] 00000050 : 0A 00 06 00 04 00 17 00-18 00 0B 00 02 01 00 : ............... 
System.Net.Sockets Verbose: 0 : [3880] Exiting Socket#39785641::Send() -> 95#95 
System.Net.Sockets Verbose: 0 : [3880] Socket#39785641::Receive() 
System.Net.Sockets Verbose: 0 : [3880] Data from Socket#39785641::Receive 
System.Net.Sockets Verbose: 0 : [3880] 00000000 : 16 03 01 00 4A         : ....J 
System.Net.Sockets Verbose: 0 : [3880] Exiting Socket#39785641::Receive() -> 5#5 
System.Net.Sockets Verbose: 0 : [3880] Socket#39785641::Receive() 
System.Net.Sockets Verbose: 0 : [3880] Data from Socket#39785641::Receive 
System.Net.Sockets Verbose: 0 : [3880] 00000005 : 02 00 00 46 03 01 81 9E-F1 4F F4 7A C6 21 B7 94 : ...F.....O.z.!.. 
System.Net.Sockets Verbose: 0 : [3880] 00000015 : 03 9B 37 C4 E0 EF 0D 1D-86 95 04 2B FE 31 6A A0 : ..7........+.1j. 
System.Net.Sockets Verbose: 0 : [3880] 00000025 : DF 1A D8 32 82 9B 20 18-1A 7B C6 FC BB 89 0B DE : ...2.. ..{...... 
System.Net.Sockets Verbose: 0 : [3880] 00000035 : 97 71 EC 38 9E 14 29 4B-65 BF 23 17 6C 17 1C 3C : .q.8..)Ke.#.l..< 
System.Net.Sockets Verbose: 0 : [3880] 00000045 : 6A 5E D9 13 BE CC F9 00-35 00     : j^......5. 
System.Net.Sockets Verbose: 0 : [3880] Exiting Socket#39785641::Receive() -> 74#74 
System.Net.Sockets Verbose: 0 : [3880] Socket#39785641::Receive() 
System.Net.Sockets Verbose: 0 : [3880] Data from Socket#39785641::Receive 
System.Net.Sockets Verbose: 0 : [3880] 00000000 : 16 03 01 03 AC         : ..... 
System.Net.Sockets Verbose: 0 : [3880] Exiting Socket#39785641::Receive() -> 5#5 
System.Net.Sockets Verbose: 0 : [3880] Socket#39785641::Receive() 
System.Net.Sockets Verbose: 0 : [3880] Data from Socket#39785641::Receive 
[server certificate received here. identical in both dumps] 
System.Net.Sockets Verbose: 0 : [3880] Exiting Socket#39785641::Receive() -> 940#940 
System.Net.Sockets Verbose: 0 : [3880] Socket#39785641::Receive() 
System.Net.Sockets Verbose: 0 : [3880] Data from Socket#39785641::Receive 
System.Net.Sockets Verbose: 0 : [3880] 00000000 : 16 03 01 00 09         : ..... 
System.Net.Sockets Verbose: 0 : [3880] Exiting Socket#39785641::Receive() -> 5#5 
System.Net.Sockets Verbose: 0 : [3880] Socket#39785641::Receive() 
System.Net.Sockets Verbose: 0 : [3880] Data from Socket#39785641::Receive 
System.Net.Sockets Verbose: 0 : [3880] 00000005 : 0D 00 00 05 02 01 02 00-00      : ......... 
System.Net.Sockets Verbose: 0 : [3880] Exiting Socket#39785641::Receive() -> 9#9 
System.Net.Sockets Verbose: 0 : [3880] Socket#39785641::Receive() 
System.Net.Sockets Verbose: 0 : [3880] Data from Socket#39785641::Receive 
System.Net.Sockets Verbose: 0 : [3880] 00000000 : 16 03 01 00 04         : ..... 
System.Net.Sockets Verbose: 0 : [3880] Exiting Socket#39785641::Receive() -> 5#5 
System.Net.Sockets Verbose: 0 : [3880] Socket#39785641::Receive() 
System.Net.Sockets Verbose: 0 : [3880] Data from Socket#39785641::Receive 
System.Net.Sockets Verbose: 0 : [3880] 00000005 : 0E 00 00 00          : .... 
System.Net.Sockets Verbose: 0 : [3880] Exiting Socket#39785641::Receive() -> 4#4 
System.Net.Sockets Verbose: 0 : [3880] Socket#39785641::Send() 
System.Net.Sockets Verbose: 0 : [3880] Data from Socket#39785641::Send 
System.Net.Sockets Verbose: 0 : [3880] (printing 1024 out of 1540) 
[my client certificate seems to be sent here] 

(मैंने उपरोक्त फ़ाइलों के प्रमाणपत्र भागों को काट दिया है)। वैसे भी मेरा अनुमान है कि कुछ मशीनों पर जो त्रुटि मुझे प्राप्त होती है वह एसएसएल हैंडशेक में चयनित सिफर एल्गोरिदम में निहित है। लेकिन यह वास्तव में अंधेरे में एक पंच है (?) और मैं इस पल में अपने बालों को फाड़ रहा हूँ। एसएसएल हैंडशेक बस कुछ मशीनों पर असफल प्रतीत होता है।

यदि कोई ऊपर उपरोक्त यातायात का विच्छेदन/डीकोड/विश्लेषण करने का एक अच्छा तरीका जानता है (मैं वायरशर्क में रहा हूं और कई घंटे तक अपने सिर को टक्कर लगी है, और अभी भी यह पता नहीं लगा सकता कि उपरोक्त हेक्स को एसएसएल को कैसे देना है चीड़फाड़)। या यदि कोई भी सीधे अंतर/# 2 में असफल हो सकता है जो बहुत मदद करेगा !!

+1

यदि ग्राहक क्लाइंट पर सिफर पसंद नहीं करते हैं तो आप क्लाइंट पर "अप्रत्याशित ईओएफ या 0 बाइट्स" देख सकते हैं। क्या वे ग्राहक हैं जो Windows XP और/या Windows Server 2003 चलाना काम नहीं करते हैं? सर्वर को उन दोनों की तुलना में मजबूत सिफर की आवश्यकता हो सकती है। मजबूत एईएस सिफर जोड़ने के लिए सर्वर 2003 में हॉट-फ़िक्स है। यह देखने के लिए कुछ है। –

+0

आपकी टिप्पणी जिम के लिए धन्यवाद! मशीनें जो काम नहीं करती हैं वे Windows 2003 सर्वर और विंडोज 7 चला रहे हैं। मशीन जो काम करती है वह विंडोज 2008 आर 2 मशीन चल रही है। मैं हॉटफिक्स पर लीड देखेंगे। धन्यवाद!! –

उत्तर

6

मुझे टीएलएस प्रोटोकॉल को विच्छेदन करते समय स्वयं समाधान मिला। यह पता चला है कि क्लाइंट जो ऊपर दिए गए उदाहरण में काम नहीं करता है, वह हैंडशेकिंग के दौरान मेरा क्लाइंट प्रमाणपत्र भेज रहा है; और ग्राहक जो काम करते हैं ऐसा नहीं करता है। जाहिर है एन्क्रिप्शन किसी भी तरह से स्थापित किया गया है (मैंने टीएलएस प्रोटोकॉल में जारी नहीं रखा है), और शायद एक सर्टिफिकेट एक्सचेंज/कुंजी एक्सचेंज आगे बढ़ाया जाता है।

काम से कनेक्शन प्राप्त करने के लिए, मुझे बस कनेक्शनस्ट्रिंग को बदलना था और सभी प्रमाणपत्र * = कुंजी को हटा देना था। विशेष रूप से "प्रमाणपत्र स्टोर स्थान = CurrentUser"। मेरे वर्तमान, काम MySql एसएसएल connectionstring है:

server=xxx.yyy.zzz.uuu;database=whopper;user=Username;password=Secret;Pooling=false;SSL Mode=Required;Keepalive=60 

इसके अलावा, एक पक्ष नोट के रूप में, जबकि संचार चीर-फाड़, मैंने पाया कि Tamos CommView जबकि वीपीएन संचार पर & विदारक में अवरोध डालने में WireShark तुलना में एक बेहतर काम करता है। शायद विंडोज 7 x64 के तहत वीपीएन पैकेट को विच्छेदन करने के लिए WinPCaps अक्षमता के कारण। CommView में टीएलएस डिस्क्टर भी है जो वास्तव में मुझे हैंडशेकिंग समस्या खोजने में मदद करता है।

इसके अलावा, दूसरी तरफ नोट के रूप में। विंडोज़ में सभी एसएसएल/टीएलएस संचार को एक डीएलएल द्वारा नियंत्रित किया जाता है जिसे schannel.dll कहा जाता है।उस डीएल के लिए सिस्टम इवेंट लॉग में पूर्ण लॉगिंग को DWORD HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ SecurityProviders \ SCHANNEL \ EventLogging को 7 के साथ बनाकर सक्षम किया जा सकता है। यहां और पढ़ें: http://support.microsoft.com/kb/260729

इसे काम करने के लिए। सामान निकालें।

+0

शानदार रूप से निर्मित प्रश्न और आत्म-उत्तर, बहुत सराहना की :) – ilasno

+0

बिल्कुल आश्चर्यजनक, मेरी समस्या हल हो गई। बेवकूफ MySQL दस्तावेज़। धन्यवाद! – Raymond

संबंधित मुद्दे