# HG changeset patch # User William Ehlhardt # Date 1186719012 0 # Node ID 1bd9557f866eaa6d981bb9f1c100a0ca00ff5f36 # Parent 344fc06139b461a069117510587d716a55062bcb In tls_cached Verifier: - What once was unknown_peer has been moved into user_auth, and a new unknown_peer created that simply uses user_auth for now. diff -r 344fc06139b4 -r 1bd9557f866e libpurple/certificate.c --- a/libpurple/certificate.c Fri Aug 10 04:03:59 2007 +0000 +++ b/libpurple/certificate.c Fri Aug 10 04:10:12 2007 +0000 @@ -740,7 +740,7 @@ static PurpleCertificateVerifier x509_tls_cached; static void -x509_tls_cached_unknown_peer_cb (PurpleCertificateVerificationRequest *vrq, gint id) +x509_tls_cached_user_auth_cb (PurpleCertificateVerificationRequest *vrq, gint id) { PurpleCertificatePool *tls_peers; @@ -768,8 +768,9 @@ purple_certificate_verify_destroy(vrq); } +/* Validates a certificate by asking the user */ static void -x509_tls_cached_unknown_peer(PurpleCertificateVerificationRequest *vrq) +x509_tls_cached_user_auth(PurpleCertificateVerificationRequest *vrq) { gchar *sha_asc; GByteArray *sha_bin; @@ -819,8 +820,8 @@ NULL, /* No other user */ NULL, /* No associated conversation */ vrq, - x509_tls_cached_unknown_peer_cb, - x509_tls_cached_unknown_peer_cb ); + x509_tls_cached_user_auth_cb, + x509_tls_cached_user_auth_cb ); /* Cleanup */ g_free(primary); @@ -840,6 +841,14 @@ return; } +/* For when we've never communicated with this party before */ +static void +x509_tls_cached_unknown_peer(PurpleCertificateVerificationRequest *vrq) +{ + /* For now, just toss it to the user */ + x509_tls_cached_user_auth(vrq); +} + static void x509_tls_cached_start_verify(PurpleCertificateVerificationRequest *vrq) {