 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Nassim Guest
|
Posted: Fri Dec 16, 2005 7:05 pm Post subject: Using SSL |
|
|
I'm workin on an application that uses TClientsocket. But in the last
minute, the client decided to use SSL.
What's the best way to do that?? Should I just change the TCLientSocket
component by an appropriate component or it's more complicated?
Thanks.
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Fri Dec 16, 2005 8:19 pm Post subject: Re: Using SSL |
|
|
"Nassim" <Nassim_b (AT) hotmail (DOT) com> wrote
| Quote: | I'm workin on an application that uses TClientsocket. But in
the last minute, the client decided to use SSL. What's the best
way to do that??
|
TClientSocket does not support SSL. If you download the OpenSSL library,
you would have to access the API manually to set up secure connections.
Otherwise, yes, your best option is to switch to another component that
already has native support for SSL. Indy (http://www.indyproject.org) and
ICS (http://www.overbyte.be) both have SSL support, for instance. I don't
know about ICS, but Indy v10 also supports TLS as well, which is based on
SSL.
Gambit
|
|
| Back to top |
|
 |
Nassim Guest
|
Posted: Fri Dec 16, 2005 8:28 pm Post subject: Re: Using SSL |
|
|
I know TClientSocket doesn't support SSL, that's why I'm posting here.
In fact I also want to know, according to the others experiences, which is
the best way to do that. Will the software be slower because of SSL? What's
the simplest component (or solution).
I don't have enough time to test all the solutions, because I was not
expecting to implemente SSL on the Software. Anyone has already used SSL
with Delphi? Tell me the big lines about it.
Thanks.
"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> wrote
| Quote: |
"Nassim" <Nassim_b (AT) hotmail (DOT) com> wrote in message
news:43a30f4d$1 (AT) newsgroups (DOT) borland.com...
I'm workin on an application that uses TClientsocket. But in
the last minute, the client decided to use SSL. What's the best
way to do that??
TClientSocket does not support SSL. If you download the OpenSSL library,
you would have to access the API manually to set up secure connections.
Otherwise, yes, your best option is to switch to another component that
already has native support for SSL. Indy (http://www.indyproject.org) and
ICS (http://www.overbyte.be) both have SSL support, for instance. I don't
know about ICS, but Indy v10 also supports TLS as well, which is based on
SSL.
Gambit
|
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Fri Dec 16, 2005 9:14 pm Post subject: Re: Using SSL |
|
|
"Nassim" <Nassim_b (AT) hotmail (DOT) com> wrote
| Quote: | Will the software be slower because of SSL?
|
Yes, a little. Encryption of any kind always has some overhead.
| Quote: | What's the simplest component (or solution).
|
There is no simple solution. Any solution you decide to use will require
you to re-write your existing TClientSocket code, so I hope you already
refactored your code to not be too dependant on any particular socket
implement, or else you will have a lot of work ahead of you to migrate. At
the very least, you can hook OpenSSL directly to your existing
TClientSocket, but there are many DLL functions to use, and you will have to
re-work your socket logic a bit. SSL is not a trivial thing to implement.
Gambit
|
|
| Back to top |
|
 |
Nassim Guest
|
Posted: Fri Dec 16, 2005 9:27 pm Post subject: Re: Using SSL |
|
|
What I'm doing now is adding each received socket to a list. Then I do the
process for each element of that list.
I think my code is not too dependant to the socket.
"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> wrote
| Quote: |
"Nassim" <Nassim_b (AT) hotmail (DOT) com> wrote in message
news:43a322cc$1 (AT) newsgroups (DOT) borland.com...
Will the software be slower because of SSL?
Yes, a little. Encryption of any kind always has some overhead.
What's the simplest component (or solution).
There is no simple solution. Any solution you decide to use will require
you to re-write your existing TClientSocket code, so I hope you already
refactored your code to not be too dependant on any particular socket
implement, or else you will have a lot of work ahead of you to migrate.
At
the very least, you can hook OpenSSL directly to your existing
TClientSocket, but there are many DLL functions to use, and you will have
to
re-work your socket logic a bit. SSL is not a trivial thing to implement.
Gambit
|
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Fri Dec 16, 2005 9:42 pm Post subject: Re: Using SSL |
|
|
"Nassim" <Nassim_b (AT) hotmail (DOT) com> wrote
| Quote: | What I'm doing now is adding each received socket to a list.
|
What kind of list? Are you adding the TClientSocket pointer, or the
underlying SOCKET handle?
| Quote: | Then I do the process for each element of that list. I think
my code is not too dependant to the socket.
|
That is not what I meant. I was referring to HOW to handle each socket
operation - how you read from a socket, how you write to a socket, how you
check for incoming data/connections, how you check for timeouts, etc. All
of that changes when you add SSL to the code, because you have to delegate
those operations to the SSL library rather than (or in addition to)
performing them on the socket directly. The situation is worse if you are
performing those operations through the methods of the TClientSocket object
rather than via the OS's socket API on the socket handle itself.
Gambit
|
|
| Back to top |
|
 |
Eugene Mayevski Guest
|
Posted: Sat Dec 17, 2005 5:46 am Post subject: Re: Using SSL |
|
|
Hello!
You wrote on Fri, 16 Dec 2005 14:05:40 -0500:
N> I'm workin on an application that uses TClientsocket. But in the last
N> minute, the client decided to use SSL.
To avoid rebuilding the application you can use SSLBlackbox ( http://www.eldos.com/sbb/delphi-ssl.php)
which includes TElSecureClientSocket class, which provides transparent SSL
support.
With best regards,
Eugene Mayevski
|
|
| Back to top |
|
 |
theo Guest
|
Posted: Sat Dec 17, 2005 1:09 pm Post subject: Re: Using SSL |
|
|
Nassim schrieb:
| Quote: | I'm workin on an application that uses TClientsocket. But in the last
minute, the client decided to use SSL.
What's the best way to do that?? Should I just change the TCLientSocket
component by an appropriate component or it's more complicated?
Thanks.
|
http://www.ararat.cz/synapse/features.htm
|
|
| Back to top |
|
 |
Paul Guest
|
Posted: Sat Dec 17, 2005 1:20 pm Post subject: Re: Using SSL |
|
|
You can use ICS_SSL.
The latest implementation works stable now.
Paul
"Nassim" <Nassim_b (AT) hotmail (DOT) com> schreef in bericht
news:43a30f4d$1 (AT) newsgroups (DOT) borland.com...
| Quote: | I'm workin on an application that uses TClientsocket. But in the last
minute, the client decided to use SSL.
What's the best way to do that?? Should I just change the TCLientSocket
component by an appropriate component or it's more complicated?
Thanks.
|
|
|
| Back to top |
|
 |
danny heijl Guest
|
Posted: Sat Dec 17, 2005 4:05 pm Post subject: Re: Using SSL |
|
|
Nassim schreef:
| Quote: | I'm workin on an application that uses TClientsocket. But in the last
minute, the client decided to use SSL.
What's the best way to do that?? Should I just change the TCLientSocket
component by an appropriate component or it's more complicated?
|
Another solution: use WinInet or WinHttp (the pure Win32 api that
supports SSL) or download a class wrapper built on top of WinInet or
WinHttp from http://www.torry.ru/pages.php?id=215 (Arkadia, freeware
with source).
Personally I use Indy for everything that's TCP related, except for SSL,
where I use WinInet.
Danny
---
|
|
| Back to top |
|
 |
Don Guest
|
Posted: Sat Dec 17, 2005 7:35 pm Post subject: Re: Using SSL |
|
|
| Quote: | Personally I use Indy for everything that's TCP related, except for SSL,
where I use WinInet.
|
Why do you exclude Indy when it involves SSL?
|
|
| Back to top |
|
 |
Francois PIETTE [ICS - Mi Guest
|
Posted: Sun Dec 18, 2005 12:19 pm Post subject: Re: Using SSL |
|
|
| Quote: | I'm workin on an application that uses TClientsocket. But in
the last minute, the client decided to use SSL. What's the best
way to do that??
TClientSocket does not support SSL. If you download the OpenSSL library,
you would have to access the API manually to set up secure connections.
Otherwise, yes, your best option is to switch to another component that
already has native support for SSL. Indy (http://www.indyproject.org) and
ICS (http://www.overbyte.be) both have SSL support, for instance. I don't
know about ICS, but Indy v10 also supports TLS as well, which is based on
SSL.
|
ICS basically support the same SSL/TLS as Indy since both Indy and ICS use
OpenSSL.
--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[email]francois.piette (AT) overbyte (DOT) be[/email]
The author for the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be
|
|
| Back to top |
|
 |
danny heijl Guest
|
Posted: Sun Dec 18, 2005 8:40 pm Post subject: Re: Using SSL |
|
|
Don schreef:
| Quote: | Why do you exclude Indy when it involves SSL?
|
Because:
- it doesn't use the standard openssl distribution, but needs a special
build
- because openssl is a bit awkward for using client authentication with
certificates, especially if those certificates are on a smartcard (no
pkcs12 support out of the box).
Danny
---
|
|
| Back to top |
|
 |
Don Guest
|
Posted: Sun Dec 18, 2005 10:19 pm Post subject: Re: Using SSL |
|
|
| Quote: | Why do you exclude Indy when it involves SSL?
Because:
- it doesn't use the standard openssl distribution, but needs a special
build
|
Ok... I was anticipating that one. <g>
| Quote: | - because openssl is a bit awkward for using client authentication with
certificates, especially if those certificates are on a smartcard (no
pkcs12 support out of the box).
|
That one I was not expecting.
Thanks for the info.
|
|
| Back to top |
|
 |
tony caduto Guest
|
Posted: Mon Dec 19, 2005 2:44 am Post subject: Re: Using SSL |
|
|
Nassim wrote:
| Quote: | I'm workin on an application that uses TClientsocket. But in the last
minute, the client decided to use SSL.
What's the best way to do that?? Should I just change the TCLientSocket
component by an appropriate component or it's more complicated?
Thanks.
|
You can use Synpase, it has the best SSL implementation I have seen,
super easy to use.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|