aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/evp/scrypt.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2015-09-04 13:07:10 -0400
committerRich Salz <rsalz@openssl.org>2015-09-04 14:09:14 -0400
commitb0809bc8ffb34bf89de9e68d8caeb4d8c2aa08f9 (patch)
tree3e1362aa59ccad836c959914db7cbb2fe8e09514 /crypto/evp/scrypt.c
parenta939b0aab5deb3678308df804d25a340240deee5 (diff)
downloadopenssl-b0809bc8ffb34bf89de9e68d8caeb4d8c2aa08f9.tar.gz
RT3998: Allow scrypt to be disabled
This does 64-bit division and multiplication, and on 32-bit platforms pulls in libgcc symbols (and MSVC does similar) which may not be available. Mostly done by David Woodhouse. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Diffstat (limited to 'crypto/evp/scrypt.c')
-rw-r--r--crypto/evp/scrypt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/evp/scrypt.c b/crypto/evp/scrypt.c
index 09dfdf2515..380e1fa792 100644
--- a/crypto/evp/scrypt.c
+++ b/crypto/evp/scrypt.c
@@ -64,6 +64,8 @@
#include <openssl/err.h>
#include <internal/numbers.h>
+#ifndef OPENSSL_NO_SCRYPT
+
#define R(a,b) (((a) << (b)) | ((a) >> (32 - (b))))
static void salsa208_word_specification(uint32_t inout[16])
{
@@ -296,3 +298,4 @@ int EVP_PBE_scrypt(const char *pass, size_t passlen,
OPENSSL_clear_free(B, Blen + Vlen);
return rv;
}
+#endif