With URL-safe base64 the + and / are replaced by - and _ This way we can accept base64 strings which are URL-safe.
Signed-off-by: Wido den Hollander <w...@widodh.nl> --- lib/base64.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/base64.c b/lib/base64.c index 194e9ca..be91495 100644 --- a/lib/base64.c +++ b/lib/base64.c @@ -215,7 +215,9 @@ base64_encode_alloc (const char *in, size_t inlen, char **out) : (_) == '8' ? 60 \ : (_) == '9' ? 61 \ : (_) == '+' ? 62 \ + : (_) == '-' ? 62 \ : (_) == '/' ? 63 \ + : (_) == '_' ? 63 \ : -1) static const signed char b64[0x100] = { -- 1.7.9.5