SSL: Mbed TLS (polarSSL)

...
  • 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.
    Last edited by rgimad on Fri Jul 23, 2021 11:43 pm, edited 3 times in total.
    The best way to predict the future is to create it.
  • 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!
    Attachments
    ssl_client1 (8.23 KiB)
    Downloaded 127 times
    mbedtls.obj (190.69 KiB)
    Downloaded 131 times
    Изобретайте колёса каждый раз, когда хотите написать новую программу.
  • 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/
    Attachments
    example (4.15 KiB)
    Downloaded 123 times
    mbedtls.inc (1.34 KiB)
    Downloaded 126 times
    example.asm (10.39 KiB)
    Downloaded 139 times
    Test run
    VirtualBox_KolibriOS_24_07_2021_15_55_15.png (36.54 KiB)
    Test run Viewed 4446 times
    "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein
  • 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.
    Изобретайте колёса каждый раз, когда хотите написать новую программу.
  • > 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.
    Из хаоса в космос
  • Изобретайте колёса каждый раз, когда хотите написать новую программу.
  • 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)
    Attachments
    ssl_client1.7z (1.79 KiB)
    Downloaded 106 times
  • Who is online

    Users browsing this forum: No registered users and 1 guest