wolfssl | wolfSSL library is a small , fast , portable implementation | TLS library

 by   wolfSSL C Version: v5.6.2-stable License: GPL-2.0

kandi X-RAY | wolfssl Summary

kandi X-RAY | wolfssl Summary

wolfssl is a C library typically used in Security, TLS applications. wolfssl has no bugs, it has a Strong Copyleft License and it has medium support. However wolfssl has 2 vulnerabilities. You can download it from GitHub.

The wolfSSL embedded SSL library (formerly CyaSSL) is a lightweight SSL/TLS library written in ANSI C and targeted for embedded, RTOS, and resource-constrained environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating environments as well because of its royalty-free pricing and excellent cross platform support. wolfSSL supports industry standards up to the current TLS 1.3 and DTLS 1.2, is up to 20 times smaller than OpenSSL, and offers progressive ciphers such as ChaCha20, Curve25519, Blake2b and Post-Quantum TLS 1.3 groups. User benchmarking and feedback reports dramatically better performance when using wolfSSL over OpenSSL. wolfSSL is powered by the wolfCrypt cryptography library. Two versions of wolfCrypt have been FIPS 140-2 validated (Certificate #2425 and certificate #3389). FIPS 140-3 validation is in progress. For additional information, visit the wolfCrypt FIPS FAQ or contact fips@wolfssl.com.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              wolfssl has a medium active ecosystem.
              It has 1931 star(s) with 721 fork(s). There are 102 watchers for this library.
              There were 1 major release(s) in the last 12 months.
              There are 53 open issues and 687 have been closed. On average issues are closed in 22 days. There are 59 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of wolfssl is v5.6.2-stable

            kandi-Quality Quality

              wolfssl has 0 bugs and 0 code smells.

            kandi-Security Security

              OutlinedDot
              wolfssl has 2 vulnerability issues reported (1 critical, 0 high, 1 medium, 0 low).
              wolfssl code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              wolfssl is licensed under the GPL-2.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              wolfssl releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.
              It has 7854 lines of code, 136 functions and 78 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of wolfssl
            Get all kandi verified functions for this library.

            wolfssl Key Features

            No Key Features are available at this moment for wolfssl.

            wolfssl Examples and Code Snippets

            No Code Snippets are available at this moment for wolfssl.

            Community Discussions

            QUESTION

            Problem with manually allocating memory address for a pointer
            Asked 2022-Feb-16 at 16:50

            I am trying to work with flash memory on MPC5748G - a microcontroller from NXP running FreeRTOS 10.0.1, and I get some behaviour that I can't understand.

            I am allocating memory manually, and the assignment seems not to work. However, I can reach the value at the address when using 'printf' - but only from the same function. (I'm using the copy of a pointer, to make sure that some sore of compiler optimisation doesn't take place)

            ...

            ANSWER

            Answered 2022-Feb-16 at 16:50

            The problem was writing to FLASH memory - it hasn't been correctly initialized.

            The proper way to write to flash on MPC5748g using the SDK 3.0.3 is following:

            • save flash controller cache
            • initialise flash
            • check and protect UT block
            • unblock an address space
            • erase a block in this space
            • check if the space block is blank
            • program the block
            • verify if the block is programmed correctly
            • check sum of the programmed data
            • restore flash controller cache

            The strange behaviour of printf and pointer was due to compiler optimization. After changing the compiler flags to -O0 (no optimization), the error was consistent.

            The same consistent error can be achieved when marking the pointers as 'volatile'.

            Source https://stackoverflow.com/questions/71069626

            QUESTION

            Structs without ifdefs in C or C++
            Asked 2021-Sep-17 at 13:48

            There are some C projects with structs full of ifdefs (for ex. WolfSSL https://github.com/wolfSSL/wolfssl/blob/bb70fee1ecff8945af8179f48e90d78ea7007c66/wolfssl/internal.h#L2792)

            ...

            ANSWER

            Answered 2021-Sep-17 at 13:48

            You can do it in C++20 with [[no_unique_address]] and some chicanary. This isn't guaranteed result in smaller types however, so I still suggest you use the #defines

            Source https://stackoverflow.com/questions/69224093

            QUESTION

            Website loads inconsistently on mobile only
            Asked 2021-Aug-14 at 21:28

            I have a website being served from a custom webserver, and it loads and works fine when loaded from a laptop/desktop browser, but loads inconsistently on mobile browsers. (In my case I tested specifically Samsung Internet and Chrome on Android)

            (The exact behaviour is: load the web page, refresh, and then after a couple of refreshes it will sometimes not be able to load a background image, or any resource on the page at all - but only on mobile browsers)

            In case this was just some cached data issue, I've cleared all browser data, restarted my phone, asked friends to try on their devices etc, but I've only been able to reproduce this on mobile devices.

            My web server is written using liburing, nginx as a reverse proxy, though I doubt that would be the issue

            I read Can Anyone Explain These Long Network Stalled Times? and it ocurred to me that an issue could be me using multiple different HTTP requests to get resources (I've not implemented Connection: Keep-Alive), but I also get this issue on WiFi, and I get the issue even when loading a single asset (such as a background image)

            Additional possibly relevant info:

            • I was initially having a similar issue on desktop as well, and I fixed it by using shutdown() before calling close() on the HTTP requests
            • I'm using the following response headers:
              • Keep-Alive: timeout=0, max=0
              • Connection: close
              • Cache-Control: no-cache
            • I'm using the following socket options:
              • SO_REUSEADDR (mainly for debug convenience)
              • SO_REUSEPORT (sockets in multiple threads bind to and listen on the same port)
              • SO_KEEPALIVE, TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT (to kill off inactive clients)
            • Oddly enough though I think this disappears for a while after restarting my phone
            • I have tried not using nginx, instead using WolfSSL for TLS, and I get the same issue

            I am inclined to think that this could be an issue with what headers I'm setting in responses (or possibly some HTTPS specific detail I'm missing?), but I'm not sure And here's the actual site if anyone wants to verify the issue https://servertest.erewhon.xyz/

            ...

            ANSWER

            Answered 2021-Aug-14 at 21:28

            It looks to me like your server does not do a proper TLS shutdown, but is simply shutting down the underlying TCP connection. This causes your server to send a RST (packet 28) when the client is doing the proper TLS shutdown by sending the appropriate close notify TLS alert (packet 27).

            This RST will result in a connection close on the client side. Depending on how fast the client has processed the incoming data this can result in abandoning still unread data in the TCP socket buffer, thus causing the problems you see.

            The difference in behavior between mobile and desktop might just be caused by the performance of the systems and maybe by the underlying TCP stack. But no matter if the desktop works fine - your web server behaves wrong.

            For details on how the connection close should happen at the HTTP level see RFC 7230 section 6.6. Note especially the following parts of this section:

            If a server performs an immediate close of a TCP connection, there is a significant risk that the client will not be able to read the last HTTP response. If the server receives additional data from the client on a fully closed connection, such as another request that was sent by the client before receiving the server's response, the server's TCP stack will send a reset packet to the client; unfortunately, the reset packet might erase the client's unacknowledged input buffers before they can be read and interpreted by the client's HTTP parser.

            To avoid the TCP reset problem, servers typically close a connection in stages. First, the server performs a half-close by closing only the write side of the read/write connection. The server then continues to read from the connection until it receives a corresponding close by the client, or until the server is reasonably certain that its own TCP stack has received the client's acknowledgement of the packet(s) containing the server's last response. Finally, the server fully closes the connection.

            Source https://stackoverflow.com/questions/68786500

            QUESTION

            WolfSSL: Resume Session failure due to configuration issue of build (cmake)
            Asked 2021-Mar-10 at 15:52

            I am using an Ubuntu 20.04 machine along with the CLion IDE 2020.3.2 and I want to create an app using WolfSSL which would need the TLS1.3 implementation of it.

            Using CLion, I cloned the official repository https://github.com/wolfSSL/wolfssl.git. CLion automatically built the project and I was able to run all the \wolfssl\examples perfectly. Thus, the resumption session does not work. I run both Server/Client with these arguments: client/server -v 4 -r And I am getting this output from the client side: didn't reuse session id!!! which I can verify from Wireshark that there was no resumption made but just another handshake.

            At another build I did, where instead of cmake ( which is the default of CLion ) I used make I manged to run properly the resumption but for that I had to add in the configuration before the build this command: ./configure --enable-all which "Enables all wolfSSL features, excluding SSL v3".

            What is the equivalent command of --enable-all I should use in my Cmake configuration ? Or what should I do so I can achieve properly the resumption?

            I tried -DWOLFSSL_ALL -DENABLE_ALL and others but did not managed to do it. I tried including many of them separately to find which is the one that enables the resumption but nothing yet.

            ...

            ANSWER

            Answered 2021-Mar-10 at 15:52

            The specific wolfSSL option for enabling TLS sessions is HAVE_SESSION_TICKET.

            There is not currently an equivalent macro for the ./configure --enable-all option, but you can use the "user_settings" method to get close: https://github.com/wolfSSL/wolfssl/tree/master/examples/configs

            Here is an example that configures most of the library options: https://github.com/wolfSSL/wolfssl/blob/master/examples/configs/user_settings_all.h

            Source https://stackoverflow.com/questions/66540479

            QUESTION

            Server uses LibreSSL and Client uses wolfSSL.. Will this communication be success? Please advice
            Asked 2021-Mar-05 at 16:19

            My server running on PC uses LibreSSL My client running on board uses wolfSSL Will handshake be success?

            ...

            ANSWER

            Answered 2021-Mar-05 at 16:19

            Different TLS implementations can work together because they all implement a standardized protocol. This does not mean that it will work in all cases, i.e. common problems like no shared ciphers, invalid certificates etc can happen both when connecting with different TLS stacks but also when connecting with same TLS stacks.

            In other words, there are no inherent handshake problems caused by using different TLS stacks. But other problems might make the handshake fail.

            Source https://stackoverflow.com/questions/66494040

            QUESTION

            DTLS `HelloVerifyRequest`/`HelloRetryRequest` in WolfSSL
            Asked 2021-Jan-29 at 20:23

            The cookie exchange initiated by HelloVerifyRequest described in section 4.2.1 of RFC 6347 is essential to DoS-protection in DTLS. Unless I'm overlooking something, the WolfSSL documentation does not really describe how to enable this cookie exchange with its DTLS implementation.

            The closest I can find is the function wolfSSL_send_hrr_cookie, about which the manual states:

            This function is called on the server side to indicate that a HelloRetryRequest message must contain a Cookie. The Cookie holds a hash of the current transcript so that another server process can handle the ClientHello in reply. The secret is used when generting the integrity check on the Cookie data.

            As far as I understand, the HelloRetryRequest (compare HelloVerifyRequest) is TLS 1.3 terminology. DTLS 1.3 is not finalized. How does one enable and control the DTLS 1.0/1.2 cookie exchange in WolfSSL?

            ...

            ANSWER

            Answered 2021-Jan-29 at 20:23

            The DTLS Hello Cookie is enabled by default. The wolfSSL server code uses the callback function EmbedGenerateCookie() in the file src/wolfio.c to generate the cookie per the recommendation in RFC 6347 §4.2.1.

            TLSv1.3's hrr_cookie is something else unrelated.

            Source https://stackoverflow.com/questions/65940078

            QUESTION

            Msys2 mingw built libcurl with openssl, but https unsupported
            Asked 2021-Jan-22 at 09:51

            I need to use libcurl with https in my project, so I've built zlib, openssl and libcurl (with mingw32-make mingw32-ssl-zlib) successfully. But after I copied include libcurl.a libcurldll.a libcurl.dll to my project folder, sent a GET request to https://www.google.com it failed with error Unsupported protocol

            My OPENSSL_PATH and ZLIB_PATH in my lib/Makefile.m32 src/Makefile.m32 are:
            ZLIB_PATH = ../../zlib-1.2.8
            OPENSSL_PATH = /c/OpenSSL

            and the build log:

            ...

            ANSWER

            Answered 2021-Jan-22 at 09:51

            Turns out I have to compile all source in the same fashion I use in Linux: ./configure && make && make install
            here are the commands I use:

            • zlib:
              1. ./configure
              2. make && make install
            • openssl:
              1. ./configure --prefix=$PWD/dist no-idea no-mdc2 no-rc5 shared mingw (or mingw64 for 64 bits)
              2. make && make install
            • libcurl:
              1. ./configure --prefix=$PWD/dist --with-zlib=PATH_TO_COMPILED_ZLIB --with-ssl=PATH_TO_COMPILED_OPENSSL --host=i686-w64-mingw32 (or x86_64-w64-mingw32 for 64 bits)
              2. make && make install

            Source https://stackoverflow.com/questions/65840427

            QUESTION

            Could not parse PKCS7 certificate using WolfSSL but same could be parsed by OpenSSL
            Asked 2021-Jan-11 at 00:06

            I'm trying to parse PKCS7 certificate using WolfSSL but its returning ERROR_CODE: -140 (ASN_PARSE_E) But i was able to parse the same certificate using OpenSSL.

            I have Base64 encoded PKCS7 file which am decoding to receive a DER format PKCS7 cert. This DER format PKCS7 is what I'm trying to parse using wolfssl ,but the code returns -140 (ASN_PARSE_E).

            ...

            ANSWER

            Answered 2021-Jan-11 at 00:06

            The PKCS7 certificate will load correctly if replacing:

            Source https://stackoverflow.com/questions/65639721

            QUESTION

            Cannot find which file represents the library you need to link
            Asked 2020-Apr-10 at 10:51

            I have built and install code to my directory /usr/local/lib:

            ls /usr/local/lib:

            ...

            ANSWER

            Answered 2020-Apr-10 at 01:39

            Entered into my terminal export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib and ran gcc -L/usr/local/lib -o my_hmac_test my_hmac_test.c -lwolfssl from that same terminal. I should add the export line to my .bashrc now.

            Source https://stackoverflow.com/questions/61132700

            QUESTION

            The linker attempts to include all not used functions and template instantiations even with function level linkage
            Asked 2020-Apr-08 at 15:38

            I have a library which uses templates very much to avoid rewriting the same code many times . But as known this leads to horrible compile times and in visual studio also leads to heavy and slow intellisense which makes coding on a computer with 4 GB of ram very noisy .

            However most classes are designed so that they only can be instantiated with particular types and templates are there to avoid rewriting for each type , this made me move most of the implementations to .cpp files and use explicit template instantiation there .

            For example I have :

            ...

            ANSWER

            Answered 2020-Apr-08 at 15:38

            For anyone who comes to this question and looks for a solution to similar problem, this is what I ended with :

            Instead of moving the implementation to a translation unit .cpp and instantiating all templates there I put the implementation in an internal header file and removed the templates instantiations from the header . For each template instantiation I made a .cpp file which includes the implementation header plus the underlying type interface and instantiate an instant of the class with this type .

            Now each instantiation resides in its own file and the linker won't pull unused instants.

            A drawback of this approach is the increased implementation files which are there only to go around this problem.

            Source https://stackoverflow.com/questions/60975350

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install wolfssl

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular TLS Libraries

            mkcert

            by FiloSottile

            v2rayN

            by 2dust

            acme.sh

            by acmesh-official

            nginxconfig.io

            by digitalocean

            v2ray

            by 233boy

            Try Top Libraries by wolfSSL

            wolfMQTT

            by wolfSSLC

            wolfssh

            by wolfSSLC

            wolfBoot

            by wolfSSLC

            wolfssl-examples

            by wolfSSLC

            wolfTPM

            by wolfSSLC