summaryrefslogtreecommitdiffstats
path: root/agent/protect.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2017-05-22 23:42:44 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2017-05-22 23:42:44 +0200
commit509e4a4d7491daf496b21e5892f4f63ab90e8e21 (patch)
treef19697b16fe58ff3274e45fd904a37aef37ea334 /agent/protect.c
parentg10: Fix default-key selection for signing, possibly by card. (diff)
downloadgnupg2-509e4a4d7491daf496b21e5892f4f63ab90e8e21.tar.xz
gnupg2-509e4a4d7491daf496b21e5892f4f63ab90e8e21.zip
agent: Add const qualifier for read-only table.
* agent/call-pinentry.c (start_pinentry): Add const to tbl. * agent/command-ssh.c (request_specs): Add const. (ssh_key_types): Likewise. (request_spec_lookup): Add const to the return value and SPEC. (ssh_request_process): Likewise. * agent/protect.c (protect_info): Add const. (agent_unprotect): Add const to algotable. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'agent/protect.c')
-rw-r--r--agent/protect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/agent/protect.c b/agent/protect.c
index a9de732a1..66c37410d 100644
--- a/agent/protect.c
+++ b/agent/protect.c
@@ -54,7 +54,7 @@
/* A table containing the information needed to create a protected
private key. */
-static struct {
+static const struct {
const char *algo;
const char *parmlist;
int prot_from, prot_to;
@@ -1010,7 +1010,7 @@ agent_unprotect (ctrl_t ctrl,
gnupg_isotime_t protected_at,
unsigned char **result, size_t *resultlen)
{
- static struct {
+ static const struct {
const char *name; /* Name of the protection method. */
int algo; /* (A zero indicates the "openpgp-native" hack.) */
int keylen; /* Used key length in bytes. */