(Sucking out of my thumb so this might not work)
Having a look at the httpserv demo, in the TTCPHttpThrd.Execute thread you
will need to accept the SSL connection. This basically means install openSSL
or similar, create a self signed certificate for a start, and including a
few lines of code right at the beginning of the thread:
sock.SSL.CertificateFile := <path to certificate file>
sock.SSL.PrivateKeyFile := <parth to private key file>
sock.SSL.CertCAFile := <parth to crt file>
sock.SSLAcceptConnection
That should do it. There was an example at some stage - I will need to look
for again. Perhaps Lukas can be more accurate on the current location of the
SSL examples. More info can also be found at:
http://ararat.cz/synapse/doku.php/public:howto:sslplugin?s=ssl
Accepting connections from specific IP's: Have a look at the GetRemoteSinIP
function. This will return the Client IP Address and then you can compare it
to IP's that you would only allow, closing the socket if the IP is not
allowed.
Hope it helps!
On Thu, Sep 18, 2008 at 5:08 PM, Lee Jenkins <[EMAIL PROTECTED]> wrote:
>
> Can anyone suggest an elegant way to ensure that a HTTP server only
> accepts:
>
> 1. SSL connections
> 2. Only connections from specific IP?
>
>
> I'm not necessarily looking for code examples, but more along the lines of
> structure or strategy.
>
> Of course, code examples are also nice when appropriate ;)
>
> Thanks,
>
> Lee
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> synalist-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/synalist-public
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public