[fpc-pascal] HTTPS Client certificate in TFPHTTPServer

2022-08-28 Thread Fabio Luis Girardi via fpc-pascal
Hi!

Now that I'm able to use TFPHTTPServer and HTTPS, I want to know how to use
the certificate of HTTPS client to authenticate a session on TFPHTTPServer.
This is possible? If yes, how to do that? Examples or pointing some docs
are welcome.


The best regards,

Fabio Luis Girardi
PascalSCADA Project
http://sourceforge.net/projects/pascalscada
http://www.pascalscada.com
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] https://sourceforge.net/projects/freepascal/files/Source/3.2.2/ : Missing install.sh

2021-07-07 Thread Tomas Hajny via fpc-pascal

On 2021-07-06 22:37, Jean Pierre CASSOU via fpc-pascal wrote:

https://sourceforge.net/projects/freepascal/files/Source/3.2.2/

Missing install.sh


This file is included in the fpcbuild package (either zip, or tar.gz), 
in particular in subdirectory "install".


Apart from that - I assume that you already know that the source 
packages are not meant to be installed directly and that you need to 
have a previous FPC binary for the given target (or cross-compile from a 
different platform on which the FPC binary is already installed) in 
order to build the compiler, accompanying tools, run-time library and 
other packages first before installing them (and if you already do this, 
you can use 'make install' rather than install.sh; install.sh is only 
needed for installation of pre-built compiler, etc.).


Tomas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] https://sourceforge.net/projects/freepascal/files/Source/3.2.2/ : Missing install.sh

2021-07-07 Thread Marco van de Voort via fpc-pascal


Op 2021-07-06 om 22:37 schreef Jean Pierre CASSOU via fpc-pascal:


https://sourceforge.net/projects/freepascal/files/Source/3.2.2/ 
<https://sourceforge.net/projects/freepascal/files/Source/3.2.2/>


Missing install.sh

Install is a script to install _binary_ releases, and is part of the 
fpcbuild repo, listed above.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] https://sourceforge.net/projects/freepascal/files/Source/3.2.2/ : Missing install.sh

2021-07-07 Thread Jean Pierre CASSOU via fpc-pascal
https://sourceforge.net/projects/freepascal/files/Source/3.2.2/ 


Missing install.sh___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] HTTPS with fphttpclient

2017-08-30 Thread Michael Van Canneyt



On Tue, 29 Aug 2017, kristakis wrote:


Hi,

I'd like to make a request to a HTTPS address with TfpHTTPClient but am
getting an unknown protocol error. 


I'm running fpc 2.6.4 on Rasbian 8 (Jessie) on a Pi 3. Here's the source
code:


You need version 3.0.2 or 3.0.0 for this to work.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] HTTPS with fphttpclient

2017-08-29 Thread kristakis
Hi,

I'd like to make a request to a HTTPS address with TfpHTTPClient but am
getting an unknown protocol error. 

I'm running fpc 2.6.4 on Rasbian 8 (Jessie) on a Pi 3. Here's the source
code:

program test2;
{$mode objfpc}{$H+}
uses
  fphttpclient;
begin
  WriteLn(TFPHTTPClient.SimpleGet('http://www.google.com/humans.txt'));
end.

That works fine but if I change the URL to https:// it returns:

An unhandled exception occurred at $00041AE4 :
EHTTPClient : Invalid protocol : "https"

Looking around on the internet led me to this mailing list where this
question has been answered before. 

http://free-pascal-general.1045716.n5.nabble.com/https-how-does-it-work-td5727678.html#a5727837
"The ssockets unit has the ability to set up a TLS/SSL connection. 
It uses openssl as a library. 

You can check the fphttpclient unit to see how this is done. "

I found the source for fphttpclient at
https://github.com/alrieckert/freepascal/blob/master/packages/fcl-web/src/base/fphttpclient.pp

and it uses sslsockets unit. I found that at
https://github.com/graemeg/freepascal/tree/master/packages/fcl-net/src but
it wouldn't compile with the ssockets unit that I had. I tried the ssockets
unit on that same page and got more errors. 

I tried to find all the units that were failing and replaced them with
copies from those githubs but ended up with just more errors further down
the uses tree. This didn't feel right so I reset and started over.

I found this post:
https://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg38960.html
where the poster asks about https support in fphttpclient and is told:

It is already implemented in trunk. So you just:

program project1;
{$mode objfpc}{$H+}
uses
  fphttpclient;
begin
  WriteLn(TFPHTTPClient.SimpleGet('https://www.google.com/humans.txt'));
