diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2014-03-22 15:23:38 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2014-03-22 15:23:38 +0000 |
commit | 0c79dacc8a8d4de2455d61c51724866f667ba53c (patch) | |
tree | 5186034782b608fd13a7408b5852ad248f6bdc35 /rsa.c | |
parent | 02d4c2ac3daa0f36264392972709ccd7676ab3e8 (diff) |
Notes
Diffstat (limited to 'rsa.c')
-rw-r--r-- | rsa.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: rsa.c,v 1.30 2013/05/17 00:13:14 djm Exp $ */ +/* $OpenBSD: rsa.c,v 1.31 2014/02/02 03:44:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -94,8 +94,8 @@ rsa_public_encrypt(BIGNUM *out, BIGNUM *in, RSA *key) if (BN_bin2bn(outbuf, len, out) == NULL) fatal("rsa_public_encrypt: BN_bin2bn failed"); - memset(outbuf, 0, olen); - memset(inbuf, 0, ilen); + explicit_bzero(outbuf, olen); + explicit_bzero(inbuf, ilen); free(outbuf); free(inbuf); } @@ -120,8 +120,8 @@ rsa_private_decrypt(BIGNUM *out, BIGNUM *in, RSA *key) if (BN_bin2bn(outbuf, len, out) == NULL) fatal("rsa_private_decrypt: BN_bin2bn failed"); } - memset(outbuf, 0, olen); - memset(inbuf, 0, ilen); + explicit_bzero(outbuf, olen); + explicit_bzero(inbuf, ilen); free(outbuf); free(inbuf); return len; |