aboutsummaryrefslogtreecommitdiffstats
path: root/sm/encrypt.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2005-06-16 08:12:03 +0000
committerWerner Koch <[email protected]>2005-06-16 08:12:03 +0000
commitdeeba405a9a5868ea478db5003be6335ab9aac6f (patch)
treed61d720258fd571ec81a3d3e5d776320b7b1d796 /sm/encrypt.c
parentNew debugging optionhs, updates to the manual. (diff)
downloadgnupg-deeba405a9a5868ea478db5003be6335ab9aac6f.tar.gz
gnupg-deeba405a9a5868ea478db5003be6335ab9aac6f.zip
gcc-4 defaults forced me to edit many many files to get rid of the
char * vs. unsigned char * warnings. The GNU coding standards used to say that these mismatches are okay and better than a bunch of casts. Obviously this has changed now.
Diffstat (limited to 'sm/encrypt.c')
-rw-r--r--sm/encrypt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sm/encrypt.c b/sm/encrypt.c
index 50da92c32..e4c0d5437 100644
--- a/sm/encrypt.c
+++ b/sm/encrypt.c
@@ -164,10 +164,10 @@ encode_session_key (DEK dek, gcry_sexp_t * r_data)
}
-/* encrypt the DEK under the key contained in CERT and return it as a
- canonical S-Exp in encval */
+/* Encrypt the DEK under the key contained in CERT and return it as a
+ canonical S-Exp in encval. */
static int
-encrypt_dek (const DEK dek, ksba_cert_t cert, char **encval)
+encrypt_dek (const DEK dek, ksba_cert_t cert, unsigned char **encval)
{
gcry_sexp_t s_ciph, s_data, s_pkey;
int rc;
@@ -189,7 +189,7 @@ encrypt_dek (const DEK dek, ksba_cert_t cert, char **encval)
log_error ("libksba did not return a proper S-Exp\n");
return gpg_error (GPG_ERR_BUG);
}
- rc = gcry_sexp_sscan (&s_pkey, NULL, buf, len);
+ rc = gcry_sexp_sscan (&s_pkey, NULL, (char*)buf, len);
xfree (buf); buf = NULL;
if (rc)
{
@@ -220,7 +220,7 @@ encrypt_dek (const DEK dek, ksba_cert_t cert, char **encval)
gcry_sexp_release (s_ciph);
return tmperr;
}
- len = gcry_sexp_sprint (s_ciph, GCRYSEXP_FMT_CANON, buf, len);
+ len = gcry_sexp_sprint (s_ciph, GCRYSEXP_FMT_CANON, (char*)buf, len);
assert (len);
*encval = buf;
@@ -437,7 +437,7 @@ gpgsm_encrypt (CTRL ctrl, CERTLIST recplist, int data_fd, FILE *out_fp)
each and store them in the CMS object */
for (recpno = 0, cl = recplist; cl; recpno++, cl = cl->next)
{
- char *encval;
+ unsigned char *encval;
rc = encrypt_dek (dek, cl->cert, &encval);
if (rc)