mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 19:54:40 +02:00
fix github issue #20, allow user to use settings.h at app level as well for building wolfssl. verified types.h (which includes settings.h) or settings.h is included b4 definition checks at wolfssl and wolcrypt header levels
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
#ifndef WOLFSSL_ERROR_H
|
#ifndef WOLFSSL_ERROR_H
|
||||||
#define WOLFSSL_ERROR_H
|
#define WOLFSSL_ERROR_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/error-crypt.h> /* pull in CTaoCrypt errors */
|
#include <wolfssl/wolfcrypt/error-crypt.h> /* pull in wolfCrypt errors */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@@ -19,15 +19,13 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_AES
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_AES_H
|
#ifndef WOLF_CRYPT_AES_H
|
||||||
#define WOLF_CRYPT_AES_H
|
#define WOLF_CRYPT_AES_H
|
||||||
|
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifndef NO_AES
|
||||||
|
|
||||||
/* included for fips @wc_fips */
|
/* included for fips @wc_fips */
|
||||||
#ifdef HAVE_FIPS
|
#ifdef HAVE_FIPS
|
||||||
#include <cyassl/ctaocrypt/aes.h>
|
#include <cyassl/ctaocrypt/aes.h>
|
||||||
@@ -182,6 +180,6 @@ typedef struct Gmac {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* WOLF_CRYPT_AES_H */
|
|
||||||
#endif /* NO_AES */
|
#endif /* NO_AES */
|
||||||
|
#endif /* WOLF_CRYPT_AES_H */
|
||||||
|
|
||||||
|
@@ -23,15 +23,12 @@
|
|||||||
#ifndef WOLF_CRYPT_ARC4_H
|
#ifndef WOLF_CRYPT_ARC4_H
|
||||||
#define WOLF_CRYPT_ARC4_H
|
#define WOLF_CRYPT_ARC4_H
|
||||||
|
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define WOLFSSL_ARC4_CAVIUM_MAGIC 0xBEEF0001
|
#define WOLFSSL_ARC4_CAVIUM_MAGIC 0xBEEF0001
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@@ -19,12 +19,13 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef NO_ASN
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_ASN_H
|
#ifndef WOLF_CRYPT_ASN_H
|
||||||
#define WOLF_CRYPT_ASN_H
|
#define WOLF_CRYPT_ASN_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifndef NO_ASN
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/integer.h>
|
#include <wolfssl/wolfcrypt/integer.h>
|
||||||
#ifndef NO_RSA
|
#ifndef NO_RSA
|
||||||
#include <wolfssl/wolfcrypt/rsa.h>
|
#include <wolfssl/wolfcrypt/rsa.h>
|
||||||
@@ -730,6 +731,6 @@ WOLFSSL_LOCAL void FreeDecodedCRL(DecodedCRL*);
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* CTAO_CRYPT_ASN_H */
|
|
||||||
|
|
||||||
#endif /* !NO_ASN */
|
#endif /* !NO_ASN */
|
||||||
|
#endif /* WOLF_CRYPT_ASN_H */
|
||||||
|
|
||||||
|
@@ -20,11 +20,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_BLAKE2
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_BLAKE2_H
|
#ifndef WOLF_CRYPT_BLAKE2_H
|
||||||
#define WOLF_CRYPT_BLAKE2_H
|
#define WOLF_CRYPT_BLAKE2_H
|
||||||
|
|
||||||
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_BLAKE2
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/blake2-int.h>
|
#include <wolfssl/wolfcrypt/blake2-int.h>
|
||||||
|
|
||||||
/* call old functions if using fips for the sake of hmac @wc_fips */
|
/* call old functions if using fips for the sake of hmac @wc_fips */
|
||||||
@@ -63,6 +66,6 @@ WOLFSSL_API int wc_Blake2bFinal(Blake2b*, byte*, word32);
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* WOLF_CRYPT_BLAKE2_H */
|
|
||||||
#endif /* HAVE_BLAKE2 */
|
#endif /* HAVE_BLAKE2 */
|
||||||
|
#endif /* WOLF_CRYPT_BLAKE2_H */
|
||||||
|
|
||||||
|
@@ -46,19 +46,17 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CAMELLIA
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_CAMELLIA_H
|
#ifndef WOLF_CRYPT_CAMELLIA_H
|
||||||
#define WOLF_CRYPT_CAMELLIA_H
|
#define WOLF_CRYPT_CAMELLIA_H
|
||||||
|
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_CAMELLIA
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
CAMELLIA_BLOCK_SIZE = 16
|
CAMELLIA_BLOCK_SIZE = 16
|
||||||
};
|
};
|
||||||
@@ -93,6 +91,6 @@ WOLFSSL_API void wc_CamelliaCbcDecrypt(Camellia* cam,
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* WOLF_CRYPT_CAMELLIA_H */
|
|
||||||
#endif /* HAVE_CAMELLIA */
|
#endif /* HAVE_CAMELLIA */
|
||||||
|
#endif /* WOLF_CRYPT_CAMELLIA_H */
|
||||||
|
|
||||||
|
@@ -19,18 +19,17 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CHACHA
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_CHACHA_H
|
#ifndef WOLF_CRYPT_CHACHA_H
|
||||||
#define WOLF_CRYPT_CHACHA_H
|
#define WOLF_CRYPT_CHACHA_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_CHACHA
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
CHACHA_ENC_TYPE = 7 /* cipher unique type */
|
CHACHA_ENC_TYPE = 7 /* cipher unique type */
|
||||||
};
|
};
|
||||||
@@ -53,6 +52,6 @@ WOLFSSL_API int wc_Chacha_SetKey(ChaCha* ctx, const byte* key, word32 keySz);
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* WOLF_CRYPT_CHACHA_H */
|
|
||||||
#endif /* HAVE_CHACHA */
|
#endif /* HAVE_CHACHA */
|
||||||
|
#endif /* WOLF_CRYPT_CHACHA_H */
|
||||||
|
|
||||||
|
@@ -24,13 +24,13 @@
|
|||||||
* https://tools.ietf.org/html/draft-irtf-cfrg-chacha20-poly1305-10
|
* https://tools.ietf.org/html/draft-irtf-cfrg-chacha20-poly1305-10
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(HAVE_CHACHA) && defined(HAVE_POLY1305)
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_CHACHA20_POLY1305_H
|
#ifndef WOLF_CRYPT_CHACHA20_POLY1305_H
|
||||||
#define WOLF_CRYPT_CHACHA20_POLY1305_H
|
#define WOLF_CRYPT_CHACHA20_POLY1305_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#if defined(HAVE_CHACHA) && defined(HAVE_POLY1305)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -75,5 +75,5 @@ int wc_ChaCha20Poly1305_Decrypt(
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* WOLF_CRYPT_CHACHA20_POLY1305_H */
|
|
||||||
#endif /* HAVE_CHACHA && HAVE_POLY1305 */
|
#endif /* HAVE_CHACHA && HAVE_POLY1305 */
|
||||||
|
#endif /* WOLF_CRYPT_CHACHA20_POLY1305_H */
|
||||||
|
@@ -19,15 +19,12 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBZ
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_COMPRESS_H
|
#ifndef WOLF_CRYPT_COMPRESS_H
|
||||||
#define WOLF_CRYPT_COMPRESS_H
|
#define WOLF_CRYPT_COMPRESS_H
|
||||||
|
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBZ
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -46,7 +43,6 @@ WOLFSSL_API int wc_DeCompress(byte*, word32, const byte*, word32);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* HAVE_LIBZ */
|
||||||
#endif /* WOLF_CRYPT_COMPRESS_H */
|
#endif /* WOLF_CRYPT_COMPRESS_H */
|
||||||
|
|
||||||
#endif /* HAVE_LIBZ */
|
|
||||||
|
|
||||||
|
@@ -19,15 +19,13 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_DES3
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_DES3_H
|
#ifndef WOLF_CRYPT_DES3_H
|
||||||
#define WOLF_CRYPT_DES3_H
|
#define WOLF_CRYPT_DES3_H
|
||||||
|
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifndef NO_DES3
|
||||||
|
|
||||||
#ifdef HAVE_FIPS
|
#ifdef HAVE_FIPS
|
||||||
/* included for fips @wc_fips */
|
/* included for fips @wc_fips */
|
||||||
#include <cyassl/ctaocrypt/des3.h>
|
#include <cyassl/ctaocrypt/des3.h>
|
||||||
@@ -111,5 +109,5 @@ WOLFSSL_API int wc_Des3_CbcDecryptWithKey(byte* out, const byte* in, word32 sz,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* NO_DES3 */
|
#endif /* NO_DES3 */
|
||||||
#endif /* CTAO_CRYPT_DES3_H */
|
#endif /* WOLF_CRYPT_DES3_H */
|
||||||
|
|
||||||
|
@@ -19,13 +19,13 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_DH
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_DH_H
|
#ifndef WOLF_CRYPT_DH_H
|
||||||
#define WOLF_CRYPT_DH_H
|
#define WOLF_CRYPT_DH_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifndef NO_DH
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/integer.h>
|
#include <wolfssl/wolfcrypt/integer.h>
|
||||||
#include <wolfssl/wolfcrypt/random.h>
|
#include <wolfssl/wolfcrypt/random.h>
|
||||||
|
|
||||||
@@ -61,7 +61,6 @@ WOLFSSL_API int wc_DhParamsLoad(const byte* input, word32 inSz, byte* p,
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* NO_DH */
|
||||||
#endif /* WOLF_CRYPT_DH_H */
|
#endif /* WOLF_CRYPT_DH_H */
|
||||||
|
|
||||||
#endif /* NO_DH */
|
|
||||||
|
|
||||||
|
@@ -19,13 +19,13 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_DSA
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_DSA_H
|
#ifndef WOLF_CRYPT_DSA_H
|
||||||
#define WOLF_CRYPT_DSA_H
|
#define WOLF_CRYPT_DSA_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifndef NO_DSA
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/integer.h>
|
#include <wolfssl/wolfcrypt/integer.h>
|
||||||
#include <wolfssl/wolfcrypt/random.h>
|
#include <wolfssl/wolfcrypt/random.h>
|
||||||
|
|
||||||
@@ -70,6 +70,6 @@ WOLFSSL_API int wc_DsaPrivateKeyDecode(const byte* input, word32* inOutIdx, DsaK
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* WOLF_CRYPT_DSA_H */
|
|
||||||
#endif /* NO_DSA */
|
#endif /* NO_DSA */
|
||||||
|
#endif /* WOLF_CRYPT_DSA_H */
|
||||||
|
|
||||||
|
@@ -19,12 +19,13 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_ECC
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_ECC_H
|
#ifndef WOLF_CRYPT_ECC_H
|
||||||
#define WOLF_CRYPT_ECC_H
|
#define WOLF_CRYPT_ECC_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_ECC
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/integer.h>
|
#include <wolfssl/wolfcrypt/integer.h>
|
||||||
#include <wolfssl/wolfcrypt/random.h>
|
#include <wolfssl/wolfcrypt/random.h>
|
||||||
|
|
||||||
@@ -32,7 +33,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
ECC_PUBLICKEY = 1,
|
ECC_PUBLICKEY = 1,
|
||||||
ECC_PRIVATEKEY = 2,
|
ECC_PRIVATEKEY = 2,
|
||||||
@@ -239,5 +239,5 @@ int wc_ecc_decrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg,
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* WOLF_CRYPT_ECC_H */
|
|
||||||
#endif /* HAVE_ECC */
|
#endif /* HAVE_ECC */
|
||||||
|
#endif /* WOLF_CRYPT_ECC_H */
|
||||||
|
@@ -19,14 +19,14 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_ECC25519
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_ECC25519_H
|
#ifndef WOLF_CRYPT_ECC25519_H
|
||||||
#define WOLF_CRYPT_ECC25519_H
|
#define WOLF_CRYPT_ECC25519_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/ecc25519_fe.h>
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
#include <wolfssl/wolfcrypt/settings.h>
|
|
||||||
|
#ifdef HAVE_ECC25519
|
||||||
|
|
||||||
|
#include <wolfssl/wolfcrypt/ecc25519_fe.h>
|
||||||
#include <wolfssl/wolfcrypt/random.h>
|
#include <wolfssl/wolfcrypt/random.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@@ -96,6 +96,6 @@ int wc_ecc25519_size(ecc25519_key* key);
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* WOLF_CRYPT_ECC25519_H */
|
|
||||||
#endif /* HAVE_ECC25519 */
|
#endif /* HAVE_ECC25519 */
|
||||||
|
#endif /* WOLF_CRYPT_ECC25519_H */
|
||||||
|
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef CTAO_CRYPT_FIPS_TEST_H
|
#ifndef WOLF_CRYPT_FIPS_TEST_H
|
||||||
#define CTAO_CRYPT_FIPS_TEST_H
|
#define WOLF_CRYPT_FIPS_TEST_H
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/types.h>
|
#include <cyassl/ctaocrypt/types.h>
|
||||||
|
|
||||||
@@ -54,5 +54,5 @@ CYASSL_API const char* wolfCrypt_GetCoreHash_fips(void);
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* CTAO_CRYPT_FIPS_TEST_H */
|
#endif /* WOLF_CRYPT_FIPS_TEST_H */
|
||||||
|
|
||||||
|
@@ -19,19 +19,17 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_HC128
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_HC128_H
|
#ifndef WOLF_CRYPT_HC128_H
|
||||||
#define WOLF_CRYPT_HC128_H
|
#define WOLF_CRYPT_HC128_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifndef NO_HC128
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
HC128_ENC_TYPE = 6 /* cipher unique type */
|
HC128_ENC_TYPE = 6 /* cipher unique type */
|
||||||
};
|
};
|
||||||
@@ -55,6 +53,6 @@ WOLFSSL_API int wc_Hc128_SetKey(HC128*, const byte* key, const byte* iv);
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* HAVE_HC128 */
|
||||||
#endif /* WOLF_CRYPT_HC128_H */
|
#endif /* WOLF_CRYPT_HC128_H */
|
||||||
|
|
||||||
#endif /* HAVE_HC128 */
|
|
||||||
|
@@ -19,18 +19,17 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef WOLFSSL_MD2
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_MD2_H
|
#ifndef WOLF_CRYPT_MD2_H
|
||||||
#define WOLF_CRYPT_MD2_H
|
#define WOLF_CRYPT_MD2_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_MD2
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* in bytes */
|
/* in bytes */
|
||||||
enum {
|
enum {
|
||||||
MD2 = 6, /* hash type unique */
|
MD2 = 6, /* hash type unique */
|
||||||
@@ -60,6 +59,6 @@ WOLFSSL_API int wc_Md2Hash(const byte*, word32, byte*);
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* WOLF_CRYPT_MD2_H */
|
|
||||||
#endif /* WOLFSSL_MD2 */
|
#endif /* WOLFSSL_MD2 */
|
||||||
|
#endif /* WOLF_CRYPT_MD2_H */
|
||||||
|
|
||||||
|
@@ -19,19 +19,17 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_MD4
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_MD4_H
|
#ifndef WOLF_CRYPT_MD4_H
|
||||||
#define WOLF_CRYPT_MD4_H
|
#define WOLF_CRYPT_MD4_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifndef NO_MD4
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* in bytes */
|
/* in bytes */
|
||||||
enum {
|
enum {
|
||||||
MD4_BLOCK_SIZE = 64,
|
MD4_BLOCK_SIZE = 64,
|
||||||
@@ -59,7 +57,6 @@ WOLFSSL_API void wc_Md4Final(Md4*, byte*);
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* NO_MD4 */
|
||||||
#endif /* WOLF_CRYPT_MD4_H */
|
#endif /* WOLF_CRYPT_MD4_H */
|
||||||
|
|
||||||
#endif /* NO_MD4 */
|
|
||||||
|
|
||||||
|
@@ -19,13 +19,13 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef NO_MD5
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_MD5_H
|
#ifndef WOLF_CRYPT_MD5_H
|
||||||
#define WOLF_CRYPT_MD5_H
|
#define WOLF_CRYPT_MD5_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifndef NO_MD5
|
||||||
|
|
||||||
#ifdef HAVE_FIPS
|
#ifdef HAVE_FIPS
|
||||||
#define wc_InitMd5 InitMd5
|
#define wc_InitMd5 InitMd5
|
||||||
#define wc_Md5Update Md5Update
|
#define wc_Md5Update Md5Update
|
||||||
@@ -77,5 +77,5 @@ WOLFSSL_API int wc_Md5Hash(const byte*, word32, byte*);
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* WOLF_CRYPT_MD5_H */
|
|
||||||
#endif /* NO_MD5 */
|
#endif /* NO_MD5 */
|
||||||
|
#endif /* WOLF_CRYPT_MD5_H */
|
||||||
|
@@ -19,13 +19,13 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_PKCS7
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_PKCS7_H
|
#ifndef WOLF_CRYPT_PKCS7_H
|
||||||
#define WOLF_CRYPT_PKCS7_H
|
#define WOLF_CRYPT_PKCS7_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_PKCS7
|
||||||
|
|
||||||
#ifndef NO_ASN
|
#ifndef NO_ASN
|
||||||
#include <wolfssl/wolfcrypt/asn.h>
|
#include <wolfssl/wolfcrypt/asn.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -121,7 +121,6 @@ WOLFSSL_API int wc_PKCS7_DecodeEnvelopedData(PKCS7* pkcs7, byte* pkiMsg,
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* HAVE_PKCS7 */
|
||||||
#endif /* WOLF_CRYPT_PKCS7_H */
|
#endif /* WOLF_CRYPT_PKCS7_H */
|
||||||
|
|
||||||
#endif /* HAVE_PKCS7 */
|
|
||||||
|
|
||||||
|
@@ -19,14 +19,13 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_POLY1305
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_POLY1305_H
|
#ifndef WOLF_CRYPT_POLY1305_H
|
||||||
#define WOLF_CRYPT_POLY1305_H
|
#define WOLF_CRYPT_POLY1305_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_POLY1305
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -77,7 +76,6 @@ WOLFSSL_API int wc_Poly1305Final(Poly1305* poly1305, byte* tag);
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* HAVE_POLY1305 */
|
||||||
#endif /* WOLF_CRYPT_POLY1305_H */
|
#endif /* WOLF_CRYPT_POLY1305_H */
|
||||||
|
|
||||||
#endif /* HAVE_POLY1305 */
|
|
||||||
|
|
||||||
|
@@ -19,13 +19,13 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_PWDBASED
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_PWDBASED_H
|
#ifndef WOLF_CRYPT_PWDBASED_H
|
||||||
#define WOLF_CRYPT_PWDBASED_H
|
#define WOLF_CRYPT_PWDBASED_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifndef NO_PWDBASED
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/md5.h> /* for hash type */
|
#include <wolfssl/wolfcrypt/md5.h> /* for hash type */
|
||||||
#include <wolfssl/wolfcrypt/sha.h>
|
#include <wolfssl/wolfcrypt/sha.h>
|
||||||
|
|
||||||
@@ -52,5 +52,5 @@ WOLFSSL_API int wc_PKCS12_PBKDF(byte* output, const byte* passwd, int pLen,
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* WOLF_CRYPT_PWDBASED_H */
|
|
||||||
#endif /* NO_PWDBASED */
|
#endif /* NO_PWDBASED */
|
||||||
|
#endif /* WOLF_CRYPT_PWDBASED_H */
|
||||||
|
@@ -19,14 +19,13 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_RABBIT
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_RABBIT_H
|
#ifndef WOLF_CRYPT_RABBIT_H
|
||||||
#define WOLF_CRYPT_RABBIT_H
|
#define WOLF_CRYPT_RABBIT_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifndef NO_RABBIT
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -60,6 +59,6 @@ WOLFSSL_API int wc_RabbitSetKey(Rabbit*, const byte* key, const byte* iv);
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* NO_RABBIT */
|
||||||
#endif /* WOLF_CRYPT_RABBIT_H */
|
#endif /* WOLF_CRYPT_RABBIT_H */
|
||||||
|
|
||||||
#endif /* NO_RABBIT */
|
|
||||||
|
@@ -19,14 +19,13 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef WOLFSSL_RIPEMD
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_RIPEMD_H
|
#ifndef WOLF_CRYPT_RIPEMD_H
|
||||||
#define WOLF_CRYPT_RIPEME_H
|
#define WOLF_CRYPT_RIPEMD_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_RIPEMD
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -60,5 +59,5 @@ WOLFSSL_API void wc_RipeMdFinal(RipeMd*, byte*);
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* WOLF_CRYPT_RIPEMD_H */
|
|
||||||
#endif /* WOLFSSL_RIPEMD */
|
#endif /* WOLFSSL_RIPEMD */
|
||||||
|
#endif /* WOLF_CRYPT_RIPEMD_H */
|
||||||
|
@@ -19,13 +19,13 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef NO_RSA
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_RSA_H
|
#ifndef WOLF_CRYPT_RSA_H
|
||||||
#define WOLF_CRYPT_RSA_H
|
#define WOLF_CRYPT_RSA_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifndef NO_RSA
|
||||||
|
|
||||||
#ifdef HAVE_FIPS
|
#ifdef HAVE_FIPS
|
||||||
/* for fips @wc_fips */
|
/* for fips @wc_fips */
|
||||||
#include <cyassl/ctaocrypt/rsa.h>
|
#include <cyassl/ctaocrypt/rsa.h>
|
||||||
@@ -114,7 +114,6 @@ WOLFSSL_API int wc_RsaFlattenPublicKey(RsaKey*, byte*, word32*, byte*,
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* NO_RSA */
|
||||||
#endif /* WOLF_CRYPT_RSA_H */
|
#endif /* WOLF_CRYPT_RSA_H */
|
||||||
|
|
||||||
#endif /* NO_RSA */
|
|
||||||
|
|
||||||
|
@@ -19,15 +19,13 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_SHA
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_SHA_H
|
#ifndef WOLF_CRYPT_SHA_H
|
||||||
#define WOLF_CRYPT_SHA_H
|
#define WOLF_CRYPT_SHA_H
|
||||||
|
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifndef NO_SHA
|
||||||
|
|
||||||
#ifdef HAVE_FIPS
|
#ifdef HAVE_FIPS
|
||||||
/* for fips @wc_fips */
|
/* for fips @wc_fips */
|
||||||
#include <cyassl/ctaocrypt/sha.h>
|
#include <cyassl/ctaocrypt/sha.h>
|
||||||
@@ -77,6 +75,6 @@ WOLFSSL_API int wc_ShaHash(const byte*, word32, byte*);
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* CTAO_CRYPT_SHA_H */
|
|
||||||
#endif /* NO_SHA */
|
#endif /* NO_SHA */
|
||||||
|
#endif /* WOLF_CRYPT_SHA_H */
|
||||||
|
|
||||||
|
@@ -17,21 +17,20 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* code submitted by raphael.huck@efixo.com */
|
/* code submitted by raphael.huck@efixo.com */
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_SHA256
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_SHA256_H
|
#ifndef WOLF_CRYPT_SHA256_H
|
||||||
#define WOLF_CRYPT_SHA256_H
|
#define WOLF_CRYPT_SHA256_H
|
||||||
|
|
||||||
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifndef NO_SHA256
|
||||||
|
|
||||||
#ifdef HAVE_FIPS
|
#ifdef HAVE_FIPS
|
||||||
/* for fips @wc_fips */
|
/* for fips @wc_fips */
|
||||||
#include <cyassl/ctaocrypt/sha256.h>
|
#include <cyassl/ctaocrypt/sha256.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -39,7 +38,7 @@
|
|||||||
|
|
||||||
#ifndef HAVE_FIPS /* avoid redefinition of structs */
|
#ifndef HAVE_FIPS /* avoid redefinition of structs */
|
||||||
#ifdef WOLFSSL_PIC32MZ_HASH
|
#ifdef WOLFSSL_PIC32MZ_HASH
|
||||||
#include "port/pic32/pic32mz-crypt.h"
|
#include "port/pic32/pic32mz-crypt.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* in bytes */
|
/* in bytes */
|
||||||
@@ -74,6 +73,6 @@ WOLFSSL_API int wc_Sha256Hash(const byte*, word32, byte*);
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* WOLF_CRYPT_SHA256_H */
|
|
||||||
#endif /* NO_SHA256 */
|
#endif /* NO_SHA256 */
|
||||||
|
#endif /* WOLF_CRYPT_SHA256_H */
|
||||||
|
|
||||||
|
@@ -19,13 +19,13 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef WOLFSSL_SHA512
|
|
||||||
|
|
||||||
#ifndef WOLF_CRYPT_SHA512_H
|
#ifndef WOLF_CRYPT_SHA512_H
|
||||||
#define WOLF_CRYPT_SHA512_H
|
#define WOLF_CRYPT_SHA512_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_SHA512
|
||||||
|
|
||||||
/* for fips @wc_fips */
|
/* for fips @wc_fips */
|
||||||
#ifdef HAVE_FIPS
|
#ifdef HAVE_FIPS
|
||||||
#define CYASSL_SHA512
|
#define CYASSL_SHA512
|
||||||
@@ -99,6 +99,6 @@ WOLFSSL_API int wc_Sha384Hash(const byte*, word32, byte*);
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* WOLF_CRYPT_SHA512_H */
|
|
||||||
#endif /* WOLFSSL_SHA512 */
|
#endif /* WOLFSSL_SHA512 */
|
||||||
|
#endif /* WOLF_CRYPT_SHA512_H */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user