Recent

Author Topic: Brook Security (https)  (Read 4107 times)

RedOctober

  • Sr. Member
  • ****
  • Posts: 452
Re: Brook Security (https)
« Reply #15 on: February 26, 2021, 04:31:57 pm »
Unless.... at this early point... there is a way to make a Lazarus 2.0.10, FPC 3.2.0, an Apache module.  In that case, Apache wd handle the HTTPS stuff.   I'm just starting to research if this is possible and I have not found any info that says this is possible.

So my current question is:   Is it possible to make a Lazarus, Microsoft app, that uses Brook 5, into an Apache module?  If so, is there a document explaining how to do this?

Thanks in advance.

RedOctober

  • Sr. Member
  • ****
  • Posts: 452
Re: Brook Security (https)
« Reply #16 on: February 26, 2021, 06:25:47 pm »
Hey... something interesting...maybe nothing...

My little "Test" button, that uses "Assigned()", doesn't seem to recognize that the function variables are assiged.  Pls see the attached file.  Am I not understanding what Assigned() does?  Does my copy of Brook 5 actually HAVE TLS 1.3 support?

The variable is not NULL, which is what I suspected to see in my variable contents viewer in Lazarus.

 

RedOctober

  • Sr. Member
  • ****
  • Posts: 452
Re: Brook Security (https)
« Reply #17 on: February 26, 2021, 09:25:29 pm »
I can get my app to work in unsecure mode, no problem.  I turn on security, I have all .pem files in place, load them correctly, and I keep getting the error message from the app:   "TLS is not available"
And when I try to connect via browser, I get the error message  "This site can't be reached".
So I guess even though the function variables may be populated, they don't do anything.
Still stuck (using the real, DigiCert .pem files, Brook 5, without the libsabgui that has TLS compiled in, as Pierce was saying)  If there's no way to make an Apache module out of Brook 5, then, for me, Brook 5 cannot be used in my project.

PierceNg

  • Sr. Member
  • ****
  • Posts: 369
    • SamadhiWeb
Re: Brook Security (https)
« Reply #18 on: February 27, 2021, 12:58:43 am »
Unless.... at this early point... there is a way to make a Lazarus 2.0.10, FPC 3.2.0, an Apache module.  In that case, Apache wd handle the HTTPS stuff.   I'm just starting to research if this is possible and I have not found any info that says this is possible.

So my current question is:   Is it possible to make a Lazarus, Microsoft app, that uses Brook 5, into an Apache module?  If so, is there a document explaining how to do this?

Thanks in advance.

Brook Framework is unlikely to work as an Apache module. FPC does have with functionality to do so, see the directories httpd20, httpd22, httpd24 in <fpcsrc>/<version>/packages.

But your best bet is to do reverse proxying, letting Apache (or Nginx, or whatever) handle the HTTPS. The reverse proxy then talks to your app over HTTP. This way your can focus on  your app functionality and your can try out any number of Pascal web frameworks.

PierceNg

  • Sr. Member
  • ****
  • Posts: 369
    • SamadhiWeb
Re: Brook Security (https)
« Reply #19 on: February 27, 2021, 01:10:47 am »
Hey... something interesting...maybe nothing...

My little "Test" button, that uses "Assigned()", doesn't seem to recognize that the function variables are assiged.  Pls see the attached file.  Am I not understanding what Assigned() does?  Does my copy of Brook 5 actually HAVE TLS 1.3 support?

The variable is not NULL, which is what I suspected to see in my variable contents viewer in Lazarus.

I am not 100% certain, but there are two things here - the Pascal variable and the C function the variable points to. From the libsagui source code, if TLS is not configured, then those functions don't exist. Maybe the inspector is showing the Pascal variable? Anyway, in Brook source code, the error "TLS not available" comes from testing assigned().

One way to find out is to download the GnuTLS dependencies and try it.

RedOctober

  • Sr. Member
  • ****
  • Posts: 452
Re: Brook Security (https)
« Reply #20 on: February 27, 2021, 03:23:14 am »
I have emailed Silvio via this forum, just asking if there is an existing or upcoming build of Brook 5 Framework that will include HTTPS support on Windows "out of the box".  I included links to this forum post, and the issue link you provided.  I'm hoping the email reaches him and he has time to answer.  Thanks for all your help PierceNG.

 

TinyPortal © 2005-2018