Hello,
In Xbase 2.0 socket functions work for both non-TLS and TLS connections. They work fine for any Internet protocol.
In Xbase 1.9 socket functions work fine only for non-TLS connections. TLS connection is created successfully, but on ClientHello message, TLS server always returns alert error 50, which is decode error.
Also, in Xbase 2.0 socket descriptors have 8 digits and in Xbase 1.9 they have 3-4 digits.
I use the same socket functions both in Xbase 1.9 and Xbase 2.0.
Does anybody knows what is the difference, and what I did wrong or miss?
Thanks.
TLS socket connection in Xbase 1.9
TLS socket connection in Xbase 1.9
Best regards,
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Re: TLS socket connection in Xbase 1.9
You will need Xb2.Net (prof) in a later version to do this - or switch to 2.0. Xbase++ 1.9 doesn't support SSL/TLS.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: TLS socket connection in Xbase 1.9
Hi Tom,
Yes, I know that Xbase 1.9 don't support TLS. In order to overcome that lack for Xbase 1.9 users, I developed my own implementation of WinSock2, and it works o.k. but only for non-TLS as in Xbase 1.9. The point is that the base socket should be set to security state to work for TLS. There are several methods to do that. I tried the basic one, but without results.
Xb2.Net uses OpenSSL for TLS connection and communication. I don't need that because I have developed my own TLS implementation, and it works fine in Xbase 2.0, because in it the sockets are secured.
I have to try some other options for securing sockets.
Regards
Yes, I know that Xbase 1.9 don't support TLS. In order to overcome that lack for Xbase 1.9 users, I developed my own implementation of WinSock2, and it works o.k. but only for non-TLS as in Xbase 1.9. The point is that the base socket should be set to security state to work for TLS. There are several methods to do that. I tried the basic one, but without results.
Xb2.Net uses OpenSSL for TLS connection and communication. I don't need that because I have developed my own TLS implementation, and it works fine in Xbase 2.0, because in it the sockets are secured.
I have to try some other options for securing sockets.
Regards
Best regards,
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Re: TLS socket connection in Xbase 1.9
The problem is solved. I was not the problem in socket, but in Xbase++ function RandomKey() which return empty value in 1.9. I created my own function for that purpose in C using WinApi, and now TLS client works fine. All Internet clients in Xbase++ 1.9 now support TLS connection.
Best regards,
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Re: TLS socket connection in Xbase 1.9
That is good information for 1.9 users.
It probably could have been written in Xbase++ too, for those 1.9 users who can't program C.
It probably could have been written in Xbase++ too, for those 1.9 users who can't program C.
The eXpress train is coming - and it has more cars.
Re: TLS socket connection in Xbase 1.9
Random key generation can be simulated in Xbase++ code with STRTRAN(UUIDTOCHAR(UUIDCREATE()), "-", ""), but this returns key of length 16. For larger keys the same code can be repeated in a loop, concatenated the results, and SUBSTR() it to the right length.
Best regards,
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Re: TLS socket connection in Xbase 1.9
hi,
"how" have you integrate "C"-Code to Xbase++
can you please post some "C"-Code Sample for Xbase++
p.s. under harbour i can make COM DLL so i can use it as ActiveX
"how" have you integrate "C"-Code to Xbase++
can you please post some "C"-Code Sample for Xbase++
p.s. under harbour i can make COM DLL so i can use it as ActiveX
greetings by OHR
Jimmy
Jimmy
Re: TLS socket connection in Xbase 1.9
Hi,
I use Xbase++ C-API extension, which is part of Xbase++ package. It works great and have many capabilities, especially for sending parameters to C function and retrieving results from it. You can create a C DLL file and link it with your app, or just a C object files and link it with Xbase++ object files. I personally create a C DLL file, don't like to mix different code files.
There is one simple example in Xbase++ C-API documentation. It shows how to make both version of integration. I tested it and it works fine.
I use Xbase++ C-API extension, which is part of Xbase++ package. It works great and have many capabilities, especially for sending parameters to C function and retrieving results from it. You can create a C DLL file and link it with your app, or just a C object files and link it with Xbase++ object files. I personally create a C DLL file, don't like to mix different code files.
There is one simple example in Xbase++ C-API documentation. It shows how to make both version of integration. I tested it and it works fine.
Best regards,
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs