summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-04-02 20:40:53 +0200
committerStef Walter <stefw@gnome.org>2013-04-03 10:39:09 +0200
commitfcc3a83cc4d540bc2c4096524b5e8003046ba561 (patch)
tree5bc566d6813448f83269797ce05aadeb02cdf36f /tools
parentae7dd1be6d431f25b101bc7e2b3fa373a8cbb47b (diff)
Separate library init from message code
Put library init/uninit code its into their own statically linked library so that they don't get linked into the p11-kit executable. Refactor the message code so that the library initialization can plug in its per thread message buffer. https://bugs.freedesktop.org/show_bug.cgi?id=63046
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am3
-rw-r--r--tools/extract-info.c2
-rw-r--r--tools/extract-jks.c2
-rw-r--r--tools/extract-openssl.c2
-rw-r--r--tools/extract-pem.c2
-rw-r--r--tools/extract-x509.c2
-rw-r--r--tools/extract.c2
-rw-r--r--tools/list.c2
-rw-r--r--tools/save.c2
-rw-r--r--tools/tests/Makefile.am3
-rw-r--r--tools/tests/test-extract.c3
-rw-r--r--tools/tests/test-openssl.c3
-rw-r--r--tools/tests/test-pem.c3
-rw-r--r--tools/tests/test-save.c5
-rw-r--r--tools/tests/test-x509.c3
-rw-r--r--tools/tool.c2
16 files changed, 18 insertions, 23 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index aaf7e99..92c2644 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -27,8 +27,7 @@ p11_kit_CFLAGS = \
p11_kit_LDADD = \
$(top_builddir)/p11-kit/libp11-kit.la \
- $(top_builddir)/common/libp11-library.la \
- $(top_builddir)/common/libp11-compat.la \
+ $(top_builddir)/common/libp11-common.la \
$(LTLIBINTL) \
$(NULL)
diff --git a/tools/extract-info.c b/tools/extract-info.c
index 1c81e07..133b1cd 100644
--- a/tools/extract-info.c
+++ b/tools/extract-info.c
@@ -41,7 +41,7 @@
#include "oid.h"
#include "dict.h"
#include "extract.h"
-#include "library.h"
+#include "message.h"
#include "pkcs11.h"
#include "pkcs11x.h"
#include "x509.h"
diff --git a/tools/extract-jks.c b/tools/extract-jks.c
index d72b1dc..2c78a51 100644
--- a/tools/extract-jks.c
+++ b/tools/extract-jks.c
@@ -40,7 +40,7 @@
#include "debug.h"
#include "extract.h"
#include "hash.h"
-#include "library.h"
+#include "message.h"
#include "save.h"
#include <assert.h>
diff --git a/tools/extract-openssl.c b/tools/extract-openssl.c
index cf387f7..2b8005a 100644
--- a/tools/extract-openssl.c
+++ b/tools/extract-openssl.c
@@ -42,7 +42,7 @@
#include "dict.h"
#include "extract.h"
#include "hash.h"
-#include "library.h"
+#include "message.h"
#include "oid.h"
#include "pem.h"
#include "pkcs11.h"
diff --git a/tools/extract-pem.c b/tools/extract-pem.c
index 4d03208..a1a0865 100644
--- a/tools/extract-pem.c
+++ b/tools/extract-pem.c
@@ -39,7 +39,7 @@
#include "compat.h"
#include "debug.h"
#include "extract.h"
-#include "library.h"
+#include "message.h"
#include "pem.h"
#include "save.h"
diff --git a/tools/extract-x509.c b/tools/extract-x509.c
index c6fe15f..4a0d9c0 100644
--- a/tools/extract-x509.c
+++ b/tools/extract-x509.c
@@ -37,7 +37,7 @@
#include "compat.h"
#include "debug.h"
#include "extract.h"
-#include "library.h"
+#include "message.h"
#include "save.h"
#include <stdlib.h>
diff --git a/tools/extract.c b/tools/extract.c
index cf08ae9..cd0f369 100644
--- a/tools/extract.c
+++ b/tools/extract.c
@@ -39,7 +39,7 @@
#include "debug.h"
#include "extract.h"
#include "iter.h"
-#include "library.h"
+#include "message.h"
#include "oid.h"
#include "pkcs11.h"
#include "pkcs11x.h"
diff --git a/tools/list.c b/tools/list.c
index 8430d78..da99940 100644
--- a/tools/list.c
+++ b/tools/list.c
@@ -44,7 +44,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include "library.h"
+#include "message.h"
#include "p11-kit.h"
#include "tool.h"
#include "uri.h"
diff --git a/tools/save.c b/tools/save.c
index 856a723..f1605a3 100644
--- a/tools/save.c
+++ b/tools/save.c
@@ -37,7 +37,7 @@
#include "buffer.h"
#include "debug.h"
#include "dict.h"
-#include "library.h"
+#include "message.h"
#include "save.h"
#include <sys/stat.h>
diff --git a/tools/tests/Makefile.am b/tools/tests/Makefile.am
index 7936743..f6609ec 100644
--- a/tools/tests/Makefile.am
+++ b/tools/tests/Makefile.am
@@ -24,8 +24,7 @@ LDADD = \
$(top_builddir)/p11-kit/libp11-kit.la \
$(top_builddir)/common/libp11-data.la \
$(top_builddir)/common/libp11-mock.la \
- $(top_builddir)/common/libp11-library.la \
- $(top_builddir)/common/libp11-compat.la \
+ $(top_builddir)/common/libp11-common.la \
$(builddir)/libtestcommon.la \
$(LIBTASN1_LIBS) \
$(LTLIBINTL) \
diff --git a/tools/tests/test-extract.c b/tools/tests/test-extract.c
index 29ee986..74e3c9c 100644
--- a/tools/tests/test-extract.c
+++ b/tools/tests/test-extract.c
@@ -40,7 +40,7 @@
#include "debug.h"
#include "dict.h"
#include "extract.h"
-#include "library.h"
+#include "message.h"
#include "mock.h"
#include "pkcs11.h"
#include "pkcs11x.h"
@@ -524,7 +524,6 @@ main (void)
int ret;
putenv ("P11_KIT_STRICT=1");
- p11_library_init ();
mock_module_init ();
p11_debug_init ();
diff --git a/tools/tests/test-openssl.c b/tools/tests/test-openssl.c
index 77df109..286b4e9 100644
--- a/tools/tests/test-openssl.c
+++ b/tools/tests/test-openssl.c
@@ -41,7 +41,7 @@
#include "debug.h"
#include "dict.h"
#include "extract.h"
-#include "library.h"
+#include "message.h"
#include "mock.h"
#include "pkcs11.h"
#include "pkcs11x.h"
@@ -655,7 +655,6 @@ main (void)
int ret;
putenv ("P11_KIT_STRICT=1");
- p11_library_init ();
mock_module_init ();
p11_debug_init ();
diff --git a/tools/tests/test-pem.c b/tools/tests/test-pem.c
index 5c19455..be79279 100644
--- a/tools/tests/test-pem.c
+++ b/tools/tests/test-pem.c
@@ -40,7 +40,7 @@
#include "debug.h"
#include "dict.h"
#include "extract.h"
-#include "library.h"
+#include "message.h"
#include "mock.h"
#include "pkcs11.h"
#include "pkcs11x.h"
@@ -249,7 +249,6 @@ main (void)
int ret;
putenv ("P11_KIT_STRICT=1");
- p11_library_init ();
mock_module_init ();
p11_debug_init ();
diff --git a/tools/tests/test-save.c b/tools/tests/test-save.c
index 32713ee..d686bd6 100644
--- a/tools/tests/test-save.c
+++ b/tools/tests/test-save.c
@@ -39,7 +39,7 @@
#include "compat.h"
#include "debug.h"
#include "dict.h"
-#include "library.h"
+#include "message.h"
#include "save.h"
#include "test.h"
@@ -537,7 +537,8 @@ main (void)
CuSuite* suite = CuSuiteNew ();
int ret;
- p11_library_init ();
+ putenv ("P11_KIT_STRICT=1");
+ p11_debug_init ();
SUITE_ADD_TEST (suite, test_file_write);
SUITE_ADD_TEST (suite, test_file_exists);
diff --git a/tools/tests/test-x509.c b/tools/tests/test-x509.c
index 7cf9787..138e6b7 100644
--- a/tools/tests/test-x509.c
+++ b/tools/tests/test-x509.c
@@ -40,7 +40,7 @@
#include "debug.h"
#include "dict.h"
#include "extract.h"
-#include "library.h"
+#include "message.h"
#include "mock.h"
#include "pkcs11.h"
#include "pkcs11x.h"
@@ -259,7 +259,6 @@ main (void)
int ret;
putenv ("P11_KIT_STRICT=1");
- p11_library_init ();
mock_module_init ();
p11_debug_init ();
diff --git a/tools/tool.c b/tools/tool.c
index fa68eed..9ec41a4 100644
--- a/tools/tool.c
+++ b/tools/tool.c
@@ -37,7 +37,7 @@
#include "buffer.h"
#include "compat.h"
#include "debug.h"
-#include "library.h"
+#include "message.h"
#include "p11-kit.h"
#include <assert.h>