Commit graph

9 commits

Author SHA1 Message Date
Andy Polyakov
5bbdc26cad crypto/mem_clr.c: switch to OPENSSL_cleanse implementation from master.
It's probably worth reminding that this is a fall-back implementation
for platforms that don't have assembly OPENSSL_cleanse.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-12 13:47:57 +02:00
Richard Levitte
93a17f79b9 Remove the "eay" c-file-style indicators
Since we don't use the eay style any more, there's no point tryint to
tell emacs to use it.

Reviewed-by: Ben Laurie <ben@openssl.org>
2015-12-18 13:39:34 +01:00
Matt Caswell
197db2143c Make sure OPENSSL_cleanse checks for NULL
In master we have the function OPENSSL_clear_free(x,y), which immediately
returns if x == NULL. In <=1.0.2 this function does not exist so we have to
do:
OPENSSL_cleanse(x, y);
OPENSSL_free(x);

However, previously, OPENSSL_cleanse did not check that if x == NULL, so
the real equivalent check would have to be:
if (x != NULL)
    OPENSSL_cleanse(x, y);
OPENSSL_free(x);

It would be easy to get this wrong during cherry-picking to other branches
and therefore, for safety, it is best to just ensure OPENSSL_cleanse also
checks for NULL.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 020d8fc83f)
2015-09-17 22:31:24 +01:00
Matt Caswell
ae5c8664e5 Run util/openssl-format-source -v -c .
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:31:38 +00:00
Ben Laurie
949ce10e88 Fix warning. 2007-06-23 18:47:51 +00:00
Andy Polyakov
c943ca5404 Optimize OPENSSL_cleanse. 2007-06-20 17:36:39 +00:00
Nils Larsch
1897c89302 avoid warnings when building on systems where sizeof(void *) > sizeof(int) 2005-04-29 14:26:59 +00:00
Richard Levitte
4707991520 Make CRYPTO_cleanse() independent of endianness. 2002-12-03 16:06:40 +00:00
Richard Levitte
df29cc8f77 Add OPENSSL_cleanse() to help cleanse memory and avoid certain compiler
and linker optimizations.
PR: 343
2002-11-27 12:24:05 +00:00