fixed mem leaks from openssl code
pub key