Mercurial > pidgin
changeset 19085:1bd9557f866e
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.
author | William Ehlhardt <williamehlhardt@gmail.com> |
---|---|
date | Fri, 10 Aug 2007 04:10:12 +0000 |
parents | 344fc06139b4 |
children | e256e0bf8ae1 |
files | libpurple/certificate.c |
diffstat | 1 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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) {