Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Library:WolfSSL

From ReverseEngineering.wiki
Library
Developer wolfSSL Inc.
License GPL-3.0 (with exception) or commercial
Website https://www.wolfssl.com
On this wiki Facts · Code · Notes · Topics

Embedded-oriented TLS 1.2/1.3 and crypto library in C (GPL-3.0 or commercial; formerly CyaSSL), common in firmware, game consoles and IoT; recognizable by wolfSSL_/wc_ exports, LIBWOLFSSL_VERSION_STRING and wolfSSL-specific error texts.

Overview

wolfSSL (older names CyaSSL, yaSSL) is a small C TLS library; its crypto half is called wolfCrypt (wc_* functions). Builds are configured with options.h or user_settings.h, so feature sets vary a lot. See Technique:Identifying cryptographic libraries for telling it from Library:OpenSSL, Library:Mbed TLS and others.

Identification

  • Version: wolfssl/version.h defines LIBWOLFSSL_VERSION_STRING ("5.9.4" on master) and LIBWOLFSSL_VERSION_HEX (0x05009004). wolfSSL_lib_version() returns the bare string "5.9.4"; with OPENSSL_EXTRA, wolfSSL_OpenSSL_version(OPENSSL_VERSION) returns "wolfSSL 5.9.4". Fact:WolfSSL/identification/Version string and hex.
  • Exports and names: functions are wolfSSL_* (TLS layer, e.g. wolfSSL_Init, wolfSSL_get_error) and wc_* (wolfCrypt). The OpenSSL compatibility layer keeps OpenSSL names as macros mapping to wolfSSL_*, so a wolfSSL binary normally exports no OpenSSL-named functions. This holds for builds without OPENSSL_COEXIST: wolfssl/openssl/ssl.h line 139 wraps the OpenSSL-name macros (#define SSL_new wolfSSL_new, line 362) in #if !defined(OPENSSL_COEXIST) && (defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)), and wolfssl/ssl.h lines 114-118 define NO_OLD_SSL_NAMES when OPENSSL_COEXIST is set (wolfSSL commit 7be1181fa997901e3c07fe2a56e151d6d333e054).
  • Error strings: wc_GetErrorString (wolfcrypt/src/error.c) returns plain sentences such as "out of memory error" (MEMORY_E -125), "ASN parsing error, invalid input" (ASN_PARSE_E -140), "Bad function argument" (BAD_FUNC_ARG -173); TLS layer codes are in error-ssl.h (SOCKET_ERROR_E -308, DECRYPT_ERROR -312, WANT_READ -323). Fact:WolfSSL/enum/Common error codes.
  • Debug log strings (only with DEBUG_WOLFSSL): "wolfSSL Entering %s" and "wolfSSL Leaving %s, return %d" (wolfcrypt/src/logging.c).
  • Cipher suite names: OpenSSL-style names such as "ECDHE-RSA-AES128-GCM-SHA256" and TLS 1.3 names like "TLS13-AES128-GCM-SHA256" (SUITE_INFO table in src/internal.c) next to the IANA names.

Pitfalls

  • Unverified: stripped static builds without DEBUG_WOLFSSL may keep only the error texts, and only if wc_GetErrorString is linked; test with strings on a known firmware.
  • Error numbers are negative and differ from Library:Mbed TLS (-0x6900 style) and Library:OpenSSL (packed ERR_get_error values).

Code & repositories

Tags of the repository below let you diff a version against a binary.

  • https://github.com/wolfSSL/wolfssl @ 16cac42a0db8ea6b4df0ba7fe8737e76a5085d6e · license: GPL-3.0-only (declared by the contributor for the files used; GitHub reports GPL-3.0 for the repository)
    wolfSSL source: wolfssl/version.h, wolfcrypt/src/error.c, wolfssl/error-ssl.h, src/ssl.c, src/internal.c.
    Tested on: source read, not run: Source read at this commit; not built. · checked 2026-10-18; last activity 2026-10-18