Skip to content

Don't depend on OpenSSL for base64 decode#1

Open
dsommers wants to merge 1 commit intohuiyiqun:masterfrom
dsommers:master
Open

Don't depend on OpenSSL for base64 decode#1
dsommers wants to merge 1 commit intohuiyiqun:masterfrom
dsommers:master

Conversation

@dsommers
Copy link

@dsommers dsommers commented Dec 6, 2017

Took most of the simpler base64 decode in libbase64 [1] instead of
depending on a large external library.

Also revamped lots of the check_auth() code to be more failsafe, removed
a few memory leaks. And the hashmap_return_entry() function didn't
NULL-terminate the value, so added that as well.

[1] https://github.com/kisom/libbase64/blob/master/src/base64.c

Took most of the simpler base64 decode in libbase64 [1] instead of
depending on a large external library.

Also revamped lots of the check_auth() code to be more failsafe, removed
a few memory leaks.  And the hashmap_return_entry() function didn't
NULL-terminate the value, so added that as well.

[1] <https://github.com/kisom/libbase64/blob/master/src/base64.c>
@dsommers
Copy link
Author

dsommers commented Dec 6, 2017

If this base64 implementation is too heavy, we can consider another one from the OpenVPN source repository as well. https://github.com/OpenVPN/openvpn/blob/master/src/openvpn/base64.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant