Page 2 of 2

Re: SSL: Mbed TLS (polarSSL)

Posted: Tue Dec 22, 2020 6:18 pm
by hidnplayr
Congrats on the breakthrough!

Now before you do anything else on this, go and seed that PRNG! :)

Some possible sources of entropy:
Sysfn 3, 9, 14, 18.4, 18.4, 18.6, 18.20, 26.10, 37.0, 66.3, 68.0, 74.8, 74.9,

Re: SSL: Mbed TLS (polarSSL)

Posted: Tue Dec 22, 2020 9:22 pm
by rgimad
hidnplayr wrote:Congrats on the breakthrough!

Now before you do anything else on this, go and seed that PRNG! :)

Some possible sources of entropy:
Sysfn 3, 9, 14, 18.4, 18.4, 18.6, 18.20, 26.10, 37.0, 66.3, 68.0, 74.8, 74.9,
Thanks!) I will work on this problem.

UPD: Done in January 2021, forgot to say.

Re: SSL: Mbed TLS (polarSSL)

Posted: Fri Jul 23, 2021 11:30 pm
by turbocat
After a lot of pain, we managed to create an OBJ (MS COFF) library.
Thanks Boppan and RGmad for this :D .

The test case works. I tried to export all the symbols, but maybe I missed something ... In fact, you can already start developing a library for working with https.

PS.
The library depends on libc.obj (which is not used by anyone :evil: ) and network.obj. So they must be present in the system!

Re: SSL: Mbed TLS (polarSSL)

Posted: Sat Jul 24, 2021 5:11 pm
by hidnplayr
Rewritten example program in FASM as proof of concept. Works!

TODO:
Translate all .h files for library to .inc files for fasm, or at least correct the sizes in mbedtls.inc
Get certificates working. Without it, half the concept of TLS/SSL is broken.
...
Use it in practical applications (HTTP library, IRC client, FTP client, ..)

turbocat
I believe the folder "SVN\programs\develop\libraries\kos_mbedtls" should be moved to "SVN\contrib\network\mbedtls".
Do you know how to enable building on the server? (No need to copy to floppy/cd/.. yet. Just so we can download from https://builds.kolibrios.org/eng/data/

Re: SSL: Mbed TLS (polarSSL)

Posted: Sun Jul 25, 2021 2:55 am
by turbocat
Hello hidnplayr thanks for creating an example on fasm! For me, this would be an unbearable burden. Regarding auto-assembly: It is already configured on my pc, I'm just waiting for CLINK to be uploaded to the server. I won't move the folder to Contrib at least because I don't want to break the commit history. Plus this is an obj library where it belongs. I will not add it to the distribution kit either, because no one is using it yet.

Re: SSL: Mbed TLS (polarSSL)

Posted: Sun Jul 25, 2021 8:49 am
by Leency
> I won't move the folder to Contrib at least because I don't want to break the commit history

SVN allows you to move files/folders without loosing history.

Re: SSL: Mbed TLS (polarSSL)

Posted: Mon Jul 26, 2021 5:10 pm
by turbocat

Re: SSL: Mbed TLS (polarSSL)

Posted: Sun Dec 12, 2021 1:14 pm
by Coldy
Hello!
In mbedtls.obj need to rename entry "mbedtls_init" to "lib_init".
This because 1) dll.Load call lib_* automaticaly and 2) reduce app size (see part from ssl_client1.c below)

Code: Select all

/* code below no needed if rename mbedtls_init entry in mbedtls.obj to lib_init
if(mbedtls_init()){ 
        puts("mbedtls.obj not init!");
        return -1;
    }*/
Also ssl_client1 was successfully adapted to auto load and linking with dll.obj (see attach). It's has size - 1687 bytes (vs original 2233 bytes)