Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109135446
D22364.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D22364.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D22364: Add support for ESN in cryptosoft
Attached
Detach File
Event Timeline
Log In to Comment