Comments (4)
Fixed for next release
from mbedtls.
I'm afraid I disagree here :) The current code only work with pthreads indeed since it needs to initialize a global mutex. The following line will not compile with a non-pthread imlementation:
static threading_mutex_t readdir_mutex = PTHREAD_MUTEX_INITIALIZER;
Some threading implementations do not provide similar static initializers. (Btw, the fact that using phtreads here is intentional is reflected in the function's documentation, see the warning.)
It is possible, however, to initialise global mutexes in threading_set_alt()
but, in case it allocates some resources, then the user will have to call threading_free_alt()
, a function that currently doesn't exist, or the resources will be lost. (OTOH, since you usually call threading_set_alt()
only once, and the mutexes are most likely need till the end of the program anyway, it's not much of a leak.) (Paul, you can check the internal branch threading-1.4
(only one commit) for how I planned to handle global mutexes.)
So I thought it might be better to wait for the next API change to introduce global mutexes. But maybe it's also OK to make this change now but mention it clearly in the release notes?
from mbedtls.
@mpg You are totally right.. Missed that part..
Ok, so this one stays pthread-only for at least this 1.3 branch. Should be properly documented to prevent my mistaken fix in the future though!
from mbedtls.
This is fixed in the 2.0 branch (currently internal, hopefully release in the next few weeks).
from mbedtls.
Related Issues (20)
- mbedtls_ecp_write_key is hard to use HOT 1
- Unify consistency tests for mbedtls_pk_import_into_psa and mbedtls_pk_copy_from_psa
- Add generate_key_ext driver entry point
- Keep-going mode for test-ref-configs
- Warnings during build: `no previous prototype for ‘mbedtls_xor’`, `no previous prototype for ‘mbedtls_put_unaligned_uint16’` etc. HOT 8
- Deprecate or remove mbedtls_pk_wrap_as_opaque HOT 2
- Make psa_crypto_transaction thread safe HOT 1
- Remove calls to PSA_ASSERT after the exit label HOT 1
- 3.5.0-3.5.2 Performing the SSL/TLS handshake will report error mac does not match HOT 2
- mbedtls_ssl_close_notify will silently failed if preceeded by an incomplete mbedtls_ssl_write HOT 2
- Nonstandard extension - zero-sized array in struct/union HOT 3
- memory leak in function mbedtls_mpi_exp_mod HOT 4
- Implement and use a once mechanism
- Revise handling and testing of module-internal optimization options HOT 3
- Improve test key generation in test_suite_pk
- Direct use of *.py files HOT 3
- ESP32 Applying mbedtls_ecdsa_write_signature_det Error BIGNUM - The buffer is too small to write to HOT 2
- Create mbedtls-framework repository HOT 2
- Make mbedtls require the framework submodule
- Adapt the release process to cover the framework submodule HOT 3
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 mbedtls.