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