GTlsCertificate *
cockpit_certificate_load (const gchar *cert_path,
                          GError **error)
{
  GTlsCertificate *cert;

  cert = tls_certificate_new_from_file (cert_path, error);
  if (cert == NULL)
    g_prefix_error (error, "%s: ", cert_path);
  return cert;
}
示例#2
0
GTlsCertificate *
cockpit_certificate_load (const gchar *cert_path,
                          GError **error)
{
  GTlsCertificate *cert;

  cert = tls_certificate_new_from_file (cert_path, error);
  if (cert == NULL)
    g_prefix_error (error, "%s: ", cert_path);
  else
    g_debug ("loaded %d certificates from %s", tls_certificate_count (cert), cert_path);
  return cert;
}