svn commit: r328465 - head/sys/crypto/ccp
Conrad Meyer
cem at FreeBSD.org
Sat Jan 27 07:41:32 UTC 2018
Author: cem
Date: Sat Jan 27 07:41:31 2018
New Revision: 328465
URL: https://svnweb.freebsd.org/changeset/base/328465
Log:
ccp(4): Store IV in output buffer in GCM software fallback when requested
Apply r328361 to duplicate copy of ccr_gcm_soft in ccp(4).
Properly honor the lack of the CRD_F_IV_PRESENT flag in the GCM software
fallback case for encryption requests.
Modified:
head/sys/crypto/ccp/ccp.c
Modified: head/sys/crypto/ccp/ccp.c
==============================================================================
--- head/sys/crypto/ccp/ccp.c Sat Jan 27 07:18:02 2018 (r328464)
+++ head/sys/crypto/ccp/ccp.c Sat Jan 27 07:41:31 2018 (r328465)
@@ -130,6 +130,9 @@ ccp_gcm_soft(struct ccp_session *s, struct cryptop *cr
memcpy(iv, crde->crd_iv, 12);
else
arc4rand(iv, 12, 0);
+ if ((crde->crd_flags & CRD_F_IV_PRESENT) == 0)
+ crypto_copyback(crp->crp_flags, crp->crp_buf,
+ crde->crd_inject, 12, iv);
} else {
if (crde->crd_flags & CRD_F_IV_EXPLICIT)
memcpy(iv, crde->crd_iv, 12);
More information about the svn-src-all
mailing list