mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 17:48:33 -04:00
Update CyaSSL to latest version.
This commit is contained in:
parent
5fcd270398
commit
3d007d0b4b
445 changed files with 162375 additions and 26182 deletions
28
FreeRTOS-Plus/Source/CyaSSL/mcapi/PIC32MZ-serial.h
Normal file
28
FreeRTOS-Plus/Source/CyaSSL/mcapi/PIC32MZ-serial.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
void _mon_putc(char c);
|
||||
|
||||
static void init_serial() {
|
||||
#ifdef MICROCHIP_PIC32
|
||||
#if defined (__32MZ2048ECH144__) || (__32MZ2048ECM144__)
|
||||
/* Set up PB2 divisor for UART2 */
|
||||
SYSKEY = 0x00000000;
|
||||
SYSKEY = 0xAA996655;
|
||||
SYSKEY = 0x556699AA;
|
||||
PB2DIV = 0x00008018;
|
||||
SYSKEY = 0x33333333;
|
||||
|
||||
/* UART2 Init */
|
||||
// U2BRG = 0x0C;
|
||||
U2BRG = 0x7;
|
||||
ANSELBCLR = 0x4000;
|
||||
ANSELGCLR = 0x0040;
|
||||
RPB14R = 0x02;
|
||||
U2RXR = 0x01;
|
||||
U2MODE = 0x8000;
|
||||
U2STA = 0x400;
|
||||
#elif defined __PIC32MX__
|
||||
SYSTEMConfigPerformance(80000000);
|
||||
DBINIT();
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
79
FreeRTOS-Plus/Source/CyaSSL/mcapi/README
Normal file
79
FreeRTOS-Plus/Source/CyaSSL/mcapi/README
Normal file
|
@ -0,0 +1,79 @@
|
|||
CyaSSL MPLAB X Project Files
|
||||
|
||||
This directory contains project files for the Microchip MPLAB X IDE. These
|
||||
projects have been set up to use the Microchip PIC32 Ethernet Starter Kit
|
||||
and the Microchip XC32 compiler, and have been created specifically to test
|
||||
the Microchip-specific CTaoCrypt API with compression support. For MPLAB X
|
||||
projects that don't use compression and are generic to the CTaoCrypt API,
|
||||
please see the <cyassl_root>/mplabx directory.
|
||||
|
||||
In order to generate the necessary auto-generated MPLAB X files, make sure
|
||||
to import the cyassl.X and zlib.X projects into your MPLAB X workspace before
|
||||
trying to build either the CTaoCrypt test or benchmark applications. This will
|
||||
correctly set up the respective project's Makefiles.
|
||||
|
||||
Included Project Files
|
||||
-----------------------
|
||||
|
||||
1. CyaSSL library (cyassl.X)
|
||||
|
||||
This project builds a static CyaSSL library. Prior to building this
|
||||
project, uncomment the MICROCHIP_PIC32 define located in:
|
||||
|
||||
<cyassl_root>/cyassl/ctaocrypt/settings.h
|
||||
|
||||
After this project has been built, the compiled library will be located
|
||||
at:
|
||||
|
||||
<cyassl_root>/mplabx/cyassl.X/dist/default/production/cyassl.X.a
|
||||
|
||||
Note that this project includes the zlib header location in the project's
|
||||
include paths. This is because this project has been set up to be compiled
|
||||
with zlib support to enable compression and decompression features.
|
||||
|
||||
2. CTaoCrypt Test App (ctaocrypt_test.X)
|
||||
|
||||
This project tests the CTaoCrypt cryptography modules. It is generally
|
||||
a good idea to run this first on an embedded system after compiling
|
||||
CyaSSL in order to verify all underlying crypto is working correctly.
|
||||
|
||||
3. CTaoCrypt Benchmark App (ctaocrypt_benchmark.X)
|
||||
|
||||
This project builds the CTaoCrypt benchmark application. If the CyaSSL
|
||||
project (cyassl.X) has been compiled with libz support and is being
|
||||
used to build this project, the zlib.X project will need to added to
|
||||
the "Libraries" folder under the ctaocrypt_benchmark.X project before
|
||||
it will compile successfully.
|
||||
|
||||
4. CTaoCrypt MCAPI Test App (ctaocrypt_mcapi.X)
|
||||
|
||||
This project tests the Microchip crytpo API layer. The Microchip crypto
|
||||
layer is located under the <cyassl_root>/mcapi directory.
|
||||
|
||||
5. zlib library (zlib.X)
|
||||
|
||||
This project builds the zlib library for use in the ctaocrypt_test.X
|
||||
and ctaocrypt_mcapi.X projects. This project expects the zlib sources
|
||||
to be located under the CyaSSL root directory. Currently it is set up
|
||||
to work with zlib 1.2.8, and looks for sources under:
|
||||
|
||||
<cyassl_root>/zlib-1.2.8
|
||||
|
||||
PIC32MX/PIC32MZ
|
||||
---------------
|
||||
|
||||
The projects are set for PIC32MX by default. For PIC32MZ, change project
|
||||
properties->Devices and add "CYASSL_MICROCHIP_PIC32M" to
|
||||
XC32-gcc->Preprocessing and messages-> Preprocessor macros.
|
||||
|
||||
MIPS16 and MIPS32 Support
|
||||
-------------------------
|
||||
|
||||
These projects support both MIPS16 and MIPS32 instruction sets. Switching
|
||||
between these two instruction sets can be done in each project's properties
|
||||
settings by checking the "Generate 16-bit code" checkbox.
|
||||
|
||||
Support
|
||||
-------
|
||||
Please send questions or comments to support@wolfssl.com
|
||||
|
703
FreeRTOS-Plus/Source/CyaSSL/mcapi/crypto.c
Normal file
703
FreeRTOS-Plus/Source/CyaSSL/mcapi/crypto.c
Normal file
|
@ -0,0 +1,703 @@
|
|||
/* crypto.c
|
||||
*
|
||||
* Copyright (C) 2006-2014 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of CyaSSL.
|
||||
*
|
||||
* CyaSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CyaSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
/* Implements Microchip CRYPTO API layer */
|
||||
|
||||
|
||||
|
||||
#include "crypto.h"
|
||||
|
||||
#include <cyassl/ctaocrypt/settings.h>
|
||||
|
||||
#include <cyassl/ctaocrypt/md5.h>
|
||||
#include <cyassl/ctaocrypt/sha.h>
|
||||
#include <cyassl/ctaocrypt/sha256.h>
|
||||
#include <cyassl/ctaocrypt/sha512.h>
|
||||
#include <cyassl/ctaocrypt/hmac.h>
|
||||
#include <cyassl/ctaocrypt/compress.h>
|
||||
#include <cyassl/ctaocrypt/random.h>
|
||||
#include <cyassl/ctaocrypt/des3.h>
|
||||
#include <cyassl/ctaocrypt/aes.h>
|
||||
#include <cyassl/ctaocrypt/rsa.h>
|
||||
#include <cyassl/ctaocrypt/ecc.h>
|
||||
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||
|
||||
|
||||
/* Initialize MD5 */
|
||||
int CRYPT_MD5_Initialize(CRYPT_MD5_CTX* md5)
|
||||
{
|
||||
typedef char md5_test[sizeof(CRYPT_MD5_CTX) >= sizeof(Md5) ? 1 : -1];
|
||||
(void)sizeof(md5_test);
|
||||
|
||||
if (md5 == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
InitMd5((Md5*)md5);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Add data to MD5 */
|
||||
int CRYPT_MD5_DataAdd(CRYPT_MD5_CTX* md5, const unsigned char* input,
|
||||
unsigned int sz)
|
||||
{
|
||||
if (md5 == NULL || input == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
Md5Update((Md5*)md5, input, sz);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Get MD5 Final into digest */
|
||||
int CRYPT_MD5_Finalize(CRYPT_MD5_CTX* md5, unsigned char* digest)
|
||||
{
|
||||
if (md5 == NULL || digest == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
Md5Final((Md5*)md5, digest);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Initialize SHA */
|
||||
int CRYPT_SHA_Initialize(CRYPT_SHA_CTX* sha)
|
||||
{
|
||||
typedef char sha_test[sizeof(CRYPT_SHA_CTX) >= sizeof(Sha) ? 1 : -1];
|
||||
(void)sizeof(sha_test);
|
||||
|
||||
if (sha == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return InitSha((Sha*)sha);
|
||||
}
|
||||
|
||||
|
||||
/* Add data to SHA */
|
||||
int CRYPT_SHA_DataAdd(CRYPT_SHA_CTX* sha, const unsigned char* input,
|
||||
unsigned int sz)
|
||||
{
|
||||
if (sha == NULL || input == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return ShaUpdate((Sha*)sha, input, sz);
|
||||
}
|
||||
|
||||
|
||||
/* Get SHA Final into digest */
|
||||
int CRYPT_SHA_Finalize(CRYPT_SHA_CTX* sha, unsigned char* digest)
|
||||
{
|
||||
if (sha == NULL || digest == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return ShaFinal((Sha*)sha, digest);
|
||||
}
|
||||
|
||||
|
||||
/* Initialize SHA-256 */
|
||||
int CRYPT_SHA256_Initialize(CRYPT_SHA256_CTX* sha256)
|
||||
{
|
||||
typedef char sha_test[sizeof(CRYPT_SHA256_CTX) >= sizeof(Sha256) ? 1 : -1];
|
||||
(void)sizeof(sha_test);
|
||||
|
||||
if (sha256 == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return InitSha256((Sha256*)sha256);
|
||||
}
|
||||
|
||||
|
||||
/* Add data to SHA-256 */
|
||||
int CRYPT_SHA256_DataAdd(CRYPT_SHA256_CTX* sha256, const unsigned char* input,
|
||||
unsigned int sz)
|
||||
{
|
||||
if (sha256 == NULL || input == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return Sha256Update((Sha256*)sha256, input, sz);
|
||||
}
|
||||
|
||||
|
||||
/* Get SHA-256 Final into digest */
|
||||
int CRYPT_SHA256_Finalize(CRYPT_SHA256_CTX* sha256, unsigned char* digest)
|
||||
{
|
||||
if (sha256 == NULL || digest == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return Sha256Final((Sha256*)sha256, digest);
|
||||
}
|
||||
|
||||
|
||||
/* Initialize SHA-384 */
|
||||
int CRYPT_SHA384_Initialize(CRYPT_SHA384_CTX* sha384)
|
||||
{
|
||||
typedef char sha_test[sizeof(CRYPT_SHA384_CTX) >= sizeof(Sha384) ? 1 : -1];
|
||||
(void)sizeof(sha_test);
|
||||
|
||||
if (sha384 == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return InitSha384((Sha384*)sha384);
|
||||
}
|
||||
|
||||
|
||||
/* Add data to SHA-384 */
|
||||
int CRYPT_SHA384_DataAdd(CRYPT_SHA384_CTX* sha384, const unsigned char* input,
|
||||
unsigned int sz)
|
||||
{
|
||||
if (sha384 == NULL || input == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return Sha384Update((Sha384*)sha384, input, sz);
|
||||
}
|
||||
|
||||
|
||||
/* Get SHA-384 Final into digest */
|
||||
int CRYPT_SHA384_Finalize(CRYPT_SHA384_CTX* sha384, unsigned char* digest)
|
||||
{
|
||||
if (sha384 == NULL || digest == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return Sha384Final((Sha384*)sha384, digest);
|
||||
}
|
||||
|
||||
|
||||
/* Initialize SHA-512 */
|
||||
int CRYPT_SHA512_Initialize(CRYPT_SHA512_CTX* sha512)
|
||||
{
|
||||
typedef char sha_test[sizeof(CRYPT_SHA512_CTX) >= sizeof(Sha512) ? 1 : -1];
|
||||
(void)sizeof(sha_test);
|
||||
|
||||
if (sha512 == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return InitSha512((Sha512*)sha512);
|
||||
}
|
||||
|
||||
|
||||
/* Add data to SHA-512 */
|
||||
int CRYPT_SHA512_DataAdd(CRYPT_SHA512_CTX* sha512, const unsigned char* input,
|
||||
unsigned int sz)
|
||||
{
|
||||
if (sha512 == NULL || input == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return Sha512Update((Sha512*)sha512, input, sz);
|
||||
}
|
||||
|
||||
|
||||
/* Get SHA-512 Final into digest */
|
||||
int CRYPT_SHA512_Finalize(CRYPT_SHA512_CTX* sha512, unsigned char* digest)
|
||||
{
|
||||
if (sha512 == NULL || digest == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return Sha512Final((Sha512*)sha512, digest);
|
||||
}
|
||||
|
||||
|
||||
/* Set HMAC key with type */
|
||||
int CRYPT_HMAC_SetKey(CRYPT_HMAC_CTX* hmac, int type, const unsigned char* key,
|
||||
unsigned int sz)
|
||||
{
|
||||
typedef char hmac_test[sizeof(CRYPT_HMAC_CTX) >= sizeof(Hmac) ? 1 : -1];
|
||||
(void)sizeof(hmac_test);
|
||||
|
||||
if (hmac == NULL || key == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
if (type != CRYPT_HMAC_SHA && type != CRYPT_HMAC_SHA256 &&
|
||||
type != CRYPT_HMAC_SHA384 && type != CRYPT_HMAC_SHA512) {
|
||||
return BAD_FUNC_ARG; /* bad hmac type */
|
||||
}
|
||||
|
||||
return HmacSetKey((Hmac*)hmac, type, key, sz);
|
||||
}
|
||||
|
||||
|
||||
int CRYPT_HMAC_DataAdd(CRYPT_HMAC_CTX* hmac, const unsigned char* input,
|
||||
unsigned int sz)
|
||||
{
|
||||
if (hmac == NULL || input == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return HmacUpdate((Hmac*)hmac, input, sz);
|
||||
}
|
||||
|
||||
|
||||
/* Get HMAC Final into digest */
|
||||
int CRYPT_HMAC_Finalize(CRYPT_HMAC_CTX* hmac, unsigned char* digest)
|
||||
{
|
||||
if (hmac == NULL || digest == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return HmacFinal((Hmac*)hmac, digest);
|
||||
}
|
||||
|
||||
|
||||
/* Huffman Compression, set flag to do static, otherwise dynamic */
|
||||
/* return compressed size, otherwise < 0 for error */
|
||||
int CRYPT_HUFFMAN_Compress(unsigned char* out, unsigned int outSz,
|
||||
const unsigned char* in, unsigned int inSz,
|
||||
unsigned int flags)
|
||||
{
|
||||
if (out == NULL || in == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return Compress(out, outSz, in, inSz, flags);
|
||||
}
|
||||
|
||||
|
||||
/* Huffman DeCompression, self determines type */
|
||||
/* return decompressed size, otherwise < 0 for error */
|
||||
int CRYPT_HUFFMAN_DeCompress(unsigned char* out, unsigned int outSz,
|
||||
const unsigned char* in, unsigned int inSz)
|
||||
{
|
||||
if (out == NULL || in == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return DeCompress(out, outSz, in, inSz);
|
||||
}
|
||||
|
||||
|
||||
/* RNG Initialize, < 0 on error */
|
||||
int CRYPT_RNG_Initialize(CRYPT_RNG_CTX* rng)
|
||||
{
|
||||
typedef char rng_test[sizeof(CRYPT_RNG_CTX) >= sizeof(RNG) ? 1 : -1];
|
||||
(void)sizeof(rng_test);
|
||||
|
||||
if (rng == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return InitRng((RNG*)rng);
|
||||
}
|
||||
|
||||
|
||||
/* RNG Get single bytes, < 0 on error */
|
||||
int CRYPT_RNG_Get(CRYPT_RNG_CTX* rng, unsigned char* b)
|
||||
{
|
||||
if (rng == NULL || b == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return RNG_GenerateByte((RNG*)rng, (byte*)b);
|
||||
}
|
||||
|
||||
|
||||
/* RNG Block Generation of sz bytes, < 0 on error */
|
||||
int CRYPT_RNG_BlockGenerate(CRYPT_RNG_CTX* rng, unsigned char* b,
|
||||
unsigned int sz)
|
||||
{
|
||||
if (rng == NULL || b == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return RNG_GenerateBlock((RNG*)rng, b, sz);
|
||||
}
|
||||
|
||||
|
||||
/* Triple DES Key Set, may have iv, will have direction */
|
||||
int CRYPT_TDES_KeySet(CRYPT_TDES_CTX* tdes, const unsigned char* key,
|
||||
const unsigned char* iv, int dir)
|
||||
{
|
||||
typedef char tdes_test[sizeof(CRYPT_TDES_CTX) >= sizeof(Des3) ? 1 : -1];
|
||||
(void)sizeof(tdes_test);
|
||||
|
||||
if (tdes == NULL || key == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return Des3_SetKey((Des3*)tdes, key, iv, dir);
|
||||
}
|
||||
|
||||
|
||||
/* Triple DES Iv Set, sometimes added later */
|
||||
int CRYPT_TDES_IvSet(CRYPT_TDES_CTX* tdes, const unsigned char* iv)
|
||||
{
|
||||
if (tdes == NULL || iv == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return Des3_SetIV((Des3*)tdes, iv);
|
||||
}
|
||||
|
||||
|
||||
/* Triple DES CBC Encrypt */
|
||||
int CRYPT_TDES_CBC_Encrypt(CRYPT_TDES_CTX* tdes, unsigned char* out,
|
||||
const unsigned char* in, unsigned int inSz)
|
||||
{
|
||||
if (tdes == NULL || out == NULL || in == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return Des3_CbcEncrypt((Des3*)tdes, out, in, inSz);
|
||||
}
|
||||
|
||||
|
||||
/* Triple DES CBC Decrypt */
|
||||
int CRYPT_TDES_CBC_Decrypt(CRYPT_TDES_CTX* tdes, unsigned char* out,
|
||||
const unsigned char* in, unsigned int inSz)
|
||||
{
|
||||
if (tdes == NULL || out == NULL || in == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return Des3_CbcDecrypt((Des3*)tdes, out, in, inSz);
|
||||
}
|
||||
|
||||
|
||||
/* AES Key Set, may have iv, will have direction */
|
||||
int CRYPT_AES_KeySet(CRYPT_AES_CTX* aes, const unsigned char* key,
|
||||
unsigned int keyLen, const unsigned char* iv, int dir)
|
||||
{
|
||||
typedef char aes_test[sizeof(CRYPT_AES_CTX) >= sizeof(Aes) ? 1 : -1];
|
||||
(void)sizeof(aes_test);
|
||||
|
||||
if (aes == NULL || key == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return AesSetKey((Aes*)aes, key, keyLen, iv, dir);
|
||||
}
|
||||
|
||||
|
||||
/* AES Iv Set, sometimes added later */
|
||||
int CRYPT_AES_IvSet(CRYPT_AES_CTX* aes, const unsigned char* iv)
|
||||
{
|
||||
if (aes == NULL || iv == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return AesSetIV((Aes*)aes, iv);
|
||||
}
|
||||
|
||||
|
||||
/* AES CBC Encrypt */
|
||||
int CRYPT_AES_CBC_Encrypt(CRYPT_AES_CTX* aes, unsigned char* out,
|
||||
const unsigned char* in, unsigned int inSz)
|
||||
{
|
||||
if (aes == NULL || out == NULL || in == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return AesCbcEncrypt((Aes*)aes, out, in, inSz);
|
||||
}
|
||||
|
||||
|
||||
/* AES CBC Decrypt */
|
||||
int CRYPT_AES_CBC_Decrypt(CRYPT_AES_CTX* aes, unsigned char* out,
|
||||
const unsigned char* in, unsigned int inSz)
|
||||
{
|
||||
if (aes == NULL || out == NULL || in == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return AesCbcDecrypt((Aes*)aes, out, in, inSz);
|
||||
}
|
||||
|
||||
|
||||
/* AES CTR Encrypt (used for decrypt too, with ENCRYPT key setup) */
|
||||
int CRYPT_AES_CTR_Encrypt(CRYPT_AES_CTX* aes, unsigned char* out,
|
||||
const unsigned char* in, unsigned int inSz)
|
||||
{
|
||||
if (aes == NULL || out == NULL || in == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
AesCtrEncrypt((Aes*)aes, out, in, inSz);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* AES Direct mode encrypt, one block at a time */
|
||||
int CRYPT_AES_DIRECT_Encrypt(CRYPT_AES_CTX* aes, unsigned char* out,
|
||||
const unsigned char* in)
|
||||
{
|
||||
if (aes == NULL || out == NULL || in == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
AesEncryptDirect((Aes*)aes, out, in);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* AES Direct mode decrypt, one block at a time */
|
||||
int CRYPT_AES_DIRECT_Decrypt(CRYPT_AES_CTX* aes, unsigned char* out,
|
||||
const unsigned char* in)
|
||||
{
|
||||
if (aes == NULL || out == NULL || in == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
AesDecryptDirect((Aes*)aes, out, in);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* RSA Initialize */
|
||||
int CRYPT_RSA_Initialize(CRYPT_RSA_CTX* rsa)
|
||||
{
|
||||
if (rsa == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
rsa->holder = (RsaKey*)XMALLOC(sizeof(RsaKey), NULL, DYNAMIC_TYPE_RSA);
|
||||
if (rsa->holder == NULL)
|
||||
return -1;
|
||||
|
||||
return InitRsaKey((RsaKey*)rsa->holder, NULL);
|
||||
}
|
||||
|
||||
|
||||
/* RSA Free resources */
|
||||
int CRYPT_RSA_Free(CRYPT_RSA_CTX* rsa)
|
||||
{
|
||||
if (rsa == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
FreeRsaKey((RsaKey*)rsa->holder);
|
||||
XFREE(rsa->holder, NULL, DYNAMIC_TYPE_RSA);
|
||||
rsa->holder = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* RSA Public key decode ASN.1 */
|
||||
int CRYPT_RSA_PublicKeyDecode(CRYPT_RSA_CTX* rsa, const unsigned char* in,
|
||||
unsigned int inSz)
|
||||
{
|
||||
unsigned int idx = 0;
|
||||
(void)idx;
|
||||
|
||||
if (rsa == NULL || in == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return RsaPublicKeyDecode(in, &idx, (RsaKey*)rsa->holder, inSz);
|
||||
}
|
||||
|
||||
|
||||
/* RSA Private key decode ASN.1 */
|
||||
int CRYPT_RSA_PrivateKeyDecode(CRYPT_RSA_CTX* rsa, const unsigned char* in,
|
||||
unsigned int inSz)
|
||||
{
|
||||
unsigned int idx = 0;
|
||||
(void)idx;
|
||||
|
||||
if (rsa == NULL || in == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return RsaPrivateKeyDecode(in, &idx, (RsaKey*)rsa->holder, inSz);
|
||||
}
|
||||
|
||||
|
||||
/* RSA Public Encrypt */
|
||||
int CRYPT_RSA_PublicEncrypt(CRYPT_RSA_CTX* rsa, unsigned char* out,
|
||||
unsigned int outSz, const unsigned char* in,
|
||||
unsigned int inSz, CRYPT_RNG_CTX* rng)
|
||||
{
|
||||
if (rsa == NULL || in == NULL || out == NULL || rng == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return RsaPublicEncrypt(in, inSz, out, outSz, (RsaKey*)rsa->holder,
|
||||
(RNG*)rng);
|
||||
}
|
||||
|
||||
|
||||
/* RSA Private Decrypt */
|
||||
int CRYPT_RSA_PrivateDecrypt(CRYPT_RSA_CTX* rsa, unsigned char* out,
|
||||
unsigned int outSz, const unsigned char* in,
|
||||
unsigned int inSz)
|
||||
{
|
||||
if (rsa == NULL || in == NULL || out == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return RsaPrivateDecrypt(in, inSz, out, outSz, (RsaKey*)rsa->holder);
|
||||
}
|
||||
|
||||
|
||||
/* RSA Get Encrypt size helper */
|
||||
int CRYPT_RSA_EncryptSizeGet(CRYPT_RSA_CTX* rsa)
|
||||
{
|
||||
if (rsa == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return RsaEncryptSize((RsaKey*)rsa->holder);
|
||||
}
|
||||
|
||||
|
||||
/* ECC init */
|
||||
int CRYPT_ECC_Initialize(CRYPT_ECC_CTX* ecc)
|
||||
{
|
||||
if (ecc == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
ecc->holder = (ecc_key*)XMALLOC(sizeof(ecc_key), NULL, DYNAMIC_TYPE_ECC);
|
||||
if (ecc->holder == NULL)
|
||||
return -1;
|
||||
|
||||
ecc_init((ecc_key*)ecc->holder);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* ECC free resources */
|
||||
int CRYPT_ECC_Free(CRYPT_ECC_CTX* ecc)
|
||||
{
|
||||
if (ecc == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
ecc_free((ecc_key*)ecc->holder);
|
||||
XFREE(ecc->holder, NULL, DYNAMIC_TYPE_ECC);
|
||||
ecc->holder = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* ECC Public x963 Export */
|
||||
int CRYPT_ECC_PublicExport(CRYPT_ECC_CTX* ecc, unsigned char* out,
|
||||
unsigned int outSz, unsigned int* usedSz)
|
||||
{
|
||||
int ret;
|
||||
unsigned int inOut = outSz;
|
||||
|
||||
if (ecc == NULL || out == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
ret = ecc_export_x963((ecc_key*)ecc->holder, out, &inOut);
|
||||
*usedSz = inOut;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* ECC Public x963 Import */
|
||||
int CRYPT_ECC_PublicImport(CRYPT_ECC_CTX* ecc, const unsigned char* in,
|
||||
unsigned int inSz)
|
||||
{
|
||||
if (ecc == NULL || in == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return ecc_import_x963(in, inSz, (ecc_key*)ecc->holder);
|
||||
}
|
||||
|
||||
|
||||
/* ECC Private x963 Import */
|
||||
int CRYPT_ECC_PrivateImport(CRYPT_ECC_CTX* ecc, const unsigned char* priv,
|
||||
unsigned int privSz, const unsigned char* pub, unsigned int pubSz)
|
||||
{
|
||||
if (ecc == NULL || priv == NULL || pub == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return ecc_import_private_key(priv, privSz, pub, pubSz,
|
||||
(ecc_key*)ecc->holder);
|
||||
}
|
||||
|
||||
|
||||
/* ECC DHE Make key */
|
||||
int CRYPT_ECC_DHE_KeyMake(CRYPT_ECC_CTX* ecc, CRYPT_RNG_CTX* rng, int keySz)
|
||||
{
|
||||
if (ecc == NULL || rng == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return ecc_make_key((RNG*)rng, keySz, (ecc_key*)ecc->holder);
|
||||
}
|
||||
|
||||
|
||||
/* ECC DHE Make shared secret with our private and peer public */
|
||||
int CRYPT_ECC_DHE_SharedSecretMake(CRYPT_ECC_CTX* priv, CRYPT_ECC_CTX* pub,
|
||||
unsigned char* out, unsigned int outSz, unsigned int* usedSz)
|
||||
{
|
||||
int ret;
|
||||
unsigned int inOut = outSz;
|
||||
|
||||
if (priv == NULL || pub == NULL || out == NULL || usedSz == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
ret = ecc_shared_secret((ecc_key*)priv->holder, (ecc_key*)pub->holder,
|
||||
out, &inOut);
|
||||
*usedSz = inOut;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* ECC DSA Hash Sign */
|
||||
int CRYPT_ECC_DSA_HashSign(CRYPT_ECC_CTX* ecc, CRYPT_RNG_CTX* rng,
|
||||
unsigned char* sig, unsigned int sigSz,
|
||||
unsigned int* usedSz, const unsigned char* in,
|
||||
unsigned int inSz)
|
||||
{
|
||||
int ret;
|
||||
unsigned int inOut = sigSz;
|
||||
|
||||
if (ecc == NULL || rng == NULL || sig == NULL || usedSz == NULL ||
|
||||
in == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
ret = ecc_sign_hash(in, inSz, sig, &inOut, (RNG*)rng,
|
||||
(ecc_key*)ecc->holder);
|
||||
*usedSz = inOut;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* ECC DSA Hash Verify */
|
||||
int CRYPT_ECC_DSA_HashVerify(CRYPT_ECC_CTX* ecc, const unsigned char* sig,
|
||||
unsigned int sigSz, unsigned char* hash,
|
||||
unsigned int hashSz, int* status)
|
||||
{
|
||||
if (ecc == NULL || sig == NULL || hash == NULL || status == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return ecc_verify_hash(sig, sigSz, hash, hashSz, status,
|
||||
(ecc_key*)ecc->holder);
|
||||
}
|
||||
|
||||
|
||||
/* ECC get key size helper */
|
||||
int CRYPT_ECC_KeySizeGet(CRYPT_ECC_CTX* ecc)
|
||||
{
|
||||
if (ecc == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return ecc_size((ecc_key*)ecc->holder);
|
||||
}
|
||||
|
||||
|
||||
/* ECC get signature size helper */
|
||||
int CRYPT_ECC_SignatureSizeGet(CRYPT_ECC_CTX* ecc)
|
||||
{
|
||||
if (ecc == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
return ecc_sig_size((ecc_key*)ecc->holder);
|
||||
}
|
||||
|
||||
|
||||
/* Save error string from err to str which needs to be >= 80 chars */
|
||||
int CRYPT_ERROR_StringGet(int err, char* str)
|
||||
{
|
||||
if (str == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
CTaoCryptErrorString(err, str);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
268
FreeRTOS-Plus/Source/CyaSSL/mcapi/crypto.h
Normal file
268
FreeRTOS-Plus/Source/CyaSSL/mcapi/crypto.h
Normal file
|
@ -0,0 +1,268 @@
|
|||
/* crypto.h
|
||||
*
|
||||
* Copyright (C) 2006-2014 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of CyaSSL.
|
||||
*
|
||||
* CyaSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CyaSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
/* Defines Microchip CRYPTO API layer */
|
||||
|
||||
|
||||
#ifndef MC_CRYPTO_API_H
|
||||
#define MC_CRYPTO_API_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* MD5 */
|
||||
typedef struct CRYPT_MD5_CTX {
|
||||
int holder[24]; /* big enough to hold internal, but check on init */
|
||||
} CRYPT_MD5_CTX;
|
||||
|
||||
int CRYPT_MD5_Initialize(CRYPT_MD5_CTX*);
|
||||
int CRYPT_MD5_DataAdd(CRYPT_MD5_CTX*, const unsigned char*, unsigned int);
|
||||
int CRYPT_MD5_Finalize(CRYPT_MD5_CTX*, unsigned char*);
|
||||
|
||||
enum {
|
||||
CRYPT_MD5_DIGEST_SIZE = 16
|
||||
};
|
||||
|
||||
|
||||
/* SHA */
|
||||
typedef struct CRYPT_SHA_CTX {
|
||||
int holder[24]; /* big enough to hold internal, but check on init */
|
||||
} CRYPT_SHA_CTX;
|
||||
|
||||
int CRYPT_SHA_Initialize(CRYPT_SHA_CTX*);
|
||||
int CRYPT_SHA_DataAdd(CRYPT_SHA_CTX*, const unsigned char*, unsigned int);
|
||||
int CRYPT_SHA_Finalize(CRYPT_SHA_CTX*, unsigned char*);
|
||||
|
||||
enum {
|
||||
CRYPT_SHA_DIGEST_SIZE = 20
|
||||
};
|
||||
|
||||
|
||||
/* SHA-256 */
|
||||
typedef struct CRYPT_SHA256_CTX {
|
||||
int holder[28]; /* big enough to hold internal, but check on init */
|
||||
} CRYPT_SHA256_CTX;
|
||||
|
||||
int CRYPT_SHA256_Initialize(CRYPT_SHA256_CTX*);
|
||||
int CRYPT_SHA256_DataAdd(CRYPT_SHA256_CTX*, const unsigned char*, unsigned int);
|
||||
int CRYPT_SHA256_Finalize(CRYPT_SHA256_CTX*, unsigned char*);
|
||||
|
||||
enum {
|
||||
CRYPT_SHA256_DIGEST_SIZE = 32
|
||||
};
|
||||
|
||||
|
||||
/* SHA-384 */
|
||||
typedef struct CRYPT_SHA384_CTX {
|
||||
long long holder[32]; /* big enough to hold internal, but check on init */
|
||||
} CRYPT_SHA384_CTX;
|
||||
|
||||
int CRYPT_SHA384_Initialize(CRYPT_SHA384_CTX*);
|
||||
int CRYPT_SHA384_DataAdd(CRYPT_SHA384_CTX*, const unsigned char*, unsigned int);
|
||||
int CRYPT_SHA384_Finalize(CRYPT_SHA384_CTX*, unsigned char*);
|
||||
|
||||
enum {
|
||||
CRYPT_SHA384_DIGEST_SIZE = 48
|
||||
};
|
||||
|
||||
|
||||
/* SHA-512 */
|
||||
typedef struct CRYPT_SHA512_CTX {
|
||||
long long holder[36]; /* big enough to hold internal, but check on init */
|
||||
} CRYPT_SHA512_CTX;
|
||||
|
||||
int CRYPT_SHA512_Initialize(CRYPT_SHA512_CTX*);
|
||||
int CRYPT_SHA512_DataAdd(CRYPT_SHA512_CTX*, const unsigned char*, unsigned int);
|
||||
int CRYPT_SHA512_Finalize(CRYPT_SHA512_CTX*, unsigned char*);
|
||||
|
||||
enum {
|
||||
CRYPT_SHA512_DIGEST_SIZE = 64
|
||||
};
|
||||
|
||||
|
||||
/* HMAC */
|
||||
typedef struct CRYPT_HMAC_CTX {
|
||||
long long holder[67]; /* big enough to hold internal, but check on init */
|
||||
} CRYPT_HMAC_CTX;
|
||||
|
||||
int CRYPT_HMAC_SetKey(CRYPT_HMAC_CTX*, int, const unsigned char*, unsigned int);
|
||||
int CRYPT_HMAC_DataAdd(CRYPT_HMAC_CTX*, const unsigned char*, unsigned int);
|
||||
int CRYPT_HMAC_Finalize(CRYPT_HMAC_CTX*, unsigned char*);
|
||||
|
||||
/* HMAC types */
|
||||
enum {
|
||||
CRYPT_HMAC_SHA = 1,
|
||||
CRYPT_HMAC_SHA256 = 2,
|
||||
CRYPT_HMAC_SHA384 = 5,
|
||||
CRYPT_HMAC_SHA512 = 4
|
||||
};
|
||||
|
||||
|
||||
/* Huffman */
|
||||
int CRYPT_HUFFMAN_Compress(unsigned char*, unsigned int, const unsigned char*,
|
||||
unsigned int, unsigned int);
|
||||
int CRYPT_HUFFMAN_DeCompress(unsigned char*, unsigned int, const unsigned char*,
|
||||
unsigned int);
|
||||
|
||||
/* flag to use static huffman */
|
||||
enum {
|
||||
CRYPT_HUFFMAN_COMPRESS_STATIC = 1
|
||||
};
|
||||
|
||||
|
||||
/* RNG */
|
||||
typedef struct CRYPT_RNG_CTX {
|
||||
int holder[66]; /* big enough to hold internal, but check on init */
|
||||
} CRYPT_RNG_CTX;
|
||||
|
||||
int CRYPT_RNG_Initialize(CRYPT_RNG_CTX*);
|
||||
int CRYPT_RNG_Get(CRYPT_RNG_CTX*, unsigned char*);
|
||||
int CRYPT_RNG_BlockGenerate(CRYPT_RNG_CTX*, unsigned char*, unsigned int);
|
||||
|
||||
|
||||
/* TDES */
|
||||
typedef struct CRYPT_TDES_CTX {
|
||||
int holder[100]; /* big enough to hold internal, but check on init */
|
||||
} CRYPT_TDES_CTX;
|
||||
|
||||
int CRYPT_TDES_KeySet(CRYPT_TDES_CTX*, const unsigned char*,
|
||||
const unsigned char*, int);
|
||||
int CRYPT_TDES_IvSet(CRYPT_TDES_CTX*, const unsigned char*);
|
||||
int CRYPT_TDES_CBC_Encrypt(CRYPT_TDES_CTX*, unsigned char*,
|
||||
const unsigned char*, unsigned int);
|
||||
int CRYPT_TDES_CBC_Decrypt(CRYPT_TDES_CTX*, unsigned char*,
|
||||
const unsigned char*, unsigned int);
|
||||
|
||||
/* key direction flags for setup */
|
||||
enum {
|
||||
CRYPT_TDES_ENCRYPTION = 0,
|
||||
CRYPT_TDES_DECRYPTION = 1
|
||||
};
|
||||
|
||||
|
||||
/* AES */
|
||||
typedef struct CRYPT_AES_CTX {
|
||||
int holder[70]; /* big enough to hold internal, but check on init */
|
||||
} CRYPT_AES_CTX;
|
||||
|
||||
/* key */
|
||||
int CRYPT_AES_KeySet(CRYPT_AES_CTX*, const unsigned char*, unsigned int,
|
||||
const unsigned char*, int);
|
||||
int CRYPT_AES_IvSet(CRYPT_AES_CTX*, const unsigned char*);
|
||||
|
||||
/* cbc */
|
||||
int CRYPT_AES_CBC_Encrypt(CRYPT_AES_CTX*, unsigned char*,
|
||||
const unsigned char*, unsigned int);
|
||||
int CRYPT_AES_CBC_Decrypt(CRYPT_AES_CTX*, unsigned char*,
|
||||
const unsigned char*, unsigned int);
|
||||
|
||||
/* ctr (counter), use Encrypt both ways with ENCRYPT key setup */
|
||||
int CRYPT_AES_CTR_Encrypt(CRYPT_AES_CTX*, unsigned char*,
|
||||
const unsigned char*, unsigned int);
|
||||
|
||||
/* direct, one block at a time */
|
||||
int CRYPT_AES_DIRECT_Encrypt(CRYPT_AES_CTX*, unsigned char*,
|
||||
const unsigned char*);
|
||||
int CRYPT_AES_DIRECT_Decrypt(CRYPT_AES_CTX*, unsigned char*,
|
||||
const unsigned char*);
|
||||
|
||||
/* key direction flags for setup, ctr always uses ENCRYPT flag */
|
||||
enum {
|
||||
CRYPT_AES_ENCRYPTION = 0,
|
||||
CRYPT_AES_DECRYPTION = 1,
|
||||
CRYPT_AES_BLOCK_SIZE = 16
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* RSA */
|
||||
typedef struct CRYPT_RSA_CTX {
|
||||
void* holder;
|
||||
} CRYPT_RSA_CTX;
|
||||
|
||||
/* init/free */
|
||||
int CRYPT_RSA_Initialize(CRYPT_RSA_CTX*);
|
||||
int CRYPT_RSA_Free(CRYPT_RSA_CTX*);
|
||||
|
||||
/* key decode */
|
||||
int CRYPT_RSA_PublicKeyDecode(CRYPT_RSA_CTX*, const unsigned char*,
|
||||
unsigned int);
|
||||
int CRYPT_RSA_PrivateKeyDecode(CRYPT_RSA_CTX*, const unsigned char*,
|
||||
unsigned int);
|
||||
|
||||
/* encrypt/decrypt */
|
||||
int CRYPT_RSA_PublicEncrypt(CRYPT_RSA_CTX*, unsigned char*,
|
||||
unsigned int, const unsigned char*, unsigned int,
|
||||
CRYPT_RNG_CTX*);
|
||||
int CRYPT_RSA_PrivateDecrypt(CRYPT_RSA_CTX*, unsigned char*,
|
||||
unsigned int, const unsigned char*, unsigned int);
|
||||
|
||||
/* helpers */
|
||||
int CRYPT_RSA_EncryptSizeGet(CRYPT_RSA_CTX*);
|
||||
|
||||
|
||||
|
||||
/* ECC */
|
||||
typedef struct CRYPT_ECC_CTX {
|
||||
void* holder;
|
||||
} CRYPT_ECC_CTX;
|
||||
|
||||
/* init/free */
|
||||
int CRYPT_ECC_Initialize(CRYPT_ECC_CTX*);
|
||||
int CRYPT_ECC_Free(CRYPT_ECC_CTX*);
|
||||
|
||||
/* key coders */
|
||||
int CRYPT_ECC_PublicExport(CRYPT_ECC_CTX*, unsigned char*, unsigned int,
|
||||
unsigned int*);
|
||||
int CRYPT_ECC_PublicImport(CRYPT_ECC_CTX*, const unsigned char*, unsigned int);
|
||||
int CRYPT_ECC_PrivateImport(CRYPT_ECC_CTX*, const unsigned char*, unsigned int,
|
||||
const unsigned char*, unsigned int);
|
||||
|
||||
/* dhe */
|
||||
int CRYPT_ECC_DHE_KeyMake(CRYPT_ECC_CTX*, CRYPT_RNG_CTX*, int);
|
||||
int CRYPT_ECC_DHE_SharedSecretMake(CRYPT_ECC_CTX*, CRYPT_ECC_CTX*,
|
||||
unsigned char*, unsigned int, unsigned int*);
|
||||
|
||||
/* dsa */
|
||||
int CRYPT_ECC_DSA_HashSign(CRYPT_ECC_CTX*, CRYPT_RNG_CTX*, unsigned char*,
|
||||
unsigned int, unsigned int*, const unsigned char*, unsigned int);
|
||||
int CRYPT_ECC_DSA_HashVerify(CRYPT_ECC_CTX*, const unsigned char*,
|
||||
unsigned int, unsigned char*, unsigned int, int*);
|
||||
|
||||
/* helpers */
|
||||
int CRYPT_ECC_KeySizeGet(CRYPT_ECC_CTX*);
|
||||
int CRYPT_ECC_SignatureSizeGet(CRYPT_ECC_CTX*);
|
||||
|
||||
|
||||
/* Error string helper, string needs to be >= 80 chars */
|
||||
int CRYPT_ERROR_StringGet(int, char*);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* MC_CRYPTO_API_H */
|
||||
|
108
FreeRTOS-Plus/Source/CyaSSL/mcapi/ctaocrypt_mcapi.X/Makefile
Normal file
108
FreeRTOS-Plus/Source/CyaSSL/mcapi/ctaocrypt_mcapi.X/Makefile
Normal file
|
@ -0,0 +1,108 @@
|
|||
#
|
||||
# There exist several targets which are by default empty and which can be
|
||||
# used for execution of your targets. These targets are usually executed
|
||||
# before and after some main targets. They are:
|
||||
#
|
||||
# .build-pre: called before 'build' target
|
||||
# .build-post: called after 'build' target
|
||||
# .clean-pre: called before 'clean' target
|
||||
# .clean-post: called after 'clean' target
|
||||
# .clobber-pre: called before 'clobber' target
|
||||
# .clobber-post: called after 'clobber' target
|
||||
# .all-pre: called before 'all' target
|
||||
# .all-post: called after 'all' target
|
||||
# .help-pre: called before 'help' target
|
||||
# .help-post: called after 'help' target
|
||||
#
|
||||
# Targets beginning with '.' are not intended to be called on their own.
|
||||
#
|
||||
# Main targets can be executed directly, and they are:
|
||||
#
|
||||
# build build a specific configuration
|
||||
# clean remove built files from a configuration
|
||||
# clobber remove all built files
|
||||
# all build all configurations
|
||||
# help print help mesage
|
||||
#
|
||||
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
|
||||
# .help-impl are implemented in nbproject/makefile-impl.mk.
|
||||
#
|
||||
# Available make variables:
|
||||
#
|
||||
# CND_BASEDIR base directory for relative paths
|
||||
# CND_DISTDIR default top distribution directory (build artifacts)
|
||||
# CND_BUILDDIR default top build directory (object files, ...)
|
||||
# CONF name of current configuration
|
||||
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
|
||||
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
|
||||
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
|
||||
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
|
||||
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
|
||||
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
|
||||
#
|
||||
# NOCDDL
|
||||
|
||||
|
||||
# Environment
|
||||
MKDIR=mkdir
|
||||
CP=cp
|
||||
CCADMIN=CCadmin
|
||||
RANLIB=ranlib
|
||||
|
||||
|
||||
# build
|
||||
build: .build-post
|
||||
|
||||
.build-pre:
|
||||
# Add your pre 'build' code here...
|
||||
|
||||
.build-post: .build-impl
|
||||
# Add your post 'build' code here...
|
||||
|
||||
|
||||
# clean
|
||||
clean: .clean-post
|
||||
|
||||
.clean-pre:
|
||||
# Add your pre 'clean' code here...
|
||||
|
||||
.clean-post: .clean-impl
|
||||
# Add your post 'clean' code here...
|
||||
|
||||
|
||||
# clobber
|
||||
clobber: .clobber-post
|
||||
|
||||
.clobber-pre:
|
||||
# Add your pre 'clobber' code here...
|
||||
|
||||
.clobber-post: .clobber-impl
|
||||
# Add your post 'clobber' code here...
|
||||
|
||||
|
||||
# all
|
||||
all: .all-post
|
||||
|
||||
.all-pre:
|
||||
# Add your pre 'all' code here...
|
||||
|
||||
.all-post: .all-impl
|
||||
# Add your post 'all' code here...
|
||||
|
||||
|
||||
# help
|
||||
help: .help-post
|
||||
|
||||
.help-pre:
|
||||
# Add your pre 'help' code here...
|
||||
|
||||
.help-post: .help-impl
|
||||
# Add your post 'help' code here...
|
||||
|
||||
|
||||
|
||||
# include project implementation makefile
|
||||
include nbproject/Makefile-impl.mk
|
||||
|
||||
# include project make variables
|
||||
include nbproject/Makefile-variables.mk
|
|
@ -0,0 +1,175 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configurationDescriptor version="62">
|
||||
<logicalFolder name="root" displayName="root" projectFiles="true">
|
||||
<logicalFolder name="HeaderFiles"
|
||||
displayName="Header Files"
|
||||
projectFiles="true">
|
||||
</logicalFolder>
|
||||
<logicalFolder name="LinkerScript"
|
||||
displayName="Linker Files"
|
||||
projectFiles="true">
|
||||
</logicalFolder>
|
||||
<logicalFolder name="SourceFiles"
|
||||
displayName="Source Files"
|
||||
projectFiles="true">
|
||||
<itemPath>../mcapi_test.c</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="ExternalFiles"
|
||||
displayName="Important Files"
|
||||
projectFiles="false">
|
||||
<itemPath>Makefile</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<sourceRootList>
|
||||
<Elem>..</Elem>
|
||||
</sourceRootList>
|
||||
<projectmakefile>Makefile</projectmakefile>
|
||||
<confs>
|
||||
<conf name="default" type="2">
|
||||
<toolsSet>
|
||||
<developmentServer>localhost</developmentServer>
|
||||
<targetDevice>PIC32MX795F512L</targetDevice>
|
||||
<targetHeader></targetHeader>
|
||||
<targetPluginBoard></targetPluginBoard>
|
||||
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
||||
<languageToolchain>XC32</languageToolchain>
|
||||
<languageToolchainVersion>1.30</languageToolchainVersion>
|
||||
<platform>3</platform>
|
||||
</toolsSet>
|
||||
<compileType>
|
||||
<linkerTool>
|
||||
<linkerLibItems>
|
||||
<linkerLibProjectItem>
|
||||
<makeArtifact PL="../cyassl.X"
|
||||
CT="3"
|
||||
CN="default"
|
||||
AC="true"
|
||||
BL="true"
|
||||
WD="../cyassl.X"
|
||||
BC="${MAKE} -f Makefile CONF=default"
|
||||
DBC="${MAKE} -f Makefile CONF=default TYPE_IMAGE=DEBUG_RUN"
|
||||
CC="rm -rf "build/default" "dist/default""
|
||||
OP="dist/default/production/cyassl.X.a"
|
||||
DOP="dist/default/debug/cyassl.X.a"
|
||||
FL="dist/default/production/cyassl.X.a"
|
||||
PD="dist/default/production/cyassl.X."
|
||||
DD="dist/default/debug/cyassl.X.">
|
||||
</makeArtifact>
|
||||
</linkerLibProjectItem>
|
||||
<linkerLibProjectItem>
|
||||
<makeArtifact PL="../zlib.X"
|
||||
CT="3"
|
||||
CN="default"
|
||||
AC="true"
|
||||
BL="true"
|
||||
WD="../zlib.X"
|
||||
BC="${MAKE} -f Makefile CONF=default"
|
||||
DBC="${MAKE} -f Makefile CONF=default TYPE_IMAGE=DEBUG_RUN"
|
||||
CC="rm -rf "build/default" "dist/default""
|
||||
OP="dist/default/production/zlib.X.a"
|
||||
DOP="dist/default/debug/zlib.X.a"
|
||||
FL="dist/default/production/zlib.X.a"
|
||||
PD="dist/default/production/zlib.X."
|
||||
DD="dist/default/debug/zlib.X.">
|
||||
</makeArtifact>
|
||||
</linkerLibProjectItem>
|
||||
</linkerLibItems>
|
||||
</linkerTool>
|
||||
<loading>
|
||||
<useAlternateLoadableFile>false</useAlternateLoadableFile>
|
||||
<alternateLoadableFile></alternateLoadableFile>
|
||||
</loading>
|
||||
</compileType>
|
||||
<makeCustomizationType>
|
||||
<makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
|
||||
<makeCustomizationPreStep></makeCustomizationPreStep>
|
||||
<makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
|
||||
<makeCustomizationPostStep></makeCustomizationPostStep>
|
||||
<makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
|
||||
<makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
|
||||
<makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
|
||||
</makeCustomizationType>
|
||||
<C32>
|
||||
<property key="additional-warnings" value="false"/>
|
||||
<property key="enable-app-io" value="false"/>
|
||||
<property key="enable-omit-frame-pointer" value="false"/>
|
||||
<property key="enable-symbols" value="true"/>
|
||||
<property key="enable-unroll-loops" value="false"/>
|
||||
<property key="exclude-floating-point" value="false"/>
|
||||
<property key="extra-include-directories"
|
||||
value="../../;../../mcapi;../../zlib-1.2.7"/>
|
||||
<property key="generate-16-bit-code" value="false"/>
|
||||
<property key="isolate-each-function" value="false"/>
|
||||
<property key="make-warnings-into-errors" value="false"/>
|
||||
<property key="optimization-level" value=""/>
|
||||
<property key="place-data-into-section" value="false"/>
|
||||
<property key="post-instruction-scheduling" value="default"/>
|
||||
<property key="pre-instruction-scheduling" value="default"/>
|
||||
<property key="preprocessor-macros" value="CYASSL_SHA384;CYASSL_SHA512"/>
|
||||
<property key="strict-ansi" value="false"/>
|
||||
<property key="support-ansi" value="false"/>
|
||||
<property key="use-cci" value="false"/>
|
||||
<property key="use-iar" value="false"/>
|
||||
<property key="use-indirect-calls" value="false"/>
|
||||
</C32>
|
||||
<C32-AS>
|
||||
</C32-AS>
|
||||
<C32-LD>
|
||||
<property key="additional-options-use-response-files" value="false"/>
|
||||
<property key="enable-check-sections" value="false"/>
|
||||
<property key="exclude-floating-point-library" value="false"/>
|
||||
<property key="exclude-standard-libraries" value="false"/>
|
||||
<property key="extra-lib-directories" value=""/>
|
||||
<property key="generate-16-bit-code" value="false"/>
|
||||
<property key="generate-cross-reference-file" value="false"/>
|
||||
<property key="heap-size" value="32768"/>
|
||||
<property key="input-libraries" value=""/>
|
||||
<property key="linker-symbols" value=""/>
|
||||
<property key="map-file" value=""/>
|
||||
<property key="no-startup-files" value="false"/>
|
||||
<property key="oXC32ld-extra-opts" value=""/>
|
||||
<property key="optimization-level" value=""/>
|
||||
<property key="preprocessor-macros" value=""/>
|
||||
<property key="remove-unused-sections" value="false"/>
|
||||
<property key="report-memory-usage" value="false"/>
|
||||
<property key="stack-size" value="2048"/>
|
||||
<property key="symbol-stripping" value=""/>
|
||||
<property key="trace-symbols" value=""/>
|
||||
<property key="warn-section-align" value="false"/>
|
||||
</C32-LD>
|
||||
<C32CPP>
|
||||
<property key="additional-warnings" value="false"/>
|
||||
<property key="check-new" value="false"/>
|
||||
<property key="eh-specs" value="true"/>
|
||||
<property key="enable-app-io" value="false"/>
|
||||
<property key="enable-omit-frame-pointer" value="false"/>
|
||||
<property key="enable-symbols" value="true"/>
|
||||
<property key="enable-unroll-loops" value="false"/>
|
||||
<property key="exceptions" value="true"/>
|
||||
<property key="exclude-floating-point" value="false"/>
|
||||
<property key="extra-include-directories" value=""/>
|
||||
<property key="generate-16-bit-code" value="false"/>
|
||||
<property key="isolate-each-function" value="false"/>
|
||||
<property key="make-warnings-into-errors" value="false"/>
|
||||
<property key="optimization-level" value=""/>
|
||||
<property key="place-data-into-section" value="false"/>
|
||||
<property key="post-instruction-scheduling" value="default"/>
|
||||
<property key="pre-instruction-scheduling" value="default"/>
|
||||
<property key="preprocessor-macros" value=""/>
|
||||
<property key="rtti" value="true"/>
|
||||
<property key="strict-ansi" value="false"/>
|
||||
<property key="use-cci" value="false"/>
|
||||
<property key="use-iar" value="false"/>
|
||||
<property key="use-indirect-calls" value="false"/>
|
||||
</C32CPP>
|
||||
<C32Global>
|
||||
<property key="legacy-libc" value="false"/>
|
||||
<property key="save-temps" value="false"/>
|
||||
<property key="wpo-lto" value="false"/>
|
||||
</C32Global>
|
||||
<SKDEPIC32PlatformTool>
|
||||
<property key="whatToProgram" value="all"/>
|
||||
</SKDEPIC32PlatformTool>
|
||||
</conf>
|
||||
</confs>
|
||||
</configurationDescriptor>
|
|
@ -0,0 +1,11 @@
|
|||
# vim:ft=automake
|
||||
# All paths should be given relative to the root
|
||||
#
|
||||
|
||||
EXTRA_DIST += \
|
||||
mcapi/ctaocrypt_mcapi.X/Makefile
|
||||
|
||||
EXTRA_DIST += \
|
||||
mcapi/ctaocrypt_mcapi.X/nbproject/configurations.xml \
|
||||
mcapi/ctaocrypt_mcapi.X/nbproject/project.xml
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
||||
<name>ctaocrypt_mcapi</name>
|
||||
<creation-uuid>2ca6ab9b-e225-4ad3-b48e-9ea7b47a4ca4</creation-uuid>
|
||||
<make-project-type>0</make-project-type>
|
||||
<c-extensions>c</c-extensions>
|
||||
<cpp-extensions/>
|
||||
<header-extensions/>
|
||||
<sourceEncoding>ISO-8859-1</sourceEncoding>
|
||||
<make-dep-projects>
|
||||
<make-dep-project>../zlib.X</make-dep-project>
|
||||
<make-dep-project>../cyassl.X</make-dep-project>
|
||||
</make-dep-projects>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
108
FreeRTOS-Plus/Source/CyaSSL/mcapi/ctaocrypt_test.X/Makefile
Normal file
108
FreeRTOS-Plus/Source/CyaSSL/mcapi/ctaocrypt_test.X/Makefile
Normal file
|
@ -0,0 +1,108 @@
|
|||
#
|
||||
# There exist several targets which are by default empty and which can be
|
||||
# used for execution of your targets. These targets are usually executed
|
||||
# before and after some main targets. They are:
|
||||
#
|
||||
# .build-pre: called before 'build' target
|
||||
# .build-post: called after 'build' target
|
||||
# .clean-pre: called before 'clean' target
|
||||
# .clean-post: called after 'clean' target
|
||||
# .clobber-pre: called before 'clobber' target
|
||||
# .clobber-post: called after 'clobber' target
|
||||
# .all-pre: called before 'all' target
|
||||
# .all-post: called after 'all' target
|
||||
# .help-pre: called before 'help' target
|
||||
# .help-post: called after 'help' target
|
||||
#
|
||||
# Targets beginning with '.' are not intended to be called on their own.
|
||||
#
|
||||
# Main targets can be executed directly, and they are:
|
||||
#
|
||||
# build build a specific configuration
|
||||
# clean remove built files from a configuration
|
||||
# clobber remove all built files
|
||||
# all build all configurations
|
||||
# help print help mesage
|
||||
#
|
||||
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
|
||||
# .help-impl are implemented in nbproject/makefile-impl.mk.
|
||||
#
|
||||
# Available make variables:
|
||||
#
|
||||
# CND_BASEDIR base directory for relative paths
|
||||
# CND_DISTDIR default top distribution directory (build artifacts)
|
||||
# CND_BUILDDIR default top build directory (object files, ...)
|
||||
# CONF name of current configuration
|
||||
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
|
||||
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
|
||||
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
|
||||
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
|
||||
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
|
||||
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
|
||||
#
|
||||
# NOCDDL
|
||||
|
||||
|
||||
# Environment
|
||||
MKDIR=mkdir
|
||||
CP=cp
|
||||
CCADMIN=CCadmin
|
||||
RANLIB=ranlib
|
||||
|
||||
|
||||
# build
|
||||
build: .build-post
|
||||
|
||||
.build-pre:
|
||||
# Add your pre 'build' code here...
|
||||
|
||||
.build-post: .build-impl
|
||||
# Add your post 'build' code here...
|
||||
|
||||
|
||||
# clean
|
||||
clean: .clean-post
|
||||
|
||||
.clean-pre:
|
||||
# Add your pre 'clean' code here...
|
||||
|
||||
.clean-post: .clean-impl
|
||||
# Add your post 'clean' code here...
|
||||
|
||||
|
||||
# clobber
|
||||
clobber: .clobber-post
|
||||
|
||||
.clobber-pre:
|
||||
# Add your pre 'clobber' code here...
|
||||
|
||||
.clobber-post: .clobber-impl
|
||||
# Add your post 'clobber' code here...
|
||||
|
||||
|
||||
# all
|
||||
all: .all-post
|
||||
|
||||
.all-pre:
|
||||
# Add your pre 'all' code here...
|
||||
|
||||
.all-post: .all-impl
|
||||
# Add your post 'all' code here...
|
||||
|
||||
|
||||
# help
|
||||
help: .help-post
|
||||
|
||||
.help-pre:
|
||||
# Add your pre 'help' code here...
|
||||
|
||||
.help-post: .help-impl
|
||||
# Add your post 'help' code here...
|
||||
|
||||
|
||||
|
||||
# include project implementation makefile
|
||||
include nbproject/Makefile-impl.mk
|
||||
|
||||
# include project make variables
|
||||
include nbproject/Makefile-variables.mk
|
|
@ -0,0 +1,192 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configurationDescriptor version="62">
|
||||
<logicalFolder name="root" displayName="root" projectFiles="true">
|
||||
<logicalFolder name="HeaderFiles"
|
||||
displayName="Header Files"
|
||||
projectFiles="true">
|
||||
<itemPath>../../ctaocrypt/test/test.h</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="LinkerScript"
|
||||
displayName="Linker Files"
|
||||
projectFiles="true">
|
||||
</logicalFolder>
|
||||
<logicalFolder name="SourceFiles"
|
||||
displayName="Source Files"
|
||||
projectFiles="true">
|
||||
<itemPath>../../ctaocrypt/test/test.c</itemPath>
|
||||
<itemPath>../../mplabx/test_main.c</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="ExternalFiles"
|
||||
displayName="Important Files"
|
||||
projectFiles="false">
|
||||
<itemPath>Makefile</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<sourceRootList>
|
||||
<Elem>../../mplabx</Elem>
|
||||
</sourceRootList>
|
||||
<projectmakefile>Makefile</projectmakefile>
|
||||
<confs>
|
||||
<conf name="default" type="2">
|
||||
<toolsSet>
|
||||
<developmentServer>localhost</developmentServer>
|
||||
<targetDevice>PIC32MX795F512L</targetDevice>
|
||||
<targetHeader></targetHeader>
|
||||
<targetPluginBoard></targetPluginBoard>
|
||||
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
||||
<languageToolchain>XC32</languageToolchain>
|
||||
<languageToolchainVersion>1.30</languageToolchainVersion>
|
||||
<platform>3</platform>
|
||||
</toolsSet>
|
||||
<compileType>
|
||||
<linkerTool>
|
||||
<linkerLibItems>
|
||||
<linkerLibProjectItem>
|
||||
<makeArtifact PL="../cyassl.X"
|
||||
CT="3"
|
||||
CN="default"
|
||||
AC="true"
|
||||
BL="true"
|
||||
WD="../cyassl.X"
|
||||
BC="${MAKE} -f Makefile CONF=default"
|
||||
DBC="${MAKE} -f Makefile CONF=default TYPE_IMAGE=DEBUG_RUN"
|
||||
CC="rm -rf "build/default" "dist/default""
|
||||
OP="dist/default/production/cyassl.X.a"
|
||||
DOP="dist/default/debug/cyassl.X.a"
|
||||
FL="dist/default/production/cyassl.X.a"
|
||||
PD="dist/default/production/cyassl.X."
|
||||
DD="dist/default/debug/cyassl.X.">
|
||||
</makeArtifact>
|
||||
</linkerLibProjectItem>
|
||||
<linkerLibProjectItem>
|
||||
<makeArtifact PL="../zlib.X"
|
||||
CT="3"
|
||||
CN="default"
|
||||
AC="true"
|
||||
BL="true"
|
||||
WD="../zlib.X"
|
||||
BC="${MAKE} -f Makefile CONF=default"
|
||||
DBC="${MAKE} -f Makefile CONF=default TYPE_IMAGE=DEBUG_RUN"
|
||||
CC="rm -rf "build/default" "dist/default""
|
||||
OP="dist/default/production/zlib.X.a"
|
||||
DOP="dist/default/debug/zlib.X.a"
|
||||
FL="dist/default/production/zlib.X.a"
|
||||
PD="dist/default/production/zlib.X."
|
||||
DD="dist/default/debug/zlib.X.">
|
||||
</makeArtifact>
|
||||
</linkerLibProjectItem>
|
||||
</linkerLibItems>
|
||||
</linkerTool>
|
||||
<loading>
|
||||
<useAlternateLoadableFile>false</useAlternateLoadableFile>
|
||||
<alternateLoadableFile></alternateLoadableFile>
|
||||
</loading>
|
||||
</compileType>
|
||||
<makeCustomizationType>
|
||||
<makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
|
||||
<makeCustomizationPreStep></makeCustomizationPreStep>
|
||||
<makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
|
||||
<makeCustomizationPostStep></makeCustomizationPostStep>
|
||||
<makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
|
||||
<makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
|
||||
<makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
|
||||
</makeCustomizationType>
|
||||
<C32>
|
||||
<property key="additional-warnings" value="false"/>
|
||||
<property key="enable-app-io" value="false"/>
|
||||
<property key="enable-omit-frame-pointer" value="false"/>
|
||||
<property key="enable-symbols" value="false"/>
|
||||
<property key="enable-unroll-loops" value="false"/>
|
||||
<property key="exclude-floating-point" value="false"/>
|
||||
<property key="extra-include-directories" value="../../;../../zlib-1.2.7"/>
|
||||
<property key="generate-16-bit-code" value="false"/>
|
||||
<property key="isolate-each-function" value="false"/>
|
||||
<property key="make-warnings-into-errors" value="false"/>
|
||||
<property key="optimization-level" value="-Os"/>
|
||||
<property key="place-data-into-section" value="false"/>
|
||||
<property key="post-instruction-scheduling" value="default"/>
|
||||
<property key="pre-instruction-scheduling" value="default"/>
|
||||
<property key="preprocessor-macros"
|
||||
value="NO_MAIN_DRIVER;USE_CERT_BUFFERS_1024;CYASSL_SHA384;CYASSL_SHA512;HAVE_ECC;HAVE_LIBZ;HAVE_MCAPI"/>
|
||||
<property key="strict-ansi" value="false"/>
|
||||
<property key="support-ansi" value="false"/>
|
||||
<property key="use-cci" value="false"/>
|
||||
<property key="use-iar" value="false"/>
|
||||
<property key="use-indirect-calls" value="false"/>
|
||||
</C32>
|
||||
<C32-AS>
|
||||
<property key="assembler-symbols" value=""/>
|
||||
<property key="enable-symbols" value="true"/>
|
||||
<property key="exclude-floating-point-library" value="false"/>
|
||||
<property key="expand-macros" value="false"/>
|
||||
<property key="extra-include-directories-for-assembler" value=""/>
|
||||
<property key="extra-include-directories-for-preprocessor" value=""/>
|
||||
<property key="false-conditionals" value="false"/>
|
||||
<property key="keep-locals" value="false"/>
|
||||
<property key="list-assembly" value="false"/>
|
||||
<property key="list-source" value="false"/>
|
||||
<property key="list-symbols" value="false"/>
|
||||
<property key="oXC32asm-list-to-file" value="false"/>
|
||||
<property key="omit-debug-dirs" value="false"/>
|
||||
<property key="omit-forms" value="false"/>
|
||||
<property key="preprocessor-macros" value=""/>
|
||||
<property key="warning-level" value=""/>
|
||||
</C32-AS>
|
||||
<C32-LD>
|
||||
<property key="additional-options-use-response-files" value="false"/>
|
||||
<property key="enable-check-sections" value="false"/>
|
||||
<property key="exclude-floating-point-library" value="false"/>
|
||||
<property key="exclude-standard-libraries" value="false"/>
|
||||
<property key="extra-lib-directories" value=""/>
|
||||
<property key="generate-16-bit-code" value="false"/>
|
||||
<property key="generate-cross-reference-file" value="false"/>
|
||||
<property key="heap-size" value="32768"/>
|
||||
<property key="input-libraries" value=""/>
|
||||
<property key="linker-symbols" value=""/>
|
||||
<property key="map-file" value=""/>
|
||||
<property key="no-startup-files" value="false"/>
|
||||
<property key="oXC32ld-extra-opts" value=""/>
|
||||
<property key="optimization-level" value="-Os"/>
|
||||
<property key="preprocessor-macros" value=""/>
|
||||
<property key="remove-unused-sections" value="true"/>
|
||||
<property key="report-memory-usage" value="false"/>
|
||||
<property key="stack-size" value="1024"/>
|
||||
<property key="symbol-stripping" value=""/>
|
||||
<property key="trace-symbols" value=""/>
|
||||
<property key="warn-section-align" value="false"/>
|
||||
</C32-LD>
|
||||
<C32CPP>
|
||||
<property key="additional-warnings" value="false"/>
|
||||
<property key="check-new" value="false"/>
|
||||
<property key="eh-specs" value="true"/>
|
||||
<property key="enable-app-io" value="false"/>
|
||||
<property key="enable-omit-frame-pointer" value="false"/>
|
||||
<property key="enable-symbols" value="true"/>
|
||||
<property key="enable-unroll-loops" value="false"/>
|
||||
<property key="exceptions" value="true"/>
|
||||
<property key="exclude-floating-point" value="false"/>
|
||||
<property key="extra-include-directories" value=""/>
|
||||
<property key="generate-16-bit-code" value="false"/>
|
||||
<property key="isolate-each-function" value="false"/>
|
||||
<property key="make-warnings-into-errors" value="false"/>
|
||||
<property key="optimization-level" value=""/>
|
||||
<property key="place-data-into-section" value="false"/>
|
||||
<property key="post-instruction-scheduling" value="default"/>
|
||||
<property key="pre-instruction-scheduling" value="default"/>
|
||||
<property key="preprocessor-macros" value=""/>
|
||||
<property key="rtti" value="true"/>
|
||||
<property key="strict-ansi" value="false"/>
|
||||
<property key="use-cci" value="false"/>
|
||||
<property key="use-indirect-calls" value="false"/>
|
||||
</C32CPP>
|
||||
<C32Global>
|
||||
<property key="legacy-libc" value="false"/>
|
||||
<property key="save-temps" value="false"/>
|
||||
<property key="wpo-lto" value="false"/>
|
||||
</C32Global>
|
||||
<SKDEPIC32PlatformTool>
|
||||
<property key="whatToProgram" value="all"/>
|
||||
</SKDEPIC32PlatformTool>
|
||||
</conf>
|
||||
</confs>
|
||||
</configurationDescriptor>
|
|
@ -0,0 +1,11 @@
|
|||
# vim:ft=automake
|
||||
# All paths should be given relative to the root
|
||||
#
|
||||
|
||||
EXTRA_DIST += \
|
||||
mcapi/ctaocrypt_test.X/Makefile
|
||||
|
||||
EXTRA_DIST += \
|
||||
mcapi/ctaocrypt_test.X/nbproject/configurations.xml \
|
||||
mcapi/ctaocrypt_test.X/nbproject/project.xml
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
||||
<name>ctaocrypt_test</name>
|
||||
<creation-uuid>b34c4937-7042-4352-88b1-7717bcdf8aeb</creation-uuid>
|
||||
<make-project-type>0</make-project-type>
|
||||
<c-extensions>c</c-extensions>
|
||||
<cpp-extensions/>
|
||||
<header-extensions>h</header-extensions>
|
||||
<sourceEncoding>ISO-8859-1</sourceEncoding>
|
||||
<make-dep-projects>
|
||||
<make-dep-project>../zlib.X</make-dep-project>
|
||||
<make-dep-project>../cyassl.X</make-dep-project>
|
||||
</make-dep-projects>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
108
FreeRTOS-Plus/Source/CyaSSL/mcapi/cyassl.X/Makefile
Normal file
108
FreeRTOS-Plus/Source/CyaSSL/mcapi/cyassl.X/Makefile
Normal file
|
@ -0,0 +1,108 @@
|
|||
#
|
||||
# There exist several targets which are by default empty and which can be
|
||||
# used for execution of your targets. These targets are usually executed
|
||||
# before and after some main targets. They are:
|
||||
#
|
||||
# .build-pre: called before 'build' target
|
||||
# .build-post: called after 'build' target
|
||||
# .clean-pre: called before 'clean' target
|
||||
# .clean-post: called after 'clean' target
|
||||
# .clobber-pre: called before 'clobber' target
|
||||
# .clobber-post: called after 'clobber' target
|
||||
# .all-pre: called before 'all' target
|
||||
# .all-post: called after 'all' target
|
||||
# .help-pre: called before 'help' target
|
||||
# .help-post: called after 'help' target
|
||||
#
|
||||
# Targets beginning with '.' are not intended to be called on their own.
|
||||
#
|
||||
# Main targets can be executed directly, and they are:
|
||||
#
|
||||
# build build a specific configuration
|
||||
# clean remove built files from a configuration
|
||||
# clobber remove all built files
|
||||
# all build all configurations
|
||||
# help print help mesage
|
||||
#
|
||||
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
|
||||
# .help-impl are implemented in nbproject/makefile-impl.mk.
|
||||
#
|
||||
# Available make variables:
|
||||
#
|
||||
# CND_BASEDIR base directory for relative paths
|
||||
# CND_DISTDIR default top distribution directory (build artifacts)
|
||||
# CND_BUILDDIR default top build directory (object files, ...)
|
||||
# CONF name of current configuration
|
||||
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
|
||||
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
|
||||
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
|
||||
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
|
||||
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
|
||||
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
|
||||
#
|
||||
# NOCDDL
|
||||
|
||||
|
||||
# Environment
|
||||
MKDIR=mkdir
|
||||
CP=cp
|
||||
CCADMIN=CCadmin
|
||||
RANLIB=ranlib
|
||||
|
||||
|
||||
# build
|
||||
build: .build-post
|
||||
|
||||
.build-pre:
|
||||
# Add your pre 'build' code here...
|
||||
|
||||
.build-post: .build-impl
|
||||
# Add your post 'build' code here...
|
||||
|
||||
|
||||
# clean
|
||||
clean: .clean-post
|
||||
|
||||
.clean-pre:
|
||||
# Add your pre 'clean' code here...
|
||||
|
||||
.clean-post: .clean-impl
|
||||
# Add your post 'clean' code here...
|
||||
|
||||
|
||||
# clobber
|
||||
clobber: .clobber-post
|
||||
|
||||
.clobber-pre:
|
||||
# Add your pre 'clobber' code here...
|
||||
|
||||
.clobber-post: .clobber-impl
|
||||
# Add your post 'clobber' code here...
|
||||
|
||||
|
||||
# all
|
||||
all: .all-post
|
||||
|
||||
.all-pre:
|
||||
# Add your pre 'all' code here...
|
||||
|
||||
.all-post: .all-impl
|
||||
# Add your post 'all' code here...
|
||||
|
||||
|
||||
# help
|
||||
help: .help-post
|
||||
|
||||
.help-pre:
|
||||
# Add your pre 'help' code here...
|
||||
|
||||
.help-post: .help-impl
|
||||
# Add your post 'help' code here...
|
||||
|
||||
|
||||
|
||||
# include project implementation makefile
|
||||
include nbproject/Makefile-impl.mk
|
||||
|
||||
# include project make variables
|
||||
include nbproject/Makefile-variables.mk
|
|
@ -0,0 +1,192 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configurationDescriptor version="62">
|
||||
<logicalFolder name="root" displayName="root" projectFiles="true">
|
||||
<logicalFolder name="HeaderFiles"
|
||||
displayName="Header Files"
|
||||
projectFiles="true">
|
||||
</logicalFolder>
|
||||
<logicalFolder name="LinkerScript"
|
||||
displayName="Linker Files"
|
||||
projectFiles="true">
|
||||
</logicalFolder>
|
||||
<logicalFolder name="SourceFiles"
|
||||
displayName="Source Files"
|
||||
projectFiles="true">
|
||||
<itemPath>../../src/crl.c</itemPath>
|
||||
<itemPath>../../src/internal.c</itemPath>
|
||||
<itemPath>../../src/io.c</itemPath>
|
||||
<itemPath>../../src/keys.c</itemPath>
|
||||
<itemPath>../../src/ocsp.c</itemPath>
|
||||
<itemPath>../../src/sniffer.c</itemPath>
|
||||
<itemPath>../../src/ssl.c</itemPath>
|
||||
<itemPath>../../src/tls.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/aes.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/arc4.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/asm.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/asn.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/coding.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/des3.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/dh.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/dsa.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/ecc.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/ecc_fp.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/error.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/hc128.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/hmac.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/integer.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/logging.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/md2.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/md4.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/md5.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/memory.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/misc.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/pwdbased.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/rabbit.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/random.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/ripemd.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/rsa.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/sha.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/sha256.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/sha512.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/tfm.c</itemPath>
|
||||
<itemPath>../../mcapi/crypto.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/compress.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/camellia.c</itemPath>
|
||||
<itemPath>../../ctaocrypt/src/wc_port.c</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="ExternalFiles"
|
||||
displayName="Important Files"
|
||||
projectFiles="false">
|
||||
<itemPath>Makefile</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<sourceRootList>
|
||||
<Elem>..</Elem>
|
||||
<Elem>../../ctaocrypt/src</Elem>
|
||||
</sourceRootList>
|
||||
<projectmakefile>Makefile</projectmakefile>
|
||||
<confs>
|
||||
<conf name="default" type="3">
|
||||
<toolsSet>
|
||||
<developmentServer>localhost</developmentServer>
|
||||
<targetDevice>PIC32MX795F512L</targetDevice>
|
||||
<targetHeader></targetHeader>
|
||||
<targetPluginBoard></targetPluginBoard>
|
||||
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
||||
<languageToolchain>XC32</languageToolchain>
|
||||
<languageToolchainVersion>1.30</languageToolchainVersion>
|
||||
<platform>3</platform>
|
||||
</toolsSet>
|
||||
<compileType>
|
||||
<archiverTool>
|
||||
</archiverTool>
|
||||
</compileType>
|
||||
<makeCustomizationType>
|
||||
<makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
|
||||
<makeCustomizationPreStep></makeCustomizationPreStep>
|
||||
<makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
|
||||
<makeCustomizationPostStep></makeCustomizationPostStep>
|
||||
<makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
|
||||
<makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
|
||||
<makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
|
||||
</makeCustomizationType>
|
||||
<C32>
|
||||
<property key="additional-warnings" value="false"/>
|
||||
<property key="enable-app-io" value="false"/>
|
||||
<property key="enable-omit-frame-pointer" value="false"/>
|
||||
<property key="enable-symbols" value="false"/>
|
||||
<property key="enable-unroll-loops" value="false"/>
|
||||
<property key="exclude-floating-point" value="false"/>
|
||||
<property key="extra-include-directories"
|
||||
value="../../;../../mcapi;../../zlib-1.2.7;/Users/chrisc/yaSSL/products/cyassl/git/cyassl57/zlib-1.2.7"/>
|
||||
<property key="generate-16-bit-code" value="false"/>
|
||||
<property key="isolate-each-function" value="false"/>
|
||||
<property key="make-warnings-into-errors" value="false"/>
|
||||
<property key="optimization-level" value="-Os"/>
|
||||
<property key="place-data-into-section" value="false"/>
|
||||
<property key="post-instruction-scheduling" value="default"/>
|
||||
<property key="pre-instruction-scheduling" value="default"/>
|
||||
<property key="preprocessor-macros"
|
||||
value="CYASSL_SHA512;CYASSL_SHA384;CYASSL_AES_COUNTER;CYASSL_AES_DIRECT;HAVE_ECC;HAVE_LIBZ;HAVE_MCAPI"/>
|
||||
<property key="strict-ansi" value="false"/>
|
||||
<property key="support-ansi" value="false"/>
|
||||
<property key="use-cci" value="false"/>
|
||||
<property key="use-iar" value="false"/>
|
||||
<property key="use-indirect-calls" value="false"/>
|
||||
</C32>
|
||||
<C32-AS>
|
||||
<property key="assembler-symbols" value=""/>
|
||||
<property key="enable-symbols" value="false"/>
|
||||
<property key="exclude-floating-point-library" value="false"/>
|
||||
<property key="expand-macros" value="false"/>
|
||||
<property key="extra-include-directories-for-assembler" value="../../"/>
|
||||
<property key="extra-include-directories-for-preprocessor" value="../../"/>
|
||||
<property key="false-conditionals" value="false"/>
|
||||
<property key="keep-locals" value="false"/>
|
||||
<property key="list-assembly" value="false"/>
|
||||
<property key="list-source" value="false"/>
|
||||
<property key="list-symbols" value="false"/>
|
||||
<property key="oXC32asm-list-to-file" value="false"/>
|
||||
<property key="omit-debug-dirs" value="false"/>
|
||||
<property key="omit-forms" value="false"/>
|
||||
<property key="preprocessor-macros" value=""/>
|
||||
<property key="warning-level" value=""/>
|
||||
</C32-AS>
|
||||
<C32-LD>
|
||||
<property key="additional-options-use-response-files" value="false"/>
|
||||
<property key="enable-check-sections" value="false"/>
|
||||
<property key="exclude-floating-point-library" value="false"/>
|
||||
<property key="exclude-standard-libraries" value="false"/>
|
||||
<property key="extra-lib-directories" value=""/>
|
||||
<property key="generate-16-bit-code" value="false"/>
|
||||
<property key="generate-cross-reference-file" value="false"/>
|
||||
<property key="heap-size" value=""/>
|
||||
<property key="input-libraries" value=""/>
|
||||
<property key="linker-symbols" value=""/>
|
||||
<property key="map-file" value=""/>
|
||||
<property key="no-startup-files" value="false"/>
|
||||
<property key="oXC32ld-extra-opts" value=""/>
|
||||
<property key="optimization-level" value="-Os"/>
|
||||
<property key="preprocessor-macros" value=""/>
|
||||
<property key="remove-unused-sections" value="true"/>
|
||||
<property key="report-memory-usage" value="false"/>
|
||||
<property key="stack-size" value=""/>
|
||||
<property key="symbol-stripping" value="-s"/>
|
||||
<property key="trace-symbols" value=""/>
|
||||
<property key="warn-section-align" value="false"/>
|
||||
</C32-LD>
|
||||
<C32CPP>
|
||||
<property key="additional-warnings" value="false"/>
|
||||
<property key="check-new" value="false"/>
|
||||
<property key="eh-specs" value="false"/>
|
||||
<property key="enable-app-io" value="false"/>
|
||||
<property key="enable-omit-frame-pointer" value="false"/>
|
||||
<property key="enable-symbols" value="true"/>
|
||||
<property key="enable-unroll-loops" value="false"/>
|
||||
<property key="exceptions" value="false"/>
|
||||
<property key="exclude-floating-point" value="false"/>
|
||||
<property key="extra-include-directories" value=""/>
|
||||
<property key="generate-16-bit-code" value="false"/>
|
||||
<property key="isolate-each-function" value="false"/>
|
||||
<property key="make-warnings-into-errors" value="false"/>
|
||||
<property key="optimization-level" value=""/>
|
||||
<property key="place-data-into-section" value="false"/>
|
||||
<property key="post-instruction-scheduling" value="default"/>
|
||||
<property key="pre-instruction-scheduling" value="default"/>
|
||||
<property key="preprocessor-macros" value=""/>
|
||||
<property key="rtti" value="false"/>
|
||||
<property key="strict-ansi" value="false"/>
|
||||
<property key="use-cci" value="false"/>
|
||||
<property key="use-indirect-calls" value="false"/>
|
||||
</C32CPP>
|
||||
<C32Global>
|
||||
<property key="legacy-libc" value="false"/>
|
||||
<property key="save-temps" value="false"/>
|
||||
<property key="wpo-lto" value="false"/>
|
||||
</C32Global>
|
||||
<SKDEPIC32PlatformTool>
|
||||
<property key="whatToProgram" value="all"/>
|
||||
</SKDEPIC32PlatformTool>
|
||||
</conf>
|
||||
</confs>
|
||||
</configurationDescriptor>
|
|
@ -0,0 +1,11 @@
|
|||
# vim:ft=automake
|
||||
# All paths should be given relative to the root
|
||||
#
|
||||
|
||||
EXTRA_DIST += \
|
||||
mcapi/cyassl.X/Makefile
|
||||
|
||||
EXTRA_DIST += \
|
||||
mcapi/cyassl.X/nbproject/configurations.xml \
|
||||
mcapi/cyassl.X/nbproject/project.xml
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
||||
<name>cyassl</name>
|
||||
<creation-uuid>93bbfc3a-a0fa-4d48-bbc8-6cd47a2bd05b</creation-uuid>
|
||||
<make-project-type>0</make-project-type>
|
||||
<c-extensions>c</c-extensions>
|
||||
<cpp-extensions/>
|
||||
<header-extensions/>
|
||||
<sourceEncoding>ISO-8859-1</sourceEncoding>
|
||||
<make-dep-projects/>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
19
FreeRTOS-Plus/Source/CyaSSL/mcapi/include.am
Normal file
19
FreeRTOS-Plus/Source/CyaSSL/mcapi/include.am
Normal file
|
@ -0,0 +1,19 @@
|
|||
# vim:ft=automake
|
||||
# included from Top Level Makefile.am
|
||||
# All paths should be given relative to the root
|
||||
|
||||
if BUILD_MCAPI
|
||||
check_PROGRAMS += mcapi/test
|
||||
noinst_PROGRAMS += mcapi/test
|
||||
mcapi_test_SOURCES = mcapi/crypto.c \
|
||||
mcapi/mcapi_test.c
|
||||
mcapi_test_LDADD = src/libcyassl.la
|
||||
mcapi_test_DEPENDENCIES = src/libcyassl.la
|
||||
endif
|
||||
|
||||
noinst_HEADERS += mcapi/crypto.h
|
||||
|
||||
EXTRA_DIST += \
|
||||
mcapi/README \
|
||||
mcapi/PIC32MZ-serial.h
|
||||
|
1482
FreeRTOS-Plus/Source/CyaSSL/mcapi/mcapi_test.c
Normal file
1482
FreeRTOS-Plus/Source/CyaSSL/mcapi/mcapi_test.c
Normal file
File diff suppressed because it is too large
Load diff
108
FreeRTOS-Plus/Source/CyaSSL/mcapi/zlib.X/Makefile
Normal file
108
FreeRTOS-Plus/Source/CyaSSL/mcapi/zlib.X/Makefile
Normal file
|
@ -0,0 +1,108 @@
|
|||
#
|
||||
# There exist several targets which are by default empty and which can be
|
||||
# used for execution of your targets. These targets are usually executed
|
||||
# before and after some main targets. They are:
|
||||
#
|
||||
# .build-pre: called before 'build' target
|
||||
# .build-post: called after 'build' target
|
||||
# .clean-pre: called before 'clean' target
|
||||
# .clean-post: called after 'clean' target
|
||||
# .clobber-pre: called before 'clobber' target
|
||||
# .clobber-post: called after 'clobber' target
|
||||
# .all-pre: called before 'all' target
|
||||
# .all-post: called after 'all' target
|
||||
# .help-pre: called before 'help' target
|
||||
# .help-post: called after 'help' target
|
||||
#
|
||||
# Targets beginning with '.' are not intended to be called on their own.
|
||||
#
|
||||
# Main targets can be executed directly, and they are:
|
||||
#
|
||||
# build build a specific configuration
|
||||
# clean remove built files from a configuration
|
||||
# clobber remove all built files
|
||||
# all build all configurations
|
||||
# help print help mesage
|
||||
#
|
||||
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
|
||||
# .help-impl are implemented in nbproject/makefile-impl.mk.
|
||||
#
|
||||
# Available make variables:
|
||||
#
|
||||
# CND_BASEDIR base directory for relative paths
|
||||
# CND_DISTDIR default top distribution directory (build artifacts)
|
||||
# CND_BUILDDIR default top build directory (object files, ...)
|
||||
# CONF name of current configuration
|
||||
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
|
||||
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
|
||||
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
|
||||
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
|
||||
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
|
||||
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
|
||||
#
|
||||
# NOCDDL
|
||||
|
||||
|
||||
# Environment
|
||||
MKDIR=mkdir
|
||||
CP=cp
|
||||
CCADMIN=CCadmin
|
||||
RANLIB=ranlib
|
||||
|
||||
|
||||
# build
|
||||
build: .build-post
|
||||
|
||||
.build-pre:
|
||||
# Add your pre 'build' code here...
|
||||
|
||||
.build-post: .build-impl
|
||||
# Add your post 'build' code here...
|
||||
|
||||
|
||||
# clean
|
||||
clean: .clean-post
|
||||
|
||||
.clean-pre:
|
||||
# Add your pre 'clean' code here...
|
||||
|
||||
.clean-post: .clean-impl
|
||||
# Add your post 'clean' code here...
|
||||
|
||||
|
||||
# clobber
|
||||
clobber: .clobber-post
|
||||
|
||||
.clobber-pre:
|
||||
# Add your pre 'clobber' code here...
|
||||
|
||||
.clobber-post: .clobber-impl
|
||||
# Add your post 'clobber' code here...
|
||||
|
||||
|
||||
# all
|
||||
all: .all-post
|
||||
|
||||
.all-pre:
|
||||
# Add your pre 'all' code here...
|
||||
|
||||
.all-post: .all-impl
|
||||
# Add your post 'all' code here...
|
||||
|
||||
|
||||
# help
|
||||
help: .help-post
|
||||
|
||||
.help-pre:
|
||||
# Add your pre 'help' code here...
|
||||
|
||||
.help-post: .help-impl
|
||||
# Add your post 'help' code here...
|
||||
|
||||
|
||||
|
||||
# include project implementation makefile
|
||||
include nbproject/Makefile-impl.mk
|
||||
|
||||
# include project make variables
|
||||
include nbproject/Makefile-variables.mk
|
|
@ -0,0 +1,157 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configurationDescriptor version="62">
|
||||
<logicalFolder name="root" displayName="root" projectFiles="true">
|
||||
<logicalFolder name="HeaderFiles"
|
||||
displayName="Header Files"
|
||||
projectFiles="true">
|
||||
</logicalFolder>
|
||||
<logicalFolder name="LinkerScript"
|
||||
displayName="Linker Files"
|
||||
projectFiles="true">
|
||||
</logicalFolder>
|
||||
<logicalFolder name="SourceFiles"
|
||||
displayName="Source Files"
|
||||
projectFiles="true">
|
||||
<itemPath>../../zlib-1.2.8/adler32.c</itemPath>
|
||||
<itemPath>../../zlib-1.2.8/compress.c</itemPath>
|
||||
<itemPath>../../zlib-1.2.8/crc32.c</itemPath>
|
||||
<itemPath>../../zlib-1.2.8/deflate.c</itemPath>
|
||||
<itemPath>../../zlib-1.2.8/gzclose.c</itemPath>
|
||||
<itemPath>../../zlib-1.2.8/gzlib.c</itemPath>
|
||||
<itemPath>../../zlib-1.2.8/gzread.c</itemPath>
|
||||
<itemPath>../../zlib-1.2.8/gzwrite.c</itemPath>
|
||||
<itemPath>../../zlib-1.2.8/infback.c</itemPath>
|
||||
<itemPath>../../zlib-1.2.8/inffast.c</itemPath>
|
||||
<itemPath>../../zlib-1.2.8/inflate.c</itemPath>
|
||||
<itemPath>../../zlib-1.2.8/inftrees.c</itemPath>
|
||||
<itemPath>../../zlib-1.2.8/trees.c</itemPath>
|
||||
<itemPath>../../zlib-1.2.8/uncompr.c</itemPath>
|
||||
<itemPath>../../zlib-1.2.8/zutil.c</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="ExternalFiles"
|
||||
displayName="Important Files"
|
||||
projectFiles="false">
|
||||
<itemPath>Makefile</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<projectmakefile>Makefile</projectmakefile>
|
||||
<confs>
|
||||
<conf name="default" type="3">
|
||||
<toolsSet>
|
||||
<developmentServer>localhost</developmentServer>
|
||||
<targetDevice>PIC32MX795F512L</targetDevice>
|
||||
<targetHeader></targetHeader>
|
||||
<targetPluginBoard></targetPluginBoard>
|
||||
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
||||
<languageToolchain>XC32</languageToolchain>
|
||||
<languageToolchainVersion>1.10</languageToolchainVersion>
|
||||
<platform>4</platform>
|
||||
</toolsSet>
|
||||
<compileType>
|
||||
<archiverTool>
|
||||
</archiverTool>
|
||||
</compileType>
|
||||
<makeCustomizationType>
|
||||
<makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
|
||||
<makeCustomizationPreStep></makeCustomizationPreStep>
|
||||
<makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
|
||||
<makeCustomizationPostStep></makeCustomizationPostStep>
|
||||
<makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
|
||||
<makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
|
||||
<makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
|
||||
</makeCustomizationType>
|
||||
<C32>
|
||||
<property key="additional-warnings" value="false"/>
|
||||
<property key="enable-app-io" value="false"/>
|
||||
<property key="enable-omit-frame-pointer" value="false"/>
|
||||
<property key="enable-symbols" value="true"/>
|
||||
<property key="enable-unroll-loops" value="false"/>
|
||||
<property key="exclude-floating-point" value="false"/>
|
||||
<property key="extra-include-directories" value="../../zlib-1.2.8"/>
|
||||
<property key="generate-16-bit-code" value="false"/>
|
||||
<property key="isolate-each-function" value="false"/>
|
||||
<property key="make-warnings-into-errors" value="false"/>
|
||||
<property key="optimization-level" value="-Os"/>
|
||||
<property key="place-data-into-section" value="false"/>
|
||||
<property key="post-instruction-scheduling" value="default"/>
|
||||
<property key="pre-instruction-scheduling" value="default"/>
|
||||
<property key="preprocessor-macros"
|
||||
value="HAVE_HIDDEN;MAX_MEM_LEVEL=1;MAX_WBITS=11"/>
|
||||
<property key="strict-ansi" value="false"/>
|
||||
<property key="support-ansi" value="false"/>
|
||||
<property key="use-cci" value="false"/>
|
||||
<property key="use-indirect-calls" value="false"/>
|
||||
</C32>
|
||||
<C32-AS>
|
||||
<property key="assembler-symbols" value=""/>
|
||||
<property key="enable-symbols" value="true"/>
|
||||
<property key="exclude-floating-point-library" value="false"/>
|
||||
<property key="expand-macros" value="false"/>
|
||||
<property key="extra-include-directories-for-assembler" value=""/>
|
||||
<property key="extra-include-directories-for-preprocessor" value=""/>
|
||||
<property key="false-conditionals" value="false"/>
|
||||
<property key="keep-locals" value="false"/>
|
||||
<property key="list-assembly" value="false"/>
|
||||
<property key="list-source" value="false"/>
|
||||
<property key="list-symbols" value="false"/>
|
||||
<property key="oXC32asm-list-to-file" value="false"/>
|
||||
<property key="omit-debug-dirs" value="false"/>
|
||||
<property key="omit-forms" value="false"/>
|
||||
<property key="preprocessor-macros" value=""/>
|
||||
<property key="warning-level" value=""/>
|
||||
</C32-AS>
|
||||
<C32-LD>
|
||||
<property key="additional-options-use-response-files" value="false"/>
|
||||
<property key="enable-check-sections" value="false"/>
|
||||
<property key="exclude-floating-point-library" value="false"/>
|
||||
<property key="exclude-standard-libraries" value="false"/>
|
||||
<property key="extra-lib-directories" value=""/>
|
||||
<property key="generate-16-bit-code" value="false"/>
|
||||
<property key="generate-cross-reference-file" value="false"/>
|
||||
<property key="heap-size" value=""/>
|
||||
<property key="input-libraries" value=""/>
|
||||
<property key="linker-symbols" value=""/>
|
||||
<property key="map-file" value=""/>
|
||||
<property key="no-startup-files" value="false"/>
|
||||
<property key="optimization-level" value=""/>
|
||||
<property key="preprocessor-macros" value=""/>
|
||||
<property key="remove-unused-sections" value="false"/>
|
||||
<property key="report-memory-usage" value="false"/>
|
||||
<property key="stack-size" value=""/>
|
||||
<property key="symbol-stripping" value=""/>
|
||||
<property key="trace-symbols" value=""/>
|
||||
<property key="warn-section-align" value="false"/>
|
||||
</C32-LD>
|
||||
<C32CPP>
|
||||
<property key="additional-warnings" value="false"/>
|
||||
<property key="check-new" value="false"/>
|
||||
<property key="eh-specs" value="true"/>
|
||||
<property key="enable-app-io" value="false"/>
|
||||
<property key="enable-omit-frame-pointer" value="false"/>
|
||||
<property key="enable-symbols" value="true"/>
|
||||
<property key="enable-unroll-loops" value="false"/>
|
||||
<property key="exceptions" value="true"/>
|
||||
<property key="exclude-floating-point" value="false"/>
|
||||
<property key="extra-include-directories" value=""/>
|
||||
<property key="generate-16-bit-code" value="false"/>
|
||||
<property key="isolate-each-function" value="false"/>
|
||||
<property key="make-warnings-into-errors" value="false"/>
|
||||
<property key="optimization-level" value=""/>
|
||||
<property key="place-data-into-section" value="false"/>
|
||||
<property key="post-instruction-scheduling" value="default"/>
|
||||
<property key="pre-instruction-scheduling" value="default"/>
|
||||
<property key="preprocessor-macros" value=""/>
|
||||
<property key="rtti" value="true"/>
|
||||
<property key="strict-ansi" value="false"/>
|
||||
<property key="use-cci" value="false"/>
|
||||
<property key="use-indirect-calls" value="false"/>
|
||||
</C32CPP>
|
||||
<C32Global>
|
||||
<property key="legacy-libc" value="false"/>
|
||||
</C32Global>
|
||||
<SKDEPIC32PlatformTool>
|
||||
<property key="whatToProgram" value="all"/>
|
||||
</SKDEPIC32PlatformTool>
|
||||
</conf>
|
||||
</confs>
|
||||
</configurationDescriptor>
|
|
@ -0,0 +1,11 @@
|
|||
# vim:ft=automake
|
||||
# All paths should be given relative to the root
|
||||
#
|
||||
|
||||
EXTRA_DIST += \
|
||||
mcapi/zlib.X/Makefile
|
||||
|
||||
EXTRA_DIST += \
|
||||
mcapi/zlib.X/nbproject/configurations.xml \
|
||||
mcapi/zlib.X/nbproject/project.xml
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
||||
<name>zlib</name>
|
||||
<creation-uuid>8eef651d-e634-46ae-9183-39443c98e390</creation-uuid>
|
||||
<make-project-type>0</make-project-type>
|
||||
<c-extensions>c</c-extensions>
|
||||
<cpp-extensions/>
|
||||
<header-extensions/>
|
||||
<sourceEncoding>ISO-8859-1</sourceEncoding>
|
||||
<make-dep-projects/>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
Loading…
Add table
Add a link
Reference in a new issue