Skip to content

Commit

Permalink
Sendmail upgraded to ESP-Mail-Client v3.4.9 from v1.2.0, using Bear…
Browse files Browse the repository at this point in the history
…SSL instead of MbedTLS (#19460)

* `Sendmail` upgraded to ESP-Mail-Client v3.4.9 from v1.2.0, using BearSSL instead of MbedTLS

* Fix compilation on ESP8266

* Fix compilation

* fix compilation
  • Loading branch information
s-hadinger authored Sep 4, 2023
1 parent 1ea1258 commit c2f8821
Show file tree
Hide file tree
Showing 488 changed files with 150,895 additions and 32,312 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
### Changed
- Berry fast_loop is now called every 5ms whatever the Sleep value
- Reduce IRAM consumption of HDMI CEC to 1453 bytes
- `Sendmail` upgraded to ESP-Mail-Client v3.4.9 from v1.2.0, using BearSSL instead of MbedTLS

### Fixed
- PCF8574 mode 1 with base relays exception 3/28 regression from v12.4.0.4 (#19408)
Expand Down
4 changes: 2 additions & 2 deletions lib/lib_ssl/bearssl-esp8266/src/t_bearssl_x509.h
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ typedef struct {
* \param append_in issuer DN receiver callback (or `0`).
* \param append_in_ctx context for the issuer DN receiver callback.
*/
void br_x509_decoder_init(br_x509_decoder_context *ctx,
void br_x509_decoder_init_esp8266(br_x509_decoder_context *ctx,
void (*append_dn)(void *ctx, const void *buf, size_t len),
void *append_dn_ctx,
void (*append_in)(void *ctx, const void *buf, size_t len),
Expand All @@ -1048,7 +1048,7 @@ void br_x509_decoder_init(br_x509_decoder_context *ctx,
* \param data certificate data chunk.
* \param len certificate data chunk length (in bytes).
*/
void br_x509_decoder_push(br_x509_decoder_context *ctx,
void br_x509_decoder_push_tasmota(br_x509_decoder_context *ctx,
const void *data, size_t len);

/**
Expand Down
18 changes: 9 additions & 9 deletions lib/lib_ssl/bearssl-esp8266/src/x509/x509_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ t0_parse7E_signed(const unsigned char **p)
/* static const unsigned char t0_datablock[]; */


void br_x509_decoder_init_main(void *t0ctx);
void br_x509_decoder_init_main_tasmota(void *t0ctx);

void br_x509_decoder_run(void *t0ctx);
void br_x509_decoder_run_tasmota(void *t0ctx);



Expand All @@ -81,7 +81,7 @@ void br_x509_decoder_run(void *t0ctx);

/* see bearssl_x509.h */
void
br_x509_decoder_init(br_x509_decoder_context *ctx,
br_x509_decoder_init_esp8266(br_x509_decoder_context *ctx,
void (*append_dn)(void *ctx, const void *buf, size_t len),
void *append_dn_ctx,
void (*append_in)(void *ctx, const void *buf, size_t len),
Expand All @@ -99,18 +99,18 @@ br_x509_decoder_init(br_x509_decoder_context *ctx,
ctx->append_in_ctx = append_in_ctx;
ctx->cpu.dp = &ctx->dp_stack[0];
ctx->cpu.rp = &ctx->rp_stack[0];
br_x509_decoder_init_main(&ctx->cpu);
br_x509_decoder_run(&ctx->cpu);
br_x509_decoder_init_main_tasmota(&ctx->cpu);
br_x509_decoder_run_tasmota(&ctx->cpu);
}

/* see bearssl_x509.h */
void
br_x509_decoder_push(br_x509_decoder_context *ctx,
br_x509_decoder_push_tasmota(br_x509_decoder_context *ctx,
const void *data, size_t len)
{
ctx->hbuf = data;
ctx->hlen = len;
br_x509_decoder_run(&ctx->cpu);
br_x509_decoder_run_tasmota(&ctx->cpu);
}


Expand Down Expand Up @@ -381,12 +381,12 @@ name(void *ctx) \
T0_ENTER(t0ctx->ip, t0ctx->rp, slot); \
}

T0_DEFENTRY(br_x509_decoder_init_main, 93)
T0_DEFENTRY(br_x509_decoder_init_main_tasmota, 93)

#define T0_NEXT(t0ipp) (pgm_read_byte((*t0ipp)++))

void
br_x509_decoder_run(void *t0ctx)
br_x509_decoder_run_tasmota(void *t0ctx)
{
uint32_t *dp, *rp;
const unsigned char *ip;
Expand Down
4 changes: 2 additions & 2 deletions lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ extern "C" {
br_x509_pubkeyfingerprint_context *xc = (br_x509_pubkeyfingerprint_context *)ctx;
// Don't process anything but the first certificate in the chain
if (!xc->done_cert) {
br_x509_decoder_init(&xc->ctx, nullptr, nullptr, nullptr, nullptr);
br_x509_decoder_init_esp8266(&xc->ctx, nullptr, nullptr, nullptr, nullptr);
}
(void)server_name; // ignore server name
}
Expand All @@ -748,7 +748,7 @@ extern "C" {
br_x509_pubkeyfingerprint_context *xc = (br_x509_pubkeyfingerprint_context *)ctx;
// Don't process anything but the first certificate in the chain
if (!xc->done_cert) {
br_x509_decoder_push(&xc->ctx, (const void*)buf, len);
br_x509_decoder_push_tasmota(&xc->ctx, (const void*)buf, len);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MIT License

Copyright (c) 2021 mobizt

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2023 mobizt
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit c2f8821

Please sign in to comment.