Cleanse memory using the new OPENSSL_cleanse() function. I've covered all the memset()s I felt safe modifying, but may have missed some.
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index be43258..2145385 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c
@@ -1468,7 +1468,7 @@ sk_X509_NAME_pop_free(s->s3->tmp.ca_names,X509_NAME_free); EVP_MD_CTX_cleanup(&s->s3->finish_dgst1); EVP_MD_CTX_cleanup(&s->s3->finish_dgst2); - memset(s->s3,0,sizeof *s->s3); + OPENSSL_cleanse(s->s3,sizeof *s->s3); OPENSSL_free(s->s3); s->s3=NULL; }