Page MenuHomeFreeBSD

D22364.diff
No OneTemporary

D22364.diff

Index: head/sys/opencrypto/cryptosoft.c
===================================================================
--- head/sys/opencrypto/cryptosoft.c
+++ head/sys/opencrypto/cryptosoft.c
@@ -327,8 +327,8 @@
axf = sw->sw_axf;
+ csp = crypto_get_params(crp->crp_session);
if (crp->crp_auth_key != NULL) {
- csp = crypto_get_params(crp->crp_session);
swcr_authprepare(axf, sw, crp->crp_auth_key,
csp->csp_auth_klen);
}
@@ -354,6 +354,9 @@
if (err)
goto out;
+ if (csp->csp_flags & CSP_F_ESN)
+ axf->Update(&ctx, crp->crp_esn, 4);
+
axf->Final(aalg, &ctx);
if (sw->sw_octx != NULL) {
bcopy(sw->sw_octx, &ctx, axf->ctxsize);
@@ -1235,12 +1238,12 @@
return (true);
}
+#define SUPPORTED_SES (CSP_F_SEPARATE_OUTPUT | CSP_F_SEPARATE_AAD | CSP_F_ESN)
+
static int
swcr_probesession(device_t dev, const struct crypto_session_params *csp)
{
-
- if ((csp->csp_flags & ~(CSP_F_SEPARATE_OUTPUT | CSP_F_SEPARATE_AAD)) !=
- 0)
+ if ((csp->csp_flags & ~(SUPPORTED_SES)) != 0)
return (EINVAL);
switch (csp->csp_mode) {
case CSP_MODE_COMPRESS:

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 2, 6:46 AM (20 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16397056
Default Alt Text
D22364.diff (1 KB)

Event Timeline