Comments (5)
Hi 59985,
I am happy to hear things are working for you! Your build options look good, but here are a few things you can try:
-
The
USE_FAST_MATH
option uses stack for the math variables. You have defined them to support 4096 bit RSA keys (withFP_MAX_BITS 8192
). You might try disablingUSE_FAST_MATH
, which instead enables our normal math that uses Heap. You will also need to comment outTFM_TIMING_RESISTANT
. -
Try defining the
RSA_LOW_MEM
option. It uses half as much memory but twice as slow. -
You might find this example user_settings.h useful, since it documents some of the memory optimization options. To use a user_settings.h you just need to define the preprocessor macro
WOLFSSL_USER_SETTINGS
and put theuser_settings.h
somewhere in your include path.
https://github.com/wolfSSL/wolfssl/blob/master/IDE/GCC-ARM/Header/user_settings.h -
Do you know if your Renesas micro-controller supports any hardware crypto like AES or SHA?
Thanks,
David Garske, wolfSSL
from wolfmqtt.
Hi David,
Thank you for your support. I tried to disable USE_FAST_MATH, but with no luck. Comment out TFM_TIMING_RESISTANT and adding RSA_LOW_MEM helped, but the use of stack is still high.
So I am still looking for a solution.
Thanks
Kasper
from wolfmqtt.
Hi 59985,
When you say "I tried to disable USE_FAST_MATH, but with no luck", does that mean it did not reduce stack use or it did not build/run correctly? If its the later then please include the build errors so we can recommend a solution.
For our reference can you tell us how much stack memory is being used, which TLS cipher suite and confirm you are using RSA 4096-bit operations? Its more common to be using RSA 2048-bit, which would have your FP_MAX_BITS set to 4096 (max * 2).
Thanks,
David Garske, wolfSSL
from wolfmqtt.
Hi David,
When tried to disable USE_FAST_MATH it build and run correctly. It's seems like I never get response from the server. In ssl.c the program is hanging here:
case FINISHED_DONE :
/* get response */
while (ssl->options.serverState < SERVER_FINISHED_COMPLETE)
**if ( (ssl->error = ProcessReply(ssl)) < 0) {**
WOLFSSL_ERROR(ssl->error);
return WOLFSSL_FATAL_ERROR;
}
ssl->options.connectState = SECOND_REPLY_DONE;
WOLFSSL_MSG("connect state: SECOND_REPLY_DONE");
FALL_THROUGH;
Used stack memory is ~13000
TLS cipher suite: TLS v1.2
#define FP_MAX_BITS 8192 // It won't work with 4096
Just for info: I am working with MS Azure and trying to connect to the Iot Hub
from wolfmqtt.
Hi 59985,
I wanted to check in and see if you were able to get your TLS working. I suspect with RSA and 4096-bit keys you probably were still experiencing stack or heap issues. If you'd like to send use a detailed report with logging enabled (define DEBUG_WOLFSSL
and call wolfSSL_Debugging_ON()
) to [email protected] we are happy to help you through it.
Thanks,
David Garske, wolfSSL
from wolfmqtt.
Related Issues (20)
- MHC3 PIC32MZ - Client stops handling incoming messages if it stops publishing HOT 3
- WMQTT_NET_GLUE Error: Skt Timeout, occurred in func: WMQTT_NETGlue_DoRead, line: 522 HOT 5
- Multiple errors when including WolfSSl/ssl.h VS HOT 1
- HAVE_SNI define in wolfssl HOT 18
- wolfMQTT callbacks HOT 1
- Reconnect problem: MqttSocket_Connect relies on incorrect client->flags status value
- Dynamic property stack for v5 HOT 1
- Update AWS example to demonstrate MQTT v5 client
- Simple Publish & Subscribe Code to Test (Without TLS) HOT 5
- publish and subscribe at the same time in the same client HOT 13
- Refresh broker certs before release
- wolfMQTT Espressif ESP32 Managed Component Support HOT 1
- wolfMQTT unexpectedly attempts single-use Espressif hardware lock
- Use wolfMQTT without sockets HOT 2
- MQTT-SN Gateway that supports DTLS 1.3 HOT 2
- Broken wolfMQTT Cube Pack link HOT 3
- As a future TODO... when comparing this with `MqttClient_WaitType` there are some fixes that need brought over.
- showng header file error like no such dictionary HOT 30
- MqttClient_WaitType 死锁的问题 HOT 9
- Memory leakage issue in version 1.18.0 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wolfmqtt.