Browse Source

extmod/modussl_axtls: Further changes to allow alternative SSL modules.

Make variable MICROPY_SSL_AXTLS=1 should be defined to activate modussl_axtls
and link with -laxtls.
pull/2241/head
Paul Sokolovsky 8 years ago
parent
commit
20283aec10
  1. 2
      extmod/modussl_axtls.c
  2. 5
      py/py.mk
  3. 2
      unix/mpconfigport.h
  4. 1
      unix/mpconfigport.mk

2
extmod/modussl_axtls.c

@ -32,7 +32,7 @@
#include "py/runtime.h"
#include "py/stream.h"
#if MICROPY_PY_USSL
#if MICROPY_PY_USSL && MICROPY_SSL_AXTLS
#include "ssl.h"

5
py/py.mk

@ -20,9 +20,12 @@ INC += -I../lib
INC += -I../lib/netutils
ifeq ($(MICROPY_PY_USSL),1)
CFLAGS_MOD += -DMICROPY_PY_USSL=1 -I../lib/axtls/ssl -I../lib/axtls/crypto -I../lib/axtls/config
CFLAGS_MOD += -DMICROPY_PY_USSL=1
ifeq ($(MICROPY_SSL_AXTLS),1)
CFLAGS_MOD += -DMICROPY_SSL_AXTLS=1 -I../lib/axtls/ssl -I../lib/axtls/crypto -I../lib/axtls/config
LDFLAGS_MOD += -L../lib/axtls/_stage -laxtls
endif
endif
#ifeq ($(MICROPY_PY_LWIP),1)
#CFLAGS_MOD += -DMICROPY_PY_LWIP=1 -I../lib/lwip/src/include -I../lib/lwip/src/include/ipv4 -I../extmod/lwip-include

2
unix/mpconfigport.h

@ -111,7 +111,7 @@
#define MICROPY_PY_URE (1)
#define MICROPY_PY_UHEAPQ (1)
#define MICROPY_PY_UHASHLIB (1)
#if MICROPY_PY_USSL
#if MICROPY_PY_USSL && MICROPY_SSL_AXTLS
#define MICROPY_PY_UHASHLIB_SHA1 (1)
#endif
#define MICROPY_PY_UBINASCII (1)

1
unix/mpconfigport.mk

@ -28,6 +28,7 @@ MICROPY_PY_FFI = 1
# ussl module requires axtls
MICROPY_PY_USSL = 1
MICROPY_SSL_AXTLS = 1
# jni module requires JVM/JNI
MICROPY_PY_JNI = 0

Loading…
Cancel
Save