aboutsummaryrefslogtreecommitdiffstats
path: root/agent/cvt-openpgp.c
diff options
context:
space:
mode:
Diffstat (limited to 'agent/cvt-openpgp.c')
-rw-r--r--agent/cvt-openpgp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/agent/cvt-openpgp.c b/agent/cvt-openpgp.c
index 06cd1c840..003402956 100644
--- a/agent/cvt-openpgp.c
+++ b/agent/cvt-openpgp.c
@@ -22,7 +22,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <assert.h>
#include "agent.h"
#include "../common/i18n.h"
@@ -571,7 +570,7 @@ do_unprotect (const char *passphrase,
}
skey[i] = NULL;
skeylen = i;
- assert (skeylen <= skeysize);
+ log_assert (skeylen <= skeysize);
/* Note: at this point NDATA should be 2 for a simple
checksum or 20 for the sha1 digest. */
@@ -1067,7 +1066,8 @@ convert_from_openpgp_native (ctrl_t ctrl,
if (!agent_protect (*r_key, passphrase,
&protectedkey, &protectedkeylen,
ctrl->s2k_count, -1))
- agent_write_private_key (grip, protectedkey, protectedkeylen, 1);
+ agent_write_private_key (grip, protectedkey, protectedkeylen, 1,
+ NULL, NULL);
xfree (protectedkey);
}
else
@@ -1076,7 +1076,7 @@ convert_from_openpgp_native (ctrl_t ctrl,
agent_write_private_key (grip,
*r_key,
gcry_sexp_canon_len (*r_key, 0, NULL,NULL),
- 1);
+ 1, NULL, NULL);
}
}
@@ -1104,8 +1104,8 @@ apply_protection (gcry_mpi_t *array, int npkey, int nskey,
int ndata;
unsigned char *p, *data;
- assert (npkey < nskey);
- assert (nskey < DIM (bufarr));
+ log_assert (npkey < nskey);
+ log_assert (nskey < DIM (bufarr));
/* Collect only the secret key parameters into BUFARR et al and
compute the required size of the data buffer. */
@@ -1142,7 +1142,7 @@ apply_protection (gcry_mpi_t *array, int npkey, int nskey,
xfree (bufarr[i]);
bufarr[i] = NULL;
}
- assert (p == data + ndata - 20);
+ log_assert (p == data + ndata - 20);
/* Append a hash of the secret key parameters. */
gcry_md_hash_buffer (GCRY_MD_SHA1, p, data, ndata - 20);