[gnome-keyring] Split the gcr library into base and ui components.
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] Split the gcr library into base and ui components.
- Date: Mon, 26 Sep 2011 10:01:05 +0000 (UTC)
commit a30d6325588070aacc40c171edc429b4680b36e0
Author: Stef Walter <stefw collabora co uk>
Date: Mon Sep 26 11:58:33 2011 +0200
Split the gcr library into base and ui components.
* Different pkg-config files gcr-3.pc and gcr-base-3.pc
* The base library doesn't link to GTK+ or anything that
is used in the UI. It can be used by non-ui programs.
.gitignore | 2 +
configure.ac | 1 +
gcr/Makefile.am | 177 ++++++++++++++++++++++-------------
gcr/gcr-base.h | 51 ++++++++++
gcr/gcr-base.pc.in | 16 +++
gcr/gcr-base.symbols | 110 ++++++++++++++++++++++
gcr/gcr-certificate-chain.h | 5 +-
gcr/gcr-certificate-exporter.h | 4 +-
gcr/gcr-certificate-extensions.h | 4 +-
gcr/gcr-certificate-renderer.h | 4 +-
gcr/gcr-certificate-widget.h | 4 +-
gcr/gcr-certificate.h | 4 +-
gcr/gcr-combo-selector.c | 2 -
gcr/gcr-deprecated-base.h | 49 ++++++++++
gcr/gcr-deprecated.h | 27 ++----
gcr/gcr-enum-types.c.template | 10 ++-
gcr/gcr-enum-types.h.template | 2 +-
gcr/gcr-failure-renderer.h | 4 +-
gcr/gcr-gnupg-collection.h | 2 +-
gcr/gcr-gnupg-key.c | 1 -
gcr/gcr-gnupg-key.h | 5 +-
gcr/gcr-gnupg-process.h | 2 +-
gcr/gcr-gnupg-util.h | 4 +-
gcr/gcr-import-dialog.c | 2 -
gcr/gcr-importer.c | 2 -
gcr/gcr-importer.h | 4 +-
gcr/gcr-key-renderer.h | 4 +-
gcr/gcr-key-widget.h | 4 +-
gcr/gcr-library.c | 73 +--------------
gcr/gcr-library.h | 4 +-
gcr/gcr-list-selector.c | 2 -
gcr/gcr-memory.c | 92 ++++++++++++++++++
gcr/gcr-parser.h | 4 +-
gcr/gcr-pkcs11-certificate.h | 4 +-
gcr/gcr-record.h | 4 +-
gcr/gcr-simple-certificate.h | 6 +-
gcr/gcr-simple-collection.c | 3 +-
gcr/gcr-simple-collection.h | 2 +-
gcr/gcr-tree-selector.c | 2 -
gcr/gcr-trust.c | 2 +-
gcr/gcr-trust.h | 4 +-
gcr/gcr-types.h | 4 +-
gcr/gcr-union-collection.h | 2 +-
gcr/gcr-unlock-options-widget.h | 4 +-
gcr/gcr-unlock-renderer.h | 4 +-
gcr/gcr.h | 16 +---
gcr/gcr.pc.in | 2 +-
gcr/gcr.symbols | 106 ---------------------
gcr/tests/frob-parser.c | 6 +-
gcr/tests/test-certificate-chain.c | 2 +-
gcr/tests/test-certificate.c | 2 +-
gcr/tests/test-fingerprint.c | 2 +-
gcr/tests/test-gnupg-collection.c | 2 +-
gcr/tests/test-gnupg-process.c | 2 +-
gcr/tests/test-parser.c | 2 +-
gcr/tests/test-pkcs11-certificate.c | 2 +-
gcr/tests/test-simple-certificate.c | 2 +-
gcr/tests/test-trust.c | 2 +-
gcr/tests/test-util.c | 2 +-
59 files changed, 517 insertions(+), 355 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index d2fc41a..a186ec0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,6 +37,7 @@ run-tests
*.gcda
*.valid
*.abi
+*.pc
/compile
/ABOUT-NLS
@@ -113,6 +114,7 @@ run-tests
/gcr/gcr-oids.[ch]
/gcr/gcr-enum-types.[ch]
+/gcr/gcr-enum-types-base.[ch]
/gcr/tests/frob-certificate
/gcr/tests/frob-key
/gcr/tests/frob-gnupg-selector
diff --git a/configure.ac b/configure.ac
index 4e4c13b..b785f65 100644
--- a/configure.ac
+++ b/configure.ac
@@ -766,6 +766,7 @@ gck/gck.pc
gck/Makefile
gck/tests/Makefile
gcr/gcr.pc
+gcr/gcr-base.pc
gcr/gcr-viewer.desktop.in
gcr/Makefile
gcr/icons/Makefile
diff --git a/gcr/Makefile.am b/gcr/Makefile.am
index aaeeefb..f3db2a0 100644
--- a/gcr/Makefile.am
+++ b/gcr/Makefile.am
@@ -1,4 +1,3 @@
-
if WITH_TESTS
TESTS_DIR = tests
TESTABLE_LIB = libgcr-testable.la
@@ -22,35 +21,39 @@ ui_DATA = \
# ------------------------------------------------------------------
# HEADERS
-HEADER_FILES = \
- gcr.h \
+HEADER_BASE_FILES = \
+ gcr-base.h \
gcr-certificate.h \
- gcr-certificate-basics-widget.h \
gcr-certificate-chain.h \
+ gcr-collection.h \
+ gcr-comparable.h \
+ gcr-deprecated-base.h \
+ gcr-library.h \
+ gcr-parser.h \
+ gcr-pkcs11-certificate.h \
+ gcr-simple-certificate.h \
+ gcr-trust.h \
+ gcr-types.h \
+ gcr-union-collection.h \
+ gcr-unlock-options.h
+
+HEADER_UI_FILES = \
+ gcr.h \
+ gcr-certificate-basics-widget.h \
gcr-certificate-details-widget.h \
gcr-certificate-renderer.h \
gcr-certificate-widget.h \
- gcr-collection.h \
gcr-collection-model.h \
gcr-column.h \
gcr-combo-selector.h \
- gcr-comparable.h \
gcr-deprecated.h \
gcr-key-renderer.h \
gcr-key-widget.h \
gcr-importer.h \
- gcr-library.h \
gcr-list-selector.h \
- gcr-parser.h \
- gcr-pkcs11-certificate.h \
gcr-renderer.h \
- gcr-simple-certificate.h \
gcr-simple-collection.h \
gcr-tree-selector.h \
- gcr-trust.h \
- gcr-types.h \
- gcr-union-collection.h \
- gcr-unlock-options.h \
gcr-unlock-options-widget.h \
gcr-viewer.h \
gcr-viewer-window.h
@@ -58,7 +61,9 @@ HEADER_FILES = \
incdir = $(includedir)/gcr- GCR_MAJOR@/gcr
inc_HEADERS = \
- $(HEADER_FILES) \
+ $(HEADER_BASE_FILES) \
+ $(HEADER_UI_FILES) \
+ gcr-enum-types-base.h \
gcr-enum-types.h
# ------------------------------------------------------------------
@@ -67,98 +72,127 @@ inc_HEADERS = \
INCLUDES = \
-I$(top_builddir) \
-I$(top_srcdir) \
- $(GTK_CFLAGS) \
$(GOBJECT_CFLAGS) \
$(GLIB_CFLAGS) \
$(LIBGCRYPT_CFLAGS) \
- $(LIBTASN1_CFLAGS) \
$(P11_KIT_CFLAGS) \
-DG_LOG_DOMAIN=\"Gcr\"
-BUILT_SOURCES = \
+lib_LTLIBRARIES = \
+ libgcr-base- GCR_MAJOR@.la \
+ libgcr- GCR_MAJOR@.la
+
+BUILT_BASE_FILES = \
+ gcr-marshal.c gcr-marshal.h \
+ gcr-enum-types-base.c gcr-enum-types-base.h \
+ gcr-oids.c gcr-oids.h
+
+BUILT_UI_FILES = \
gcr-marshal.c gcr-marshal.h \
gcr-enum-types.c gcr-enum-types.h \
gcr-oids.c gcr-oids.h
-lib_LTLIBRARIES = libgcr- GCR_MAJOR@.la
+BUILT_SOURCES = \
+ $(BUILT_BASE_FILES) \
+ $(BUILT_UI_FILES)
-libgcr_ GCR_MAJOR@_la_SOURCES = \
+libgcr_base_ GCR_MAJOR@_la_SOURCES = \
gcr-certificate.c gcr-certificate.h \
- gcr-certificate-basics-widget.h gcr-certificate-basics-widget.c \
gcr-certificate-chain.c gcr-certificate-chain.h \
- gcr-certificate-details-widget.h gcr-certificate-details-widget.c \
- gcr-certificate-renderer.c gcr-certificate-renderer.h \
+ gcr-collection.c gcr-collection.h \
+ gcr-comparable.c gcr-comparable.h \
+ gcr-debug.c gcr-debug.h \
+ gcr-gnupg-collection.c gcr-gnupg-collection.h \
+ gcr-gnupg-key.c gcr-gnupg-key.h \
+ gcr-gnupg-process.c gcr-gnupg-process.h \
+ gcr-gnupg-util.c gcr-gnupg-util.h \
+ gcr-library.c gcr-library.h \
+ gcr-internal.h \
+ gcr-memory.c \
+ gcr-memory-icon.c gcr-memory-icon.h \
+ gcr-parser.c gcr-parser.h \
+ gcr-pkcs11-certificate.c gcr-pkcs11-certificate.h \
+ gcr-record.c gcr-record.h \
+ gcr-simple-certificate.c gcr-simple-certificate.h \
+ gcr-simple-collection.c gcr-simple-collection.h \
+ gcr-trust.c gcr-trust.h \
+ gcr-types.h \
+ gcr-union-collection.c gcr-union-collection.h \
+ gcr-util.c gcr-util.h \
+ $(BUILT_BASE_FILES)
+
+libgcr_ GCR_MAJOR@_la_SOURCES = \
+ gcr-certificate-basics-widget.c gcr-certificate-basics-widget.h \
+ gcr-certificate-details-widget.c gcr-certificate-details-widget.h \
gcr-certificate-exporter.c gcr-certificate-exporter.h \
gcr-certificate-extensions.c gcr-certificate-extensions.h \
+ gcr-certificate-renderer.c gcr-certificate-renderer.h \
gcr-certificate-widget.c gcr-certificate-widget.h \
- gcr-collection.c gcr-collection.h \
gcr-collection-model.c gcr-collection-model.h \
gcr-combo-selector.c gcr-combo-selector.h \
- gcr-comparable.c gcr-comparable.h \
- gcr-debug.c gcr-debug.h \
gcr-display-scrolled.c gcr-display-scrolled.h \
gcr-display-view.c gcr-display-view.h \
- gcr-gnupg-collection.c gcr-gnupg-collection.h \
- gcr-gnupg-key.c gcr-gnupg-key.h \
gcr-failure-renderer.c gcr-failure-renderer.h \
gcr-fingerprint.c gcr-fingerprint.h \
- gcr-gnupg-process.c gcr-gnupg-process.h \
- gcr-gnupg-util.c gcr-gnupg-util.h \
gcr-icons.c gcr-icons.h \
gcr-import-dialog.c gcr-import-dialog.h \
gcr-importer.c gcr-importer.h \
- gcr-internal.h \
gcr-key-renderer.c gcr-key-renderer.h \
gcr-key-widget.c gcr-key-widget.h \
- gcr-library.c gcr-library.h \
gcr-list-selector.c gcr-list-selector.h gcr-list-selector-private.h \
gcr-live-search.c gcr-live-search.h \
- gcr-memory-icon.c gcr-memory-icon.h \
- gcr-parser.c gcr-parser.h \
- gcr-pkcs11-certificate.c gcr-pkcs11-certificate.h \
- gcr-record.c gcr-record.h \
+ gcr-memory.c \
gcr-renderer.c gcr-renderer.h \
- gcr-simple-certificate.c gcr-simple-certificate.h \
- gcr-simple-collection.c gcr-simple-collection.h \
gcr-tree-selector.c gcr-tree-selector.h \
- gcr-trust.c gcr-trust.h \
- gcr-types.h \
- gcr-union-collection.c \
gcr-unlock-options.h \
gcr-unlock-options-widget.c gcr-unlock-options-widget.h \
gcr-unlock-renderer.c gcr-unlock-renderer.h \
- gcr-util.c gcr-util.h \
gcr-viewer.c gcr-viewer.h \
gcr-viewer-window.c \
- $(BUILT_SOURCES)
+ $(BUILT_UI_FILES)
-libgcr_ GCR_MAJOR@_la_CFLAGS = \
+libgcr_base_ GCR_MAJOR@_la_CFLAGS = \
-DGCK_API_SUBJECT_TO_CHANGE \
-DGCR_API_SUBJECT_TO_CHANGE \
-DP11_KIT_API_SUBJECT_TO_CHANGE \
- -DGCR_COMPILATION \
- -DUIDIR=\""$(uidir)"\"
+ -DGCR_COMPILATION
-libgcr_ GCR_MAJOR@_la_LDFLAGS = \
+libgcr_ GCR_MAJOR@_la_CFLAGS = \
+ $(GTK_CFLAGS) \
+ -DUIDIR=\""$(uidir)"\" \
+ $(libgcr_base_ GCR_MAJOR@_la_CFLAGS)
+
+libgcr_base_ GCR_MAJOR@_la_LDFLAGS = \
-version-info $(GCR_LT_RELEASE) \
-no-undefined \
-export-symbols-regex '^gcr_*'
-libgcr_ GCR_MAJOR@_la_LIBADD = \
+libgcr_ GCR_MAJOR@_la_LDFLAGS = \
+ $(libgcr_base_ GCR_MAJOR@_la_LDFLAGS)
+
+libgcr_base_ GCR_MAJOR@_la_LIBADD = \
$(top_builddir)/egg/libegg.la \
$(top_builddir)/egg/libegg-entry-buffer.la \
$(top_builddir)/gck/libgck- GCK_MAJOR@.la \
$(GOBJECT_LIBS) \
$(GLIB_LIBS) \
$(LIBGCRYPT_LIBS) \
- $(GTK_LIBS) \
$(P11_KIT_LIBS)
+libgcr_ GCR_MAJOR@_la_LIBADD = \
+ $(GTK_LIBS) \
+ $(libgcr_base_ GCR_MAJOR@_la_LIBADD) \
+ $(builddir)/libgcr-base-$(GCR_MAJOR).la
+
noinst_LTLIBRARIES = $(TESTABLE_LIB)
libgcr_testable_la_SOURCES =
-libgcr_testable_la_LIBADD = $(libgcr_ GCR_MAJOR@_la_OBJECTS) \
+libgcr_testable_la_LIBADD = \
+ $(libgcr_base_ GCR_MAJOR@_la_OBJECTS) \
+ $(libgcr_ GCR_MAJOR@_la_OBJECTS) \
$(libgcr_ GCR_MAJOR@_la_LIBADD)
-libgcr_testable_la_DEPENDENCIES = $(libgcr_ GCR_MAJOR@_la_OBJECTS)
+libgcr_testable_la_DEPENDENCIES = \
+ $(libgcr_base_ GCR_MAJOR@_la_OBJECTS) \
+ $(libgcr_ GCR_MAJOR@_la_OBJECTS)
gcr-marshal.h: gcr-marshal.list $(GLIB_GENMARSHAL)
$(AM_V_GEN) $(GLIB_GENMARSHAL) $< --header --prefix=_gcr_marshal > $@
@@ -167,13 +201,21 @@ gcr-marshal.c: gcr-marshal.list $(GLIB_GENMARSHAL)
$(AM_V_GEN) ( echo "#include \"gcr-marshal.h\"" > $@ && \
$(GLIB_GENMARSHAL) $< --body --prefix=_gcr_marshal >> $@ )
-gcr-enum-types.h: $(HEADER_FILES) gcr-enum-types.h.template
+gcr-enum-types.h: $(HEADER_UI_FILES) gcr-enum-types.h.template
+ $(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/gcr-enum-types.h.template \
+ $(HEADER_UI_FILES) > $@
+
+gcr-enum-types.c: $(HEADER_UI_FILES) gcr-enum-types.c.template
+ $(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/gcr-enum-types.c.template \
+ $(HEADER_UI_FILES) > $@
+
+gcr-enum-types-base.h: $(HEADER_BASE_FILES) gcr-enum-types.h.template
$(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/gcr-enum-types.h.template \
- $(HEADER_FILES) > $@
+ $(HEADER_BASE_FILES) > $@
-gcr-enum-types.c: $(HEADER_FILES) gcr-enum-types.c.template
+gcr-enum-types-base.c: $(HEADER_BASE_FILES) gcr-enum-types.c.template
$(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/gcr-enum-types.c.template \
- $(HEADER_FILES) > $@
+ $(HEADER_BASE_FILES) > $@
gcr-oids.c: gcr-oids.list gcr-mkoids
$(AM_V_GEN) sh gcr-mkoids -p GCR -c gcr-oids.c -h gcr-oids.h gcr-oids.list
@@ -181,10 +223,12 @@ gcr-oids.c: gcr-oids.list gcr-mkoids
gcr-oids.h: gcr-oids.c
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = gcr-$(GCR_MAJOR).pc
+pkgconfig_DATA = gcr-$(GCR_MAJOR).pc gcr-base-$(GCR_MAJOR).pc
gcr-$(GCR_MAJOR).pc: gcr.pc
cp gcr.pc gcr-$(GCR_MAJOR).pc
+gcr-base-$(GCR_MAJOR).pc: gcr-base.pc
+ cp gcr-base.pc gcr-base-$(GCR_MAJOR).pc
# ----------------------------------------------------------------
# SYSTEM INTEGRATION
@@ -234,14 +278,21 @@ gcr_viewer_LDADD = \
# ----------------------------------------------------------------
+gcr-expected-base.abi: gcr-base.symbols
+ $(AM_V_GEN) cpp -P $< | sort > $@
gcr-expected.abi: gcr.symbols
$(AM_V_GEN) cpp -P $< | sort > $@
+gcr-actual-base.abi: $(builddir)/.libs/libgcr-base- GCR_MAJOR@.so
+ $(AM_V_GEN) $(NM) -D -g --defined-only $< | \
+ cut -d ' ' -f 3 | grep -Ev '^(__bss_start|_edata|_end)' | sort > $@
gcr-actual.abi: $(builddir)/.libs/libgcr- GCR_MAJOR@.so
$(AM_V_GEN) $(NM) -D -g --defined-only $< | \
cut -d ' ' -f 3 | grep -Ev '^(__bss_start|_edata|_end)' | sort > $@
-check-symbols: gcr-expected.abi gcr-actual.abi
+check-symbols: gcr-expected.abi gcr-actual.abi gcr-expected-base.abi gcr-actual-base.abi
+ $(AM_V_GEN) diff -U0 --ignore-blank-lines gcr-expected-base.abi gcr-actual-base.abi || \
+ (echo "check-symbols: Symbols have CHANGED. Fix gcr-base.symbols"; exit 1)
$(AM_V_GEN) diff -U0 --ignore-blank-lines gcr-expected.abi gcr-actual.abi || \
(echo "check-symbols: Symbols have CHANGED. Fix gcr.symbols"; exit 1)
@@ -249,6 +300,7 @@ check-local: check-symbols
EXTRA_DIST = \
gcr.pc.in \
+ gcr-base.pc.in \
gcr-marshal.list \
gcr-oids.list \
gcr-mkoids \
@@ -257,6 +309,7 @@ EXTRA_DIST = \
gcr-enum-types.h.template \
gcr-enum-types.c.template \
gcr.symbols \
+ gcr-base.symbols \
$(desktop_in_in_files) \
$(desktop_in_files) \
$(desktop_DATA) \
@@ -266,15 +319,11 @@ CLEANFILES = \
$(BUILT_SOURCES) \
$(pkgconfig_DATA) \
gcr-actual.abi \
- gcr-expected.abi
+ gcr-actual-base.abi \
+ gcr-expected.abi \
+ gcr-expected-base.abi
DISTCLEANFILES = \
$(desktop_in_files) \
$(desktop_DATA) \
$(pkgconfig_DATA)
-
-symbols: libgcr-$(VERSION).symbols
-
-libgcr-$(VERSION).symbols: .libs/libgcr- GCR_MAJOR@.so
- nm -D .libs/libgcr- GCR_MAJOR@.so | grep -F ' T ' | \
- cut -d ' ' -f 3 | sort > $@
diff --git a/gcr/gcr-base.h b/gcr/gcr-base.h
new file mode 100644
index 0000000..218030a
--- /dev/null
+++ b/gcr/gcr-base.h
@@ -0,0 +1,51 @@
+/*
+ * gnome-keyring
+ *
+ * Copyright (C) 2010 Collabora Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * Author: Stef Walter <stefw collabora co uk>
+ */
+
+#ifndef GCR_API_SUBJECT_TO_CHANGE
+#error "This API has not yet reached stability."
+#endif
+
+#ifndef __GCR_BASE_H__
+#define __GCR_BASE_H__
+
+#include <glib.h>
+
+#define __GCR_INSIDE_HEADER__
+
+#include "gcr-types.h"
+
+#include "gcr-certificate.h"
+#include "gcr-certificate-chain.h"
+#include "gcr-deprecated-base.h"
+#include "gcr-enum-types-base.h"
+#include "gcr-library.h"
+#include "gcr-parser.h"
+#include "gcr-pkcs11-certificate.h"
+#include "gcr-simple-certificate.h"
+#include "gcr-trust.h"
+#include "gcr-union-collection.h"
+#include "gcr-unlock-options.h"
+
+#undef __GCR_INSIDE_HEADER__
+
+#endif /* __GCR_BASE_H__ */
diff --git a/gcr/gcr-base.pc.in b/gcr/gcr-base.pc.in
new file mode 100644
index 0000000..629882a
--- /dev/null
+++ b/gcr/gcr-base.pc.in
@@ -0,0 +1,16 @@
+prefix= prefix@
+exec_prefix= exec_prefix@
+libdir= libdir@
+includedir= includedir@
+datarootdir= datarootdir@
+datadir= datadir@
+sysconfdir= sysconfdir@
+pkcs11dir= P11_MODULE_PATH@
+pkcs11standalonedir= pkcs11standalonedir@
+
+Name: gcr-base- GCR_MAJOR@
+Description: GObject library for high level crypto parsing
+Version: @VERSION@
+Requires: glib-2.0 gck- GCK_MAJOR@ p11-kit-1
+Libs: -L${libdir} -lgcr-base- GCR_MAJOR@
+Cflags: -I${includedir}/gcr- GCR_MAJOR@
diff --git a/gcr/gcr-base.symbols b/gcr/gcr-base.symbols
new file mode 100644
index 0000000..15f77b0
--- /dev/null
+++ b/gcr/gcr-base.symbols
@@ -0,0 +1,110 @@
+/* This file lists all exported symbols. It is used to guarantee that we
+ * only consciously change our ABI.
+ */
+
+gcr_certificate_compare
+gcr_certificate_chain_add
+gcr_certificate_chain_build
+gcr_certificate_chain_build_async
+gcr_certificate_chain_build_finish
+gcr_certificate_chain_flags_get_type
+gcr_certificate_chain_get_anchor
+gcr_certificate_chain_get_certificate
+gcr_certificate_chain_get_endpoint
+gcr_certificate_chain_get_length
+gcr_certificate_chain_get_status
+gcr_certificate_chain_get_type
+gcr_certificate_chain_new
+gcr_certificate_chain_status_get_type
+gcr_certificate_get_columns
+gcr_certificate_get_der_data
+gcr_certificate_get_expiry_date
+gcr_certificate_get_fingerprint
+gcr_certificate_get_fingerprint_hex
+gcr_certificate_get_icon
+gcr_certificate_get_issued_date
+gcr_certificate_get_issuer_cn
+gcr_certificate_get_issuer_dn
+gcr_certificate_get_issuer_part
+gcr_certificate_get_issuer_raw
+gcr_certificate_get_key_size
+gcr_certificate_get_serial_number
+gcr_certificate_get_serial_number_hex
+gcr_certificate_get_subject_cn
+gcr_certificate_get_subject_dn
+gcr_certificate_get_subject_part
+gcr_certificate_get_subject_raw
+gcr_certificate_get_type
+gcr_certificate_mixin_class_init
+gcr_certificate_mixin_comparable_init
+gcr_certificate_mixin_get_property
+gcr_certificate_is_issuer
+gcr_collection_contains
+gcr_collection_emit_added
+gcr_collection_emit_removed
+gcr_collection_get_length
+gcr_collection_get_objects
+gcr_collection_get_type
+gcr_comparable_compare
+gcr_comparable_get_type
+gcr_comparable_memcmp
+gcr_data_error_get_domain
+gcr_data_error_get_type
+gcr_data_format_get_type
+gcr_error_get_domain
+gcr_parser_add_password
+gcr_parser_format_disable
+gcr_parser_format_enable
+gcr_parser_format_supported
+gcr_parser_get_parsed_attributes
+gcr_parser_get_parsed_block
+gcr_parser_get_parsed_description
+gcr_parser_get_parsed_label
+gcr_parser_get_type
+gcr_parser_new
+gcr_parser_parse_data
+gcr_parser_parse_stream
+gcr_parser_parse_stream_async
+gcr_parser_parse_stream_finish
+gcr_pkcs11_add_module
+gcr_pkcs11_add_module_from_file
+gcr_pkcs11_certificate_get_attributes
+gcr_pkcs11_certificate_get_type
+gcr_pkcs11_certificate_lookup_issuer
+gcr_pkcs11_certificate_lookup_issuer_async
+gcr_pkcs11_certificate_lookup_issuer_finish
+gcr_pkcs11_get_modules
+gcr_pkcs11_get_trust_lookup_slots
+gcr_pkcs11_get_trust_lookup_uris
+gcr_pkcs11_get_trust_store_slot
+gcr_pkcs11_get_trust_store_uri
+gcr_pkcs11_set_modules
+gcr_pkcs11_set_trust_lookup_uris
+gcr_pkcs11_set_trust_store_uri
+gcr_simple_certificate_get_type
+gcr_simple_certificate_new
+gcr_simple_certificate_new_static
+gcr_simple_collection_add
+gcr_simple_collection_contains
+gcr_simple_collection_get_type
+gcr_simple_collection_new
+gcr_simple_collection_remove
+gcr_trust_add_pinned_certificate
+gcr_trust_add_pinned_certificate_async
+gcr_trust_add_pinned_certificate_finish
+gcr_trust_is_certificate_anchored
+gcr_trust_is_certificate_anchored_async
+gcr_trust_is_certificate_anchored_finish
+gcr_trust_is_certificate_pinned
+gcr_trust_is_certificate_pinned_async
+gcr_trust_is_certificate_pinned_finish
+gcr_trust_remove_pinned_certificate
+gcr_trust_remove_pinned_certificate_async
+gcr_trust_remove_pinned_certificate_finish
+gcr_union_collection_add
+gcr_union_collection_get_type
+gcr_union_collection_have
+gcr_union_collection_new
+gcr_union_collection_remove
+gcr_union_collection_size
+gcr_union_collection_take
diff --git a/gcr/gcr-certificate-chain.h b/gcr/gcr-certificate-chain.h
index fe3ab37..a77df07 100644
--- a/gcr/gcr-certificate-chain.h
+++ b/gcr/gcr-certificate-chain.h
@@ -21,15 +21,14 @@
* Author: Stef Walter <stefw collabora co uk>
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef __GCR_CERTIFICATE_CHAIN_H__
#define __GCR_CERTIFICATE_CHAIN_H__
#include <glib-object.h>
-#include <gtk/gtk.h>
#include "gcr-certificate.h"
#include "gcr-types.h"
diff --git a/gcr/gcr-certificate-exporter.h b/gcr/gcr-certificate-exporter.h
index 5f7a9cf..3ab43d2 100644
--- a/gcr/gcr-certificate-exporter.h
+++ b/gcr/gcr-certificate-exporter.h
@@ -19,8 +19,8 @@
* Author: Stef Walter <stefw collabora co uk>
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef __GCR_CERTIFICATE_EXPORTER_H__
diff --git a/gcr/gcr-certificate-extensions.h b/gcr/gcr-certificate-extensions.h
index ab22d42..9101008 100644
--- a/gcr/gcr-certificate-extensions.h
+++ b/gcr/gcr-certificate-extensions.h
@@ -21,8 +21,8 @@
* Author: Stef Walter <stefw collabora co uk>
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef GCR_CERTIFICATE_EXTENSIONS_H
diff --git a/gcr/gcr-certificate-renderer.h b/gcr/gcr-certificate-renderer.h
index c45f2ea..6167dd5 100644
--- a/gcr/gcr-certificate-renderer.h
+++ b/gcr/gcr-certificate-renderer.h
@@ -17,8 +17,8 @@
* 02111-1307, USA.
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef __GCR_CERTIFICATE_RENDERER_H__
diff --git a/gcr/gcr-certificate-widget.h b/gcr/gcr-certificate-widget.h
index b5d169d..3ad2f19 100644
--- a/gcr/gcr-certificate-widget.h
+++ b/gcr/gcr-certificate-widget.h
@@ -17,8 +17,8 @@
* 02111-1307, USA.
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef __GCR_CERTIFICATE_WIDGET_H__
diff --git a/gcr/gcr-certificate.h b/gcr/gcr-certificate.h
index 504b643..43cba42 100644
--- a/gcr/gcr-certificate.h
+++ b/gcr/gcr-certificate.h
@@ -19,8 +19,8 @@
* 02111-1307, USA.
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef __GCR_CERTIFICATE_H__
diff --git a/gcr/gcr-combo-selector.c b/gcr/gcr-combo-selector.c
index ee9c79d..91328a2 100644
--- a/gcr/gcr-combo-selector.c
+++ b/gcr/gcr-combo-selector.c
@@ -188,8 +188,6 @@ gcr_combo_selector_class_init (GcrComboSelectorClass *klass)
g_object_class_install_property (gobject_class, PROP_COLLECTION,
g_param_spec_object ("collection", "Collection", "Collection to select from",
GCR_TYPE_COLLECTION, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
- _gcr_initialize_library ();
}
/* -----------------------------------------------------------------------------
diff --git a/gcr/gcr-deprecated-base.h b/gcr/gcr-deprecated-base.h
new file mode 100644
index 0000000..9f81281
--- /dev/null
+++ b/gcr/gcr-deprecated-base.h
@@ -0,0 +1,49 @@
+/*
+ * gnome-keyring
+ *
+ * Copyright (C) 2011 Collabora Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * Author: Stef Walter <stefw collabora co uk>
+ */
+
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
+#endif
+
+#ifndef GCR_BASE_DEPRECATED_H_
+#define GCR_BASE_DEPRECATED_H_
+#ifndef GCR_DISABLE_DEPRECATED
+
+#include <glib.h>
+
+#include "gcr-parser.h"
+#include "gcr-simple-collection.h"
+
+G_BEGIN_DECLS
+
+#define GCR_ERROR (gcr_error_get_domain ())
+
+GQuark gcr_error_get_domain (void) G_GNUC_CONST;
+
+gboolean gcr_simple_collection_contains (GcrSimpleCollection *self,
+ GObject *object);
+
+G_END_DECLS
+
+#endif /* GCR_DISABLE_DEPRECATED */
+#endif /* GCRTYPES_H_ */
diff --git a/gcr/gcr-deprecated.h b/gcr/gcr-deprecated.h
index 3eb0a62..b3bfad7 100644
--- a/gcr/gcr-deprecated.h
+++ b/gcr/gcr-deprecated.h
@@ -21,27 +21,22 @@
* Author: Stef Walter <stefw collabora co uk>
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
-
#ifndef GCR_DEPRECATED_H_
#define GCR_DEPRECATED_H_
+#ifndef GCR_DISABLE_DEPRECATED
#include <glib.h>
-#include <gck/gck.h>
-
+#include "gcr-certificate-basics-widget.h"
+#include "gcr-certificate-details-widget.h"
#include "gcr-importer.h"
-#include "gcr-parser.h"
-#include "gcr-simple-collection.h"
#include "gcr-viewer.h"
-#ifndef GCR_DISABLE_DEPRECATED
-
-#include "gcr-certificate-basics-widget.h"
-#include "gcr-certificate-details-widget.h"
+G_BEGIN_DECLS
void gcr_renderer_render (GcrRenderer *self,
GcrViewer *viewer);
@@ -51,15 +46,7 @@ GcrParser* gcr_importer_get_parser (GcrImporter *self
void gcr_importer_set_parser (GcrImporter *self,
GcrParser *parser);
-#define GCR_ERROR (gcr_error_get_domain ())
-
-GQuark gcr_error_get_domain (void) G_GNUC_CONST;
-
-gboolean gcr_simple_collection_contains (GcrSimpleCollection *self,
- GObject *object);
-
-#endif /* GCR_DISABLE_DEPRECATED */
-
G_END_DECLS
+#endif /* GCR_DISABLE_DEPRECATED */
#endif /* GCRTYPES_H_ */
diff --git a/gcr/gcr-enum-types.c.template b/gcr/gcr-enum-types.c.template
index 685ceb7..d609535 100644
--- a/gcr/gcr-enum-types.c.template
+++ b/gcr/gcr-enum-types.c.template
@@ -1,13 +1,21 @@
/*** BEGIN file-header ***/
-#include "gcr.h"
+
+#include <glib-object.h>
+
+#ifndef GCR_COMPILATION
+#define GCR_COMPILATION
+#endif
/*** END file-header ***/
/*** BEGIN file-production ***/
+#include "@filename@"
/* enumerations from "@filename@" */
/*** END file-production ***/
/*** BEGIN value-header ***/
+GType @enum_name _get_type (void) G_GNUC_CONST;
+
GType
@enum_name _get_type (void)
{
diff --git a/gcr/gcr-enum-types.h.template b/gcr/gcr-enum-types.h.template
index c1b4f41..91d5a60 100644
--- a/gcr/gcr-enum-types.h.template
+++ b/gcr/gcr-enum-types.h.template
@@ -1,5 +1,5 @@
/*** BEGIN file-header ***/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
#error "Only <gcr/gcr.h> can be included directly."
#endif
diff --git a/gcr/gcr-failure-renderer.h b/gcr/gcr-failure-renderer.h
index 5ea2f09..0e8311e 100644
--- a/gcr/gcr-failure-renderer.h
+++ b/gcr/gcr-failure-renderer.h
@@ -19,8 +19,8 @@
* Author: Stef Walter <stefw collabora co uk>
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef __GCR_FAILURE_RENDERER_H__
diff --git a/gcr/gcr-gnupg-collection.h b/gcr/gcr-gnupg-collection.h
index 1a457e7..ab52a1e 100644
--- a/gcr/gcr-gnupg-collection.h
+++ b/gcr/gcr-gnupg-collection.h
@@ -24,7 +24,7 @@
#ifndef GCR_GNUPG_COLLECTION_H
#define GCR_GNUPG_COLLECTION_H
-#include "gcr.h"
+#include "gcr-base.h"
#include "gcr-collection.h"
#include <glib-object.h>
diff --git a/gcr/gcr-gnupg-key.c b/gcr/gcr-gnupg-key.c
index a382c64..893ab27 100644
--- a/gcr/gcr-gnupg-key.c
+++ b/gcr/gcr-gnupg-key.c
@@ -27,7 +27,6 @@
#include "gck/gck.h"
-#include <gdk/gdk.h>
#include <glib/gi18n-lib.h>
enum {
diff --git a/gcr/gcr-gnupg-key.h b/gcr/gcr-gnupg-key.h
index 745bec2..2564edb 100644
--- a/gcr/gcr-gnupg-key.h
+++ b/gcr/gcr-gnupg-key.h
@@ -19,15 +19,14 @@
* Author: Stef Walter <stefw collabora co uk>
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef GCR_GNUPG_KEY_H
#define GCR_GNUPG_KEY_H
#include <glib-object.h>
-#include <gtk/gtk.h>
#include "gcr-column.h"
#include "gcr-types.h"
diff --git a/gcr/gcr-gnupg-process.h b/gcr/gcr-gnupg-process.h
index ecbab6d..143f36d 100644
--- a/gcr/gcr-gnupg-process.h
+++ b/gcr/gcr-gnupg-process.h
@@ -24,7 +24,7 @@
#ifndef GCR_GNUPG_PROCESS_H
#define GCR_GNUPG_PROCESS_H
-#include "gcr.h"
+#include "gcr-base.h"
#include "gcr-record.h"
#include <glib-object.h>
diff --git a/gcr/gcr-gnupg-util.h b/gcr/gcr-gnupg-util.h
index 49b0e4f..5910bfb 100644
--- a/gcr/gcr-gnupg-util.h
+++ b/gcr/gcr-gnupg-util.h
@@ -19,8 +19,8 @@
* Author: Stef Walter <stefw collabora co uk>
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef GCR_GNUPG_UTIL_H
diff --git a/gcr/gcr-import-dialog.c b/gcr/gcr-import-dialog.c
index aa1c406..1196035 100644
--- a/gcr/gcr-import-dialog.c
+++ b/gcr/gcr-import-dialog.c
@@ -272,8 +272,6 @@ _gcr_import_dialog_class_init (GcrImportDialogClass *klass)
g_object_class_install_property (gobject_class, PROP_SECONDARY_TEXT,
g_param_spec_string ("secondary-text", "Secondary Text", "Dialog secondary text",
NULL, G_PARAM_READWRITE));
-
- _gcr_initialize_library ();
}
/* -----------------------------------------------------------------------------
diff --git a/gcr/gcr-importer.c b/gcr/gcr-importer.c
index 01b26c4..1f0f6dc 100644
--- a/gcr/gcr-importer.c
+++ b/gcr/gcr-importer.c
@@ -690,8 +690,6 @@ gcr_importer_class_init (GcrImporterClass *klass)
G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GcrImporterClass, imported),
NULL, NULL, g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, GCK_TYPE_OBJECT);
-
- _gcr_initialize_library ();
}
static gpointer
diff --git a/gcr/gcr-importer.h b/gcr/gcr-importer.h
index 077ce1a..892b5d4 100644
--- a/gcr/gcr-importer.h
+++ b/gcr/gcr-importer.h
@@ -19,8 +19,8 @@
* 02111-1307, USA.
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef __GCR_IMPORTER_H__
diff --git a/gcr/gcr-key-renderer.h b/gcr/gcr-key-renderer.h
index 5d09aeb..1c79644 100644
--- a/gcr/gcr-key-renderer.h
+++ b/gcr/gcr-key-renderer.h
@@ -17,8 +17,8 @@
* 02111-1307, USA.
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef __GCR_KEY_RENDERER_H__
diff --git a/gcr/gcr-key-widget.h b/gcr/gcr-key-widget.h
index 2e3b7b6..4901aad 100644
--- a/gcr/gcr-key-widget.h
+++ b/gcr/gcr-key-widget.h
@@ -17,8 +17,8 @@
* 02111-1307, USA.
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef __GCR_KEY_WIDGET_H__
diff --git a/gcr/gcr-library.c b/gcr/gcr-library.c
index 892899f..6f31753 100644
--- a/gcr/gcr-library.c
+++ b/gcr/gcr-library.c
@@ -21,13 +21,11 @@
#include "config.h"
-#include "gcr.h"
-#include "gcr-certificate-renderer.h"
+#include "gcr-base.h"
#define DEBUG_FLAG GCR_DEBUG_LIBRARY
#include "gcr-debug.h"
#include "gcr-internal.h"
#include "gcr-library.h"
-#include "gcr-key-renderer.h"
#include "gcr-types.h"
#include "egg/egg-error.h"
@@ -109,72 +107,6 @@ gcr_error_get_domain (void)
}
/* -----------------------------------------------------------------------------
- * MEMORY
- */
-
-static gboolean do_warning = TRUE;
-#define WARNING "couldn't allocate secure memory to keep passwords " \
- "and or keys from being written to the disk"
-
-#define ABORTMSG "The GNOME_KEYRING_PARANOID environment variable was set. " \
- "Exiting..."
-
-static G_LOCK_DEFINE (memory_lock);
-
-/*
- * These are called from egg-secure-memory.c to provide appropriate
- * locking for memory between threads
- */
-
-void
-egg_memory_lock (void)
-{
- G_LOCK (memory_lock);
-}
-
-void
-egg_memory_unlock (void)
-{
- G_UNLOCK (memory_lock);
-}
-
-void*
-egg_memory_fallback (void *p, size_t sz)
-{
- const gchar *env;
-
- /* We were asked to free memory */
- if (!sz) {
- g_free (p);
- return NULL;
- }
-
- /* We were asked to allocate */
- if (!p) {
- if (do_warning) {
- g_message (WARNING);
- do_warning = FALSE;
- }
-
- env = g_getenv ("GNOME_KEYRING_PARANOID");
- if (env && *env)
- g_error (ABORTMSG);
-
- return g_malloc0 (sz);
- }
-
- /*
- * Reallocation is a bit of a gray area, as we can be asked
- * by external libraries (like libgcrypt) to reallocate a
- * non-secure block into secure memory. We cannot satisfy
- * this request (as we don't know the size of the original
- * block) so we just try our best here.
- */
-
- return g_realloc (p, sz);
-}
-
-/* -----------------------------------------------------------------------------
* INITIALIZATION
*/
@@ -189,9 +121,6 @@ _gcr_initialize_library (void)
/* Initialize the libgcrypt library if needed */
egg_libgcrypt_initialize ();
- g_type_class_unref (g_type_class_ref (GCR_TYPE_CERTIFICATE_RENDERER));
- g_type_class_unref (g_type_class_ref (GCR_TYPE_KEY_RENDERER));
-
_gcr_debug ("initialized library");
}
diff --git a/gcr/gcr-library.h b/gcr/gcr-library.h
index de0f44d..88e13a3 100644
--- a/gcr/gcr-library.h
+++ b/gcr/gcr-library.h
@@ -21,8 +21,8 @@
* Author: Stef Walter <stefw collabora co uk>
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef GCR_LIBRARY_H_
diff --git a/gcr/gcr-list-selector.c b/gcr/gcr-list-selector.c
index 17b7d8a..b7e6beb 100644
--- a/gcr/gcr-list-selector.c
+++ b/gcr/gcr-list-selector.c
@@ -352,8 +352,6 @@ gcr_list_selector_class_init (GcrListSelectorClass *klass)
g_object_class_install_property (gobject_class, PROP_COLLECTION,
g_param_spec_object ("collection", "Collection", "Collection to select from",
GCR_TYPE_COLLECTION, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
- _gcr_initialize_library ();
}
/* -----------------------------------------------------------------------------
diff --git a/gcr/gcr-memory.c b/gcr/gcr-memory.c
new file mode 100644
index 0000000..04d216d
--- /dev/null
+++ b/gcr/gcr-memory.c
@@ -0,0 +1,92 @@
+/*
+ * gnome-keyring
+ *
+ * Copyright (C) 2008 Stefan Walter
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "egg/egg-secure-memory.h"
+
+#include <glib.h>
+
+/* -----------------------------------------------------------------------------
+ * MEMORY
+ */
+
+static gboolean do_warning = TRUE;
+#define WARNING "couldn't allocate secure memory to keep passwords " \
+ "and or keys from being written to the disk"
+
+#define ABORTMSG "The GNOME_KEYRING_PARANOID environment variable was set. " \
+ "Exiting..."
+
+static G_LOCK_DEFINE (memory_lock);
+
+/*
+ * These are called from egg-secure-memory.c to provide appropriate
+ * locking for memory between threads
+ */
+
+void
+egg_memory_lock (void)
+{
+ G_LOCK (memory_lock);
+}
+
+void
+egg_memory_unlock (void)
+{
+ G_UNLOCK (memory_lock);
+}
+
+void*
+egg_memory_fallback (void *p, size_t sz)
+{
+ const gchar *env;
+
+ /* We were asked to free memory */
+ if (!sz) {
+ g_free (p);
+ return NULL;
+ }
+
+ /* We were asked to allocate */
+ if (!p) {
+ if (do_warning) {
+ g_message (WARNING);
+ do_warning = FALSE;
+ }
+
+ env = g_getenv ("GNOME_KEYRING_PARANOID");
+ if (env && *env)
+ g_error (ABORTMSG);
+
+ return g_malloc0 (sz);
+ }
+
+ /*
+ * Reallocation is a bit of a gray area, as we can be asked
+ * by external libraries (like libgcrypt) to reallocate a
+ * non-secure block into secure memory. We cannot satisfy
+ * this request (as we don't know the size of the original
+ * block) so we just try our best here.
+ */
+
+ return g_realloc (p, sz);
+}
diff --git a/gcr/gcr-parser.h b/gcr/gcr-parser.h
index 91bd428..1887fd4 100644
--- a/gcr/gcr-parser.h
+++ b/gcr/gcr-parser.h
@@ -19,8 +19,8 @@
* 02111-1307, USA.
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef __GCR_PARSER_H__
diff --git a/gcr/gcr-pkcs11-certificate.h b/gcr/gcr-pkcs11-certificate.h
index e7ed464..04c15b3 100644
--- a/gcr/gcr-pkcs11-certificate.h
+++ b/gcr/gcr-pkcs11-certificate.h
@@ -21,8 +21,8 @@
* Author: Stef Walter <stefw collabora co uk>
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef __GCR_PKCS11_CERTIFICATE_H__
diff --git a/gcr/gcr-record.h b/gcr/gcr-record.h
index 937ef75..1fe2bce 100644
--- a/gcr/gcr-record.h
+++ b/gcr/gcr-record.h
@@ -21,8 +21,8 @@
* Author: Stef Walter <stefw collabora co uk>
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef GCR_RECORD_H
diff --git a/gcr/gcr-simple-certificate.h b/gcr/gcr-simple-certificate.h
index 59bd541..79f84e1 100644
--- a/gcr/gcr-simple-certificate.h
+++ b/gcr/gcr-simple-certificate.h
@@ -19,14 +19,14 @@
* 02111-1307, USA.
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef __GCR_SIMPLE_CERTIFICATE_H__
#define __GCR_SIMPLE_CERTIFICATE_H__
-#include "gcr.h"
+#include "gcr-base.h"
#include <glib-object.h>
diff --git a/gcr/gcr-simple-collection.c b/gcr/gcr-simple-collection.c
index 17e1f1c..05c17ae 100644
--- a/gcr/gcr-simple-collection.c
+++ b/gcr/gcr-simple-collection.c
@@ -22,7 +22,7 @@
#include "config.h"
#include "gcr-collection.h"
-#include "gcr-deprecated.h"
+#include "gcr-deprecated-base.h"
#include "gcr-internal.h"
#include "gcr-simple-collection.h"
@@ -103,7 +103,6 @@ gcr_simple_collection_class_init (GcrSimpleCollectionClass *klass)
gobject_class->dispose = gcr_simple_collection_dispose;
gobject_class->finalize = gcr_simple_collection_finalize;
g_type_class_add_private (gobject_class, sizeof (GcrSimpleCollectionPrivate));
- _gcr_initialize_library ();
}
static guint
diff --git a/gcr/gcr-simple-collection.h b/gcr/gcr-simple-collection.h
index 52def96..e78c48c 100644
--- a/gcr/gcr-simple-collection.h
+++ b/gcr/gcr-simple-collection.h
@@ -22,7 +22,7 @@
#ifndef __GCR_SIMPLE_COLLECTION_H__
#define __GCR_SIMPLE_COLLECTION_H__
-#include "gcr.h"
+#include "gcr-base.h"
#include "gcr-collection.h"
#include <glib-object.h>
diff --git a/gcr/gcr-tree-selector.c b/gcr/gcr-tree-selector.c
index 0bcb8ec..11836b4 100644
--- a/gcr/gcr-tree-selector.c
+++ b/gcr/gcr-tree-selector.c
@@ -276,8 +276,6 @@ gcr_tree_selector_class_init (GcrTreeSelectorClass *klass)
g_object_class_install_property (gobject_class, PROP_COLUMNS,
g_param_spec_pointer ("columns", "Columns", "Columns to display in selector",
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
- _gcr_initialize_library ();
}
/* -----------------------------------------------------------------------------
diff --git a/gcr/gcr-trust.c b/gcr/gcr-trust.c
index 7191363..eaa9800 100644
--- a/gcr/gcr-trust.c
+++ b/gcr/gcr-trust.c
@@ -23,7 +23,7 @@
#include "config.h"
-#include "gcr.h"
+#include "gcr-base.h"
#define DEBUG_FLAG GCR_DEBUG_TRUST
#include "gcr-debug.h"
#include "gcr-types.h"
diff --git a/gcr/gcr-trust.h b/gcr/gcr-trust.h
index 3c7e8a9..79db47f 100644
--- a/gcr/gcr-trust.h
+++ b/gcr/gcr-trust.h
@@ -19,8 +19,8 @@
* 02111-1307, USA.
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef __GCR_TRUST_H__
diff --git a/gcr/gcr-types.h b/gcr/gcr-types.h
index ba6d85c..23635ca 100644
--- a/gcr/gcr-types.h
+++ b/gcr/gcr-types.h
@@ -21,8 +21,8 @@
* Author: Stef Walter <stefw collabora co uk>
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef GCRTYPES_H_
diff --git a/gcr/gcr-union-collection.h b/gcr/gcr-union-collection.h
index 46d8a04..4628799 100644
--- a/gcr/gcr-union-collection.h
+++ b/gcr/gcr-union-collection.h
@@ -24,7 +24,7 @@
#ifndef __GCR_UNION_COLLECTION_H__
#define __GCR_UNION_COLLECTION_H__
-#include "gcr.h"
+#include "gcr-base.h"
#include "gcr-collection.h"
#include <glib-object.h>
diff --git a/gcr/gcr-unlock-options-widget.h b/gcr/gcr-unlock-options-widget.h
index ef4edc7..ca274f5 100644
--- a/gcr/gcr-unlock-options-widget.h
+++ b/gcr/gcr-unlock-options-widget.h
@@ -17,8 +17,8 @@
* 02111-1307, USA.
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef __GCR_UNLOCK_OPTIONS_WIDGET_H__
diff --git a/gcr/gcr-unlock-renderer.h b/gcr/gcr-unlock-renderer.h
index 54e0e46..739133a 100644
--- a/gcr/gcr-unlock-renderer.h
+++ b/gcr/gcr-unlock-renderer.h
@@ -19,8 +19,8 @@
* Author: Stef Walter <stefw collabora co uk>
*/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
#endif
#ifndef __GCR_UNLOCK_RENDERER_H__
diff --git a/gcr/gcr.h b/gcr/gcr.h
index cdb53ec..b3078ee 100644
--- a/gcr/gcr.h
+++ b/gcr/gcr.h
@@ -30,37 +30,27 @@
#include <glib.h>
-#define __GCR_H_INSIDE__
+#include "gcr-base.h"
-#include "gcr-types.h"
+#define __GCR_INSIDE_HEADER__
-#include "gcr-certificate.h"
-#include "gcr-certificate-chain.h"
#include "gcr-certificate-renderer.h"
#include "gcr-certificate-widget.h"
#include "gcr-collection-model.h"
#include "gcr-column.h"
#include "gcr-combo-selector.h"
#include "gcr-deprecated.h"
-#include "gcr-enum-types.h"
#include "gcr-key-renderer.h"
#include "gcr-key-widget.h"
#include "gcr-importer.h"
-#include "gcr-library.h"
#include "gcr-list-selector.h"
-#include "gcr-parser.h"
#include "gcr-renderer.h"
-#include "gcr-pkcs11-certificate.h"
-#include "gcr-simple-certificate.h"
-#include "gcr-simple-collection.h"
#include "gcr-tree-selector.h"
-#include "gcr-trust.h"
#include "gcr-union-collection.h"
-#include "gcr-unlock-options.h"
#include "gcr-unlock-options-widget.h"
#include "gcr-viewer.h"
#include "gcr-viewer-window.h"
-#undef __GCR_H_INSIDE__
+#undef __GCR_INSIDE_HEADER__
#endif /* __GCR_H__ */
diff --git a/gcr/gcr.pc.in b/gcr/gcr.pc.in
index bb8f8cd..47f8935 100644
--- a/gcr/gcr.pc.in
+++ b/gcr/gcr.pc.in
@@ -11,6 +11,6 @@ pkcs11standalonedir= pkcs11standalonedir@
Name: gcr- GCR_MAJOR@
Description: GObject and GUI library for high level crypto parsing and display
Version: @VERSION@
-Requires: glib-2.0 gtk+-3.0 libtasn1 gck- GCK_MAJOR@ p11-kit-1
+Requires: glib-2.0 gtk+-3.0 gcr-base- GCR_MAJOR@ gck- GCK_MAJOR@ p11-kit-1
Libs: -L${libdir} -lgcr- GCR_MAJOR@
Cflags: -I${includedir}/gcr- GCR_MAJOR@
diff --git a/gcr/gcr.symbols b/gcr/gcr.symbols
index 0769e82..5781424 100644
--- a/gcr/gcr.symbols
+++ b/gcr/gcr.symbols
@@ -6,47 +6,10 @@ gcr_certificate_basics_widget_get_certificate
gcr_certificate_basics_widget_get_type
gcr_certificate_basics_widget_new
gcr_certificate_basics_widget_set_certificate
-gcr_certificate_compare
-gcr_certificate_chain_add
-gcr_certificate_chain_build
-gcr_certificate_chain_build_async
-gcr_certificate_chain_build_finish
-gcr_certificate_chain_flags_get_type
-gcr_certificate_chain_get_anchor
-gcr_certificate_chain_get_certificate
-gcr_certificate_chain_get_endpoint
-gcr_certificate_chain_get_length
-gcr_certificate_chain_get_status
-gcr_certificate_chain_get_type
-gcr_certificate_chain_new
-gcr_certificate_chain_status_get_type
gcr_certificate_details_widget_get_certificate
gcr_certificate_details_widget_get_type
gcr_certificate_details_widget_new
gcr_certificate_details_widget_set_certificate
-gcr_certificate_get_columns
-gcr_certificate_get_der_data
-gcr_certificate_get_expiry_date
-gcr_certificate_get_fingerprint
-gcr_certificate_get_fingerprint_hex
-gcr_certificate_get_icon
-gcr_certificate_get_issued_date
-gcr_certificate_get_issuer_cn
-gcr_certificate_get_issuer_dn
-gcr_certificate_get_issuer_part
-gcr_certificate_get_issuer_raw
-gcr_certificate_get_key_size
-gcr_certificate_get_serial_number
-gcr_certificate_get_serial_number_hex
-gcr_certificate_get_subject_cn
-gcr_certificate_get_subject_dn
-gcr_certificate_get_subject_part
-gcr_certificate_get_subject_raw
-gcr_certificate_get_type
-gcr_certificate_mixin_class_init
-gcr_certificate_mixin_comparable_init
-gcr_certificate_mixin_get_property
-gcr_certificate_is_issuer
gcr_certificate_renderer_get_attributes
gcr_certificate_renderer_get_certificate
gcr_certificate_renderer_get_type
@@ -60,12 +23,6 @@ gcr_certificate_widget_get_type
gcr_certificate_widget_new
gcr_certificate_widget_set_attributes
gcr_certificate_widget_set_certificate
-gcr_collection_contains
-gcr_collection_emit_added
-gcr_collection_emit_removed
-gcr_collection_get_length
-gcr_collection_get_objects
-gcr_collection_get_type
gcr_collection_model_change_selected
gcr_collection_model_column_for_selected
gcr_collection_model_get_collection
@@ -85,13 +42,6 @@ gcr_combo_selector_get_selected
gcr_combo_selector_get_type
gcr_combo_selector_new
gcr_combo_selector_set_selected
-gcr_comparable_compare
-gcr_comparable_get_type
-gcr_comparable_memcmp
-gcr_data_error_get_domain
-gcr_data_error_get_type
-gcr_data_format_get_type
-gcr_error_get_domain
gcr_importer_get_parser
gcr_importer_get_prompt_behavior
gcr_importer_get_slot
@@ -119,35 +69,6 @@ gcr_list_selector_get_selected
gcr_list_selector_get_type
gcr_list_selector_new
gcr_list_selector_set_selected
-gcr_parser_add_password
-gcr_parser_format_disable
-gcr_parser_format_enable
-gcr_parser_format_supported
-gcr_parser_get_parsed_attributes
-gcr_parser_get_parsed_block
-gcr_parser_get_parsed_description
-gcr_parser_get_parsed_label
-gcr_parser_get_type
-gcr_parser_new
-gcr_parser_parse_data
-gcr_parser_parse_stream
-gcr_parser_parse_stream_async
-gcr_parser_parse_stream_finish
-gcr_pkcs11_add_module
-gcr_pkcs11_add_module_from_file
-gcr_pkcs11_certificate_get_attributes
-gcr_pkcs11_certificate_get_type
-gcr_pkcs11_certificate_lookup_issuer
-gcr_pkcs11_certificate_lookup_issuer_async
-gcr_pkcs11_certificate_lookup_issuer_finish
-gcr_pkcs11_get_modules
-gcr_pkcs11_get_trust_lookup_slots
-gcr_pkcs11_get_trust_lookup_uris
-gcr_pkcs11_get_trust_store_slot
-gcr_pkcs11_get_trust_store_uri
-gcr_pkcs11_set_modules
-gcr_pkcs11_set_trust_lookup_uris
-gcr_pkcs11_set_trust_store_uri
gcr_renderer_create
gcr_renderer_emit_data_changed
gcr_renderer_get_type
@@ -156,39 +77,12 @@ gcr_renderer_register
gcr_renderer_register_well_known
gcr_renderer_render
gcr_renderer_render_view
-gcr_simple_certificate_get_type
-gcr_simple_certificate_new
-gcr_simple_certificate_new_static
-gcr_simple_collection_add
-gcr_simple_collection_contains
-gcr_simple_collection_get_type
-gcr_simple_collection_new
-gcr_simple_collection_remove
gcr_tree_selector_get_collection
gcr_tree_selector_get_columns
gcr_tree_selector_get_selected
gcr_tree_selector_get_type
gcr_tree_selector_new
gcr_tree_selector_set_selected
-gcr_trust_add_pinned_certificate
-gcr_trust_add_pinned_certificate_async
-gcr_trust_add_pinned_certificate_finish
-gcr_trust_is_certificate_anchored
-gcr_trust_is_certificate_anchored_async
-gcr_trust_is_certificate_anchored_finish
-gcr_trust_is_certificate_pinned
-gcr_trust_is_certificate_pinned_async
-gcr_trust_is_certificate_pinned_finish
-gcr_trust_remove_pinned_certificate
-gcr_trust_remove_pinned_certificate_async
-gcr_trust_remove_pinned_certificate_finish
-gcr_union_collection_add
-gcr_union_collection_get_type
-gcr_union_collection_have
-gcr_union_collection_new
-gcr_union_collection_remove
-gcr_union_collection_size
-gcr_union_collection_take
gcr_unlock_options_widget_get_choice
gcr_unlock_options_widget_get_label
gcr_unlock_options_widget_get_sensitive
diff --git a/gcr/tests/frob-parser.c b/gcr/tests/frob-parser.c
index 287e914..847d56d 100644
--- a/gcr/tests/frob-parser.c
+++ b/gcr/tests/frob-parser.c
@@ -23,9 +23,7 @@
#include "config.h"
-#include "gcr/gcr.h"
-
-#include <gtk/gtk.h>
+#include "gcr/gcr-base.h"
#include <unistd.h>
#include <string.h>
@@ -81,7 +79,7 @@ main(int argc, char *argv[])
const gchar *filename;
gchar *path;
- gtk_init (&argc, &argv);
+ g_type_init ();
g_set_prgname ("frob-parser");
if (argc != 2) {
diff --git a/gcr/tests/test-certificate-chain.c b/gcr/tests/test-certificate-chain.c
index 39d7400..3bccfff 100644
--- a/gcr/tests/test-certificate-chain.c
+++ b/gcr/tests/test-certificate-chain.c
@@ -22,7 +22,7 @@
#include "config.h"
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
#include "gcr/gcr-internal.h"
#include "egg/egg-asn1x.h"
diff --git a/gcr/tests/test-certificate.c b/gcr/tests/test-certificate.c
index aed032d..dec2b52 100644
--- a/gcr/tests/test-certificate.c
+++ b/gcr/tests/test-certificate.c
@@ -22,7 +22,7 @@
#include "config.h"
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
#include "gcr/gcr-internal.h"
#include "egg/egg-testing.h"
diff --git a/gcr/tests/test-fingerprint.c b/gcr/tests/test-fingerprint.c
index 34b5960..1c5dcf9 100644
--- a/gcr/tests/test-fingerprint.c
+++ b/gcr/tests/test-fingerprint.c
@@ -23,7 +23,7 @@
#include "config.h"
#define GCR_COMPILATION 1
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
#include "gcr/gcr-internal.h"
#include "gcr/gcr-fingerprint.h"
diff --git a/gcr/tests/test-gnupg-collection.c b/gcr/tests/test-gnupg-collection.c
index 0bdec96..686e80f 100644
--- a/gcr/tests/test-gnupg-collection.c
+++ b/gcr/tests/test-gnupg-collection.c
@@ -22,7 +22,7 @@
#include "config.h"
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
#include "gcr/gcr-gnupg-collection.h"
#include "gcr/gcr-gnupg-key.h"
#include "gcr/gcr-record.h"
diff --git a/gcr/tests/test-gnupg-process.c b/gcr/tests/test-gnupg-process.c
index c42a7b1..318b9a4 100644
--- a/gcr/tests/test-gnupg-process.c
+++ b/gcr/tests/test-gnupg-process.c
@@ -22,7 +22,7 @@
#include "config.h"
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
#include "gcr/gcr-gnupg-process.h"
#include "egg/egg-testing.h"
diff --git a/gcr/tests/test-parser.c b/gcr/tests/test-parser.c
index 7d60150..199478e 100644
--- a/gcr/tests/test-parser.c
+++ b/gcr/tests/test-parser.c
@@ -26,7 +26,7 @@
#include "egg/egg-error.h"
#include "egg/egg-secure-memory.h"
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
#include "gcr/gcr-internal.h"
#include "gck/gck.h"
diff --git a/gcr/tests/test-pkcs11-certificate.c b/gcr/tests/test-pkcs11-certificate.c
index 8e5e1f6..dd03371 100644
--- a/gcr/tests/test-pkcs11-certificate.c
+++ b/gcr/tests/test-pkcs11-certificate.c
@@ -25,7 +25,7 @@
#include "egg/egg-asn1x.h"
#include "egg/egg-asn1-defs.h"
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
#include "gcr/gcr-internal.h"
#include "egg/egg-testing.h"
diff --git a/gcr/tests/test-simple-certificate.c b/gcr/tests/test-simple-certificate.c
index f3039cb..6044135 100644
--- a/gcr/tests/test-simple-certificate.c
+++ b/gcr/tests/test-simple-certificate.c
@@ -22,7 +22,7 @@
#include "config.h"
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
#include "gcr/gcr-internal.h"
#include "gck/gck-test.h"
diff --git a/gcr/tests/test-trust.c b/gcr/tests/test-trust.c
index 861651a..1071509 100644
--- a/gcr/tests/test-trust.c
+++ b/gcr/tests/test-trust.c
@@ -22,7 +22,7 @@
#include "config.h"
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
#include "gcr/gcr-internal.h"
#include "gck/gck-mock.h"
diff --git a/gcr/tests/test-util.c b/gcr/tests/test-util.c
index 8afdd5f..96819ac 100644
--- a/gcr/tests/test-util.c
+++ b/gcr/tests/test-util.c
@@ -22,7 +22,7 @@
#include "config.h"
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
#include "gcr/gcr-util.h"
#include <errno.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]