forked from wolfSSL/wolfssl
added stubs for AES-GCM processing and build option
This commit is contained in:
16
configure.ac
16
configure.ac
@@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
AC_INIT([cyassl],[2.2.4],[http://www.yassl.com])
|
AC_INIT([cyassl],[2.2.5],[http://www.yassl.com])
|
||||||
|
|
||||||
AC_CONFIG_AUX_DIR(config)
|
AC_CONFIG_AUX_DIR(config)
|
||||||
|
|
||||||
@@ -289,6 +289,20 @@ fi
|
|||||||
|
|
||||||
AM_CONDITIONAL([BUILD_SNIFFER], [test "x$ENABLED_SNIFFER" = "xyes"])
|
AM_CONDITIONAL([BUILD_SNIFFER], [test "x$ENABLED_SNIFFER" = "xyes"])
|
||||||
|
|
||||||
|
# AES-GCM
|
||||||
|
AC_ARG_ENABLE(aesgcm,
|
||||||
|
[ --enable-aesgcm Enable CyaSSL AES-GCM support (default: disabled)],
|
||||||
|
[ ENABLED_AESGCM=$enableval ],
|
||||||
|
[ ENABLED_AESGCM=no ]
|
||||||
|
)
|
||||||
|
|
||||||
|
if test "$ENABLED_AESGCM" = "yes"
|
||||||
|
then
|
||||||
|
AM_CFLAGS="$AM_CFLAGS -DHAVE_AESGCM"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL([BUILD_AESGCM], [test "x$ENABLED_AESGCM" = "xyes"])
|
||||||
|
|
||||||
# AES-NI
|
# AES-NI
|
||||||
AC_ARG_ENABLE(aesni,
|
AC_ARG_ENABLE(aesni,
|
||||||
[ --enable-aesni Enable CyaSSL AES-NI support (default: disabled)],
|
[ --enable-aesni Enable CyaSSL AES-NI support (default: disabled)],
|
||||||
|
@@ -1404,5 +1404,31 @@ void AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)
|
|||||||
|
|
||||||
#endif /* CYASSL_AES_COUNTER */
|
#endif /* CYASSL_AES_COUNTER */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_AESGCM
|
||||||
|
|
||||||
|
void AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz,
|
||||||
|
byte* authTag, word32 authTagSz,
|
||||||
|
const byte* authIn, word32 authInSz)
|
||||||
|
{
|
||||||
|
word32 blocks = sz / AES_BLOCK_SIZE;
|
||||||
|
|
||||||
|
CYASSL_ENTER("AesGcmEncrypt");
|
||||||
|
while (blocks--) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int AesGcmDecrypt(Aes* aes, byte* out, const byte* in, word32 sz,
|
||||||
|
const byte* authTag, word32 authTagSz,
|
||||||
|
const byte* authIn, word32 authInSz)
|
||||||
|
{
|
||||||
|
CYASSL_ENTER("AesGcmDecrypt");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* HAVE_AESGCM */
|
||||||
|
|
||||||
|
|
||||||
#endif /* NO_AES */
|
#endif /* NO_AES */
|
||||||
|
|
||||||
|
@@ -80,6 +80,15 @@ CYASSL_API void AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz);
|
|||||||
CYASSL_API void AesEncryptDirect(Aes* aes, byte* out, const byte* in);
|
CYASSL_API void AesEncryptDirect(Aes* aes, byte* out, const byte* in);
|
||||||
CYASSL_API void AesDecryptDirect(Aes* aes, byte* out, const byte* in);
|
CYASSL_API void AesDecryptDirect(Aes* aes, byte* out, const byte* in);
|
||||||
|
|
||||||
|
#ifdef HAVE_AESGCM
|
||||||
|
CYASSL_API void AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz,
|
||||||
|
byte* authTag, word32 authTagSz,
|
||||||
|
const byte* authIn, word32 authInSz);
|
||||||
|
CYASSL_API int AesGcmDecrypt(Aes* aes, byte* out, const byte* in, word32 sz,
|
||||||
|
const byte* authTag, word32 authTagSz,
|
||||||
|
const byte* authIn, word32 authInSz);
|
||||||
|
#endif /* HAVE_AESGCM */
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
|
Reference in New Issue
Block a user