[glib-networking/use-default-verify-paths] Use X509_STORE_set_default_paths
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/use-default-verify-paths] Use X509_STORE_set_default_paths
- Date: Thu, 14 Feb 2019 10:55:34 +0000 (UTC)
commit 76f99161aed9a3def8600ee988b91c64df192131
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Thu Feb 14 11:55:08 2019 +0100
Use X509_STORE_set_default_paths
tls/openssl/gtlsdatabase-openssl.c | 29 +----------------------------
1 file changed, 1 insertion(+), 28 deletions(-)
---
diff --git a/tls/openssl/gtlsdatabase-openssl.c b/tls/openssl/gtlsdatabase-openssl.c
index 0496bd5..5b9b38b 100644
--- a/tls/openssl/gtlsdatabase-openssl.c
+++ b/tls/openssl/gtlsdatabase-openssl.c
@@ -534,34 +534,7 @@ g_tls_database_openssl_populate_trust_list (GTlsDatabaseOpenssl *self,
X509_STORE *store,
GError **error)
{
- X509_LOOKUP *lookup;
-
- lookup = X509_STORE_add_lookup (store, X509_LOOKUP_file ());
- if (lookup == NULL)
- {
- g_set_error (error, G_TLS_ERROR, G_TLS_ERROR_MISC,
- _("Failed to load system trust store file: %s"),
- ERR_error_string (ERR_get_error (), NULL));
- return FALSE;
- }
-
- X509_LOOKUP_load_file (lookup, NULL, X509_FILETYPE_DEFAULT);
-
- lookup = X509_STORE_add_lookup (store, X509_LOOKUP_hash_dir ());
- if (lookup == NULL)
- {
- g_set_error (error, G_TLS_ERROR, G_TLS_ERROR_MISC,
- _("Failed to load system trust store: %s"),
- ERR_error_string (ERR_get_error (), NULL));
- return FALSE;
- }
-
- X509_LOOKUP_add_dir (lookup, NULL, X509_FILETYPE_DEFAULT);
-
- /* clear any errors */
- ERR_clear_error ();
-
- return TRUE;
+ return X509_STORE_set_default_paths (store);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]