[glib-networking/use-default-verify-paths] Do not use lookup api
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/use-default-verify-paths] Do not use lookup api
- Date: Thu, 14 Feb 2019 11:32:10 +0000 (UTC)
commit 4a02df72118b4079bd899d4e2fe4bd38b8865b23
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Thu Feb 14 12:31:42 2019 +0100
Do not use lookup api
tls/openssl/gtlsfiledatabase-openssl.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/tls/openssl/gtlsfiledatabase-openssl.c b/tls/openssl/gtlsfiledatabase-openssl.c
index dd18c52..9e011db 100644
--- a/tls/openssl/gtlsfiledatabase-openssl.c
+++ b/tls/openssl/gtlsfiledatabase-openssl.c
@@ -139,10 +139,8 @@ g_tls_file_database_openssl_populate_trust_list (GTlsDatabaseOpenssl *database,
GError **error)
{
GTlsFileDatabaseOpenssl *self = G_TLS_FILE_DATABASE_OPENSSL (database);
- X509_LOOKUP *lookup;
- lookup = X509_STORE_add_lookup (store, X509_LOOKUP_file ());
- if (lookup == NULL)
+ if (!X509_STORE_load_locations (store, self->anchor_filename, NULL))
{
g_set_error (error, G_TLS_ERROR, G_TLS_ERROR_MISC,
_("Failed to load system trust store file: %s"),
@@ -150,8 +148,6 @@ g_tls_file_database_openssl_populate_trust_list (GTlsDatabaseOpenssl *database,
return FALSE;
}
- X509_LOOKUP_load_file (lookup, self->anchor_filename, X509_FILETYPE_PEM);
-
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]