summaryrefslogtreecommitdiffstats
path: root/lib/digsig.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/digsig.c')
-rw-r--r--lib/digsig.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/digsig.c b/lib/digsig.c
index ae05ea393fc8..07be6c1ef4e2 100644
--- a/lib/digsig.c
+++ b/lib/digsig.c
@@ -79,12 +79,13 @@ static int digsig_verify_rsa(struct key *key,
79 unsigned char *out1 = NULL; 79 unsigned char *out1 = NULL;
80 const char *m; 80 const char *m;
81 MPI in = NULL, res = NULL, pkey[2]; 81 MPI in = NULL, res = NULL, pkey[2];
82 uint8_t *p, *datap, *endp; 82 uint8_t *p, *datap;
83 struct user_key_payload *ukp; 83 const uint8_t *endp;
84 const struct user_key_payload *ukp;
84 struct pubkey_hdr *pkh; 85 struct pubkey_hdr *pkh;
85 86
86 down_read(&key->sem); 87 down_read(&key->sem);
87 ukp = key->payload.data; 88 ukp = user_key_payload(key);
88 89
89 if (ukp->datalen < sizeof(*pkh)) 90 if (ukp->datalen < sizeof(*pkh))
90 goto err1; 91 goto err1;