Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
mbedtls fails to initialize if run under qemu which does not support getrandom #1212
That it is possible to run an application using mbedtls under qemu.
The problem is that the version of qemu in Ubuntu 16.04 does not support
Doing this would actually seem to simplify the code by allowing to completely remove the version check (calling
Steps to reproduce
Compile mbedtls using ARM cross compiler. Then cross-compile curl, linking against mbedtls. Run it under qemu 2.5.0, trying to access an https url.
@randombit Thank you for reporting this issue!
@RonEld This is armv7 (based on my kernel headers, aarch64 uses 278 for
The problem is the code is being built on a machine with recent kernel headers (so
Thanks @randombit bit raising this, and apologies this issue was silent for so long.
For reference, I reproduced the issue on my Ubuntu 16.04 machine in the following way:
Observe failure propagated from
I tested the fix proposed by @randombit and it works fine. I will open a PR for it where we can continue the discussion.