fix previous modification -- if ssl->cert is NULL, don't follow the pointer.