Adjust openssl error handling to latest release