aboutsummaryrefslogtreecommitdiff
path: root/include/libssh
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-04-30 14:07:33 +0000
committerAndreas Schneider <mail@cynapses.org>2009-04-30 14:07:33 +0000
commitd68016050082930e4e7fa7c87ef9c1046f9b518b (patch)
treefb2176b1191c816736ba9e5690b11fe549d5948f /include/libssh
parent2317a589968d7d906840dd2b1330174c6b1d7d0d (diff)
downloadlibssh-d68016050082930e4e7fa7c87ef9c1046f9b518b.tar.gz
libssh-d68016050082930e4e7fa7c87ef9c1046f9b518b.tar.xz
libssh-d68016050082930e4e7fa7c87ef9c1046f9b518b.zip
Add a BURN_STRING macro and use it in auth.c.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@660 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'include/libssh')
-rw-r--r--include/libssh/priv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index 62f78ba1..f7c474ac 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -727,6 +727,9 @@ int match_hostname(const char *host, const char *pattern, unsigned int len);
/** Get the size of an array */
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
+/** Overwrite the complete string with 'X' */
+#define BURN_STRING(x) do { if ((x) != NULL) memset((x), 'X', strlen((x))); } while(0)
+
#ifdef HAVE_LIBGCRYPT
/* gcrypt_missing.c */
int my_gcry_dec2bn(bignum *bn, const char *data);