added stubs for AES-GCM processing and build option
This commit is contained in:
parent
31bf833239
commit
76bb3b2558
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)
|
||||
|
||||
@ -289,6 +289,20 @@ fi
|
||||
|
||||
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
|
||||
AC_ARG_ENABLE(aesni,
|
||||
[ --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 */
|
||||
|
||||
|
||||
#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 */
|
||||
|
||||
|
@ -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 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
|
||||
} /* extern "C" */
|
||||
|
Loading…
Reference in New Issue
Block a user