go-wolfssl

go-wolfssl wraps wolfSSL and wolfCrypt for Go, with a crypto/tls style Conn and an X.509 package. I fixed bugs in wolftls, wolfx509 and the examples.

Role: contributor Go, cgo, wolfSSL, TLS, X.509 wolfSSL/go-wolfssl
01 / What I built

Main changes

02 / Design

One design choice

I moved Conn.Read's wait on the transport outside the session lock, so Write stays unblocked while Read waits when wolfSSL has no write dup. A transport EOF before close_notify becomes io.ErrUnexpectedEOF, and io.EOF is returned only for a real close_notify.

03 / Debugging

A bug I fixed

The PSK example callbacks copied the identity with the caller's length and ignored the key buffer size. The fix returns 0 when the identity or key does not fit, and the server callback now matches the full identity instead of a prefix. (#71)

04 / Verification

How it was checked

PREvidence
#71CI builds the PSK callbacks under AddressSanitizer and checks undersized buffers return 0.
#67New wolftls-race workflow runs go test -race, plus TestConcurrentReadWrite payload checks.
05 / Limits

What is not done yet

Behavior depends on how wolfSSL was configured. Concurrent Read and Write only run in parallel with --enable-writedup. Several more fixes are still open.

All my merged pull requests 4 in wolfSSL/go-wolfssl
  • #68Fix wolftls Config handling for certs, ALPN, SNI, and versions
  • #69Fix wolfx509 parsing, generation, and verification gaps
  • #67Fix wolftls Conn lifecycle, concurrency, and error handling
  • #71Fix bugs and unsafe patterns in the example programs

all work view the repository