summaryrefslogtreecommitdiffstats
path: root/kbx
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2003-11-12 16:17:44 +0100
committerWerner Koch <wk@gnupg.org>2003-11-12 16:17:44 +0100
commitdba40e5e45e80896dc8864c2ae97f026069e2906 (patch)
tree724a2e0f0f73ef66cf6284adb7e2463785874ffe /kbx
parent2003-11-10 Moritz Schulte <mo@g10code.com> (diff)
downloadgnupg2-dba40e5e45e80896dc8864c2ae97f026069e2906.tar.xz
gnupg2-dba40e5e45e80896dc8864c2ae97f026069e2906.zip
Mainly changes to adjust for the changed KSBA API.
Diffstat (limited to 'kbx')
-rw-r--r--kbx/ChangeLog6
-rw-r--r--kbx/keybox-blob.c1
-rw-r--r--kbx/keybox-defs.h7
-rw-r--r--kbx/keybox-search.c12
4 files changed, 17 insertions, 9 deletions
diff --git a/kbx/ChangeLog b/kbx/ChangeLog
index af6e6b016..07a198200 100644
--- a/kbx/ChangeLog
+++ b/kbx/ChangeLog
@@ -1,3 +1,9 @@
+2003-11-12 Werner Koch <wk@gnupg.org>
+
+ Adjusted for API changes in Libksba.
+
+ * keybox-blob.c: Include time.h
+
2003-06-03 Werner Koch <wk@gnupg.org>
Changed all error codes in all files to the new libgpg-error scheme.
diff --git a/kbx/keybox-blob.c b/kbx/keybox-blob.c
index 5ad1d2610..ca36d6264 100644
--- a/kbx/keybox-blob.c
+++ b/kbx/keybox-blob.c
@@ -110,6 +110,7 @@ X.509 specific are noted like [X.509: xxx]
#include <string.h>
#include <errno.h>
#include <assert.h>
+#include <time.h>
#include "keybox-defs.h"
#include <gcrypt.h>
diff --git a/kbx/keybox-defs.h b/kbx/keybox-defs.h
index e4578d76b..fcae64c25 100644
--- a/kbx/keybox-defs.h
+++ b/kbx/keybox-defs.h
@@ -21,14 +21,15 @@
#ifndef KEYBOX_DEFS_H
#define KEYBOX_DEFS_H 1
-#include <sys/types.h> /* off_t */
-#include "keybox.h"
-
#ifdef GPG_ERR_SOURCE_DEFAULT
#error GPG_ERR_SOURCE_DEFAULT already defined
#endif
#define GPG_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_KEYBOX
+
#include <gpg-error.h>
+#include <sys/types.h> /* off_t */
+#include "keybox.h"
+
#ifndef HAVE_BYTE_TYPEDEF
diff --git a/kbx/keybox-search.c b/kbx/keybox-search.c
index 231a32d42..ff95815a2 100644
--- a/kbx/keybox-search.c
+++ b/kbx/keybox-search.c
@@ -778,9 +778,9 @@ keybox_get_cert (KEYBOX_HANDLE hd, KsbaCert *r_cert)
if (cert_off+cert_len > length)
return gpg_error (GPG_ERR_TOO_SHORT);
- reader = ksba_reader_new ();
- if (!reader)
- return gpg_error (GPG_ERR_ENOMEM);
+ rc = ksba_reader_new (&reader);
+ if (rc)
+ return rc;
rc = ksba_reader_set_mem (reader, buffer+cert_off, cert_len);
if (rc)
{
@@ -789,11 +789,11 @@ keybox_get_cert (KEYBOX_HANDLE hd, KsbaCert *r_cert)
return gpg_error (GPG_ERR_GENERAL);
}
- cert = ksba_cert_new ();
- if (!cert)
+ rc = ksba_cert_new (&cert);
+ if (rc)
{
ksba_reader_release (reader);
- return gpg_error (GPG_ERR_ENOMEM);
+ return rc;
}
rc = ksba_cert_read_der (cert, reader);