end.

This is pretty much what I had from the first search and I'm back to square
one. I feel like there's some simple little thing I'm missing but I have no
idea what it is. Is there a package for free pascal that I install via
apt-get that has the correct ssl units perhaps?

thanks,
kris





-
Things I hate: 
1. Forum signatures 
2. Irony 
3. Lists 
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] https how does it work

2017-03-13 Thread Tony Whyman
Thanks. It's good to know this. Perhaps the Indy site at 
http://www.indyproject.org should be updated to reflect this. You have 
to dig very deep to find the links to the svn (and labelled as a 
development snapshot). The last source code package appears to be the 
2004 release 10.0.52. With the site copyright being 1993 - 2008 it does 
look rather moribund.



On 13/03/17 07:20, Bo Berglund wrote:

On Thu, 16 Feb 2017 14:18:28 +, Tony Whyman
 wrote:


The downside is that the indy components do not seem to have been
updated for a long time and have not kept up-to-date with OpenSSL. I
have attached below a patch I have used to keep the components
up-to-date with SSL headers.

The Indy project is hosted on Fulgan here:
https://indy.fulgan.com/
You can find current versions of both SSL and Indy here.

It is easy to get using svn too:
svn co https://svn.atozed.com:444/svn/Indy10/trunk/Lib/ indy10

If you want to use one of the tagged versions then you face the caveat
concerning the svn tags that they contain spaces so you have to
replace these with %20 when you construct the svn command for
downloading a tag thus:
https://svn.atozed.com:444/svn/Indy10/tags/Indy%2010.6.2%20-%20XE8%20RTM/Lib/


Current version is 10.6.2 and it includes a lazarus package as well.
It is in constant development so no need to complain about not being
up-to-date! Last activity was 2017-03-08

You can browse the svn store by using your browser:
https://svn.atozed.com:444/svn/Indy10/

Go there and browse the versions for yourself.
Username is : Indy-Public-RO
No password needed for read-only access.

Lazarus package is: Lib/indylaz.lpk




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] https how does it work

2017-03-13 Thread Bo Berglund
On Thu, 16 Feb 2017 14:18:28 +, Tony Whyman
 wrote:

>The downside is that the indy components do not seem to have been 
>updated for a long time and have not kept up-to-date with OpenSSL. I 
>have attached below a patch I have used to keep the components 
>up-to-date with SSL headers.

The Indy project is hosted on Fulgan here:
https://indy.fulgan.com/
You can find current versions of both SSL and Indy here.

It is easy to get using svn too:
svn co https://svn.atozed.com:444/svn/Indy10/trunk/Lib/ indy10

If you want to use one of the tagged versions then you face the caveat
concerning the svn tags that they contain spaces so you have to
replace these with %20 when you construct the svn command for
downloading a tag thus:
https://svn.atozed.com:444/svn/Indy10/tags/Indy%2010.6.2%20-%20XE8%20RTM/Lib/


Current version is 10.6.2 and it includes a lazarus package as well.
It is in constant development so no need to complain about not being
up-to-date! Last activity was 2017-03-08

You can browse the svn store by using your browser:
https://svn.atozed.com:444/svn/Indy10/

Go there and browse the versions for yourself.
Username is : Indy-Public-RO
No password needed for read-only access.

Lazarus package is: Lib/indylaz.lpk


-- 
Bo Berglund
Developer in Sweden

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] https how does it work

2017-02-16 Thread Tony Whyman
You can always use the indy components. They have a working https 
implementation which I have successfully used in a SOAP based 
application and Lazarus's WST package. (see 
http://wiki.lazarus.freepascal.org/Indy_with_Lazarus).


The downside is that the indy components do not seem to have been 
updated for a long time and have not kept up-to-date with OpenSSL. I 
have attached below a patch I have used to keep the components 
up-to-date with SSL headers.


Tony



On 16/02/17 12:41, Rainer Stratmann wrote:

How does httpy work, what is needed?

TLS/SSL library?

A http webserver without encryption I programed already on my own and wanted
to integrate https.

Is there any example code of https?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Index: fpc/IdSSLOpenSSLHeaders.pas
===
--- fpc/IdSSLOpenSSLHeaders.pas(.../tags/R10-2-0-3)(revision 8065)
+++ fpc/IdSSLOpenSSLHeaders.pas(.../trunk)(revision 8065)
@@ -7073,7 +7076,8 @@
   where the symbolic link libbsl.so and libcrypto.so do not exist}
   SSL_DLL_name = 'libssl'; {Do not localize}
   SSLCLIB_DLL_name = 'libcrypto'; {Do not localize}
