Skip to content

Commit

Permalink
Move all SSL constants into PROGMEM, free 1.2KB (esp8266#6162)
Browse files Browse the repository at this point in the history
Rewrite all the integer math operations with const input parameters to
use PROGMEM properly (pgm_read_xx or memcpy_P), and move all the EC
order and generators and SHA OIDs to PROGMEM.

This frees around 1.2KB of heap for any SSL applications.

Also delete unneeded objects from the bearssl.a library to shrink the
GIT repo size.
  • Loading branch information
earlephilhower authored Jun 6, 2019
1 parent 6722d1d commit 6bfb1ba
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/sdk/include/bearssl/bearssl_git.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Do not edit -- Automatically generated by tools/sdk/ssl/bearssl/Makefile
#define BEARSSL_GIT 6b9587f
#define BEARSSL_GIT 0d7d5e2
Binary file modified tools/sdk/lib/libbearssl.a
Binary file not shown.
1 change: 1 addition & 0 deletions tools/sdk/ssl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ all T0 clean: bearssl/README.txt

install: all version-header
cp bearssl/esp8266/libbearssl.a ../lib/.
ar d ../lib/libbearssl.a `ar t ../lib/libbearssl.a | egrep 'i31|i32|x86|sse|pwr8|i62|m31|m32|m62|m64|ct64|ctmul64'` # Remove unneeded objects
cp bearssl/inc/bearssl*.h ../include/bearssl/.

bearssl/README.txt:
Expand Down

0 comments on commit 6bfb1ba

Please sign in to comment.