Mercurial > pidgin.yaz
changeset 18996:24fc5ca67afc
- Do some weak checking to ensure that you don't attempt to store a
certificate of the wrong scheme in a pool
author | William Ehlhardt <williamehlhardt@gmail.com> |
---|---|
date | Sun, 08 Jul 2007 00:46:34 +0000 |
parents | 47b06daea9d1 |
children | 90d8d8bb395a |
files | libpurple/certificate.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/certificate.c Sun Jul 08 00:42:01 2007 +0000 +++ b/libpurple/certificate.c Sun Jul 08 00:46:34 2007 +0000 @@ -231,8 +231,12 @@ g_return_val_if_fail(id, FALSE); g_return_val_if_fail(pool->put_cert, FALSE); - /* TODO: Should we check about scheme matches here or make that - someone else's problem? */ + /* TODO: Should this just be someone else's problem? */ + /* Whether crt->scheme matches find_scheme(pool->scheme_name) is not + relevant... I think... */ + g_return_val_if_fail( + g_ascii_strcasecmp(pool->scheme_name, crt->scheme->name) == 0, + FALSE); return (pool->put_cert)(id, crt); }