[realtek-ambz] Enable Mbed-TLS for MD5 hashing, remove Polar SSL (#156)
* Enable Mbed-TLS, remove Polar SSL * Reformat lt_defs.h --------- Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
This commit is contained in:
@@ -5,9 +5,6 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
// available built-in implementations
|
||||
#if LT_ARD_MD5_POLARSSL
|
||||
#include "MD5PolarSSLImpl.h"
|
||||
#endif
|
||||
#if LT_ARD_MD5_MBEDTLS
|
||||
#include "MD5MbedTLSImpl.h"
|
||||
#endif
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
/* Copyright (c) Kuba Szczodrzyński 2022-06-03. */
|
||||
|
||||
#if LT_ARD_MD5_POLARSSL
|
||||
|
||||
extern "C" {
|
||||
|
||||
#include <polarssl/md5.h>
|
||||
|
||||
void MD5Init(md5_context *context) {
|
||||
md5_init(context);
|
||||
md5_starts(context);
|
||||
}
|
||||
|
||||
void MD5Update(md5_context *context, const unsigned char *buf, unsigned len) {
|
||||
md5_update(context, buf, len);
|
||||
}
|
||||
|
||||
void MD5Final(unsigned char digest[16], md5_context *context) {
|
||||
md5_finish(context, digest);
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
#endif // LT_ARD_MD5_POLARSSL
|
||||
@@ -2,5 +2,5 @@
|
||||
|
||||
#error "Don't include this file directly"
|
||||
|
||||
#define LT_ARD_HAS_SERIAL 1
|
||||
#define LT_ARD_MD5_POLARSSL 1
|
||||
#define LT_ARD_HAS_SERIAL 1
|
||||
#define LT_ARD_MD5_MBEDTLS 1
|
||||
|
||||
@@ -152,7 +152,6 @@ Checking for option value should be done with `#if` (not with `#ifdef`!) - if it
|
||||
- `LT_ARD_HAS_WIFI` - WiFi library implemented
|
||||
- `LT_ARD_HAS_WIRE` - Wire (I²C) library implemented
|
||||
- `LT_ARD_HAS_SPI` - SPI library implemented
|
||||
- `LT_ARD_MD5_POLARSSL` - use PolarSSL for MD5 library
|
||||
- `LT_ARD_MD5_MBEDTLS` - use mbedTLS for MD5 library
|
||||
- `LT_ARD_MD5_HOSTAPD` - use hostapd for MD5 library
|
||||
- misc options
|
||||
|
||||
Reference in New Issue
Block a user