Provide /dev/random in runtime for fetchurl

libcrypto transparently opens /dev/random to seed its PRNG or logs an
error if this fails.
This commit is contained in:
Christian Helmuth 2018-02-27 10:36:17 +01:00
parent e3d1b8b044
commit ddd5e8abb4
3 changed files with 7 additions and 0 deletions

View File

@ -122,6 +122,7 @@
<dir name="download"> <fs label="download"/> </dir>
<dir name="dev">
<log/> <null/> <inline name="rtc">2000-01-01 00:00</inline>
<inline name="random">01234567890123456789</inline>
</dir>
</vfs>

View File

@ -44,6 +44,11 @@ void Depot_download_manager::gen_fetchurl_start_content(Xml_generator &xml,
String<64> date("2000-01-01 00:00");
xml.append(date.string());
});
xml.node("inline", [&] () {
xml.attribute("name", "random");
String<64> entropy("01234567890123456789");
xml.append(entropy.string());
});
});
xml.node("fs", [&] () {
xml.attribute("label", "tcpip"); });

View File

@ -58,6 +58,7 @@ append config {
</dir>
<dir name="dev">
<log/> <null/> <inline name="rtc">2000-01-01 00:00</inline>
<inline name="random">01234567890123456789</inline>
</dir>
<dir name="socket"> <lxip dhcp="yes"/> </dir>
</vfs>