-  SSLDLLVers : array [0..4] of string = 
('','0.9.9','.0.9.8','.0.9.7','0.9.6');
+  SSLDLLVers : array [0..6] of string = 
('','1.0.1','1.0.0','0.9.9','.0.9.8','.0.9.7','0.9.6');
+//  SSLDLLVers : array [0..3] of string = 
('0.9.9','.0.9.8','.0.9.7','0.9.6');

   {$ENDIF}
   {$IFDEF WIN32_OR_WIN64_OR_WINCE}
   SSL_DLL_name   = 'ssleay32.dll';  {Do not localize}
@@ -9479,9 +9485,9 @@
   @IdSslWrite := LoadFunction(fn_SSL_write);
   @IdSslCtxCtrl := LoadFunction(fn_SSL_CTX_ctrl);
   @IdSslGetError := LoadFunction(fn_SSL_get_error);
-  @IdSslMethodV2 := LoadFunction(fn_SSLv2_method);
-  @IdSslMethodServerV2 := LoadFunction(fn_SSLv2_server_method);
-  @IdSslMethodClientV2 := LoadFunction(fn_SSLv2_client_method);
+//  @IdSslMethodV2 := LoadFunction(fn_SSLv2_method);
+//  @IdSslMethodServerV2 := LoadFunction(fn_SSLv2_server_method);
+//  @IdSslMethodClientV2 := LoadFunction(fn_SSLv2_client_method);
   @IdSslMethodV3 := LoadFunction(fn_SSLv3_method);
   @IdSslMethodServerV3 := LoadFunction(fn_SSLv3_server_method);
   @IdSslMethodClientV3 := LoadFunction(fn_SSLv3_client_method);

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] https how does it work

2017-02-16 Thread Michael Van Canneyt



On Thu, 16 Feb 2017, Rainer Stratmann wrote:


How does httpy work, what is needed?

TLS/SSL library?


Yes.

The ssockets unit has the ability to set up a TLS/SSL connection.
It uses openssl as a library.

You can check the fphttpclient unit to see how this is done.
The fphttpserver currently does not support this yet.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] https how does it work

2017-02-16 Thread Rainer Stratmann
How does httpy work, what is needed?

TLS/SSL library?

A http webserver without encryption I programed already on my own and wanted 
to integrate https.

Is there any example code of https?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] https support; call for testers

2015-09-03 Thread Michael Van Canneyt



On Wed, 2 Sep 2015, sami wrote:

Hi Again, 


I did it work but still having problems

Thres two patches attached for sscokets.pp and fphttpserver.pp

Using TSSLSocketHandler worked, but i think it is not for use with
concurrency

TSSLSocketHandler use FSSL: TSSL; object that is freed at the end of every
connection 


if there´s two or more concurrent connections it crash with SIGSEGV because
FSSL = nil on line 436 


 Result:=FSSL.Read(@Buffer ,Count);

Ideas how to make TSSLSocketHandler work with concurrency ???


We'll need to introduce some extra argument to control the freeing of the FSSL.



Thanks. 
fphttpserver.patch
 
ssockets.patch




Thanks for the patch. I'll see about integrating this ASAP.

Michael.___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] https support; call for testers

2015-09-02 Thread sami
Hi Again, 

I did it work but still having problems

Thres two patches attached for sscokets.pp and fphttpserver.pp

Using TSSLSocketHandler worked, but i think it is not for use with
concurrency

TSSLSocketHandler use FSSL: TSSL; object that is freed at the end of every
connection 

if there´s two or more concurrent connections it crash with SIGSEGV because
FSSL = nil on line 436 

  Result:=FSSL.Read(@Buffer ,Count);

Ideas how to make TSSLSocketHandler work with concurrency ??? 

Thanks. 
fphttpserver.patch

  
ssockets.patch
 
 

 



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/https-support-call-for-testers-tp5718919p5722526.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] https support; call for testers

2015-08-31 Thread sami
Hi all, 

I´m follow the same ideia from fpHttpClient by use a event to handle the
creation of
TSSLSocketHandler for fpHttpServer. 

the event handler was implemented this way: 

procedure TForm1.sockHandleEvent(Sender: TObject; const UseSSL: Boolean; out
  aHandler: TSocketHandler);
var
  h: TSSLSocketHandler;
begin
  aHandler := nil;
  if UseSSL then
  begin
