Page 2 of 2

Re: SSL\TLS Client\Server lib based on Cryptlib Encryption T

Posted: Tue Apr 10, 2018 1:23 pm
by blueb
Thanks xakep.

I got your code to run, but so far only getting debug messages:

Code: Select all

cl32.dll loaded
cl32 initialized
so I'm sure its something to do with the HTTP code.

The reason I'm commenting is your use of: Procedure ResolveFunc(BaseAddress.l, lpProcName.s)

It appears to be a generic function to search through the Ordinal Table of a DLL to search for the functions you want.
I haven't seen it done this way before. Thanks :)

Re: SSL\TLS Client\Server lib based on Cryptlib Encryption T

Posted: Wed Apr 11, 2018 1:16 pm
by cas
blueb wrote:The reason I'm commenting is your use of: Procedure ResolveFunc(BaseAddress.l, lpProcName.s)

It appears to be a generic function to search through the Ordinal Table of a DLL to search for the functions you want.
I haven't seen it done this way before. Thanks :)
We have native function that does exactly that: GetFunction()

Re: SSL\TLS Client\Server lib based on Cryptlib Encryption T

Posted: Wed Apr 11, 2018 8:40 pm
by xakep
@blueb You should use latest cryptlib available: https://www.cs.auckland.ac.nz/~pgut001/cryptlib/
There works fine on win 7 + PB 5.62 x86

@cas Yep, but GetFunction() won't work if you load the library via LoadLibrary( or any other way except of PB's OpenLibrary)

Re: SSL\TLS Client\Server lib based on Cryptlib Encryption T

Posted: Thu Apr 12, 2018 11:25 am
by Fred
Why is ResolvProc() needed in this case, instead of using GetProcAddress_() ?

Re: SSL\TLS Client\Server lib based on Cryptlib Encryption T

Posted: Thu Apr 12, 2018 12:03 pm
by blueb
Thanks xakep... that solved it. :)

Re: SSL\TLS Client\Server lib based on Cryptlib Encryption T

Posted: Sun Aug 04, 2019 11:53 am
by doctorized
The TLS code works perfect but what about a server that requires authentication? How do we authenticate?

Also, very interesting for me, google server seems to support TLS v 1.0, 1.1, 1.2, but not 1.3, as cl32_cryptSetAttribute() succeeded with attribute values 1 to 3 but not succeded with 4 for v1.3 or 0 for TLS AUTO.

Re: SSL\TLS Client\Server lib based on Cryptlib Encryption T

Posted: Wed Mar 11, 2020 9:03 am
by tatanas
I tryed the code with TLS_Talk("www.google.com", 443, Headers) and it works well.
Now I would like to do the same to make GET request on a web console management of a switch which use a self signed certificate (on my LAN). This certificate is already register in my certifcate windows store.
When I try the same code (replacing by the ip address of my switch), I've got an error with cl32_cryptSetAttribute(SessionId, #CRYPT_SESSINFO_ACTIVE, 1).
I suppose I should use some Certifcate function but I can't find which one.

Any idea ?