It's pretty small and won't be used outside this function, so it's ok to
allocate it on the stack. This also has the advantage of simplifying the
error checking, since it's one less allocation that can fail.
Move base64 decoding to BearSSL's PEM decoder/encoder, using some simple
hacks for inserting and removing the PEM headers as well as the added
newlines.
Also added some fixes around the usage of mmap_file objects in purr.c,
and checked that the object size passed to cbcdec is actually the right
size.
We could use `extern const char *__progname` to work on musl/glibc and
BSDs, but it's not a recommended interface, and they prefer
getprogname(). In the interest of proper platform usage, use
getprogname() on BSD and program_invocation_short_name on musl/glibc.
Supporting arc4random_buf and getrandom is pretty simple.
Hasn't been tested on an actual BSD platform.
Add base64 encoding per the pattern expected by the web interface.
Fix some pointers and file size things in purr/files.
TODO: files are cut off at random points, despite the efforts to remove
verification of null characters in libbaseencode.