summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorLuiz Otavio O Souza <luiz@netgate.com>2015-09-15 13:48:54 -0500
committerLuiz Otavio O Souza <luiz@netgate.com>2015-10-20 11:52:56 -0500
commit9c0a3ee89ffa68fc04d6f19e203bfa7f31ee2937 (patch)
treea7746f9238c30022835eed22f53766621181d08e /sys/geom
parent9b291aa4649f2230d48a12c9089e526ef2182abf (diff)
downloadFreeBSD-src-9c0a3ee89ffa68fc04d6f19e203bfa7f31ee2937.zip
FreeBSD-src-9c0a3ee89ffa68fc04d6f19e203bfa7f31ee2937.tar.gz
MFC r274340:
Constify the AES code and propagate to consumers. This allows us to update the Fortuna code to use SHAd-256 as defined in FS&K. Approved by: so (self) MFC r274341: I just realized that the previous commit message makes no sense: the first sentence should have read "Constify the AES and SHA-256 code and wrappers". This allows us to feed zero_region (which is const) to the hash function during reseeding and thereby implement the FS&K version of SHAd-256 instead of the older F&S version. Approved by: so (self) TAG: IPSEC-HEAD Issue: #4841
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/bde/g_bde.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/geom/bde/g_bde.h b/sys/geom/bde/g_bde.h
index 9332c6b..2f29fe3 100644
--- a/sys/geom/bde/g_bde.h
+++ b/sys/geom/bde/g_bde.h
@@ -182,7 +182,7 @@ AES_init(cipherInstance *ci)
}
static __inline void
-AES_makekey(keyInstance *ki, int dir, u_int len, void *key)
+AES_makekey(keyInstance *ki, int dir, u_int len, const void *key)
{
int error;
@@ -191,7 +191,7 @@ AES_makekey(keyInstance *ki, int dir, u_int len, void *key)
}
static __inline void
-AES_encrypt(cipherInstance *ci, keyInstance *ki, void *in, void *out, u_int len)
+AES_encrypt(cipherInstance *ci, keyInstance *ki, const void *in, void *out, u_int len)
{
int error;
@@ -200,7 +200,7 @@ AES_encrypt(cipherInstance *ci, keyInstance *ki, void *in, void *out, u_int len)
}
static __inline void
-AES_decrypt(cipherInstance *ci, keyInstance *ki, void *in, void *out, u_int len)
+AES_decrypt(cipherInstance *ci, keyInstance *ki, const void *in, void *out, u_int len)
{
int error;
OpenPOWER on IntegriCloud