Minimal demo image showcasing gnutls with wolfSSL FIPS backend.
This image demonstrates gnutls configured to use wolfSSL's FIPS-validated wolfCrypt as its cryptographic backend. This allows any application using gnutls (wget, openldap etc...) to benefit from FIPS 140-3 validated cryptography.
- Everything from
wolfssl-image-minimal - wolfSSL FIPS (auto-configured for gnutls support)
- gnutls 3.8.9 with wolfSSL backend
- gnutls-wolfssl (test suite)
# Enable demo images
WOLFSSL_DEMOS = "wolfssl-image-minimal gnutls-image-minimal"
# Configure FIPS bundle (use absolute path)
require /path/to/meta-wolfssl/conf/wolfssl-fips.confbitbake gnutls-image-minimalrunqemu gnutls-image-minimal nographicInside QEMU, run the gnutls test suite:
# Run all tests
cd /opt/wolfssl-gnutls-wrapper/tests/
make run_fipsThe gnutls test suite should pass with the wolfSSL backend, each test prints PASS/FAIL and a summary. It also showcases all the logs of the wrapper whenever some gnutls cryptographic code in an application is called.
The wolfssl-fips.bbappend in this directory automatically configures wolfssl-fips with features needed by gnutls:
require ${WOLFSSL_LAYERDIR}/inc/wolfssl-fips/wolfssl-enable-gnutls.incThis adds:
--enable-fips=v5--enable-keygen- Required compile flags (
HAVE_AES_ECB,WC_RSA_DIRECT, etc.)
The gnutls_%.bbappend conditionally switches gnutls to the wolfSSL backend when wolfssl-fips is the provider:
inherit wolfssl-osp-support
python __anonymous() {
wolfssl_osp_include_if_provider(
d,
inc_file='inc/gnutls/gnutls-enable-wolfssl.inc',
allowed_providers=['wolfssl-fips']
)
}This:
- Switches to
github.com/wolfSSL/gnutlssource - Configures with the configurations listed in
inc/gnutls/gnutls-enable-wolfssl.inc - Adds wolfSSL dependencies
With this image, any application using gnutls will automatically use FIPS-validated cryptography:
- Valid wolfSSL FIPS commercial bundle
- wolfssl-fips configured as provider
- gnutls 3.8.9+ (provided by wolfSSL fork)
If ptests fail, check:
- FIPS hash is correct: wolfSSL FIPS auto-hash should have generated the correct hash
- All features enabled: Verify wolfssl-fips has all required flags (see
inc/wolfssl-fips/wolfssl-enable-gnutls.inc) - Dependencies: Ensure wolfssl-fips is properly built and installed
If build fails, ensure:
- FIPS bundle is accessible: Check
WOLFSSL_SRC_DIRinconf/wolfssl-fips.conf - FIPS config is included:
require conf/wolfssl-fips.confinlocal.conf - Demo is enabled:
WOLFSSL_DEMOSincludes both base and gnutls images
- Main README: ../../../README.md
- gnutls-wolfssl: https://github.com/wolfSSL/gnutls-wolfssl
- wolfSSL FIPS: https://www.wolfssl.com/products/wolfssl-fips/