summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2005-05-23 23:08:24 +0000
committermarkus <markus@openbsd.org>2005-05-23 23:08:24 +0000
commita0a6552bbc4a4767d2b2bd14a7b496239bee8006 (patch)
treee6bd7cee810e380c7d85b29ef935a34810353a9e /lib/libssl/src
parentFirst part of summary LSA origination. Not perfect but a start. (diff)
downloadwireguard-openbsd-a0a6552bbc4a4767d2b2bd14a7b496239bee8006.tar.xz
wireguard-openbsd-a0a6552bbc4a4767d2b2bd14a7b496239bee8006.zip
no need to byteswap for AES_ASM, from tom@
Diffstat (limited to 'lib/libssl/src')
-rw-r--r--lib/libssl/src/crypto/engine/hw_cryptodev.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/libssl/src/crypto/engine/hw_cryptodev.c b/lib/libssl/src/crypto/engine/hw_cryptodev.c
index 41184b67867..924e379ab54 100644
--- a/lib/libssl/src/crypto/engine/hw_cryptodev.c
+++ b/lib/libssl/src/crypto/engine/hw_cryptodev.c
@@ -714,7 +714,9 @@ xcrypt_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
AES_KEY *k = ctx->cipher_data;
+#ifndef AES_ASM
int i;
+#endif
bzero(k, sizeof *k);
if (enc)
@@ -722,9 +724,15 @@ xcrypt_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
else
AES_set_decrypt_key(key, ctx->key_len * 8, k);
- /* Damn OpenSSL byte swaps the expanded key!! */
+#ifndef AES_ASM
+ /*
+ * XXX Damn OpenSSL byte swaps the expanded key!!
+ *
+ * XXX But only if we're using the C implementation of AES
+ */
for (i = 0; i < 4 * (AES_MAXNR + 1); i++)
k->rd_key[i] = htonl(k->rd_key[i]);
+#endif
return (1);
}