Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
06724fbb
Commit
06724fbb
authored
Jun 03, 2015
by
Johny Mattsson
Browse files
Renamed SHA2 support option to SHA2_ENABLE per request.
parent
2d1e6915
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/crypto/digests.c
View file @
06724fbb
...
...
@@ -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
)
#if
n
def
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
)
...
...
app/crypto/sha2.c
View file @
06724fbb
...
...
@@ -32,8 +32,9 @@
*
*/
#i
fndef WITHOUT_SHA2
#i
nclude "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
app/include/user_config.h
View file @
06724fbb
...
...
@@ -41,6 +41,7 @@
#define CLIENT_SSL_ENABLE
#define GPIO_INTERRUPT_ENABLE
#define SHA2_ENABLE
// #define BUILD_WOFS 1
#define BUILD_SPIFFS 1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment