/pidgin/main: bf10d2bb6919: Fix problems from the merge from rel...
Mark Doliner <[email protected]>
| Newsgroups | gmane.comp.gnome.gaim.cvs |
|---|---|
| Message-ID | <[email protected]> |
Changeset: bf10d2bb691910139a5cd19d6bc0499b6596f3ea Author: Mark Doliner <[email protected]> Date: 2014-10-23 23:28 -0700 Branch: default URL: https://hg.pidgin.im/pidgin/main/rev/bf10d2bb6919 Description: Fix problems from the merge from release-2.x.y. diffstat: libpurple/certificate.h | 33 ++++++--------------------------- libpurple/plugins/ssl/ssl-nss.c | 2 +- 2 files changed, 7 insertions(+), 28 deletions(-) diffs (69 lines): diff --git a/libpurple/certificate.h b/libpurple/certificate.h --- a/libpurple/certificate.h +++ b/libpurple/certificate.h @@ -63,30 +63,6 @@ typedef enum { PURPLE_CERTIFICATE_UNKNOWN_ERROR = -1, PURPLE_CERTIFICATE_VALID = 0, - PURPLE_CERTIFICATE_NON_FATALS_MASK = 0x0000FFFF, - PURPLE_CERTIFICATE_SELF_SIGNED = 0x01, - PURPLE_CERTIFICATE_CA_UNKNOWN = 0x02, - PURPLE_CERTIFICATE_NOT_ACTIVATED = 0x04, - PURPLE_CERTIFICATE_EXPIRED = 0x08, - PURPLE_CERTIFICATE_NAME_MISMATCH = 0x10, - PURPLE_CERTIFICATE_NO_CA_POOL = 0x20, - PURPLE_CERTIFICATE_FATALS_MASK = 0xFFFF0000, - PURPLE_CERTIFICATE_INVALID_CHAIN = 0x10000, - PURPLE_CERTIFICATE_REVOKED = 0x20000, - PURPLE_CERTIFICATE_REJECTED = 0x40000, - - /*< private >*/ - PURPLE_CERTIFICATE_LAST = 0x80000, -} PurpleCertificateVerificationStatus; - -/* - * TODO: Merge this with PurpleCertificateVerificationStatus for 3.0.0 - */ -typedef enum { - PURPLE_CERTIFICATE_UNKNOWN_ERROR = -1, - - /* Not an error */ - PURPLE_CERTIFICATE_NO_PROBLEMS = 0, /* Non-fatal */ PURPLE_CERTIFICATE_NON_FATALS_MASK = 0x0000FFFF, @@ -122,8 +98,11 @@ typedef enum { /* The signature has been revoked. */ PURPLE_CERTIFICATE_REVOKED = 0x20000, - PURPLE_CERTIFICATE_LAST = 0x40000, -} PurpleCertificateInvalidityFlags; + PURPLE_CERTIFICATE_REJECTED = 0x40000, + + /*< private >*/ + PURPLE_CERTIFICATE_LAST = 0x80000, +} PurpleCertificateVerificationStatus; #define PURPLE_TYPE_CERTIFICATE (purple_certificate_get_type()) typedef struct _PurpleCertificate PurpleCertificate; @@ -327,7 +306,7 @@ struct _PurpleCertificateScheme * Verify that a certificate is valid, performing all necessary checks * including date range, valid cert chain, recognized and valid CAs, etc. */ - void (* verify_cert)(PurpleCertificateVerificationRequest *vrq, PurpleCertificateInvalidityFlags *flags); + void (* verify_cert)(PurpleCertificateVerificationRequest *vrq, PurpleCertificateVerificationStatus *flags); /*< private >*/ void (*_purple_reserved1)(void); diff --git a/libpurple/plugins/ssl/ssl-nss.c b/libpurple/plugins/ssl/ssl-nss.c --- a/libpurple/plugins/ssl/ssl-nss.c +++ b/libpurple/plugins/ssl/ssl-nss.c @@ -1029,7 +1029,7 @@ x509_register_trusted_tls_cert(PurpleCer return TRUE; } -static void x509_verify_cert(PurpleCertificateVerificationRequest *vrq, PurpleCertificateInvalidityFlags *flags) +static void x509_verify_cert(PurpleCertificateVerificationRequest *vrq, PurpleCertificateVerificationStatus *flags) { CERTCertDBHandle *certdb = CERT_GetDefaultCertDB(); CERTCertificate *crt_dat;