summaryrefslogtreecommitdiffstats
path: root/crypto/mem_sec.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2016-01-07 16:05:45 -0500
committerRich Salz <rsalz@openssl.org>2016-01-09 19:13:15 -0500
commitd594199bb47362306060db0e185582ffcfd7b6a6 (patch)
treeb6fea4bac1e8ff935211a1d38be981fc51ad6452 /crypto/mem_sec.c
parentf820b79248140419c1c2ced9873aa1d78b665a76 (diff)
RT41897: Add an CRYPTO_secure_actual_size
This is already documented, I just forgot to include the code :) Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Diffstat (limited to 'crypto/mem_sec.c')
-rw-r--r--crypto/mem_sec.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/crypto/mem_sec.c b/crypto/mem_sec.c
index 5f4f733fd0..9adc124e36 100644
--- a/crypto/mem_sec.c
+++ b/crypto/mem_sec.c
@@ -157,6 +157,19 @@ size_t CRYPTO_secure_used()
#endif /* IMPLEMENTED */
}
+size_t CRYPTO_secure_actual_size(void *ptr)
+{
+#ifdef IMPLEMENTED
+ size_t actual_size;
+
+ LOCK();
+ actual_size = sh_actual_size(ptr);
+ UNLOCK();
+ return actual_size;
+#else
+ return 0;
+#endif
+}
/* END OF PAGE ...
... START OF PAGE */