libpurple/plugins/ssl/ssl-gnutls.c

branch
soc.2007.certmgr
changeset 19494
c9ee38003eb6
parent 19359
8961d49b1b87
child 19495
af7b321844ab
equal deleted inserted replaced
19493:295745c665e5 19494:c9ee38003eb6
359 } 359 }
360 360
361 return s; 361 return s;
362 } 362 }
363 363
364 /* Forward declarations are fun! 364 /* Forward declarations are fun! */
365 TODO: This is a stupid place for this */
366 static PurpleCertificate * 365 static PurpleCertificate *
367 x509_import_from_datum(const gnutls_datum_t dt, gnutls_x509_crt_fmt_t mode); 366 x509_import_from_datum(const gnutls_datum_t dt, gnutls_x509_crt_fmt_t mode);
368 367
369 static GList * 368 static GList *
370 ssl_gnutls_get_peer_certificates(PurpleSslConnection * gsc) 369 ssl_gnutls_get_peer_certificates(PurpleSslConnection * gsc)
396 to read. If someone complains, I'll change it. 395 to read. If someone complains, I'll change it.
397 TODO: Is anyone complaining? (Maybe elb?) */ 396 TODO: Is anyone complaining? (Maybe elb?) */
398 peer_certs = g_list_append(peer_certs, newcrt); 397 peer_certs = g_list_append(peer_certs, newcrt);
399 } 398 }
400 399
401 /* cert_list shouldn't need free()-ing */ 400 /* cert_list doesn't need free()-ing */
402 /* TODO: double-check this */
403 401
404 return peer_certs; 402 return peer_certs;
405 } 403 }
406 404
407 /************************************************************************/ 405 /************************************************************************/
499 filename); 497 filename);
500 498
501 /* Next, we'll simply yank the entire contents of the file 499 /* Next, we'll simply yank the entire contents of the file
502 into memory */ 500 into memory */
503 /* TODO: Should I worry about very large files here? */ 501 /* TODO: Should I worry about very large files here? */
504 /* TODO: Error checking */ 502 g_return_val_if_fail(
505 g_file_get_contents(filename, 503 g_file_get_contents(filename,
506 &buf, 504 &buf,
507 &buf_sz, 505 &buf_sz,
508 NULL /* No error checking for now */ 506 NULL /* No error checking for now */
509 ); 507 ),
508 NULL);
510 509
511 /* Load the datum struct */ 510 /* Load the datum struct */
512 dt.data = (unsigned char *) buf; 511 dt.data = (unsigned char *) buf;
513 dt.size = buf_sz; 512 dt.size = buf_sz;
514 513

mercurial