h := TSSLSocketHandler.Create;
// h.RemoteHostName:= ;
h.SSLType := stTLSv1;
h.CertCA.FileName := 'c:\ca_certificate.pem';
h.Certificate.FileName := 'c:\certificate.pem';
h.PrivateKey.FileName := 'c:\privatekey.pem';
//  h.KeyPassword := ;
//  h.PFX.FileName := 'cert.pfx'; / if exists 
aHandler := h;
  end;
end; 

it work without errors and i can put the server to StartAccepting incoming
connections. 

but when a https request arrives, i get a SIGSEGV error 
on TSSLSocketHandler.Accept method 
line 379 = "Result:=CheckSSL(FSSL.setfd(Socket.Handle));"
because Socket is NIL. looking the code, i could not find
where the TSSLSocketHandler.Socket property would be set. 
  

function TSSLSocketHandler.Accept: Boolean;

begin
  Result:=InitContext(True);
  if Result then
begin
Result:=CheckSSL(FSSL.setfd(Socket.Handle)); // here Socket is NIL =
SIGSEGV
if Result then
  Result:=CheckSSL(FSSL.Accept);
end;
  FSSLActive:=Result;
end;

So i need some help on this. 

Thanks. 



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/https-support-call-for-testers-tp5718919p5722519.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] https support; call for testers

2015-08-27 Thread sami
2yf8lThanks, 

Let me learn more about server(and clients) certificates to try to not waste
your time with dummy questions, I'll try to study sample codes of others
open source web framework, i think it can help. 

See you later. 



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/https-support-call-for-testers-tp5718919p5722467.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] https support; call for testers

2015-08-27 Thread Michael Van Canneyt



On Thu, 27 Aug 2015, sami wrote:


leledumbo wrote

You can't yet, the support is still in fphttpclient only for now.


Can i implement it just like in fpHttpClient and upload a patch ?

or in server-side it is more complicated or have different approach than
client-side ?


You can try. But it is more complicated, since you will need to make provisions 
for adding a certificate.



In fact i trying to write a more complete server that can listen http and
https(keeping user sessions)
and more functions but i´m not too experienced in web programing and
concepts. 

Following this thread 
http://forum.lazarus.freepascal.org/index.php?topic=25433.0

  ,I could
write a server with a thread pool, 
that improved performance a lot. 


If someone interested i can share the code and contribute with some
functionality. 
but i need someone to guide my steps. starting with https support.


Ask questions, I will do my best to answer that.

Michael.___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] https support; call for testers

2015-08-27 Thread sami
leledumbo wrote
> You can't yet, the support is still in fphttpclient only for now.

Can i implement it just like in fpHttpClient and upload a patch ?

or in server-side it is more complicated or have different approach than
client-side ? 

In fact i trying to write a more complete server that can listen http and
https(keeping user sessions)
and more functions but i´m not too experienced in web programing and
concepts. 

Following this thread 
http://forum.lazarus.freepascal.org/index.php?topic=25433.0
  ,I could
write a server with a thread pool, 
that improved performance a lot. 

If someone interested i can share the code and contribute with some
functionality. 
but i need someone to guide my steps. starting with https support.

My final target is a Multi-tenancy server for a SaaS provider.  




--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/https-support-call-for-testers-tp5718919p5722465.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] https support; call for testers

2015-08-26 Thread sami
Hi to all. 


Michael Van Canneyt wrote
> I have tested on windows and unix, the support for client-side SSL support
> works.
> Server-side support (as could be done in the embedded httpserver) is not
> yet tested.

I Could not find how to enable server-side support for https on
fphttpserver/ fpcustomhttpserver, 
There´s no OnGetSocketHandler event on it.

How do i enable https support on fpHttpServer.  




--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/https-support-call-for-testers-tp5718919p5722458.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] https support; call for testers

2015-08-26 Thread leledumbo
> I Could not find how to enable server-side support for https on
fphttpserver/ fpcustomhttpserver, 
> There´s no OnGetSocketHandler event on it. 
> 
> How do i enable https support on fpHttpServer.

You can't yet, the support is still in fphttpclient only for now.



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/https-support-call-for-testers-tp5718919p5722461.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] https support; call for testers

2014-04-14 Thread Reinier Olislagers
On 13/04/2014 22:29, Michael Van Canneyt wrote:
> On Sun, 13 Apr 2014, Reinier Olislagers wrote:
>> On 11/04/2014 15:27, Reinier Olislagers wrote:
>>> On 11/04/2014 15:00, Michael Van Canneyt wrote:
>> If you want to use client side certificates with httpclient, how would
>> you do specify that?
> 
> I don't want to burden the component with too much properties.
> 
> So, I have implemented 2 methods:
> 
> 1. The socket handler is now created in a virtual method:
>GetSocketHandler
>it can be overridden to implement custom behaviour.
> 
> 2. There is an event OnGetSocketHandler which can be assigned to create
> the socket.
>the default GetSocketHandler calls this event, and if the event
> handler is not
>set or returns a Nil handler, it will create a default handler.

