This commit is contained in:
Takashi Kojo
2014-03-11 11:32:16 +09:00
parent a9ca608030
commit 6235c949b3
22 changed files with 1089 additions and 69 deletions

View File

@@ -18,6 +18,15 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if defined(CYASSL_MICROCHIP_PIC32MZ)
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <cyassl/ctaocrypt/settings.h>
#define SYSTEMConfigPerformance /* void out SYSTEMConfigPerformance(); */
#else
#if defined(CYASSL_MICROCHIP_PIC32MZ)
#define MICROCHIP_PIC32
#include <xc.h>

82
mplabx/crypto.h Normal file
View File

@@ -0,0 +1,82 @@
/*
* File: crypto.h
* Author: C15009
*
* Created on July 23, 2013, 12:26 PM
*/
#ifndef CRYPTO_H
#define CRYPTO_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct saCtrl {
unsigned int CRYPTOALGO : 4;
unsigned int MULTITASK : 3;
unsigned int KEYSIZE : 2;
unsigned int ENCTYPE : 1;
unsigned int ALGO : 7;
unsigned int : 3;
unsigned int FLAGS : 1;
unsigned int FB : 1;
unsigned int LOADIV : 1;
unsigned int LNC : 1;
unsigned int IRFLAG : 1;
unsigned int ICVONLY : 1;
unsigned int OR_EN : 1;
unsigned int NO_RX : 1;
unsigned int : 1;
unsigned int VERIFY : 1;
unsigned int : 2;
} saCtrl;
typedef struct securityAssociation {
saCtrl SA_CTRL;
unsigned int SA_AUTHKEY[8];
unsigned int SA_ENCKEY[8];
unsigned int SA_AUTHIV[8];
unsigned int SA_ENCIV[4];
} securityAssociation;
typedef struct bdCtrl {
unsigned int BUFLEN : 16;
unsigned int CBD_INT_EN : 1;
unsigned int PKT_INT_EN : 1;
unsigned int LIFM : 1;
unsigned int LAST_BD: 1;
unsigned int : 2;
unsigned int SA_FETCH_EN : 1;
unsigned int : 4;
unsigned int CRY_MODE: 3;
unsigned int : 1;
unsigned int DESC_EN : 1;
/* Naveen did this
unsigned int CRDMA_EN: 1;
unsigned int UPD_RES : 1;
unsigned int SA_FETCH_EN : 1;
unsigned int SEC_CODE : 1;
unsigned int : 7;
unsigned int DESC_EN : 1; */
} bdCtrl;
typedef struct bufferDescriptor {
bdCtrl BD_CTRL;
// unsigned int BD_CTRL;
unsigned int SA_ADDR;
unsigned int SRCADDR;
unsigned int DSTADDR;
unsigned int NXTPTR;
unsigned int UPDPTR;
unsigned int MSGLEN;
unsigned int ENCOFF;
} bufferDescriptor;
#ifdef __cplusplus
}
#endif
#endif /* CRYPTO_H */

52
mplabx/ssl-dummy.c Normal file
View File

@@ -0,0 +1,52 @@
/* ssl-dummy.c
*
* Copyright (C) 2006-2013 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <cyassl/ssl.h>
#include <cyassl/internal.h>
Signer* GetCA(void* vp, byte* hash)
{
return NULL ;
}
int CyaSSL_dtls(CYASSL* ssl)
{
return NULL ;
}
int CyaSSL_get_using_nonblock(CYASSL* ssl)
{
return NULL ;
}
Signer* GetCAByName(void* vp, byte* hash)
{
return NULL ;
}
int CyaSSL_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz)
{
return NULL ;
}

View File

@@ -19,6 +19,17 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <cyassl/ctaocrypt/settings.h>
#include <stdio.h>
#include <stdlib.h>
#include "PIC32MZ-serial.h"
#define SYSTEMConfigPerformance /* void out SYSTEMConfigPerformance(); */
#else
#if defined(CYASSL_MICROCHIP_PIC32MZ)
#define MICROCHIP_PIC32
#include <xc.h>