| 1081 |
1081 |
| 1082 if (gaim_proxy_info_get_username(phb->gpi) != NULL) { |
1082 if (gaim_proxy_info_get_username(phb->gpi) != NULL) { |
| 1083 char *t1, *t2; |
1083 char *t1, *t2; |
| 1084 t1 = g_strdup_printf("%s:%s", |
1084 t1 = g_strdup_printf("%s:%s", |
| 1085 gaim_proxy_info_get_username(phb->gpi), |
1085 gaim_proxy_info_get_username(phb->gpi), |
| 1086 gaim_proxy_info_get_password(phb->gpi) ? |
1086 gaim_proxy_info_get_password(phb->gpi) ? |
| 1087 gaim_proxy_info_get_password(phb->gpi) : ""); |
1087 gaim_proxy_info_get_password(phb->gpi) : ""); |
| 1088 t2 = gaim_base64_encode(t1, strlen(t1)); |
1088 t2 = gaim_base64_encode((const guchar *)t1, strlen(t1)); |
| 1089 g_free(t1); |
1089 g_free(t1); |
| 1090 g_return_if_fail(request_len < sizeof(request)); |
1090 g_return_if_fail(request_len < sizeof(request)); |
| 1091 request_len += g_snprintf(request + request_len, |
1091 request_len += g_snprintf(request + request_len, |
| 1092 sizeof(request) - request_len, |
1092 sizeof(request) - request_len, |
| 1093 "Proxy-Authorization: Basic %s\r\n", t2); |
1093 "Proxy-Authorization: Basic %s\r\n", t2); |
| 1416 int i; |
1416 int i; |
| 1417 unsigned char Kxoripad[65]; |
1417 unsigned char Kxoripad[65]; |
| 1418 unsigned char Kxoropad[65]; |
1418 unsigned char Kxoropad[65]; |
| 1419 int pwlen; |
1419 int pwlen; |
| 1420 char * pwinput; |
1420 char * pwinput; |
| 1421 char md5buf[16]; |
1421 guint8 md5buf[16]; |
| 1422 |
1422 |
| 1423 cipher = gaim_ciphers_find_cipher("md5"); |
1423 cipher = gaim_ciphers_find_cipher("md5"); |
| 1424 ctx = gaim_cipher_context_new(cipher, NULL); |
1424 ctx = gaim_cipher_context_new(cipher, NULL); |
| 1425 |
1425 |
| 1426 pwinput=(char *)passwd; |
1426 pwinput=(char *)passwd; |
| 1427 pwlen=strlen(passwd); |
1427 pwlen=strlen(passwd); |
| 1428 if (pwlen>64) { |
1428 if (pwlen>64) { |
| 1429 gaim_cipher_context_append(ctx, passwd, strlen(passwd)); |
1429 gaim_cipher_context_append(ctx, (const guint8 *)passwd, strlen(passwd)); |
| 1430 gaim_cipher_context_digest(ctx, sizeof(md5buf), md5buf, NULL); |
1430 gaim_cipher_context_digest(ctx, sizeof(md5buf), md5buf, NULL); |
| 1431 pwinput=(char *)md5buf; |
1431 pwinput=(char *)md5buf; |
| 1432 pwlen=16; |
1432 pwlen=16; |
| 1433 } |
1433 } |
| 1434 |
1434 |