Suggest promoting OnGetSocketHandler to public:
Index: packages/fcl-web/src/base/fphttpclient.pp
===
--- packages/fcl-web/src/base/fphttpclient.pp   (revision 27579)
+++ packages/fcl-web/src/base/fphttpclient.pp   (working copy)
@@ -266,6 +266,7 @@
 Property OnPassword;
 Property OnDataReceived;
 Property OnHeaders;
+Property OnGetSocketHandler;
   end;
   EHTTPClient = Class(Exception);

I've tested with code like this in the callback:
  AHandler:=nil;
  if UseSSL and (FClientCertificate<>'') then
  begin
// Only set up client certificate if needed.
// If not, let normal fphttpclient flow create
// required socket handler
AHandler:=TSSLSocketHandler.Create;
(AHandler as
TSSLSocketHandler).Certificate.FileName:=FClientCertificate;
  end;
which seems to work fine (no crash, stepping through the code gave good
init) but I can't test further as I've misconfigured my server (can't
get it to accept client certs from browser either; probably need some
more fiddling with CA files)


Thanks!
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] https support; call for testers

2014-04-13 Thread Michael Van Canneyt



On Sun, 13 Apr 2014, Reinier Olislagers wrote:


On 11/04/2014 15:27, Reinier Olislagers wrote:

On 11/04/2014 15:00, Michael Van Canneyt wrote:

One consequence of this is that the fphttpclient unit now has support
for the https:// protocol.



I have tested on windows and unix, the support for client-side SSL
support works.

I would like to invite people to test and report if they find problems
or missing features.


Windows Laz/FPC x86 client: just by replaced my URL http with https,
making sure the openssl libraries are present. No problems with a remote
Linux x64 apache+fcl-web CGI server.

If you want to use client side certificates with httpclient, how would
you do specify that?


I don't want to burden the component with too much properties.

So, I have implemented 2 methods:

1. The socket handler is now created in a virtual method:
   GetSocketHandler
   it can be overridden to implement custom behaviour.

2. There is an event OnGetSocketHandler which can be assigned to create the 
socket.
   the default GetSocketHandler calls this event, and if the event handler is 
not
   set or returns a Nil handler, it will create a default handler.

See if you can do it with this system, if not let me know what I would need to 
add.


PS: This:
 * Https support.
note in fphttpclient.pp can probably go...


Done, rev 27571.


PPS: If you're touching fcl-web anyway, perhaps could you implement
the patch in
http://bugs.freepascal.org/view.php?id=25940


Done, I have been staring myself blind at what could have caused this 
regression.
Thanks !!!

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] https support; call for testers

2014-04-13 Thread Reinier Olislagers
On 11/04/2014 15:27, Reinier Olislagers wrote:
> On 11/04/2014 15:00, Michael Van Canneyt wrote:
>> One consequence of this is that the fphttpclient unit now has support
>> for the https:// protocol.
> 
>> I have tested on windows and unix, the support for client-side SSL
>> support works.
>>
>> I would like to invite people to test and report if they find problems
>> or missing features.

Windows Laz/FPC x86 client: just by replaced my URL http with https,
making sure the openssl libraries are present. No problems with a remote
Linux x64 apache+fcl-web CGI server.

If you want to use client side certificates with httpclient, how would
you do specify that?

PS: This:
  * Https support.
note in fphttpclient.pp can probably go...
PPS: If you're touching fcl-web anyway, perhaps could you implement
the patch in
http://bugs.freepascal.org/view.php?id=25940
Thanks

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] https support; call for testers

2014-04-12 Thread Michael Van Canneyt



On Fri, 11 Apr 2014, Dimitrios Chr. Ioannidis wrote:


Hi,

Στις 11/4/2014 4:00 μμ, ο/η Michael Van Canneyt έγραψε:

I've just committed support for SSL in the ssockets unit of FPC.
I also made the OpenSSL unit more thread-safe.


I would like to invite people to test and report if they find problems or 
missing features.


the "Writeln(pchar(@buffer));" at line 417 in sslsockets i assume is a 
leftover from debugging ?


Yes. Removed, thanks for pointing it out.

