summaryrefslogtreecommitdiffstats
path: root/src/util/crypto/libcrypto/crypto_sha512crypt.c
diff options
context:
space:
mode:
authorGeorge McCollister <George.McCollister@gmail.com>2012-06-19 12:36:28 -0500
committerStephen Gallagher <sgallagh@redhat.com>2012-06-26 09:01:26 -0400
commite07a94a66985b674c5df11ca466792902164c4e2 (patch)
treef6e3443b5665c2a73f56a6dde999f21d25338473 /src/util/crypto/libcrypto/crypto_sha512crypt.c
parent9dadbd5cac8b25a198633508a27747039be43c34 (diff)
downloadsssd-e07a94a66985b674c5df11ca466792902164c4e2.tar.gz
sssd-e07a94a66985b674c5df11ca466792902164c4e2.tar.xz
sssd-e07a94a66985b674c5df11ca466792902164c4e2.zip
libcrypto fully implemented
Implemented working versions of the following functions for libcrypto: sss_base64_encode sss_base64_decode sss_hmac_sha1 sss_password_encrypt sss_password_decrypt test_encrypt_decrypt now expects EOK from libcrypto. test_hmac_sha1 now expects EOK from libcrypto. Added test_base64_encode to test base64 encoding implementation. Added test_base64_decode to test base64 decoding implementation. Signed-off-by: George McCollister <George.McCollister@gmail.com>
Diffstat (limited to 'src/util/crypto/libcrypto/crypto_sha512crypt.c')
-rw-r--r--src/util/crypto/libcrypto/crypto_sha512crypt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/crypto/libcrypto/crypto_sha512crypt.c b/src/util/crypto/libcrypto/crypto_sha512crypt.c
index 50734318c..f4c3e0dae 100644
--- a/src/util/crypto/libcrypto/crypto_sha512crypt.c
+++ b/src/util/crypto/libcrypto/crypto_sha512crypt.c
@@ -10,6 +10,8 @@
/* SHA512-based Unix crypt implementation.
Released into the Public Domain by Ulrich Drepper <drepper@redhat.com>. */
+#include "config.h"
+
#include <endian.h>
#include <errno.h>
#include <limits.h>
@@ -141,7 +143,6 @@ static int sha512_crypt_r(const char *key,
* compatibility with existing implementations). */
EVP_DigestUpdate(&ctx, (const unsigned char *)salt, salt_len);
-
/* Compute alternate SHA512 sum with input KEY, SALT, and KEY.
* The final result will be added to the first context. */
if (!EVP_DigestInit_ex(&alt_ctx, EVP_sha512(), NULL)) {