create_client_ssl_connection(): Don't keep the certificate lock longer than necessary