padlock(4) doesn't support explicitly provided keys yet.

Return an error instead of encrypting/decrypting data with a wrong key.
This commit is contained in:
Pawel Jakub Dawidek 2006-04-20 06:31:44 +00:00
parent bd6b0820f8
commit eb340a613c

View File

@ -366,6 +366,10 @@ padlock_process(void *arg __unused, struct cryptop *crp, int hint __unused)
err = EINVAL;
goto out;
}
if ((crd->crd_flags & CRD_F_KEY_EXPLICIT) != 0) {
err = EINVAL;
goto out;
}
mtx_lock(&sc->sc_sessions_mtx);
TAILQ_FOREACH(ses, &sc->sc_sessions, ses_next) {