[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:
Hajo Noerenberg
2023-08-17 15:20:02 +02:00
committed by GitHub
parent e99c6124e7
commit ccf21b4eab
4 changed files with 2 additions and 30 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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