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

Use OpenSSL's memory allocator #10

Closed
ghost opened this issue Feb 26, 2017 · 2 comments
Closed

Use OpenSSL's memory allocator #10

ghost opened this issue Feb 26, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 26, 2017

OpenSSL includes a replaceable memory allocator. If we decide to simulate failures using an instrumented allocator for #9, it makes sense to use OpenSSL's functions so that we don't need to write our own version of CRYPTO_set_mem_functions.

On the other hand, this makes things harder for callers, who would need to import openssl/crypto.h to free buffer contents. I'm also not sure how well this would work if we add an NSS backend later.

@ghost
Copy link
Author

ghost commented Mar 16, 2017

This is easy to do now that we're not going to return allocated buffers.

@ghost ghost added the enhancement label Mar 25, 2017
@ghost
Copy link
Author

ghost commented Apr 8, 2017

We only use malloc in the header parser, which we'll remove in #28, and calloc in ece_compute_secret. I don't think this is worth doing.

@ghost ghost closed this as completed Apr 8, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants