Commit 06724fbb authored by Johny Mattsson's avatar Johny Mattsson
Browse files

Renamed SHA2 support option to SHA2_ENABLE per request.

parent 2d1e6915
......@@ -28,6 +28,7 @@
*
*/
#include "digests.h"
#include "user_config.h"
#include "lwip/mem.h"
#include "lwip/arch.h"
#include "ssl/ssl_crypto.h"
......@@ -53,7 +54,7 @@ static const digest_mech_info_t hash_mechs[] =
MECH(MD2, MD2_SIZE, 16)
,MECH(MD5, MD5_SIZE, 64)
,MECH(SHA1, SHA1_SIZE, 64)
#ifndef WITHOUT_SHA2
#ifdef SHA2_ENABLE
,MECH(SHA256, SHA256_DIGEST_LENGTH, SHA256_BLOCK_LENGTH)
,MECH(SHA384, SHA384_DIGEST_LENGTH, SHA384_BLOCK_LENGTH)
,MECH(SHA512, SHA512_DIGEST_LENGTH, SHA512_BLOCK_LENGTH)
......
......@@ -32,8 +32,9 @@
*
*/
#ifndef WITHOUT_SHA2
#include "user_config.h"
#ifdef SHA2_ENABLE
#include "sha2.h"
#include <string.h> /* memcpy()/memset() or bcopy()/bzero() */
#define assert(x) do {} while (0)
......@@ -909,4 +910,4 @@ void ICACHE_FLASH_ATTR SHA384_Final(sha2_byte digest[], SHA384_CTX* context) {
MEMSET_BZERO(context, sizeof(SHA384_CTX));
}
#endif // WITHOUT_SHA2
#endif // SHA2_ENABLE
......@@ -41,6 +41,7 @@
#define CLIENT_SSL_ENABLE
#define GPIO_INTERRUPT_ENABLE
#define SHA2_ENABLE
// #define BUILD_WOFS 1
#define BUILD_SPIFFS 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment