/*
- * Copyright 2004-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2004-2018 The OpenSSL Project Authors. All Rights Reserved.
*
- * Licensed under the OpenSSL license (the "License"). You may not use
+ * Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
#ifndef OPENSSL_NO_HW
# ifndef OPENSSL_NO_HW_PADLOCK
-/* Attempt to have a single source for both 0.9.7 and 0.9.8 :-) */
-# if (OPENSSL_VERSION_NUMBER >= 0x00908000L)
-# ifndef OPENSSL_NO_DYNAMIC_ENGINE
-# define DYNAMIC_ENGINE
-# endif
-# elif (OPENSSL_VERSION_NUMBER >= 0x00907000L)
-# ifdef ENGINE_DYNAMIC_SUPPORT
-# define DYNAMIC_ENGINE
-# endif
-# else
-# error "Only OpenSSL >= 0.9.7 is supported"
-# endif
-
/*
* VIA PadLock AES is available *ONLY* on some x86 CPUs. Not only that it
* doesn't exist elsewhere, but it even can't be compiled on other platforms!
*/
# undef COMPILE_HW_PADLOCK
-# if !defined(I386_ONLY) && !defined(OPENSSL_NO_ASM)
-# if defined(__i386__) || defined(__i386) || \
- defined(__x86_64__) || defined(__x86_64) || \
- defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64)
-# define COMPILE_HW_PADLOCK
-# ifdef OPENSSL_NO_DYNAMIC_ENGINE
+# if !defined(I386_ONLY) && defined(PADLOCK_ASM)
+# define COMPILE_HW_PADLOCK
+# ifdef OPENSSL_NO_DYNAMIC_ENGINE
static ENGINE *ENGINE_padlock(void);
-# endif
# endif
# endif
};
/* Interface to assembler module */
-unsigned int padlock_capability();
+unsigned int padlock_capability(void);
void padlock_key_bswap(AES_KEY *key);
void padlock_verify_context(struct padlock_cipher_data *ctx);
-void padlock_reload_key();
+void padlock_reload_key(void);
void padlock_aes_block(void *out, const void *inp,
struct padlock_cipher_data *ctx);
int padlock_ecb_encrypt(void *out, const void *inp,