Changeset 77bfd07
- Timestamp:
- 2007-11-23T23:07:44Z (17 years ago)
- Branches:
- master
- Children:
- 3a80471
- Parents:
- df6d1da
- Files:
-
- 2 added
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/Makefile
rdf6d1da r77bfd07 10 10 11 11 # [SH] Program variables 12 objects = arc.o base64.o $(EVENT_HANDLER) http_client.o ini.o md5.o misc.o proxy.o sha .o $(SSL_CLIENT) url.o12 objects = arc.o base64.o $(EVENT_HANDLER) http_client.o ini.o md5.o misc.o proxy.o sha1.o $(SSL_CLIENT) url.o 13 13 14 14 CFLAGS += -Wall -
protocols/jabber/iq.c
rdf6d1da r77bfd07 23 23 24 24 #include "jabber.h" 25 #include "sha1.h" 25 26 26 27 static xt_status jabber_parse_roster( struct im_connection *ic, struct xt_node *node, struct xt_node *orig ); … … 233 234 /* We can do digest authentication, it seems, and of 234 235 course we prefer that. */ 235 SHA_CTXsha;236 sha1_state_t sha; 236 237 char hash_hex[41]; 237 238 unsigned char hash[20]; 238 239 int i; 239 240 240 sha Init( &sha );241 sha Update( &sha, (unsigned char*) s, strlen( s ) );242 sha Update( &sha, (unsigned char*) ic->acc->pass, strlen( ic->acc->pass ) );243 sha Final( &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 ); 244 245 245 246 for( i = 0; i < 20; i ++ ) -
protocols/nogaim.h
rdf6d1da r77bfd07 43 43 #include "proxy.h" 44 44 #include "md5.h" 45 #include "sha.h"46 45 47 46 #define BUF_LEN MSG_LEN -
protocols/yahoo/libyahoo2.c
rdf6d1da r77bfd07 76 76 #include <ctype.h> 77 77 78 #include "sha .h"78 #include "sha1.h" 79 79 #include "md5.h" 80 80 #include "yahoo2.h" … … 1820 1820 md5_state_t ctx; 1821 1821 1822 SHA_CTXctx1;1823 SHA_CTXctx2;1822 sha1_state_t ctx1; 1823 sha1_state_t ctx2; 1824 1824 1825 1825 char *alphabet1 = "FBZDWAGHrJTLMNOPpRSKUVEXYChImkwQ"; … … 1877 1877 magic_ptr = (unsigned char *)seed; 1878 1878 1879 while (*magic_ptr != (int)NULL) {1879 while (*magic_ptr != 0) { 1880 1880 char *loc; 1881 1881 … … 2056 2056 memset(&(pass_hash_xor2[cnt]), 0x5c, 64-cnt); 2057 2057 2058 sha Init(&ctx1);2059 sha Init(&ctx2);2058 sha1_init(&ctx1); 2059 sha1_init(&ctx2); 2060 2060 2061 2061 /* The first context gets the password hash XORed … … 2064 2064 * challenge. */ 2065 2065 2066 sha Update(&ctx1, pass_hash_xor1, 64);2066 sha1_append(&ctx1, pass_hash_xor1, 64); 2067 2067 if (j >= 3 ) 2068 ctx1. sizeLo= 0x1ff;2069 sha Update(&ctx1, magic_key_char, 4);2070 sha Final(&ctx1, digest1);2068 ctx1.Length_Low = 0x1ff; 2069 sha1_append(&ctx1, magic_key_char, 4); 2070 sha1_finish(&ctx1, digest1); 2071 2071 2072 2072 /* The second context gets the password hash XORed … … 2074 2074 * of the first context. */ 2075 2075 2076 sha Update(&ctx2, pass_hash_xor2, 64);2077 sha Update(&ctx2, digest1, 20);2078 sha Final(&ctx2, digest2);2076 sha1_append(&ctx2, pass_hash_xor2, 64); 2077 sha1_append(&ctx2, digest1, 20); 2078 sha1_finish(&ctx2, digest2); 2079 2079 2080 2080 /* Now that we have digest2, use it to fetch … … 2147 2147 memset(&(crypt_hash_xor2[cnt]), 0x5c, 64-cnt); 2148 2148 2149 sha Init(&ctx1);2150 sha Init(&ctx2);2149 sha1_init(&ctx1); 2150 sha1_init(&ctx2); 2151 2151 2152 2152 /* The first context gets the password hash XORed … … 2155 2155 * challenge. */ 2156 2156 2157 sha Update(&ctx1, crypt_hash_xor1, 64);2157 sha1_append(&ctx1, crypt_hash_xor1, 64); 2158 2158 if (j >= 3 ) 2159 ctx1. sizeLo= 0x1ff;2160 sha Update(&ctx1, magic_key_char, 4);2161 sha Final(&ctx1, digest1);2159 ctx1.Length_Low = 0x1ff; 2160 sha1_append(&ctx1, magic_key_char, 4); 2161 sha1_finish(&ctx1, digest1); 2162 2162 2163 2163 /* The second context gets the password hash XORed … … 2165 2165 * of the first context. */ 2166 2166 2167 sha Update(&ctx2, crypt_hash_xor2, 64);2168 sha Update(&ctx2, digest1, 20);2169 sha Final(&ctx2, digest2);2167 sha1_append(&ctx2, crypt_hash_xor2, 64); 2168 sha1_append(&ctx2, digest1, 20); 2169 sha1_finish(&ctx2, digest2); 2170 2170 2171 2171 /* Now that we have digest2, use it to fetch
Note: See TracChangeset
for help on using the changeset viewer.