Implement a full SSL/TLS library

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
RichAlgeni
Addict
Addict
Posts: 914
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: Implement a full SSL/TLS library

Post by RichAlgeni »

plouf wrote: Mon May 09, 2022 7:23 pm I suggest the "easy" way, already used by competive languanges

Is to use the curl library "layer" and/or just a curl library
I use libcurl to read multiple email accounts, of many different providers. I've found the latest versions of curl to be buggy, and their developers lackadaisical. I've had to resort to version 7.64.1 to get code that works. I'd avoid curl as a library for PureBasic.
infratec
Always Here
Always Here
Posts: 6810
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Implement a full SSL/TLS library

Post by infratec »

plouf wrote: Mon May 09, 2022 7:23 pm I suggest the "easy" way, already used by competive languanges

Is to use the curl library "layer" and/or just a curl library
This is impossible :wink:
libcurl handles only the client stuff, but not the server side.

@RichAlgeni
if libcurl is so bad, why is it used by any linux distribution that I know?
Btw. did you apply a fix to the problem and send to them via

https://github.com/curl/curl/pulls
plouf
Enthusiast
Enthusiast
Posts: 250
Joined: Fri Apr 25, 2003 6:35 pm
Location: Athens,Greece

Re: Implement a full SSL/TLS library

Post by plouf »

infratec wrote: Wed May 11, 2022 7:09 am
plouf wrote: Mon May 09, 2022 7:23 pm I suggest the "easy" way, already used by competive languanges

Is to use the curl library "layer" and/or just a curl library
This is impossible :wink:
libcurl handles only the client stuff, but not the server side.

@RichAlgeni
if libcurl is so bad, why is it used by any linux distribution that I know?
Btw. did you apply a fix to the problem and send to them via

https://github.com/curl/curl/pulls
then just a libcurl library? curl has some build in stuff , ready out-of-the-box if you are making a client app (which is the majority anyway)
Christos
User avatar
the.weavster
Addict
Addict
Posts: 1531
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: Implement a full SSL/TLS library

Post by the.weavster »

Fred wrote: Mon May 09, 2022 2:34 pmAbout creating your own HTTPS socket, I agree it can be useful and I will look into it.
:D 8)
User avatar
RichAlgeni
Addict
Addict
Posts: 914
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: Implement a full SSL/TLS library

Post by RichAlgeni »

infratec wrote: Wed May 11, 2022 7:09 am @RichAlgeni
if libcurl is so bad, why is it used by any linux distribution that I know?
Btw. did you apply a fix to the problem and send to them via

https://github.com/curl/curl/pulls
I didn't say it was necessarily bad, just that it was buggy. For that, I can't explain. Possibly because it is the Windows version? I provided detailed logs to the curl developers. I showed the differences between the versions. I asked them what more information I could provide. There response was sanctimonious, to say the least. I responded by asking them to reference the logs I provided. Their response was to chastise me for including user data. The user data I included was a test email account. While I was born at night, it wasn't last night. When I did not hear from them further, I followed up, again asking what more information I could provide. When again, I did not hear from them, I left, entirely appropriate in my opinion, a sarcastic response. Their response was to block me.
infratec
Always Here
Always Here
Posts: 6810
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Implement a full SSL/TLS library

Post by infratec »

plouf wrote: Thu May 12, 2022 4:21 pm then just a libcurl library? curl has some build in stuff , ready out-of-the-box if you are making a client app (which is the majority anyway)
The libcurl library is already included and used :wink:
plouf
Enthusiast
Enthusiast
Posts: 250
Joined: Fri Apr 25, 2003 6:35 pm
Location: Athens,Greece

Re: Implement a full SSL/TLS library

Post by plouf »

infratec wrote: Fri May 13, 2022 7:12 am
plouf wrote: Thu May 12, 2022 4:21 pm then just a libcurl library? curl has some build in stuff , ready out-of-the-box if you are making a client app (which is the majority anyway)
The libcurl library is already included and used :wink:
By already included you mean the "on linux curl is used blah blah blah"

I meanused as a high level layer. I.e. retrievehttpfile("rtsp:/blahblah") can used ? Since curl can

If an 3rd party libcurl exist please link..
Christos
infratec
Always Here
Always Here
Posts: 6810
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Implement a full SSL/TLS library

Post by infratec »

It is used by the inbuild HTTPRequest() stuff.

And you can also use it by your own via libcurl.pbi

https://www.purebasic.fr/english/viewto ... 71#p566971

With this libcurl.pbi you can also use the latest libcurl.dll file.
I use it also to access imaps.

FTPS example:
https://www.purebasic.fr/english/viewto ... 74#p562174
User avatar
RichAlgeni
Addict
Addict
Posts: 914
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: Implement a full SSL/TLS library

Post by RichAlgeni »

infratec wrote: Fri May 13, 2022 11:15 am It is used by the inbuild HTTPRequest() stuff.

And you can also use it by your own via libcurl.pbi

https://www.purebasic.fr/english/viewto ... 71#p566971

With this libcurl.pbi you can also use the latest libcurl.dll file.
I use it also to access imaps.

FTPS example:
https://www.purebasic.fr/english/viewto ... 74#p562174
I don't know what to tell you. I used the same exact code, except for the version of curl. I even downloaded the curl dll's from the curl github site. The newer version would not connect, or would fail during the curl commands, with godaddy, outlook and gmail email servers. The older version works, but sometimes does not delete or copy the email. I ended up writing a work around for that.

I'm sorry I haven't gotten back to you on your TLS code, I am in the process of remodeling a house.
User avatar
RichAlgeni
Addict
Addict
Posts: 914
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: Implement a full SSL/TLS library

Post by RichAlgeni »

infratec wrote: Fri May 13, 2022 11:15 am It is used by the inbuild HTTPRequest() stuff.

And you can also use it by your own via libcurl.pbi

https://www.purebasic.fr/english/viewto ... 71#p566971

With this libcurl.pbi you can also use the latest libcurl.dll file.
I use it also to access imaps.

FTPS example:
https://www.purebasic.fr/english/viewto ... 74#p562174
I apologize if I wasn't clear, this was for IMAP retrieving email messages only that I had a problem with Curl. But, it still gives me pause to use it elsewhere.
infratec
Always Here
Always Here
Posts: 6810
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Implement a full SSL/TLS library

Post by infratec »

My answer was primary for plouf.
User avatar
RichAlgeni
Addict
Addict
Posts: 914
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: Implement a full SSL/TLS library

Post by RichAlgeni »

infratec wrote: Fri May 13, 2022 7:16 pm My answer was primary for plouf.
:D
Quin
Enthusiast
Enthusiast
Posts: 256
Joined: Thu Mar 31, 2022 7:03 pm
Location: United States
Contact:

Re: Implement a full SSL/TLS library

Post by Quin »

+1
PB v5.40/6.10, Windows 10 64-bit.
16-core AMD Ryzen 9 5950X, 128 GB DDR5.
User avatar
the.weavster
Addict
Addict
Posts: 1531
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: Implement a full SSL/TLS library

Post by the.weavster »

@Fred
How close this is to the top of your TODO list?
Opcode
Enthusiast
Enthusiast
Posts: 137
Joined: Thu Jul 18, 2013 4:58 am

Re: Implement a full SSL/TLS library

Post by Opcode »

+1 Built in TLS support with PB network functions would compliment my current project that relies on TLS v1.2.

Code: Select all

OpenNetworkConnection()
CreateNetworkServer()
Post Reply