Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace json-glib with jansson #50

Closed
paolostivanin opened this issue Jan 25, 2018 · 4 comments · Fixed by #53
Closed

replace json-glib with jansson #50

paolostivanin opened this issue Jan 25, 2018 · 4 comments · Fixed by #53

Comments

@paolostivanin
Copy link
Owner

jansson supports custom memory allocation, meaning that gcry_calloc could be used to allocate secure memory. Right now, the data parsed by json-glib is not stored in a secure memory location.

http:https://jansson.readthedocs.io/en/latest/apiref.html#custom-memory-allocation

@paolostivanin
Copy link
Owner Author

This is now high prio, moving to 1.1.0. The export feature has been postponed.
The porting will require some time because it's a big refactoring that has to be backward compatible with the current implementation.

@paolostivanin
Copy link
Owner Author

paolostivanin commented Jan 25, 2018

An alternative would be to store the secret encrypted and then it will be decrypted only when needed. This, of course, will add an overhead, especially if a lot of tokens have to be updated every 30s...

@paolostivanin
Copy link
Owner Author

paolostivanin commented Jan 28, 2018

I'm currently rewriting the code to use jansson. Using this library instead of json-glib gives also more flexibility and helps to reduce the amount of code :)

I will also take this opportunity to carefully review all the memory usage and allocation 👍

@paolostivanin
Copy link
Owner Author

porting done, testing it right now

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

Successfully merging a pull request may close this issue.

1 participant