diff options
author | John Baldwin <jhb@FreeBSD.org> | 2020-04-20 22:24:49 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2020-04-20 22:24:49 +0000 |
commit | 29fe41ddd714bae92a09fd4098fad614945bedf5 (patch) | |
tree | 2692b7560f3c90d27ecdfe4de9a81c2c00514d15 /sys/mips/nlm/dev/sec/nlmsec.c | |
parent | 8cbde414199b0d2fd91c8eb770e74ec23852a9d4 (diff) | |
download | src-29fe41ddd714bae92a09fd4098fad614945bedf5.tar.gz src-29fe41ddd714bae92a09fd4098fad614945bedf5.zip |
Retire the CRYPTO_F_IV_GENERATE flag.
The sole in-tree user of this flag has been retired, so remove this
complexity from all drivers. While here, add a helper routine drivers
can use to read the current request's IV into a local buffer. Use
this routine to replace duplicated code in nearly all drivers.
Reviewed by: cem
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D24450
Notes
Notes:
svn path=/head/; revision=360136
Diffstat (limited to 'sys/mips/nlm/dev/sec/nlmsec.c')
-rw-r--r-- | sys/mips/nlm/dev/sec/nlmsec.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/mips/nlm/dev/sec/nlmsec.c b/sys/mips/nlm/dev/sec/nlmsec.c index 092011916c8b..bb32238cbc32 100644 --- a/sys/mips/nlm/dev/sec/nlmsec.c +++ b/sys/mips/nlm/dev/sec/nlmsec.c @@ -470,11 +470,7 @@ xlp_copyiv(struct xlp_sec_softc *sc, struct xlp_sec_command *cmd, crp = cmd->crp; if (csp->csp_cipher_alg != CRYPTO_ARC4) { - if (crp->crp_flags & CRYPTO_F_IV_GENERATE) { - arc4rand(cmd->iv, csp->csp_ivlen, 0); - crypto_copyback(crp, crp->crp_iv_start, csp->csp_ivlen, - cmd->iv); - } else if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) + if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) memcpy(cmd->iv, crp->crp_iv, csp->csp_ivlen); } } |