Michael.___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] https support; call for testers

2014-04-11 Thread silvioprog
Michael Van 
Canneyt
 Fri, 11 Apr 2014 06:01:08
-0700

>
>
> Hello,
>
> I've just committed support for SSL in the ssockets unit of FPC.
> I also made the OpenSSL unit more thread-safe.
>
> One consequence of this is that the fphttpclient unit now has support
> for the https:// protocol.
>
> I have tested on windows and unix, the support for client-side SSL support
> works.
> Server-side support (as could be done in the embedded httpserver) is not yet
> tested.
>
>
> I would like to invite people to test and report if they find problems or
> missingfeatures.
>
>
> That this support is released around the same time as the heartbleed leak 
> issue,
> is entirely coincidental and definitely not intended.
>
> Michael.
>
>
Thanks a lot Michael! I'll test it in my new TDropbox class!

-- 
Silvio Clécio
My public projects - github.com/silvioprog
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] https support; call for testers

2014-04-11 Thread Dimitrios Chr. Ioannidis

Hi,

Στις 11/4/2014 4:00 μμ, ο/η Michael Van Canneyt έγραψε:

I've just committed support for SSL in the ssockets unit of FPC.
I also made the OpenSSL unit more thread-safe.


I would like to invite people to test and report if they find problems 
or missing features.


the "Writeln(pchar(@buffer));" at line 417 in sslsockets i assume is a 
leftover from debugging ?


regards,

--
Dimitrios Chr. Ioannidis



smime.p7s
Description: Κρυπτογραφημένη υπογραφή S/MIME
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] https support; call for testers

2014-04-11 Thread Michael Van Canneyt



On Fri, 11 Apr 2014, Reinier Olislagers wrote:


On 11/04/2014 15:00, Michael Van Canneyt wrote:

One consequence of this is that the fphttpclient unit now has support
for the https:// protocol.



I have tested on windows and unix, the support for client-side SSL
support works.

I would like to invite people to test and report if they find problems
or missing features.

Thanks a lot - I'll test client side encryption against a CGI
application on Apache... almost posted this morning asking whether
support was upcoming ;)


Well, I committed just in time then :)




That this support is released around the same time as the heartbleed
leak issue,
is entirely coincidental and definitely not intended.

Of course. I'll just make sure to use the proper openssl version when
traversing the big bad internet ;)


People that want to be 100% safe should pull out the internet cable,
and go sit in a Faraday cage. Watch 'enemy of the state' if you need convincing 
;)

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] https support; call for testers

2014-04-11 Thread Reinier Olislagers
On 11/04/2014 15:00, Michael Van Canneyt wrote:
> One consequence of this is that the fphttpclient unit now has support
> for the https:// protocol.

> I have tested on windows and unix, the support for client-side SSL
> support works.
> 
> I would like to invite people to test and report if they find problems
> or missing features.
Thanks a lot - I'll test client side encryption against a CGI
application on Apache... almost posted this morning asking whether
support was upcoming ;)

> That this support is released around the same time as the heartbleed
> leak issue,
> is entirely coincidental and definitely not intended.
Of course. I'll just make sure to use the proper openssl version when
traversing the big bad internet ;)

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] https support; call for testers

2014-04-11 Thread Michael Van Canneyt


Hello,

I've just committed support for SSL in the ssockets unit of FPC.
I also made the OpenSSL unit more thread-safe.

One consequence of this is that the fphttpclient unit now has support
for the https:// protocol.

I have tested on windows and unix, the support for client-side SSL support 
works.
Server-side support (as could be done in the embedded httpserver) is not yet 
tested.

I would like to invite people to test and report if they find problems or missing 
features.


That this support is released around the same time as the heartbleed leak issue,
is entirely coincidental and definitely not intended.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] https

2011-06-15 Thread michael . vancanneyt



On Wed, 15 Jun 2011, ik wrote:


On Wed, Jun 15, 2011 at 18:01, Rainer Stratmann 
wrote:



Am Wednesday 15 June 2011 16:42:16 schrieb ik:

On Wed, Jun 15, 2011 at 17:32, Rainer Stratmann

wrote:

Is there a solution for https somewhere?


What do you mean exactly ?


As I understand from here
http://forum.lazarus.freepascal.org/index.php?topic=6361.0
and here
http://forum.lazarus.freepascal.org/index.php?topic=13312.0
fpweb only works with Apache. Before I read that I thought fpweb is a kind
of
(complete or not) webserver.



