summaryrefslogtreecommitdiff
path: root/cipher/pubkey-util.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-10-22 14:26:53 +0200
committerWerner Koch <wk@gnupg.org>2013-12-05 08:27:48 +0100
commit7bacf1812b55fa78db63abaa1f5a9220e9c6cccc (patch)
tree4141585ef24a83e22e411355585784f24b78f58f /cipher/pubkey-util.c
parent85bb0a98ea5add0296cbcc415d557eaa1f6bd294 (diff)
downloadlibgcrypt-7bacf1812b55fa78db63abaa1f5a9220e9c6cccc.tar.gz
Remove macro hacks for internal vs. external functions. Part 1.
* src/visibility.h: Remove almost all define/undef hacks for symbol visibility. Add macros to detect the use of the public functions. Change all affected functions by prefixing them explicitly with an underscore and change all internal callers to call the underscore prefixed versions. Provide convenience macros from sexp and mpi functions. * src/visibility.c: Change all functions to use only gpg_err_code_t and translate to gpg_error_t only in visibility.c. -- The use of the macro magic made if hard to follow the function calls in the source. It was not easy to see if an internal or external function (as defined by visibility.c) was called. The change is quite large but hopefully makes Libgcrypt easier to maintain. Some function have not yet been fixed; this will be done soon. Because Libgcrypt does no make use of any other libgpg-error using libraries it is useless to always translate between gpg_error_t and gpg_err_code_t (i.e with and w/o error source identifier). This translation has no mostly be moved to the function wrappers in visibility.c. An additional advantage of using gpg_err_code_t is that comparison can be done without using gpg_err_code(). I am sorry for that large patch, but a series of patches would actually be more work to audit. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'cipher/pubkey-util.c')
-rw-r--r--cipher/pubkey-util.c162
1 files changed, 81 insertions, 81 deletions
diff --git a/cipher/pubkey-util.c b/cipher/pubkey-util.c
index 3e0b5ef2..7f3fd824 100644
--- a/cipher/pubkey-util.c
+++ b/cipher/pubkey-util.c
@@ -62,9 +62,9 @@ _gcry_pk_util_parse_flaglist (gcry_sexp_t list,
int flags = 0;
int igninvflag = 0;
- for (i=list?gcry_sexp_length (list)-1:0; i > 0; i--)
+ for (i = list ? sexp_length (list)-1 : 0; i > 0; i--)
{
- s = gcry_sexp_nth_data (list, i, &n);
+ s = sexp_nth_data (list, i, &n);
if (!s)
continue; /* Not a data element. */
@@ -225,7 +225,7 @@ get_hash_algo (const char *s, size_t n)
{
memcpy (tmpname, s, n);
tmpname[n] = 0;
- algo = gcry_md_map_name (tmpname);
+ algo = _gcry_md_map_name (tmpname);
gcry_free (tmpname);
}
}
@@ -259,21 +259,21 @@ _gcry_pk_util_get_nbits (gcry_sexp_t list, unsigned int *r_nbits)
*r_nbits = 0;
- list = gcry_sexp_find_token (list, "nbits", 0);
+ list = sexp_find_token (list, "nbits", 0);
if (!list)
return 0; /* No NBITS found. */
- s = gcry_sexp_nth_data (list, 1, &n);
+ s = sexp_nth_data (list, 1, &n);
if (!s || n >= DIM (buf) - 1 )
{
/* NBITS given without a cdr. */
- gcry_sexp_release (list);
+ sexp_release (list);
return GPG_ERR_INV_OBJ;
}
memcpy (buf, s, n);
buf[n] = 0;
*r_nbits = (unsigned int)strtoul (buf, NULL, 0);
- gcry_sexp_release (list);
+ sexp_release (list);
return 0;
}
@@ -306,24 +306,24 @@ _gcry_pk_util_get_rsa_use_e (gcry_sexp_t list, unsigned long *r_e)
*r_e = 0;
- list = gcry_sexp_find_token (list, "rsa-use-e", 0);
+ list = sexp_find_token (list, "rsa-use-e", 0);
if (!list)
{
*r_e = 65537; /* Not given, use the value generated by old versions. */
return 0;
}
- s = gcry_sexp_nth_data (list, 1, &n);
+ s = sexp_nth_data (list, 1, &n);
if (!s || n >= DIM (buf) - 1 )
{
/* No value or value too large. */
- gcry_sexp_release (list);
+ sexp_release (list);
return GPG_ERR_INV_OBJ;
}
memcpy (buf, s, n);
buf[n] = 0;
*r_e = strtoul (buf, NULL, 0);
- gcry_sexp_release (list);
+ sexp_release (list);
return 0;
}
@@ -350,20 +350,20 @@ _gcry_pk_util_preparse_sigval (gcry_sexp_t s_sig, const char **algo_names,
*r_eccflags = 0;
/* Extract the signature value. */
- l1 = gcry_sexp_find_token (s_sig, "sig-val", 0);
+ l1 = sexp_find_token (s_sig, "sig-val", 0);
if (!l1)
{
rc = GPG_ERR_INV_OBJ; /* Does not contain a signature value object. */
goto leave;
}
- l2 = gcry_sexp_nth (l1, 1);
+ l2 = sexp_nth (l1, 1);
if (!l2)
{
rc = GPG_ERR_NO_OBJ; /* No cadr for the sig object. */
goto leave;
}
- name = _gcry_sexp_nth_string (l2, 0);
+ name = sexp_nth_string (l2, 0);
if (!name)
{
rc = GPG_ERR_INV_OBJ; /* Invalid structure of object. */
@@ -374,15 +374,15 @@ _gcry_pk_util_preparse_sigval (gcry_sexp_t s_sig, const char **algo_names,
/* Skip a "flags" parameter and look again for the algorithm
name. This is not used but here just for the sake of
consistent S-expressions we need to handle it. */
- gcry_sexp_release (l2);
- l2 = gcry_sexp_nth (l1, 2);
+ sexp_release (l2);
+ l2 = sexp_nth (l1, 2);
if (!l2)
{
rc = GPG_ERR_INV_OBJ;
goto leave;
}
gcry_free (name);
- name = _gcry_sexp_nth_string (l2, 0);
+ name = sexp_nth_string (l2, 0);
if (!name)
{
rc = GPG_ERR_INV_OBJ; /* Invalid structure of object. */
@@ -412,8 +412,8 @@ _gcry_pk_util_preparse_sigval (gcry_sexp_t s_sig, const char **algo_names,
leave:
gcry_free (name);
- gcry_sexp_release (l2);
- gcry_sexp_release (l1);
+ sexp_release (l2);
+ sexp_release (l1);
return rc;
}
@@ -453,14 +453,14 @@ _gcry_pk_util_preparse_encval (gcry_sexp_t sexp, const char **algo_names,
*r_parms = NULL;
/* Check that the first element is valid. */
- l1 = gcry_sexp_find_token (sexp, "enc-val" , 0);
+ l1 = sexp_find_token (sexp, "enc-val" , 0);
if (!l1)
{
rc = GPG_ERR_INV_OBJ; /* Does not contain an encrypted value object. */
goto leave;
}
- l2 = gcry_sexp_nth (l1, 1);
+ l2 = sexp_nth (l1, 1);
if (!l2)
{
rc = GPG_ERR_NO_OBJ; /* No cadr for the data object. */
@@ -468,7 +468,7 @@ _gcry_pk_util_preparse_encval (gcry_sexp_t sexp, const char **algo_names,
}
/* Extract identifier of sublist. */
- name = _gcry_sexp_nth_string (l2, 0);
+ name = sexp_nth_string (l2, 0);
if (!name)
{
rc = GPG_ERR_INV_OBJ; /* Invalid structure of object. */
@@ -493,11 +493,11 @@ _gcry_pk_util_preparse_encval (gcry_sexp_t sexp, const char **algo_names,
if (ctx->encoding == PUBKEY_ENC_OAEP)
{
/* Get HASH-ALGO. */
- gcry_sexp_release (l2);
- l2 = gcry_sexp_find_token (l1, "hash-algo", 0);
+ sexp_release (l2);
+ l2 = sexp_find_token (l1, "hash-algo", 0);
if (l2)
{
- s = gcry_sexp_nth_data (l2, 1, &n);
+ s = sexp_nth_data (l2, 1, &n);
if (!s)
rc = GPG_ERR_NO_OBJ;
else
@@ -511,11 +511,11 @@ _gcry_pk_util_preparse_encval (gcry_sexp_t sexp, const char **algo_names,
}
/* Get LABEL. */
- gcry_sexp_release (l2);
- l2 = gcry_sexp_find_token (l1, "label", 0);
+ sexp_release (l2);
+ l2 = sexp_find_token (l1, "label", 0);
if (l2)
{
- s = gcry_sexp_nth_data (l2, 1, &n);
+ s = sexp_nth_data (l2, 1, &n);
if (!s)
rc = GPG_ERR_NO_OBJ;
else if (n > 0)
@@ -535,9 +535,9 @@ _gcry_pk_util_preparse_encval (gcry_sexp_t sexp, const char **algo_names,
}
/* Get the next which has the actual data - skip HASH-ALGO and LABEL. */
- for (i = 2; (gcry_sexp_release (l2), l2 = gcry_sexp_nth (l1, i)); i++)
+ for (i = 2; (sexp_release (l2), l2 = sexp_nth (l1, i)); i++)
{
- s = gcry_sexp_nth_data (l2, 0, &n);
+ s = sexp_nth_data (l2, 0, &n);
if (!(n == 9 && !memcmp (s, "hash-algo", 9))
&& !(n == 5 && !memcmp (s, "label", 5))
&& !(n == 15 && !memcmp (s, "random-override", 15)))
@@ -551,7 +551,7 @@ _gcry_pk_util_preparse_encval (gcry_sexp_t sexp, const char **algo_names,
/* Extract sublist identifier. */
gcry_free (name);
- name = _gcry_sexp_nth_string (l2, 0);
+ name = sexp_nth_string (l2, 0);
if (!name)
{
rc = GPG_ERR_INV_OBJ; /* Invalid structure of object. */
@@ -577,8 +577,8 @@ _gcry_pk_util_preparse_encval (gcry_sexp_t sexp, const char **algo_names,
leave:
gcry_free (name);
- gcry_sexp_release (l2);
- gcry_sexp_release (l1);
+ sexp_release (l2);
+ sexp_release (l1);
return rc;
}
@@ -650,22 +650,22 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
int parsed_flags = 0;
*ret_mpi = NULL;
- ldata = gcry_sexp_find_token (input, "data", 0);
+ ldata = sexp_find_token (input, "data", 0);
if (!ldata)
{ /* assume old style */
- *ret_mpi = gcry_sexp_nth_mpi (input, 0, 0);
+ *ret_mpi = sexp_nth_mpi (input, 0, 0);
return *ret_mpi ? GPG_ERR_NO_ERROR : GPG_ERR_INV_OBJ;
}
/* See whether there is a flags list. */
{
- gcry_sexp_t lflags = gcry_sexp_find_token (ldata, "flags", 0);
+ gcry_sexp_t lflags = sexp_find_token (ldata, "flags", 0);
if (lflags)
{
if (_gcry_pk_util_parse_flaglist (lflags,
&parsed_flags, &ctx->encoding))
unknown_flag = 1;
- gcry_sexp_release (lflags);
+ sexp_release (lflags);
}
}
@@ -673,8 +673,8 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
ctx->encoding = PUBKEY_ENC_RAW; /* default to raw */
/* Get HASH or MPI */
- lhash = gcry_sexp_find_token (ldata, "hash", 0);
- lvalue = lhash? NULL : gcry_sexp_find_token (ldata, "value", 0);
+ lhash = sexp_find_token (ldata, "hash", 0);
+ lvalue = lhash? NULL : sexp_find_token (ldata, "value", 0);
if (!(!lhash ^ !lvalue))
rc = GPG_ERR_INV_OBJ; /* none or both given */
@@ -694,10 +694,10 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
goto leave;
}
/* Get HASH-ALGO. */
- list = gcry_sexp_find_token (ldata, "hash-algo", 0);
+ list = sexp_find_token (ldata, "hash-algo", 0);
if (list)
{
- s = gcry_sexp_nth_data (list, 1, &n);
+ s = sexp_nth_data (list, 1, &n);
if (!s)
rc = GPG_ERR_NO_OBJ;
else
@@ -706,7 +706,7 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
if (!ctx->hash_algo)
rc = GPG_ERR_DIGEST_ALGO;
}
- gcry_sexp_release (list);
+ sexp_release (list);
}
else
rc = GPG_ERR_INV_OBJ;
@@ -714,7 +714,7 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
goto leave;
/* Get VALUE. */
- value = gcry_sexp_nth_buffer (lvalue, 1, &valuelen);
+ value = sexp_nth_buffer (lvalue, 1, &valuelen);
if (!value)
{
/* We assume that a zero length message is meant by
@@ -734,7 +734,7 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
goto leave;
/* Note that mpi_set_opaque takes ownership of VALUE. */
- *ret_mpi = gcry_mpi_set_opaque (NULL, value, valuelen*8);
+ *ret_mpi = mpi_set_opaque (NULL, value, valuelen*8);
}
else if (ctx->encoding == PUBKEY_ENC_RAW && lhash
&& ((parsed_flags & PUBKEY_FLAG_RAW_FLAG)
@@ -744,9 +744,9 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
used for DSA. For better backward error compatibility we
allow this only if either the rfc6979 flag has been given or
the raw flags was explicitly given. */
- if (gcry_sexp_length (lhash) != 3)
+ if (sexp_length (lhash) != 3)
rc = GPG_ERR_INV_OBJ;
- else if ( !(s=gcry_sexp_nth_data (lhash, 1, &n)) || !n )
+ else if ( !(s=sexp_nth_data (lhash, 1, &n)) || !n )
rc = GPG_ERR_INV_OBJ;
else
{
@@ -756,7 +756,7 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
ctx->hash_algo = get_hash_algo (s, n);
if (!ctx->hash_algo)
rc = GPG_ERR_DIGEST_ALGO;
- else if (!(value=gcry_sexp_nth_buffer (lhash, 2, &valuelen)))
+ else if (!(value=sexp_nth_buffer (lhash, 2, &valuelen)))
rc = GPG_ERR_INV_OBJ;
else if ((valuelen * 8) < valuelen)
{
@@ -764,7 +764,7 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
rc = GPG_ERR_TOO_LARGE;
}
else
- *ret_mpi = gcry_mpi_set_opaque (NULL, value, valuelen*8);
+ *ret_mpi = mpi_set_opaque (NULL, value, valuelen*8);
}
}
else if (ctx->encoding == PUBKEY_ENC_RAW && lvalue)
@@ -778,7 +778,7 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
}
/* Get the value */
- *ret_mpi = gcry_sexp_nth_mpi (lvalue, 1, GCRYMPI_FMT_USG);
+ *ret_mpi = sexp_nth_mpi (lvalue, 1, GCRYMPI_FMT_USG);
if (!*ret_mpi)
rc = GPG_ERR_INV_OBJ;
}
@@ -791,15 +791,15 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
void *random_override = NULL;
size_t random_override_len = 0;
- if ( !(value=gcry_sexp_nth_data (lvalue, 1, &valuelen)) || !valuelen )
+ if ( !(value=sexp_nth_data (lvalue, 1, &valuelen)) || !valuelen )
rc = GPG_ERR_INV_OBJ;
else
{
/* Get optional RANDOM-OVERRIDE. */
- list = gcry_sexp_find_token (ldata, "random-override", 0);
+ list = sexp_find_token (ldata, "random-override", 0);
if (list)
{
- s = gcry_sexp_nth_data (list, 1, &n);
+ s = sexp_nth_data (list, 1, &n);
if (!s)
rc = GPG_ERR_NO_OBJ;
else if (n > 0)
@@ -813,7 +813,7 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
random_override_len = n;
}
}
- gcry_sexp_release (list);
+ sexp_release (list);
if (rc)
goto leave;
}
@@ -828,9 +828,9 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
else if (ctx->encoding == PUBKEY_ENC_PKCS1 && lhash
&& (ctx->op == PUBKEY_OP_SIGN || ctx->op == PUBKEY_OP_VERIFY))
{
- if (gcry_sexp_length (lhash) != 3)
+ if (sexp_length (lhash) != 3)
rc = GPG_ERR_INV_OBJ;
- else if ( !(s=gcry_sexp_nth_data (lhash, 1, &n)) || !n )
+ else if ( !(s=sexp_nth_data (lhash, 1, &n)) || !n )
rc = GPG_ERR_INV_OBJ;
else
{
@@ -841,7 +841,7 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
if (!ctx->hash_algo)
rc = GPG_ERR_DIGEST_ALGO;
- else if ( !(value=gcry_sexp_nth_data (lhash, 2, &valuelen))
+ else if ( !(value=sexp_nth_data (lhash, 2, &valuelen))
|| !valuelen )
rc = GPG_ERR_INV_OBJ;
else
@@ -856,7 +856,7 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
const void * value;
size_t valuelen;
- if ( !(value=gcry_sexp_nth_data (lvalue, 1, &valuelen)) || !valuelen )
+ if ( !(value=sexp_nth_data (lvalue, 1, &valuelen)) || !valuelen )
rc = GPG_ERR_INV_OBJ;
else
{
@@ -865,10 +865,10 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
size_t random_override_len = 0;
/* Get HASH-ALGO. */
- list = gcry_sexp_find_token (ldata, "hash-algo", 0);
+ list = sexp_find_token (ldata, "hash-algo", 0);
if (list)
{
- s = gcry_sexp_nth_data (list, 1, &n);
+ s = sexp_nth_data (list, 1, &n);
if (!s)
rc = GPG_ERR_NO_OBJ;
else
@@ -877,16 +877,16 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
if (!ctx->hash_algo)
rc = GPG_ERR_DIGEST_ALGO;
}
- gcry_sexp_release (list);
+ sexp_release (list);
if (rc)
goto leave;
}
/* Get LABEL. */
- list = gcry_sexp_find_token (ldata, "label", 0);
+ list = sexp_find_token (ldata, "label", 0);
if (list)
{
- s = gcry_sexp_nth_data (list, 1, &n);
+ s = sexp_nth_data (list, 1, &n);
if (!s)
rc = GPG_ERR_NO_OBJ;
else if (n > 0)
@@ -900,15 +900,15 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
ctx->labellen = n;
}
}
- gcry_sexp_release (list);
+ sexp_release (list);
if (rc)
goto leave;
}
/* Get optional RANDOM-OVERRIDE. */
- list = gcry_sexp_find_token (ldata, "random-override", 0);
+ list = sexp_find_token (ldata, "random-override", 0);
if (list)
{
- s = gcry_sexp_nth_data (list, 1, &n);
+ s = sexp_nth_data (list, 1, &n);
if (!s)
rc = GPG_ERR_NO_OBJ;
else if (n > 0)
@@ -922,7 +922,7 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
random_override_len = n;
}
}
- gcry_sexp_release (list);
+ sexp_release (list);
if (rc)
goto leave;
}
@@ -938,9 +938,9 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
else if (ctx->encoding == PUBKEY_ENC_PSS && lhash
&& ctx->op == PUBKEY_OP_SIGN)
{
- if (gcry_sexp_length (lhash) != 3)
+ if (sexp_length (lhash) != 3)
rc = GPG_ERR_INV_OBJ;
- else if ( !(s=gcry_sexp_nth_data (lhash, 1, &n)) || !n )
+ else if ( !(s=sexp_nth_data (lhash, 1, &n)) || !n )
rc = GPG_ERR_INV_OBJ;
else
{
@@ -953,7 +953,7 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
if (!ctx->hash_algo)
rc = GPG_ERR_DIGEST_ALGO;
- else if ( !(value=gcry_sexp_nth_data (lhash, 2, &valuelen))
+ else if ( !(value=sexp_nth_data (lhash, 2, &valuelen))
|| !valuelen )
rc = GPG_ERR_INV_OBJ;
else
@@ -961,24 +961,24 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
gcry_sexp_t list;
/* Get SALT-LENGTH. */
- list = gcry_sexp_find_token (ldata, "salt-length", 0);
+ list = sexp_find_token (ldata, "salt-length", 0);
if (list)
{
- s = gcry_sexp_nth_data (list, 1, &n);
+ s = sexp_nth_data (list, 1, &n);
if (!s)
{
rc = GPG_ERR_NO_OBJ;
goto leave;
}
ctx->saltlen = (unsigned int)strtoul (s, NULL, 10);
- gcry_sexp_release (list);
+ sexp_release (list);
}
/* Get optional RANDOM-OVERRIDE. */
- list = gcry_sexp_find_token (ldata, "random-override", 0);
+ list = sexp_find_token (ldata, "random-override", 0);
if (list)
{
- s = gcry_sexp_nth_data (list, 1, &n);
+ s = sexp_nth_data (list, 1, &n);
if (!s)
rc = GPG_ERR_NO_OBJ;
else if (n > 0)
@@ -992,7 +992,7 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
random_override_len = n;
}
}
- gcry_sexp_release (list);
+ sexp_release (list);
if (rc)
goto leave;
}
@@ -1010,9 +1010,9 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
else if (ctx->encoding == PUBKEY_ENC_PSS && lhash
&& ctx->op == PUBKEY_OP_VERIFY)
{
- if (gcry_sexp_length (lhash) != 3)
+ if (sexp_length (lhash) != 3)
rc = GPG_ERR_INV_OBJ;
- else if ( !(s=gcry_sexp_nth_data (lhash, 1, &n)) || !n )
+ else if ( !(s=sexp_nth_data (lhash, 1, &n)) || !n )
rc = GPG_ERR_INV_OBJ;
else
{
@@ -1022,7 +1022,7 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
rc = GPG_ERR_DIGEST_ALGO;
else
{
- *ret_mpi = gcry_sexp_nth_mpi (lhash, 2, GCRYMPI_FMT_USG);
+ *ret_mpi = sexp_nth_mpi (lhash, 2, GCRYMPI_FMT_USG);
if (!*ret_mpi)
rc = GPG_ERR_INV_OBJ;
ctx->verify_cmp = pss_verify_cmp;
@@ -1034,9 +1034,9 @@ _gcry_pk_util_data_to_mpi (gcry_sexp_t input, gcry_mpi_t *ret_mpi,
rc = GPG_ERR_CONFLICT;
leave:
- gcry_sexp_release (ldata);
- gcry_sexp_release (lhash);
- gcry_sexp_release (lvalue);
+ sexp_release (ldata);
+ sexp_release (lhash);
+ sexp_release (lvalue);
if (!rc)
ctx->flags = parsed_flags;