|
1 | 1 | # gnutls-wolfssl |
2 | 2 |
|
3 | | -Experimental port of wolfSSL into gnutls |
| 3 | +Experimental port of wolfSSL into GnuTLS. One script builds everything and drops the bits under /opt. |
| 4 | + |
| 5 | +## Quick start |
| 6 | +``` |
| 7 | +git clone https://github.com/YOURORG/gnutls-wolfssl.git |
| 8 | +cd gnutls-wolfssl |
| 9 | +# regular build |
| 10 | +./setup.sh |
| 11 | +
|
| 12 | +# build with FIPS 140 support |
| 13 | +./setup.sh fips |
| 14 | +``` |
| 15 | +On success you get: |
| 16 | +``` |
| 17 | +/opt/wolfssl wolfSSL |
| 18 | +/opt/gnutls GnuTLS built on wolfSSL |
| 19 | +/opt/wolfssl-gnutls-wrapper runtime shim |
| 20 | +``` |
| 21 | +If the loader can’t find the libs, add the path to LD_LIBRARY_PATH (Linux) or DYLD_LIBRARY_PATH (macOS). |
| 22 | + |
| 23 | +## Environment variables |
| 24 | +| var | default | note | |
| 25 | +|-----|---------|------| |
| 26 | +| WOLFSSL_INSTALL | /opt/wolfssl | install prefix | |
| 27 | +| GNUTLS_INSTALL | /opt/gnutls | install prefix | |
| 28 | +| GNUTLS_FORCE_FIPS_MODE | – | set at runtime to enforce FIPS | |
| 29 | + |
| 30 | +## Directory layout (after setup.sh has been run) |
| 31 | +``` |
| 32 | +setup.sh do‑it‑all build script |
| 33 | +rebuild-gnutls.sh rebuild GnuTLS only |
| 34 | +wolfssl/ upstream clone |
| 35 | +gnutls/ upstream clone + branch gnutls-wolfssl |
| 36 | +wolfssl-gnutls-wrapper/ thin shim + tests |
| 37 | +``` |
| 38 | + |
| 39 | +## Tests |
| 40 | +``` |
| 41 | +cd wolfssl-gnutls-wrapper |
| 42 | +
|
| 43 | +# build wrapper |
| 44 | +make |
| 45 | +
|
| 46 | +# full suite |
| 47 | +make test |
| 48 | +
|
| 49 | +# fast run of the test suite |
| 50 | +make test_fast |
| 51 | +
|
| 52 | +# test fips (only if ./setup.sh was run in fips mode) |
| 53 | +make test_fips |
| 54 | +``` |
| 55 | +Each test prints ✔️/❌ and a summary. |
| 56 | + |
| 57 | +## Using in your project |
| 58 | +``` |
| 59 | +cc app.c \ |
| 60 | + -I/opt/gnutls/include -I/opt/wolfssl/include \ |
| 61 | + -L/opt/gnutls/lib -lgnutls \ |
| 62 | + -L/opt/wolfssl/lib -lwolfssl \ |
| 63 | + -L/opt/wolfssl-gnutls-wrapper/lib -lgnutls-wolfssl-wrapper |
| 64 | +``` |
| 65 | +Make sure the wrapper comes after gnutls on the linker line. |
| 66 | + |
| 67 | +## Clean up |
| 68 | +``` |
| 69 | +sudo rm -rf /opt/wolfssl /opt/gnutls /opt/wolfssl-gnutls-wrapper |
| 70 | +``` |
0 commit comments