diff options
author | James Booth <boothj5@gmail.com> | 2014-05-01 22:18:04 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-05-01 22:18:04 +0100 |
commit | 524b1f2383c6018ab810b79ed9bd8508d3fe03c0 (patch) | |
tree | 0076c3fee6aa3e70d9aeca9a6c589a2129d4ad28 /src/xmpp | |
parent | f44cf86f23f7b4183c5864a74e42b9f632c2c640 (diff) | |
download | profani-tty-524b1f2383c6018ab810b79ed9bd8508d3fe03c0.tar.gz |
Changed to use gnutls instead of openssl for sha1 hashing
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/capabilities.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/xmpp/capabilities.c b/src/xmpp/capabilities.c index b44095f1..cd2e3fce 100644 --- a/src/xmpp/capabilities.c +++ b/src/xmpp/capabilities.c @@ -30,7 +30,6 @@ #include <string.h> #include <glib.h> -#include <openssl/evp.h> #include <strophe.h> #include "common.h" @@ -203,20 +202,7 @@ caps_create_sha1_str(xmpp_stanza_t * const query) curr = g_slist_next(curr); } - EVP_MD_CTX mdctx; - const EVP_MD *md; - - unsigned char md_value[EVP_MAX_MD_SIZE]; - unsigned int md_len; - OpenSSL_add_all_digests(); - md = EVP_get_digestbyname("SHA1"); - EVP_MD_CTX_init(&mdctx); - EVP_DigestInit_ex(&mdctx, md, NULL); - EVP_DigestUpdate(&mdctx, s->str, strlen(s->str)); - EVP_DigestFinal_ex(&mdctx, md_value, &md_len); - EVP_MD_CTX_cleanup(&mdctx); - - char *result = g_base64_encode(md_value, md_len); + char *result = sha1_hash(s->str); g_string_free(s, TRUE); g_slist_free_full(identities, g_free); |