Re: Is LC encryption different for Mac than for Windows??
Thanks. I still have to test outside the network. If I have issues I will definitely check the socketTimeoutInterval. Currently it is 1. I take it that is milliseconds. Bob S > On Jul 5, 2022, at 21:57 , Neville Smythe via use-livecode > wrote: > > Bob Sneider wrote >> So strange. I built in some logging, removed the base64 stuff, and now it >> works! Timing problem of some sort? Who knows. > > That’s what I was inferring. I’d suggest you increase socketTimeOut to avoid > the problem recurring (or reduce it if you want to test that timing was the > problem!) > > It may well be that > >> A socket is a socket > > but performance ain’t performance > > Neville > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Is LC encryption different for Mac than for Windows??
Bob Sneider wrote > So strange. I built in some logging, removed the base64 stuff, and now it > works! Timing problem of some sort? Who knows. That’s what I was inferring. I’d suggest you increase socketTimeOut to avoid the problem recurring (or reduce it if you want to test that timing was the problem!) It may well be that > A socket is a socket but performance ain’t performance Neville ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Is LC encryption different for Mac than for Windows??
So strange. I built in some logging, removed the base64 stuff, and now it works! Timing problem of some sort? Who knows. Sent from my iPhone > On Jul 3, 2022, at 15:03, Bob Sneidar via use-livecode > wrote: > > Ill check later. > > Sent from my iPhone > >> On Jul 2, 2022, at 17:20, Neville Smythe via use-livecode >> wrote: >> >> Is socketTimeOut set high enough? >> >> >> Neville >> >> >> ___ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Is LC encryption different for Mac than for Windows??
Ill check later. Sent from my iPhone > On Jul 2, 2022, at 17:20, Neville Smythe via use-livecode > wrote: > > Is socketTimeOut set high enough? > > > Neville > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Is LC encryption different for Mac than for Windows??
Is socketTimeOut set high enough? Neville ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Is LC encryption different for Mac than for Windows??
OIC. Well I am using the non-blocking method using with message. I don't read from until. All the data should come through then send the message. It may be that there is some kind of limit on the length of the data, but that would suck. Also it doesn't explain why when the client and the server are both running on the Mac, it works flawlessly. A socket is a socket. Bob S > On Jul 1, 2022, at 18:23 , Phil Davis via use-livecode > wrote: > > I don't know about newer LC versions, but some older ones don't do "read from > socket until EOF" correctly. Because of that, I added a data header > containing the length of the data in bytes. On the receiving end, something > like this happens: > > read from socket for 1 line > put it into tLength > read from socket for tLength > put it into tData > close socket > > I add error-checking of course. > > HTH - > Phil > > > On 7/1/22 6:10 PM, Phil Davis via use-livecode wrote: >> I was about to suggest that - you beat me to it. My client/server apps use >> base64 encode/decode as the final "envelope" for the data before network >> transfer. But I have LC on both ends of the transfer, and you may not. But >> ultimately it shouldn't matter. >> >> Phil Davis >> >> >> On 7/1/22 6:05 PM, Bob Sneidar via use-livecode wrote: >>> Okay so I base64Encoded the encrypted string before sending over the wire, >>> and base64Decoded on the receiving end. Same thing coming back. I am still >>> getting the error. It's not a problem with sending data over the wire. >>> >>> Bob S >>> >>> On Jul 1, 2022, at 17:55 , Bob Sneidar via use-livecode wrote: That's supposed to be Binary Encoding > On Jul 1, 2022, at 17:08 , Bob Sneidar via use-livecode > wrote: > > Also when I was running it on my Mac, the client in the server we’re > running on the same Macintosh. On the windows machine however I’m going > over the wire. Should I buy Ineri encoded or something? > > Sent from my iPhone > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode >>> ___ >>> use-livecode mailing list >>> use-livecode@lists.runrev.com >>> Please visit this url to subscribe, unsubscribe and manage your >>> subscription preferences: >>> http://lists.runrev.com/mailman/listinfo/use-livecode >> > > -- > Phil Davis > (503) 307-4363 > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Is LC encryption different for Mac than for Windows??
I don't know about newer LC versions, but some older ones don't do "read from socket until EOF" correctly. Because of that, I added a data header containing the length of the data in bytes. On the receiving end, something like this happens: read from socket for 1 line put it into tLength read from socket for tLength put it into tData close socket I add error-checking of course. HTH - Phil On 7/1/22 6:10 PM, Phil Davis via use-livecode wrote: I was about to suggest that - you beat me to it. My client/server apps use base64 encode/decode as the final "envelope" for the data before network transfer. But I have LC on both ends of the transfer, and you may not. But ultimately it shouldn't matter. Phil Davis On 7/1/22 6:05 PM, Bob Sneidar via use-livecode wrote: Okay so I base64Encoded the encrypted string before sending over the wire, and base64Decoded on the receiving end. Same thing coming back. I am still getting the error. It's not a problem with sending data over the wire. Bob S On Jul 1, 2022, at 17:55 , Bob Sneidar via use-livecode wrote: That's supposed to be Binary Encoding On Jul 1, 2022, at 17:08 , Bob Sneidar via use-livecode wrote: Also when I was running it on my Mac, the client in the server we’re running on the same Macintosh. On the windows machine however I’m going over the wire. Should I buy Ineri encoded or something? Sent from my iPhone ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Phil Davis (503) 307-4363 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Is LC encryption different for Mac than for Windows??
I do. The server agent was written in LC and I am running it in a community version. Just to eliminate the possibility that things are different between Community 9.5 and Pro 9.6.8, I am DL'ing the latest (which I am running on the Mac). I'll try with that. Basically I encrypt and decrypt using aes256 and a key and salt value I store as constants in both the client and the server. I'm really stumped. This should work as advertised. Bob S > On Jul 1, 2022, at 18:10 , Phil Davis via use-livecode > wrote: > > I was about to suggest that - you beat me to it. My client/server apps use > base64 encode/decode as the final "envelope" for the data before network > transfer. But I have LC on both ends of the transfer, and you may not. But > ultimately it shouldn't matter. > > Phil Davis ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Is LC encryption different for Mac than for Windows??
I was about to suggest that - you beat me to it. My client/server apps use base64 encode/decode as the final "envelope" for the data before network transfer. But I have LC on both ends of the transfer, and you may not. But ultimately it shouldn't matter. Phil Davis On 7/1/22 6:05 PM, Bob Sneidar via use-livecode wrote: Okay so I base64Encoded the encrypted string before sending over the wire, and base64Decoded on the receiving end. Same thing coming back. I am still getting the error. It's not a problem with sending data over the wire. Bob S On Jul 1, 2022, at 17:55 , Bob Sneidar via use-livecode wrote: That's supposed to be Binary Encoding On Jul 1, 2022, at 17:08 , Bob Sneidar via use-livecode wrote: Also when I was running it on my Mac, the client in the server we’re running on the same Macintosh. On the windows machine however I’m going over the wire. Should I buy Ineri encoded or something? Sent from my iPhone ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Phil Davis (503) 307-4363 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Is LC encryption different for Mac than for Windows??
Okay so I base64Encoded the encrypted string before sending over the wire, and base64Decoded on the receiving end. Same thing coming back. I am still getting the error. It's not a problem with sending data over the wire. Bob S > On Jul 1, 2022, at 17:55 , Bob Sneidar via use-livecode > wrote: > > That's supposed to be Binary Encoding > >> On Jul 1, 2022, at 17:08 , Bob Sneidar via use-livecode >> wrote: >> >> Also when I was running it on my Mac, the client in the server we’re running >> on the same Macintosh. On the windows machine however I’m going over the >> wire. Should I buy Ineri encoded or something? >> >> Sent from my iPhone >> > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Is LC encryption different for Mac than for Windows??
That's supposed to be Binary Encoding > On Jul 1, 2022, at 17:08 , Bob Sneidar via use-livecode > wrote: > > Also when I was running it on my Mac, the client in the server we’re running > on the same Macintosh. On the windows machine however I’m going over the > wire. Should I buy Ineri encoded or something? > > Sent from my iPhone > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Is LC encryption different for Mac than for Windows??
Also when I was running it on my Mac, the client in the server we’re running on the same Macintosh. On the windows machine however I’m going over the wire. Should I buy Ineri encoded or something? Sent from my iPhone > On Jul 1, 2022, at 16:57, Bob Sneidar wrote: > > Hmmm... I think I see what is happening. I compared the encrypted string > from the server to the string from the client after it received it via the > socket connection. I am only getting the last part of the encrypted string! > > So it looks like the socket connections using with message is losing data > somehow. > > Bob S > > >> On Jul 1, 2022, at 16:49 , Bob Sneidar via use-livecode >> wrote: >> >> Hi all. >> >> As I may have mentioned I wrote an SQL Server agent that uses sockets to >> listen for data from a client. The client first arrayEncodes an array, then >> encrypts the result using an encryption library I wrote. Then it sends the >> data to the Server Agent. >> >> The Agent receives the encrypted stream, decrypts it using the exact same >> library, arrayDecodes the data, then performs a query against the database >> and retrieves th data as an array. All that works. >> >> The agent then arrayEncodes the array and re-encrypts it using THE SAME >> LIBRARY. It then sends the data back to the client which of course, decrypts >> it and arrayDecodes it producing the resultant array. All fine and good. But >> wait there's more! >> >> When I run the Server Agent on my Macintosh all works as expected. I get an >> array of the queried data. When I run it on a Windows desktop however, the >> data coming back is corrupted somehow! The decryption command produces an >> error: ERROR: (SSL error: wrong final block length) >> >> How can that be? It's the same file I just copy it to the windows machine >> from the Mac along with the encryption library. Everything should be exactly >> the same! >> >> Bob S >> >> >> ___ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Is LC encryption different for Mac than for Windows??
Hmmm... I think I see what is happening. I compared the encrypted string from the server to the string from the client after it received it via the socket connection. I am only getting the last part of the encrypted string! So it looks like the socket connections using with message is losing data somehow. Bob S > On Jul 1, 2022, at 16:49 , Bob Sneidar via use-livecode > wrote: > > Hi all. > > As I may have mentioned I wrote an SQL Server agent that uses sockets to > listen for data from a client. The client first arrayEncodes an array, then > encrypts the result using an encryption library I wrote. Then it sends the > data to the Server Agent. > > The Agent receives the encrypted stream, decrypts it using the exact same > library, arrayDecodes the data, then performs a query against the database > and retrieves th data as an array. All that works. > > The agent then arrayEncodes the array and re-encrypts it using THE SAME > LIBRARY. It then sends the data back to the client which of course, decrypts > it and arrayDecodes it producing the resultant array. All fine and good. But > wait there's more! > > When I run the Server Agent on my Macintosh all works as expected. I get an > array of the queried data. When I run it on a Windows desktop however, the > data coming back is corrupted somehow! The decryption command produces an > error: ERROR: (SSL error: wrong final block length) > > How can that be? It's the same file I just copy it to the windows machine > from the Mac along with the encryption library. Everything should be exactly > the same! > > Bob S > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode