Thread: [gq-commit] gq/src dt_cert.c,1.9,1.10 dt_crl.c,1.6,1.7 dt_password.c,1.22,1.23
Status: Beta
Brought to you by:
sur5r
From: <he...@us...> - 2006-04-07 20:33:59
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11629/src Modified Files: dt_cert.c dt_crl.c dt_password.c Log Message: 2006-04-08 Sven Herzberg <he...@gn...> * .cvsignore: silence * Makefile.am, * configure.in: updated from gettextize (hopefully it doesn't modify these files anymore after checkout) * src/dt_cert.c, * src/dt_crl.c, * src/dt_password.c: fixed compile warnings wrt signedness of numbers Index: dt_cert.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_cert.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** dt_cert.c 12 Oct 2003 06:14:18 -0000 1.9 --- dt_cert.c 7 Apr 2006 20:33:41 -0000 1.10 *************** *** 160,164 **** gb = g_byte_array_new(); ! g_byte_array_append(gb, bm->data, bm->length); gtk_object_set_data_full(GTK_OBJECT(data_widget), "data", --- 160,164 ---- gb = g_byte_array_new(); ! g_byte_array_append(gb, (guchar*)bm->data, bm->length); gtk_object_set_data_full(GTK_OBJECT(data_widget), "data", Index: dt_crl.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_crl.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** dt_crl.c 12 Oct 2003 06:14:18 -0000 1.6 --- dt_crl.c 7 Apr 2006 20:33:41 -0000 1.7 *************** *** 140,144 **** gb = g_byte_array_new(); ! g_byte_array_append(gb, bm->data, bm->length); gtk_object_set_data_full(GTK_OBJECT(data_widget), "data", --- 140,144 ---- gb = g_byte_array_new(); ! g_byte_array_append(gb, (guchar*)bm->data, bm->length); gtk_object_set_data_full(GTK_OBJECT(data_widget), "data", *************** *** 192,196 **** BIO_reset(bufbio); ! BIO_printf(bufbio, "%ld", sk_X509_REVOKED_num(rev)); BIO_get_mem_ptr(bufbio, &bm); cols[1] = bm->data; --- 192,196 ---- BIO_reset(bufbio); ! BIO_printf(bufbio, "%ld", (glong)sk_X509_REVOKED_num(rev)); BIO_get_mem_ptr(bufbio, &bm); cols[1] = bm->data; Index: dt_password.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_password.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** dt_password.c 3 Nov 2003 21:07:57 -0000 1.22 --- dt_password.c 7 Apr 2006 20:33:41 -0000 1.23 *************** *** 140,144 **** unsigned char *password, rand[16], cryptbuf[32]; ! password = (char*) g_malloc((len + 1) * sizeof(char)); memcpy(password, data, len); password[len] = 0; --- 140,144 ---- unsigned char *password, rand[16], cryptbuf[32]; ! password = (guchar*) g_malloc((len + 1) * sizeof(guchar)); memcpy(password, data, len); password[len] = 0; *************** *** 146,150 **** salt = g_string_sized_new(32); RAND_pseudo_bytes(rand, 8); ! b64_encode(salt, rand, 8); /* crypt(3) says [a-zA-Z0-9./] while base64 has [a-zA-Z0-9+/] */ if(salt->str[0] == '+') salt->str[0] = '.'; --- 146,150 ---- salt = g_string_sized_new(32); RAND_pseudo_bytes(rand, 8); ! b64_encode(salt, (gchar*)rand, 8); /* crypt(3) says [a-zA-Z0-9./] while base64 has [a-zA-Z0-9+/] */ if(salt->str[0] == '+') salt->str[0] = '.'; *************** *** 152,159 **** salt->str[2] = 0; ! g_byte_array_append(gb, "{CRYPT}", 7); ! des_fcrypt(password, salt->str, cryptbuf); ! g_byte_array_append(gb, cryptbuf, strlen(cryptbuf)); g_string_free(salt, TRUE); --- 152,159 ---- salt->str[2] = 0; ! g_byte_array_append(gb, (guchar*)"{CRYPT}", 7); ! des_fcrypt((gchar*)password, salt->str, (gchar*)cryptbuf); ! g_byte_array_append(gb, cryptbuf, strlen((gchar*)cryptbuf)); g_string_free(salt, TRUE); *************** *** 171,179 **** GByteArray *gb = g_byte_array_new(); ! MD5(data, len, md5_out); b64_encode(b64, md5_out, MD5_DIGEST_LENGTH); ! g_byte_array_append(gb, "{MD5}", 5); ! g_byte_array_append(gb, b64->str, strlen(b64->str)); g_string_free(b64, TRUE); --- 171,179 ---- GByteArray *gb = g_byte_array_new(); ! MD5((guchar*)data, len, (guchar*)md5_out); b64_encode(b64, md5_out, MD5_DIGEST_LENGTH); ! g_byte_array_append(gb, (guchar*)"{MD5}", 5); ! g_byte_array_append(gb, (guchar*)b64->str, strlen(b64->str)); g_string_free(b64, TRUE); *************** *** 190,198 **** GByteArray *gb = g_byte_array_new(); ! SHA1(data, len, sha_out); b64_encode(b64, sha_out, SHA_DIGEST_LENGTH); ! g_byte_array_append(gb, "{SHA}", 5); ! g_byte_array_append(gb, b64->str, strlen(b64->str)); g_string_free(b64, TRUE); --- 190,198 ---- GByteArray *gb = g_byte_array_new(); ! SHA1((guchar*)data, len, (guchar*)sha_out); b64_encode(b64, sha_out, SHA_DIGEST_LENGTH); ! g_byte_array_append(gb, (guchar*)"{SHA}", 5); ! g_byte_array_append(gb, (guchar*)b64->str, strlen(b64->str)); g_string_free(b64, TRUE); *************** *** 220,227 **** memcpy(sha_out + SHA_DIGEST_LENGTH, rand, sizeof(rand)); ! b64_encode(b64, sha_out, sizeof(sha_out)); ! g_byte_array_append(gb, "{SSHA}", 6); ! g_byte_array_append(gb, b64->str, strlen(b64->str)); g_string_free(b64, TRUE); --- 220,227 ---- memcpy(sha_out + SHA_DIGEST_LENGTH, rand, sizeof(rand)); ! b64_encode(b64, (gchar*)sha_out, sizeof(sha_out)); ! g_byte_array_append(gb, (guchar*)"{SSHA}", 6); ! g_byte_array_append(gb, (guchar*)b64->str, strlen(b64->str)); g_string_free(b64, TRUE); *************** *** 248,255 **** memcpy(md5_out + MD5_DIGEST_LENGTH, rand, sizeof(rand)); ! b64_encode(b64, md5_out, sizeof(md5_out)); ! g_byte_array_append(gb, "{SMD5}", 6); ! g_byte_array_append(gb, b64->str, strlen(b64->str)); g_string_free(b64, TRUE); --- 248,255 ---- memcpy(md5_out + MD5_DIGEST_LENGTH, rand, sizeof(rand)); ! b64_encode(b64, (gchar*)md5_out, sizeof(md5_out)); ! g_byte_array_append(gb, (guchar*)"{SMD5}", 6); ! g_byte_array_append(gb, (guchar*)b64->str, strlen(b64->str)); g_string_free(b64, TRUE); *************** *** 280,284 **** outlen = len * 2 + 4; g_byte_array_set_size(unicode, outlen); ! out = unicode->data; while(inlen > 0 && outlen > 0) { --- 280,284 ---- outlen = len * 2 + 4; g_byte_array_set_size(unicode, outlen); ! out = (gchar*)unicode->data; while(inlen > 0 && outlen > 0) { *************** *** 289,293 **** } iconv_close(conv); ! out = unicode->data; /* strip leading endian marker (should be ff fe) */ --- 289,293 ---- } iconv_close(conv); ! out = (gchar*)unicode->data; /* strip leading endian marker (should be ff fe) */ *************** *** 299,304 **** } else { for (i = 0 ; i < len ; i++) { ! g_byte_array_append(unicode, data + i, 1); ! g_byte_array_append(unicode, "\0", 1); } } --- 299,304 ---- } else { for (i = 0 ; i < len ; i++) { ! g_byte_array_append(unicode, (guchar*)data + i, 1); ! g_byte_array_append(unicode, (guchar*)"\0", 1); } } *************** *** 318,322 **** hex[0] = hexdigit[md4_out[i] / 16]; hex[1] = hexdigit[md4_out[i] % 16]; ! g_byte_array_append(gb, hex, 2); } --- 318,322 ---- hex[0] = hexdigit[md4_out[i] / 16]; hex[1] = hexdigit[md4_out[i] % 16]; ! g_byte_array_append(gb, (guchar*)hex, 2); } *************** *** 373,382 **** hex[0] = hexdigit[bin1[i] / 16]; hex[1] = hexdigit[bin1[i] % 16]; ! g_byte_array_append(gb, hex, 2); } for(i = 0 ; i < sizeof(bin2) ; i++) { hex[0] = hexdigit[bin2[i] / 16]; hex[1] = hexdigit[bin2[i] % 16]; ! g_byte_array_append(gb, hex, 2); } return gb; --- 373,382 ---- hex[0] = hexdigit[bin1[i] / 16]; hex[1] = hexdigit[bin1[i] % 16]; ! g_byte_array_append(gb, (guchar*)hex, 2); } for(i = 0 ; i < sizeof(bin2) ; i++) { hex[0] = hexdigit[bin2[i] / 16]; hex[1] = hexdigit[bin2[i] % 16]; ! g_byte_array_append(gb, (guchar*)hex, 2); } return gb; *************** *** 504,508 **** CryptFunc *cryptfunc = detokenize_data(cryptmap, cryptflag); if (cryptfunc != NULL) { ! GByteArray *crypted = cryptfunc(data->data, data->len); /* overwrite plain-text */ memset(data->data, 0, data->len); --- 504,508 ---- CryptFunc *cryptfunc = detokenize_data(cryptmap, cryptflag); if (cryptfunc != NULL) { ! GByteArray *crypted = cryptfunc((gchar*)data->data, data->len); /* overwrite plain-text */ memset(data->data, 0, data->len); |