mirror of
https://github.com/falk-werner/webfuse
synced 2025-06-13 12:54:15 +00:00
updates libcrypto to version 1.1.0
This commit is contained in:
parent
9cf921e5ef
commit
7456c4b63d
@ -120,19 +120,18 @@ static char * compute_hash(
|
|||||||
}
|
}
|
||||||
|
|
||||||
char * result = NULL;
|
char * result = NULL;
|
||||||
unsigned int hash_size = digest->md_size;
|
unsigned int hash_size = EVP_MD_size(digest);
|
||||||
unsigned char * hash = malloc(hash_size);
|
unsigned char * hash = malloc(hash_size);
|
||||||
|
|
||||||
if (NULL != hash)
|
if (NULL != hash)
|
||||||
{
|
{
|
||||||
EVP_MD_CTX context;
|
EVP_MD_CTX * context = EVP_MD_CTX_new();
|
||||||
EVP_MD_CTX_init(&context);
|
EVP_DigestInit_ex(context, digest, NULL);
|
||||||
EVP_DigestInit_ex(&context, digest, NULL);
|
EVP_DigestUpdate(context, password, strlen(password));
|
||||||
EVP_DigestUpdate(&context, password, strlen(password));
|
EVP_DigestUpdate(context, salt, strlen(salt));
|
||||||
EVP_DigestUpdate(&context, salt, strlen(salt));
|
EVP_DigestUpdate(context, db->pepper, strlen(db->pepper));
|
||||||
EVP_DigestUpdate(&context, db->pepper, strlen(db->pepper));
|
EVP_DigestFinal_ex(context, hash, &hash_size);
|
||||||
EVP_DigestFinal_ex(&context, hash, &hash_size);
|
EVP_MD_CTX_free(context);
|
||||||
EVP_MD_CTX_cleanup(&context);
|
|
||||||
|
|
||||||
result = to_hex(hash, hash_size);
|
result = to_hex(hash, hash_size);
|
||||||
free(hash);
|
free(hash);
|
||||||
|
@ -276,7 +276,6 @@ static void openssl_cleanup(void)
|
|||||||
CONF_modules_unload(1);
|
CONF_modules_unload(1);
|
||||||
EVP_cleanup();
|
EVP_cleanup();
|
||||||
CRYPTO_cleanup_all_ex_data();
|
CRYPTO_cleanup_all_ex_data();
|
||||||
ERR_remove_state(0);
|
|
||||||
ERR_free_strings();
|
ERR_free_strings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user