1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Changes to be used with the new libksba interface.

libgcrypt-1.1.5 is required (cvs or tarball)
This commit is contained in:
Werner Koch 2001-12-18 17:37:48 +00:00
parent 73d2214abb
commit 56172ce393
16 changed files with 228 additions and 205 deletions

View file

@ -247,7 +247,7 @@ encrypt_dek (const DEK dek, KsbaCert cert, char **encval)
{
GCRY_SEXP s_ciph, s_data, s_pkey;
int rc;
char *buf;
KsbaSexp buf;
size_t len;
*encval = NULL;
@ -259,7 +259,13 @@ encrypt_dek (const DEK dek, KsbaCert cert, char **encval)
log_error ("no public key for recipient\n");
return GNUPG_No_Public_Key;
}
rc = gcry_sexp_sscan (&s_pkey, NULL, buf, strlen(buf));
len = gcry_sexp_canon_len (buf, 0, NULL, NULL);
if (!len)
{
log_error ("libksba did not return a proper S-Exp\n");
return GNUPG_Bug;
}
rc = gcry_sexp_sscan (&s_pkey, NULL, buf, len);
xfree (buf); buf = NULL;
if (rc)
{