Calling it a night. The OpenSSL api is a rats nest.