fix buffer len stuff for openssl C extension