fpWeb can work with any HTTP server out there as CGI and FastCGI.
It is not a web server (although you have code to build one yourself), but
basic tools to start writing CGI.


fpweb has a web server application type since a couple of weeks.

This is a simple web server, without support for https. 
It can be used for debugging purposes, or for simple webservices.


Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] https

2011-06-15 Thread ik
On Wed, Jun 15, 2011 at 18:01, Rainer Stratmann  wrote:

> Am Wednesday 15 June 2011 16:42:16 schrieb ik:
> > On Wed, Jun 15, 2011 at 17:32, Rainer Stratmann
> >  >
> > > wrote:
> > >
> > > Is there a solution for https somewhere?
> >
> > What do you mean exactly ?
> >
> As I understand from here
> http://forum.lazarus.freepascal.org/index.php?topic=6361.0
> and here
> http://forum.lazarus.freepascal.org/index.php?topic=13312.0
> fpweb only works with Apache. Before I read that I thought fpweb is a kind
> of
> (complete or not) webserver.
>

fpWeb can work with any HTTP server out there as CGI and FastCGI.
It is not a web server (although you have code to build one yourself), but
basic tools to start writing CGI.


>
> I wrote already my own webserver http://demo.klimaregelung.de which is
> able to
> make dynamic websites, png graphic and so on completely in freepascal (thus
> no dependencies to Apache or a png library, but so far only uncompressed
> png's) and wanted to add https support for a more secure communication. As
> I
> understand it there is no solution for https available...
>
> ...except to rely on Apache.
>

SSL is a very low level protocol. it open a tunnel over TCP, so it's better
to have an existed tool to support it, but if you must, you can add it
yourself by using libopenssl.



>
>
>
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>


Ido
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

RE : [fpc-pascal] https

2011-06-15 Thread Ludo Brands
Synapse (http://www.ararat.cz/synapse/doku.php) has https server support and
works with fpc. A demo server is included with the sources.

Ludo

> -Message d'origine-
> De : fpc-pascal-boun...@lists.freepascal.org 
> [mailto:fpc-pascal-boun...@lists.freepascal.org] De la part 
> de Rainer Stratmann
> Envoyé : mercredi 15 juin 2011 17:02
> À : FPC-Pascal users discussions
> Objet : Re: [fpc-pascal] https
> 
> 
> Am Wednesday 15 June 2011 16:42:16 schrieb ik:
> > On Wed, Jun 15, 2011 at 17:32, Rainer Stratmann 
> >  >
> > > wrote:
> > >
> > > Is there a solution for https somewhere?
> >
> > What do you mean exactly ?
> >
> As I understand from here 
> http://forum.lazarus.freepascal.org/index.php?topic=6361.0
> and here http://forum.lazarus.freepascal.org/index.php?topic=13312.0
> fpweb only works with Apache. Before I read that I thought 
> fpweb is a kind of 
> (complete or not) webserver.
> 
> I wrote already my own webserver http://demo.klimaregelung.de 
> which is able to 
> make dynamic websites, png graphic and so on completely in 
> freepascal (thus 
> no dependencies to Apache or a png library, but so far only 
> uncompressed 
> png's) and wanted to add https support for a more secure 
> communication. As I 
> understand it there is no solution for https available...
> 
> ...except to rely on Apache.
> 
> 
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org 
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] https

2011-06-15 Thread Rainer Stratmann
Am Wednesday 15 June 2011 16:42:16 schrieb ik:
> On Wed, Jun 15, 2011 at 17:32, Rainer Stratmann
> 
> > wrote:
> >
> > Is there a solution for https somewhere?
>
> What do you mean exactly ?
>
As I understand from here
http://forum.lazarus.freepascal.org/index.php?topic=6361.0
and here
http://forum.lazarus.freepascal.org/index.php?topic=13312.0
fpweb only works with Apache. Before I read that I thought fpweb is a kind of 
(complete or not) webserver.

I wrote already my own webserver http://demo.klimaregelung.de which is able to 
make dynamic websites, png graphic and so on completely in freepascal (thus 
no dependencies to Apache or a png library, but so far only uncompressed 
png's) and wanted to add https support for a more secure communication. As I 
understand it there is no solution for https available...

...except to rely on Apache.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] https

2011-06-15 Thread ik
On Wed, Jun 15, 2011 at 17:32, Rainer Stratmann  wrote:

> Is there a solution for https somewhere?
>

What do you mean exactly ?


> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] https

2011-06-15 Thread Rainer Stratmann
Is there a solution for https somewhere?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] [HTTPS]: Looking for a ssl http client

