comparison libpurple/certificate.h @ 19076:daa68185a018

- Add purple_certificate_signed_by - Modify ssl-gnutls to expose its support for above
author William Ehlhardt <williamehlhardt@gmail.com>
date Tue, 07 Aug 2007 04:31:01 +0000
parents 6c0aad79c4c5
children 8275c3cbc9da
comparison
equal deleted inserted replaced
19075:a0138be8d725 19076:daa68185a018
186 * destroyed if it is not of the correct 186 * destroyed if it is not of the correct
187 * CertificateScheme. Can be NULL 187 * CertificateScheme. Can be NULL
188 */ 188 */
189 void (* destroy_certificate)(PurpleCertificate * crt); 189 void (* destroy_certificate)(PurpleCertificate * crt);
190 190
191 /** Find whether "crt" has a valid signature from issuer "issuer"
192 * @see purple_certificate_signed_by() */
193 gboolean (*signed_by)(PurpleCertificate *crt, PurpleCertificate *issuer);
191 /** 194 /**
192 * Retrieves the certificate public key fingerprint using SHA1 195 * Retrieves the certificate public key fingerprint using SHA1
193 * 196 *
194 * @param crt Certificate instance 197 * @param crt Certificate instance
195 * @return Binary representation of SHA1 hash - must be freed using 198 * @return Binary representation of SHA1 hash - must be freed using
404 * 407 *
405 * @param crt_list List of certificates to destroy. May be NULL. 408 * @param crt_list List of certificates to destroy. May be NULL.
406 */ 409 */
407 void 410 void
408 purple_certificate_destroy_list (GList * crt_list); 411 purple_certificate_destroy_list (GList * crt_list);
412
413 /**
414 * Check whether 'crt' has a valid signature made by 'issuer'
415 *
416 * @param crt Certificate instance to check signature of
417 * @param issuer Certificate thought to have signed 'crt'
418 *
419 * @return TRUE if 'crt' has a valid signature made by 'issuer',
420 * otherwise FALSE
421 * @TODO Find a way to give the reason (bad signature, not the issuer, etc.)
422 */
423 gboolean
424 purple_certificate_signed_by(PurpleCertificate *crt, PurpleCertificate *issuer);
409 425
410 /** 426 /**
411 * Imports a PurpleCertificate from a file 427 * Imports a PurpleCertificate from a file
412 * 428 *
413 * @param scheme Scheme to import under 429 * @param scheme Scheme to import under