mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-10 18:06:29 +00:00
components/mbedtls: MBEDTLS Handshake result check
modify esp_config.h add some feature for support http2.0 protocol, TLS Handshake OK.
This commit is contained in:
@@ -64,7 +64,7 @@ int esp_aes_setkey_enc( AES_CTX *ctx, const unsigned char *key,
|
||||
unsigned int keybits )
|
||||
{
|
||||
enum AES_BITS keybit;
|
||||
uint16 keybyte = keybits / 8;
|
||||
uint16_t keybyte = keybits / 8;
|
||||
switch (keybits){
|
||||
case 128:
|
||||
keybit = AES128;
|
||||
@@ -95,7 +95,7 @@ int esp_aes_setkey_dec( AES_CTX *ctx, const unsigned char *key,
|
||||
unsigned int keybits )
|
||||
{
|
||||
enum AES_BITS keybit;
|
||||
uint16 keybyte = keybits / 8;
|
||||
uint16_t keybyte = keybits / 8;
|
||||
switch (keybits){
|
||||
case 128:
|
||||
keybit = AES128;
|
||||
|
||||
@@ -1018,9 +1018,9 @@ static void esp_mpi_mul_hlp( size_t i, esp_mpi_uint *s, esp_mpi_uint *d, esp_mpi
|
||||
static int mul_pram_alloc( mpi *X, const mpi *A, const mpi *B, char **pA, char **pB, char **pX, size_t *bites)
|
||||
{
|
||||
char *sa, *sb, *sx;
|
||||
int algn;
|
||||
// int algn;
|
||||
int words, bytes;
|
||||
int abytes, bbytes, cbytes;
|
||||
int abytes, bbytes;
|
||||
|
||||
if (A->n > B->n)
|
||||
words = A->n;
|
||||
@@ -2178,6 +2178,3 @@ cleanup:
|
||||
return( ret );
|
||||
}
|
||||
|
||||
|
||||
#endif /* ESP_BIGNUM_ALT */
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#ifndef ESP_AES_H
|
||||
#define ESP_AES_H
|
||||
|
||||
#include "c_types.h"
|
||||
#include "esp_types.h"
|
||||
#include "rom/ets_sys.h"
|
||||
#include "rom/aes.h"
|
||||
|
||||
@@ -41,8 +41,8 @@ extern "C" {
|
||||
|
||||
typedef struct{
|
||||
bool flag;
|
||||
uint16 keybites;
|
||||
uint8 key[32];
|
||||
uint16_t keybites;
|
||||
uint8_t key[32];
|
||||
}key_context, KEY_CTX;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#ifndef _ESP_BIGNUM_H
|
||||
#define _ESP_BIGNUM_H
|
||||
|
||||
#include "c_types.h"
|
||||
#include "esp_types.h"
|
||||
#include "rom/ets_sys.h"
|
||||
#include "rom/bigint.h"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _MULTI_CRYPTO_H_
|
||||
#define _MULTI_CRYPTO_H_
|
||||
|
||||
#include "c_types.h"
|
||||
#include "esp_types.h"
|
||||
#include "rom/ets_sys.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _ESP_SHA_H_
|
||||
#define _ESP_SHA_H_
|
||||
|
||||
#include "c_types.h"
|
||||
#include "esp_types.h"
|
||||
#include "rom/ets_sys.h"
|
||||
#include "rom/sha.h"
|
||||
|
||||
@@ -164,6 +164,8 @@ typedef sha_context SHA512_CTX;
|
||||
*/
|
||||
void esp_sha512_init( SHA512_CTX *ctx );
|
||||
|
||||
void esp_sha512_process( SHA512_CTX *ctx, const unsigned char data[128] );
|
||||
|
||||
/**
|
||||
* \brief Clear SHA-512 context
|
||||
*
|
||||
|
||||
@@ -205,6 +205,11 @@ void esp_sha512_init( SHA512_CTX *ctx )
|
||||
SHA_UNLOCK();
|
||||
}
|
||||
|
||||
void esp_sha512_process( SHA512_CTX *ctx, const unsigned char data[128] )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void esp_sha512_free( SHA512_CTX *ctx )
|
||||
{
|
||||
if( ctx == NULL )
|
||||
|
||||
Reference in New Issue
Block a user