2006-11-30 Thread TOUZEAU DAVID

Yes The problem is fixed now by adding libssl.so.0 link

Lukas Gebauer a écrit :

Currently synpase doesn't working with ssl mode but
if you want to do this in linux environement LibCurl is a good way and
do that you want... http://curl.haxx.se/libcurl/pascal/

The only problem that it require *.so curl files to provide into your
applications.. So i want to find the problem with synapse in SSL mode
in order to not install others librairies...



Synapse DOES working with SSL, you just must have corretly installed 
OpenSSL (or other supoorted SSL library), of course. ;-) As I see in 
synalist, your problem is solved now, right?



  


--

David Touzeau -- Linux Ubuntu Dapper 6.0.6 
FreePascal-Lazarus,perl,delphi,php icq:160018849


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] [HTTPS]: Looking for a ssl http client

2006-11-29 Thread Lukas Gebauer
> Currently synpase doesn't working with ssl mode but
> if you want to do this in linux environement LibCurl is a good way and
> do that you want... http://curl.haxx.se/libcurl/pascal/
> 
> The only problem that it require *.so curl files to provide into your
> applications.. So i want to find the problem with synapse in SSL mode
> in order to not install others librairies...

Synapse DOES working with SSL, you just must have corretly installed 
OpenSSL (or other supoorted SSL library), of course. ;-) As I see in 
synalist, your problem is solved now, right?


-- 
Lukas Gebauer.

E-mail: [EMAIL PROTECTED]
http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] [HTTPS]: Looking for a ssl http client

2006-11-28 Thread TOUZEAU DAVID

Currently synpase doesn't working with ssl mode but
if you want to do this in linux environement LibCurl is a good way and 
do that you want...

http://curl.haxx.se/libcurl/pascal/

The only problem that it require *.so curl files to provide into your 
applications..
So i want to find the problem with synapse in SSL mode in order to not 
install others librairies...



Rainer Stratmann a écrit :

Am Samstag, 25. November 2006 04:09 schrieb TOUZEAU DAVID:
  

Dear

I'm searching examples that help me to implement on a linux system an
HTTP client that supporting SSL HTTPS in order to post, get and
downloading files with or without proxy support...
A kind of functions
in the same way of  synalist THTTPSend
(http://www.ararat.cz/synapse/docs/help/index.html)
Is there anybody that have already found this requirements ??

Best regards


Hello,

I'm searching also for internet access and Networking with unit sockets.
For me it is relative new with Linux.
Does that mean that you are searching for normal down and uploading files to 
and from the internet?


Kind regards
Rainer

  


--

David Touzeau -- Linux Ubuntu Dapper 6.0.6 
FreePascal-Lazarus,perl,delphi,php icq:160018849
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re:: Looking for a ssl http client [fpc-pascal] [HTTPS]

2006-11-25 Thread Eugene Mayevski
Hello!
You (TOUZEAU DAVID [mailto:[EMAIL PROTECTED]) wrote
about "Re: [HTTPS]: Looking for a ssl http client [fpc-pascal]" on
11/25/2006 at 20:49:

TD> Hum Thanks for the information but i'm developping an Open Source
TD> application... This module is not free version... 5 655$ is a little bit

SSLBlackbox costs $163 for a single-developer license. But you are right, we
don't let users redistribute the source code of SecureBlackbox.

Sincerely yours,
Eugene Mayevski

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] [HTTPS]: Looking for a ssl http client

2006-11-25 Thread Michael Van Canneyt


On Sat, 25 Nov 2006, TOUZEAU DAVID wrote:

> Dear
> 
> I'm searching examples that help me to implement on a linux system an HTTP
> client that supporting SSL HTTPS in order to post, get and downloading files
> with or without proxy support...
> A kind of functions
> in the same way of  synalist THTTPSend
> (http://www.ararat.cz/synapse/docs/help/index.html)
> Is there anybody that have already found this requirements ??

Why not use synapse ? It works on Linux with FPC ?

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] [HTTPS]: Looking for a ssl http client

2006-11-24 Thread TOUZEAU DAVID

Dear

I'm searching examples that help me to implement on a linux system an 
HTTP client that supporting SSL HTTPS in order to post, get and 
downloading files with or without proxy support...

A kind of functions
in the same way of  synalist THTTPSend 
(http://www.ararat.cz/synapse/docs/help/index.html)

Is there anybody that have already found this requirements ??

Best regards



--

David Touzeau -- Linux Ubuntu Dapper 6.0.6 
FreePascal-Lazarus,perl,delphi,php icq:160018849

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal