Ignore:
Timestamp:
2007-11-23T23:07:44Z (13 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
3a80471
Parents:
df6d1da
Message:

Replaced GPL-incompatible SHA1 hashing code (and renamed the files in case
I ever need SHA256 ;-)).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/iq.c

    rdf6d1da r77bfd07  
    2323
    2424#include "jabber.h"
     25#include "sha1.h"
    2526
    2627static xt_status jabber_parse_roster( struct im_connection *ic, struct xt_node *node, struct xt_node *orig );
     
    233234                /* We can do digest authentication, it seems, and of
    234235                   course we prefer that. */
    235                 SHA_CTX sha;
     236                sha1_state_t sha;
    236237                char hash_hex[41];
    237238                unsigned char hash[20];
    238239                int i;
    239240               
    240                 shaInit( &sha );
    241                 shaUpdate( &sha, (unsigned char*) s, strlen( s ) );
    242                 shaUpdate( &sha, (unsigned char*) ic->acc->pass, strlen( ic->acc->pass ) );
    243                 shaFinal( &sha, hash );
     241                sha1_init( &sha );
     242                sha1_append( &sha, (unsigned char*) s, strlen( s ) );
     243                sha1_append( &sha, (unsigned char*) ic->acc->pass, strlen( ic->acc->pass ) );
     244                sha1_finish( &sha, hash );
    244245               
    245246                for( i = 0; i < 20; i ++ )
Note: See TracChangeset for help on using the changeset viewer.