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:
parent
73d2214abb
commit
56172ce393
16 changed files with 228 additions and 205 deletions
10
sm/encrypt.c
10
sm/encrypt.c
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue