Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177586699
D26810.1794802657.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D26810.1794802657.diff
View Options
Index: share/man/man4/crypto.4
===================================================================
--- share/man/man4/crypto.4
+++ share/man/man4/crypto.4
@@ -108,6 +108,11 @@
modular arithmetic (for Diffie-Hellman key exchange and other
cryptographic protocols).
The two modes are described separately below.
+.Sh DEPRECATION NOTICE
+The assymetric-key operations supported by this interface will not be
+present in
+.Fx 14.0
+and later.
.Sh THEORY OF OPERATION
Regardless of whether symmetric-key or asymmetric-key operations are
to be performed, use of the device requires a basic series of steps:
Index: sys/opencrypto/crypto.c
===================================================================
--- sys/opencrypto/crypto.c
+++ sys/opencrypto/crypto.c
@@ -1141,6 +1141,7 @@
, kalg
, flags
);
+ gone_in_dev(cap->cc_dev, 14, "asymmetric crypto");
err = 0;
} else
err = EINVAL;
Index: sys/opencrypto/cryptodev.c
===================================================================
--- sys/opencrypto/cryptodev.c
+++ sys/opencrypto/cryptodev.c
@@ -346,6 +346,11 @@
&use_separate_aad, 0,
"Use separate AAD buffer for /dev/crypto requests.");
+static struct timeval warninterval = { .tv_sec = 60, .tv_usec = 0 };
+SYSCTL_TIMEVAL_SEC(_kern, OID_AUTO, cryptodev_warn_interval, CTLFLAG_RW,
+ &warninterval,
+ "Delay in seconds between warnings of deprecated /dev/crypto algorithms");
+
static int cryptof_ioctl(struct file *, u_long, void *,
struct ucred *, struct thread *);
static int cryptof_stat(struct file *, struct stat *,
@@ -420,6 +425,7 @@
struct thread *td)
{
struct crypto_session_params csp;
+ static struct timeval keywarn, featwarn;
struct fcrypt *fcr = fp->f_data;
struct csession *cse;
struct session2_op *sop;
@@ -818,6 +824,10 @@
break;
case CIOCKEY:
case CIOCKEY2:
+ if (ratecheck(&keywarn, &warninterval))
+ gone_in(14,
+ "Assymetric crypto operations via /dev/crypto");
+
if (!crypto_userasymcrypto) {
SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__);
return (EPERM); /* XXX compat? */
@@ -833,6 +843,10 @@
mtx_unlock(&Giant);
break;
case CIOCASYMFEAT:
+ if (ratecheck(&featwarn, &warninterval))
+ gone_in(14,
+ "Assymetric crypto features via /dev/crypto");
+
if (!crypto_userasymcrypto) {
/*
* NB: if user asym crypto operations are
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 16, 4:17 AM (20 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41759638
Default Alt Text
D26810.1794802657.diff (2 KB)
Attached To
Mode
D26810: Mark asymmetric cryptography via OCF deprecated for 14.0.
Attached
Detach File
Event Timeline