[MOD] Use specific SHA1/256 abstraction functions

This commit is contained in:
LDA 2024-08-19 16:40:30 +02:00
commit 4c158ea186
9 changed files with 80 additions and 22 deletions

View file

@ -11,6 +11,7 @@
#include <errno.h>
#include <netdb.h>
#include <Parsee.h>
#include <XML.h>
/* The default component port Prosody uses. */
@ -81,14 +82,11 @@ static char *
ComputeHandshake(char *shared, char *stream)
{
char *source;
unsigned char *raw_sha;
char *sha;
source = StrConcat(2, stream, shared);
raw_sha = Sha1(source);
sha = ShaToHex(raw_sha);
sha = ParseeSHA1(source);
Free(raw_sha);
Free(source);
return sha;