mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Mainly changes to adjust for the changed KSBA API.
This commit is contained in:
parent
f794da4ad4
commit
dba40e5e45
36 changed files with 217 additions and 246 deletions
|
@ -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.
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue