SHA512 digest was sometimes too big for the 1024-bit N. Increase N to 1536 bits to ensure no intermittent fails.
wc_RsaKeyToPublicDer_ex
wc_RsaPublicKeyDerSize