-static const char *dev_crypto_id = "openbsd_dev_crypto";
-static const char *dev_crypto_name = "OpenBSD /dev/crypto";
+static const char dev_crypto_id[] = "openbsd_dev_crypto";
+static const char dev_crypto_name[] = "OpenBSD /dev/crypto";
+
+static long allow_misaligned;
+
+#define DEV_CRYPTO_CMD_ALLOW_MISALIGNED ENGINE_CMD_BASE
+static const ENGINE_CMD_DEFN dev_crypto_cmd_defns[]=
+ {
+ { DEV_CRYPTO_CMD_ALLOW_MISALIGNED,
+ "allow_misaligned",
+ "Permit misaligned data to be used",
+ ENGINE_CMD_FLAG_NUMERIC },
+ { 0, NULL, NULL, 0 }
+ };
+
+static int dev_crypto_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)())
+ {
+ switch(cmd)
+ {
+ case DEV_CRYPTO_CMD_ALLOW_MISALIGNED:
+ allow_misaligned=i;
+ printf("allow misaligned=%ld\n",allow_misaligned);
+ break;
+ }
+
+ return 1;
+ }