fix check for certificate_read_server_certificate()