libpurple/certificate.h

Mon, 10 Feb 2014 16:22:00 +0530

author
Ankit Vani <a@nevitus.org>
date
Mon, 10 Feb 2014 16:22:00 +0530
branch
soc.2013.gobjectification.plugins
changeset 37108
73c5fb6d78b3
parent 37094
84873ce721dc
child 37131
fe9ff76f1c6c
permissions
-rw-r--r--

Merged default branch

17506
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
1 /*
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
2 *
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
3 * purple
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
4 *
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
7 * source distribution.
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
8 *
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
12 * (at your option) any later version.
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
13 *
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
17 * GNU General Public License for more details.
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
18 *
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
20 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19840
diff changeset
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
17506
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
22 */
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35486
diff changeset
23
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35486
diff changeset
24 #ifndef _PURPLE_CERTIFICATE_H
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35486
diff changeset
25 #define _PURPLE_CERTIFICATE_H
35433
8dcae6cd6628 Add section blocks for account.h to connection.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
26 /**
8dcae6cd6628 Add section blocks for account.h to connection.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
27 * SECTION:certificate
8dcae6cd6628 Add section blocks for account.h to connection.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
28 * @section_id: libpurple-certificate
35436
a69d2e5604c5 Swap @title and @short_description roles
Ankit Vani <a@nevitus.org>
parents: 35433
diff changeset
29 * @short_description: <filename>certificate.h</filename>
a69d2e5604c5 Swap @title and @short_description roles
Ankit Vani <a@nevitus.org>
parents: 35433
diff changeset
30 * @title: Public-Key Certificate API
35433
8dcae6cd6628 Add section blocks for account.h to connection.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
31 * @see_also: <link linkend="chapter-signals-certificate">Certificate signals</link>
8dcae6cd6628 Add section blocks for account.h to connection.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
32 */
17506
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
33
22396
e0813f691fe2 felipec noticed that this include was missing.
Daniel Atallah <datallah@pidgin.im>
parents: 22001
diff changeset
34 #include <time.h>
e0813f691fe2 felipec noticed that this include was missing.
Daniel Atallah <datallah@pidgin.im>
parents: 22001
diff changeset
35
17506
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
36 #include <glib.h>
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
37
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
38 /**
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
39 * PurpleCertificateVerificationStatus:
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
40 * @PURPLE_CERTIFICATE_UNKNOWN_ERROR: Unknown error.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
41 * @PURPLE_CERTIFICATE_VALID: Not an error.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
42 * @PURPLE_CERTIFICATE_NON_FATALS_MASK: Non-fatal.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
43 * @PURPLE_CERTIFICATE_SELF_SIGNED: The certificate is self-signed.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
44 * @PURPLE_CERTIFICATE_CA_UNKNOWN: The CA is not in libpurple's pool of
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
45 * certificates.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
46 * @PURPLE_CERTIFICATE_NOT_ACTIVATED: The current time is before the
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
47 * certificate's specified activation time.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
48 * @PURPLE_CERTIFICATE_EXPIRED: The current time is after the certificate's
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
49 * specified expiration time.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
50 * @PURPLE_CERTIFICATE_NAME_MISMATCH: The certificate's subject name doesn't
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
51 * match the expected.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
52 * @PURPLE_CERTIFICATE_NO_CA_POOL: No CA pool was found. This shouldn't happen.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
53 * @PURPLE_CERTIFICATE_FATALS_MASK: Fatal
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
54 * @PURPLE_CERTIFICATE_INVALID_CHAIN: The signature chain could not be
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
55 * validated. Due to limitations in the the current API,
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
56 * this also indicates one of the CA certificates in the
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
57 * chain is expired (or not yet activated).
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
58 * @PURPLE_CERTIFICATE_REVOKED: The signature has been revoked.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
59 * @PURPLE_CERTIFICATE_REJECTED: The certificate was rejected by the user.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
60 */
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
61 /* FIXME 3.0.0 PURPLE_CERTIFICATE_INVALID_CHAIN -- see description */
18448
961dae46f969 - More API additions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18446
diff changeset
62 typedef enum
961dae46f969 - More API additions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18446
diff changeset
63 {
33637
5e3eb38571fc Merge PurpleCertificateInvalidityFlags and PurpleCertificateValidationStatus.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32892
diff changeset
64 PURPLE_CERTIFICATE_UNKNOWN_ERROR = -1,
5e3eb38571fc Merge PurpleCertificateInvalidityFlags and PurpleCertificateValidationStatus.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32892
diff changeset
65 PURPLE_CERTIFICATE_VALID = 0,
5e3eb38571fc Merge PurpleCertificateInvalidityFlags and PurpleCertificateValidationStatus.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32892
diff changeset
66 PURPLE_CERTIFICATE_NON_FATALS_MASK = 0x0000FFFF,
5e3eb38571fc Merge PurpleCertificateInvalidityFlags and PurpleCertificateValidationStatus.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32892
diff changeset
67 PURPLE_CERTIFICATE_SELF_SIGNED = 0x01,
5e3eb38571fc Merge PurpleCertificateInvalidityFlags and PurpleCertificateValidationStatus.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32892
diff changeset
68 PURPLE_CERTIFICATE_CA_UNKNOWN = 0x02,
5e3eb38571fc Merge PurpleCertificateInvalidityFlags and PurpleCertificateValidationStatus.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32892
diff changeset
69 PURPLE_CERTIFICATE_NOT_ACTIVATED = 0x04,
5e3eb38571fc Merge PurpleCertificateInvalidityFlags and PurpleCertificateValidationStatus.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32892
diff changeset
70 PURPLE_CERTIFICATE_EXPIRED = 0x08,
5e3eb38571fc Merge PurpleCertificateInvalidityFlags and PurpleCertificateValidationStatus.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32892
diff changeset
71 PURPLE_CERTIFICATE_NAME_MISMATCH = 0x10,
5e3eb38571fc Merge PurpleCertificateInvalidityFlags and PurpleCertificateValidationStatus.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32892
diff changeset
72 PURPLE_CERTIFICATE_NO_CA_POOL = 0x20,
5e3eb38571fc Merge PurpleCertificateInvalidityFlags and PurpleCertificateValidationStatus.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32892
diff changeset
73 PURPLE_CERTIFICATE_FATALS_MASK = 0xFFFF0000,
5e3eb38571fc Merge PurpleCertificateInvalidityFlags and PurpleCertificateValidationStatus.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32892
diff changeset
74 PURPLE_CERTIFICATE_INVALID_CHAIN = 0x10000,
5e3eb38571fc Merge PurpleCertificateInvalidityFlags and PurpleCertificateValidationStatus.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32892
diff changeset
75 PURPLE_CERTIFICATE_REVOKED = 0x20000,
5e3eb38571fc Merge PurpleCertificateInvalidityFlags and PurpleCertificateValidationStatus.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32892
diff changeset
76 PURPLE_CERTIFICATE_REJECTED = 0x40000,
35460
96946e21fce5 Fix some more gtk-doc warnings till dnssrv
Ankit Vani <a@nevitus.org>
parents: 35459
diff changeset
77
96946e21fce5 Fix some more gtk-doc warnings till dnssrv
Ankit Vani <a@nevitus.org>
parents: 35459
diff changeset
78 /*< private >*/
33637
5e3eb38571fc Merge PurpleCertificateInvalidityFlags and PurpleCertificateValidationStatus.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32892
diff changeset
79 PURPLE_CERTIFICATE_LAST = 0x80000,
18448
961dae46f969 - More API additions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18446
diff changeset
80 } PurpleCertificateVerificationStatus;
961dae46f969 - More API additions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18446
diff changeset
81
34792
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34246
diff changeset
82 #define PURPLE_TYPE_CERTIFICATE (purple_certificate_get_type())
18248
8f462eaffecd - Style issues
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18247
diff changeset
83 typedef struct _PurpleCertificate PurpleCertificate;
34792
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34246
diff changeset
84
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34246
diff changeset
85 #define PURPLE_TYPE_CERTIFICATE_POOL (purple_certificate_pool_get_type())
18489
591ff6f5dca7 - Add CertificatePool struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18481
diff changeset
86 typedef struct _PurpleCertificatePool PurpleCertificatePool;
34792
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34246
diff changeset
87
18248
8f462eaffecd - Style issues
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18247
diff changeset
88 typedef struct _PurpleCertificateScheme PurpleCertificateScheme;
18448
961dae46f969 - More API additions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18446
diff changeset
89 typedef struct _PurpleCertificateVerifier PurpleCertificateVerifier;
961dae46f969 - More API additions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18446
diff changeset
90 typedef struct _PurpleCertificateVerificationRequest PurpleCertificateVerificationRequest;
17506
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
91
18460
cceca1e961ad - Fill out CertVerifier struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18457
diff changeset
92 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
93 * PurpleCertificateVerifiedCallback:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
94 * @st: Status code
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
95 * @userdata: User-defined data
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
96 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
97 * Callback function for the results of a verification check
18460
cceca1e961ad - Fill out CertVerifier struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18457
diff changeset
98 */
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
99 typedef void (*PurpleCertificateVerifiedCallback)(PurpleCertificateVerificationStatus st,
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
100 gpointer userdata);
25888
d0fdd378a635 Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 22396
diff changeset
101
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
102 /**
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
103 * PurpleCertificate:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
104 * @scheme: Scheme this certificate is under
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
105 * @data: Opaque pointer to internal data
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
106 *
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
107 * A certificate instance
17509
fa009823dbfd - Exposed the _Certificate struct definition in certificate.h
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17508
diff changeset
108 *
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
109 * An opaque data structure representing a single certificate under some
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
110 * CertificateScheme
17509
fa009823dbfd - Exposed the _Certificate struct definition in certificate.h
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17508
diff changeset
111 */
18248
8f462eaffecd - Style issues
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18247
diff changeset
112 struct _PurpleCertificate
17509
fa009823dbfd - Exposed the _Certificate struct definition in certificate.h
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17508
diff changeset
113 {
18248
8f462eaffecd - Style issues
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18247
diff changeset
114 PurpleCertificateScheme * scheme;
17509
fa009823dbfd - Exposed the _Certificate struct definition in certificate.h
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17508
diff changeset
115 gpointer data;
fa009823dbfd - Exposed the _Certificate struct definition in certificate.h
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17508
diff changeset
116 };
fa009823dbfd - Exposed the _Certificate struct definition in certificate.h
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17508
diff changeset
117
18489
591ff6f5dca7 - Add CertificatePool struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18481
diff changeset
118 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
119 * PurpleCertificatePool:
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
120 * @scheme_name: Scheme this Pool operates for
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
121 * @name: Internal name to refer to the pool by
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
122 * @fullname: User-friendly name for this type. ex: N_("SSL Servers"). When
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
123 * this is displayed anywhere, it should be i18ned.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
124 * ex: _(pool->fullname)
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
125 * @data: Internal pool data
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
126 * @init: Set up the Pool's internal state
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
127 * <sbr/>Upon calling purple_certificate_register_pool() , this
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
128 * function will be called. May be %NULL.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
129 * <sbr/>Returns: %TRUE if the initialization succeeded,
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
130 * otherwise %FALSE.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
131 * @uninit: Uninit the Pool's internal state. Will be called by
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
132 * purple_certificate_unregister_pool(). May be %NULL.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
133 * @cert_in_pool: Check for presence of a certificate in the pool using unique
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
134 * ID
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
135 * @get_cert: Retrieve a PurpleCertificate from the pool
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
136 * @put_cert: Add a certificate to the pool. Must overwrite any other
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
137 * certificates sharing the same ID in the pool.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
138 * <sbr/>Returns: %TRUE if the operation succeeded, otherwise
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
139 * %FALSE.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
140 * @delete_cert: Delete a certificate from the pool
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
141 * @get_idlist: Returns a list of IDs stored in the pool
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
142 *
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
143 * Database for retrieval or storage of Certificates
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
144 *
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
145 * More or less a hash table; all lookups and writes are controlled by a string
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
146 * key.
18489
591ff6f5dca7 - Add CertificatePool struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18481
diff changeset
147 */
591ff6f5dca7 - Add CertificatePool struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18481
diff changeset
148 struct _PurpleCertificatePool
591ff6f5dca7 - Add CertificatePool struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18481
diff changeset
149 {
591ff6f5dca7 - Add CertificatePool struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18481
diff changeset
150 gchar *scheme_name;
591ff6f5dca7 - Add CertificatePool struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18481
diff changeset
151 gchar *name;
591ff6f5dca7 - Add CertificatePool struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18481
diff changeset
152 gchar *fullname;
591ff6f5dca7 - Add CertificatePool struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18481
diff changeset
153 gpointer data;
25888
d0fdd378a635 Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 22396
diff changeset
154
18494
fc93e7020e83 - CertificatePool member functions no longer accept a Pool instance, as Pools are expected to be singletons
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18493
diff changeset
155 gboolean (* init)(void);
fc93e7020e83 - CertificatePool member functions no longer accept a Pool instance, as Pools are expected to be singletons
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18493
diff changeset
156 void (* uninit)(void);
18489
591ff6f5dca7 - Add CertificatePool struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18481
diff changeset
157
18493
a4ee6630e3fb - cert_in_pool_by_id is now just cert_in_pool; finding the uniqueID of the Certificate wanted is entirely the caller's problem
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18490
diff changeset
158 gboolean (* cert_in_pool)(const gchar *id);
18489
591ff6f5dca7 - Add CertificatePool struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18481
diff changeset
159 PurpleCertificate * (* get_cert)(const gchar *id);
18571
abab131c242c - CertificatePool put_cert now accepts an id argument
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18496
diff changeset
160 gboolean (* put_cert)(const gchar *id, PurpleCertificate *crt);
18899
45bdab2558f8 - Add purple_certificate_pool_delete
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18818
diff changeset
161 gboolean (* delete_cert)(const gchar *id);
18661
a3c1e2719e45 - Add pool_get_idlist / pool_destroy_idlist
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18658
diff changeset
162
a3c1e2719e45 - Add pool_get_idlist / pool_destroy_idlist
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18658
diff changeset
163 GList * (* get_idlist)(void);
19827
62c3805f723e - Add purple_reserved fields to various structures.
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19489
diff changeset
164
35024
eb3afb7643ce Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents: 34792
diff changeset
165 /*< private >*/
19827
62c3805f723e - Add purple_reserved fields to various structures.
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19489
diff changeset
166 void (*_purple_reserved1)(void);
62c3805f723e - Add purple_reserved fields to various structures.
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19489
diff changeset
167 void (*_purple_reserved2)(void);
62c3805f723e - Add purple_reserved fields to various structures.
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19489
diff changeset
168 void (*_purple_reserved3)(void);
62c3805f723e - Add purple_reserved fields to various structures.
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19489
diff changeset
169 void (*_purple_reserved4)(void);
18489
591ff6f5dca7 - Add CertificatePool struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18481
diff changeset
170 };
591ff6f5dca7 - Add CertificatePool struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18481
diff changeset
171
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
172 /**
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
173 * PurpleCertificateScheme:
35459
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
174 * @name: Name of the certificate type. ex: "x509", "pgp", etc.
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
175 * <sbr/> This must be globally unique - you may not register more than
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
176 * one CertificateScheme of the same name at a time.
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
177 * @fullname: User-friendly name for this type. ex: N_("X.509 Certificates")
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
178 * <sbr/> When this is displayed anywhere, it should be i18ned. ex:
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
179 * _(scheme->fullname)
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
180 * @import_certificate: Imports a certificate from a file
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
181 * <sbr/> @filename: File to import the certificate from
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
182 * <sbr/> Returns: Pointer to the newly allocated
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
183 * Certificate struct or NULL on failure.
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
184 * @export_certificate: Exports a certificate to a file.
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
185 * <sbr/>See purple_certificate_export().
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
186 * <sbr/>@filename: File to export the certificate to
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
187 * <sbr/>@crt: Certificate to export
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
188 * <sbr/>Returns: %TRUE if the export succeeded,
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
189 * otherwise %FALSE
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
190 * @copy_certificate: Duplicates a certificate
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
191 * <sbr/>Certificates are generally assumed to be read-only,
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
192 * so feel free to do any sort of reference-counting magic
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
193 * you want here. If this ever changes, please remember to
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
194 * change the magic accordingly.
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
195 * <sbr/>Returns: Reference to the new copy
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
196 * @destroy_certificate: Destroys and frees a Certificate structure
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
197 * <sbr/> Destroys a Certificate's internal data
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
198 * structures and calls free(@crt)
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
199 * <sbr/> @crt: Certificate instance to be destroyed.
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
200 * It <emphasis>WILL NOT</emphasis> be destroyed if it is
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
201 * not of the correct CertificateScheme. Can be %NULL.
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
202 * @signed_by: Find whether "crt" has a valid signature from issuer "issuer".
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
203 * <sbr/>See purple_certificate_signed_by().
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
204 * @get_fingerprint_sha1: Retrieves the certificate public key fingerprint using
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
205 * SHA1
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
206 * <sbr/>@crt: Certificate instance
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
207 * <sbr/>Returns: Binary representation of SHA1 hash -
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
208 * must be freed using g_byte_array_free().
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
209 * @get_unique_id: Retrieves a unique certificate identifier
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
210 * <sbr/>@crt: Certificate instance
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
211 * <sbr/>Returns: Newly allocated string that can be used to
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
212 * uniquely identify the certificate.
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
213 * @get_issuer_unique_id: Retrieves a unique identifier for the certificate's
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
214 * issuer
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
215 * <sbr/>@crt: Certificate instance
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
216 * <sbr/>Returns: Newly allocated string that can be used
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
217 * to uniquely identify the issuer's
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
218 * certificate.
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
219 * @get_subject_name: Gets the certificate subject's name
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
220 * <sbr/>For X.509, this is the "Common Name" field, as we're
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
221 * only using it for hostname verification at the moment.
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
222 * <sbr/>See purple_certificate_get_subject_name().
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
223 * <sbr/>@crt: Certificate instance
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
224 * <sbr/>Returns: Newly allocated string with the certificate
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
225 * subject.
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
226 * @check_subject_name: Check the subject name against that on the certificate
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
227 * <sbr/>See purple_certificate_check_subject_name().
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
228 * <sbr/>Returns: %TRUE if it is a match, else %FALSE
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
229 * @get_times: Retrieve the certificate activation/expiration times
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
230 * @import_certificates: Imports certificates from a file
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
231 * <sbr/> @filename: File to import the certificates from
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
232 * <sbr/> Returns: #GSList of pointers to the newly
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
233 * allocated Certificate structs or
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
234 * %NULL on failure.
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
235 * @get_der_data: Retrieves the certificate data in DER form
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
236 * <sbr/>@crt: Certificate instance
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
237 * <sbr/>Returns: Binary DER representation of certificate - must
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
238 * be freed using g_byte_array_free().
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
239 * @get_display_string: Retrieves a string representation of the certificate
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
240 * suitable for display
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
241 * <sbr/>@crt: Certificate instance
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
242 * <sbr/>Returns: User-displayable string representation of
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
243 * certificate - must be freed using
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
244 * g_free().
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
245 *
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
246 * A certificate type.
17506
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
247 *
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
248 * A CertificateScheme must implement all of the fields in the structure,
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
249 * and register it using purple_certificate_register_scheme().
17506
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
250 *
35459
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
251 * There may be only <emphasis>ONE</emphasis> CertificateScheme provided for
4eab06e8345a gtk-doc-ify PurpleCertificateScheme
Ankit Vani <a@nevitus.org>
parents: 35458
diff changeset
252 * each certificate type, as specified by the "name" field.
17506
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
253 */
18248
8f462eaffecd - Style issues
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18247
diff changeset
254 struct _PurpleCertificateScheme
17506
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
255 {
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
256 gchar * name;
18247
d9f7c426dbc9 - Expose some more functions in the x509 CertificateScheme. Doesn't
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17509
diff changeset
257 gchar * fullname;
d9f7c426dbc9 - Expose some more functions in the x509 CertificateScheme. Doesn't
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17509
diff changeset
258
18249
21467a007ea7 - Eliminate compiler warning
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18248
diff changeset
259 PurpleCertificate * (* import_certificate)(const gchar * filename);
18496
3bb8e716482e - Add purple_certificate_export and associated libpurple stuff
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18494
diff changeset
260 gboolean (* export_certificate)(const gchar *filename, PurpleCertificate *crt);
3bb8e716482e - Add purple_certificate_export and associated libpurple stuff
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18494
diff changeset
261
18653
ac29c2efe90e - Add purple_certificate_copy and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18647
diff changeset
262 PurpleCertificate * (* copy_certificate)(PurpleCertificate *crt);
18248
8f462eaffecd - Style issues
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18247
diff changeset
263 void (* destroy_certificate)(PurpleCertificate * crt);
18454
9a56a88152b9 - Add more to the Certificate struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18453
diff changeset
264
19016
3cf632c31eb3 - Add purple_certificate_signed_by
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19007
diff changeset
265 gboolean (*signed_by)(PurpleCertificate *crt, PurpleCertificate *issuer);
18454
9a56a88152b9 - Add more to the Certificate struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18453
diff changeset
266 GByteArray * (* get_fingerprint_sha1)(PurpleCertificate *crt);
9a56a88152b9 - Add more to the Certificate struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18453
diff changeset
267 gchar * (* get_unique_id)(PurpleCertificate *crt);
9a56a88152b9 - Add more to the Certificate struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18453
diff changeset
268 gchar * (* get_issuer_unique_id)(PurpleCertificate *crt);
9a56a88152b9 - Add more to the Certificate struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18453
diff changeset
269
18481
d220d85caaf1 - Add purple_certificate_get_subject_name and associated libpurple
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18477
diff changeset
270 gchar * (* get_subject_name)(PurpleCertificate *crt);
18643
a6a86ac3c219 - Add certificate_check_subject_name and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18642
diff changeset
271 gboolean (* check_subject_name)(PurpleCertificate *crt, const gchar *name);
a6a86ac3c219 - Add certificate_check_subject_name and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18642
diff changeset
272
34246
2ca1bb194693 Update certificate API to use 64-bit unsigned values instead of time_t.
Daniel Atallah <datallah@pidgin.im>
parents: 33637
diff changeset
273 gboolean (* get_times)(PurpleCertificate *crt, gint64 *activation, gint64 *expiration);
25888
d0fdd378a635 Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 22396
diff changeset
274
29930
80f4616de5ce Implement reading multiple certificates from a single "bundle" of
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27936
diff changeset
275 GSList * (* import_certificates)(const gchar * filename);
32767
581cd5f30198 Add a function for retrieving the raw DER representation of a
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
276 GByteArray * (* get_der_data)(PurpleCertificate *crt);
581cd5f30198 Add a function for retrieving the raw DER representation of a
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
277
32885
d65261e7426e Add a function for converting a PurpleCertificate to a string
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32787
diff changeset
278 gchar * (* get_display_string)(PurpleCertificate *crt);
d65261e7426e Add a function for converting a PurpleCertificate to a string
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32787
diff changeset
279
35024
eb3afb7643ce Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents: 34792
diff changeset
280 /*< private >*/
19827
62c3805f723e - Add purple_reserved fields to various structures.
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19489
diff changeset
281 void (*_purple_reserved1)(void);
17506
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
282 };
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
283
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
284 /**
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
285 * PurpleCertificateVerifier:
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
286 * @scheme_name: Name of the scheme this Verifier operates on. The scheme
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
287 * will be looked up by name when a Request is generated
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
288 * using this Verifier.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
289 * @name: Name of the Verifier - case insensitive.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
290 * @start_verification: Start the verification process. To be called from
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
291 * purple_certificate_verify() once it has constructed the
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
292 * request. This will use the information in the given
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
293 * VerificationRequest to check the certificate and
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
294 * callback the requester with the verification results.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
295 * <sbr/>@vrq: The request to process.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
296 * @destroy_request: Destroy a completed Request under this Verifier. The
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
297 * function pointed to here is only responsible for
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
298 * cleaning up whatever
35467
975ae62dd895 Fix cross-references and some other warnings
Ankit Vani <a@nevitus.org>
parents: 35460
diff changeset
299 * #PurpleCertificateVerificationRequest.data points to.
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
300 * It should not call free(@vrq).
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
301 * <sbr/>@vrq: The request to destroy.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
302 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
303 * A set of operations used to provide logic for verifying a Certificate's
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
304 * authenticity.
18461
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
305 *
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
306 * A Verifier provider must fill out these fields, then register it using
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
307 * purple_certificate_register_verifier().
18461
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
308 *
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
309 * The (scheme_name, name) value must be unique for each Verifier - you may not
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
310 * register more than one Verifier of the same name for each Scheme.
18448
961dae46f969 - More API additions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18446
diff changeset
311 */
961dae46f969 - More API additions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18446
diff changeset
312 struct _PurpleCertificateVerifier
18460
cceca1e961ad - Fill out CertVerifier struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18457
diff changeset
313 {
cceca1e961ad - Fill out CertVerifier struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18457
diff changeset
314 gchar *scheme_name;
18471
2eb86930cfaf - Reorder struct for clarity
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18470
diff changeset
315 gchar *name;
25888
d0fdd378a635 Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 22396
diff changeset
316
18461
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
317 void (* start_verification)(PurpleCertificateVerificationRequest *vrq);
18467
6bd91f3acf84 - Add purple_certificate_verify_destroy and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18466
diff changeset
318 void (* destroy_request)(PurpleCertificateVerificationRequest *vrq);
19827
62c3805f723e - Add purple_reserved fields to various structures.
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19489
diff changeset
319
35024
eb3afb7643ce Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents: 34792
diff changeset
320 /*< private >*/
19827
62c3805f723e - Add purple_reserved fields to various structures.
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19489
diff changeset
321 void (*_purple_reserved1)(void);
62c3805f723e - Add purple_reserved fields to various structures.
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19489
diff changeset
322 void (*_purple_reserved2)(void);
62c3805f723e - Add purple_reserved fields to various structures.
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19489
diff changeset
323 void (*_purple_reserved3)(void);
62c3805f723e - Add purple_reserved fields to various structures.
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19489
diff changeset
324 void (*_purple_reserved4)(void);
18448
961dae46f969 - More API additions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18446
diff changeset
325 };
961dae46f969 - More API additions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18446
diff changeset
326
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
327 /**
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
328 * PurpleCertificateVerificationRequest:
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
329 * @verifier: Reference to the verification logic used.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
330 * @scheme: Reference to the scheme used. This is looked up from the
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
331 * Verifier when the Request is generated.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
332 * @subject_name: Name to check that the certificate is issued to. For X.509
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
333 * certificates, this is the Common Name.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
334 * @cert_chain: List of certificates in the chain to be verified (such as that
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
335 * returned by purple_ssl_get_peer_certificates()). This is most
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
336 * relevant for X.509 certificates used in SSL sessions. The list
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
337 * order should be: certificate, issuer, issuer's issuer, etc.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
338 * @data: Internal data used by the Verifier code.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
339 * @cb: Function to call with the verification result.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
340 * @cb_data: Data to pass to the post-verification callback.
18448
961dae46f969 - More API additions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18446
diff changeset
341 *
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
342 * Structure for a single certificate request
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
343 *
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
344 * Useful for keeping track of the state of a verification that involves
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
345 * several steps
18448
961dae46f969 - More API additions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18446
diff changeset
346 */
961dae46f969 - More API additions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18446
diff changeset
347 struct _PurpleCertificateVerificationRequest
961dae46f969 - More API additions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18446
diff changeset
348 {
961dae46f969 - More API additions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18446
diff changeset
349 PurpleCertificateVerifier *verifier;
18462
2c6d71addbdb - purple_certificate_verify now takes a Verifier argument, creates its
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18461
diff changeset
350 PurpleCertificateScheme *scheme;
18451
304d2fa12f6a - purple_ssl_get_peer_certificates
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18448
diff changeset
351 gchar *subject_name;
18448
961dae46f969 - More API additions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18446
diff changeset
352 GList *cert_chain;
18460
cceca1e961ad - Fill out CertVerifier struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18457
diff changeset
353 gpointer data;
cceca1e961ad - Fill out CertVerifier struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18457
diff changeset
354 PurpleCertificateVerifiedCallback cb;
cceca1e961ad - Fill out CertVerifier struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18457
diff changeset
355 gpointer cb_data;
18448
961dae46f969 - More API additions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18446
diff changeset
356 };
17506
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
357
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32767
diff changeset
358 G_BEGIN_DECLS
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32767
diff changeset
359
18465
e3f061608f7b - Documentation segmentation
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18462
diff changeset
360 /*****************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35467
diff changeset
361 /* Certificate Verification Functions */
18465
e3f061608f7b - Documentation segmentation
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18462
diff changeset
362 /*****************************************************************************/
e3f061608f7b - Documentation segmentation
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18462
diff changeset
363
18462
2c6d71addbdb - purple_certificate_verify now takes a Verifier argument, creates its
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18461
diff changeset
364 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
365 * purple_certificate_verify:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
366 * @verifier: Verification logic to use.
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
367 * See purple_certificate_find_verifier().
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
368 * @subject_name: Name that should match the first certificate in the
18462
2c6d71addbdb - purple_certificate_verify now takes a Verifier argument, creates its
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18461
diff changeset
369 * chain for the certificate to be valid. Will be strdup'd
2c6d71addbdb - purple_certificate_verify now takes a Verifier argument, creates its
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18461
diff changeset
370 * into the Request struct
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
371 * @cert_chain: Certificate chain to check. If there is more than one
18462
2c6d71addbdb - purple_certificate_verify now takes a Verifier argument, creates its
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18461
diff changeset
372 * certificate in the chain (X.509), the peer's
2c6d71addbdb - purple_certificate_verify now takes a Verifier argument, creates its
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18461
diff changeset
373 * certificate comes first, then the issuer/signer's
18656
02c822b398d2 - purple_certificate_verify no longer takes possession of the
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18655
diff changeset
374 * certificate, etc. The whole list is duplicated into the
02c822b398d2 - purple_certificate_verify no longer takes possession of the
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18655
diff changeset
375 * Request struct.
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
376 * @cb: Callback function to be called with whether the
18462
2c6d71addbdb - purple_certificate_verify now takes a Verifier argument, creates its
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18461
diff changeset
377 * certificate was approved or not.
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
378 * @cb_data: User-defined data for the above.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
379 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
380 * Constructs a verification request and passed control to the specified Verifier
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
381 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
382 * It is possible that the callback will be called immediately upon calling
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
383 * this function. Plan accordingly.
18462
2c6d71addbdb - purple_certificate_verify now takes a Verifier argument, creates its
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18461
diff changeset
384 */
2c6d71addbdb - purple_certificate_verify now takes a Verifier argument, creates its
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18461
diff changeset
385 void
2c6d71addbdb - purple_certificate_verify now takes a Verifier argument, creates its
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18461
diff changeset
386 purple_certificate_verify (PurpleCertificateVerifier *verifier,
2c6d71addbdb - purple_certificate_verify now takes a Verifier argument, creates its
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18461
diff changeset
387 const gchar *subject_name, GList *cert_chain,
2c6d71addbdb - purple_certificate_verify now takes a Verifier argument, creates its
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18461
diff changeset
388 PurpleCertificateVerifiedCallback cb,
2c6d71addbdb - purple_certificate_verify now takes a Verifier argument, creates its
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18461
diff changeset
389 gpointer cb_data);
2c6d71addbdb - purple_certificate_verify now takes a Verifier argument, creates its
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18461
diff changeset
390
18466
881319eb171d - Add certificate_destroy and certificate_destroy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18465
diff changeset
391 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
392 * purple_certificate_verify_complete:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
393 * @vrq: Request to conclude
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
394 * @st: Success/failure code to pass to the request's
19028
1c28409e9c5f - Add verify_complete, which should deprecate verify_destroy
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19022
diff changeset
395 * completion callback.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
396 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
397 * Completes and destroys a VerificationRequest
19028
1c28409e9c5f - Add verify_complete, which should deprecate verify_destroy
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19022
diff changeset
398 */
1c28409e9c5f - Add verify_complete, which should deprecate verify_destroy
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19022
diff changeset
399 void
1c28409e9c5f - Add verify_complete, which should deprecate verify_destroy
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19022
diff changeset
400 purple_certificate_verify_complete(PurpleCertificateVerificationRequest *vrq,
1c28409e9c5f - Add verify_complete, which should deprecate verify_destroy
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19022
diff changeset
401 PurpleCertificateVerificationStatus st);
1c28409e9c5f - Add verify_complete, which should deprecate verify_destroy
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19022
diff changeset
402
18583
a3e6934ba7a8 - Rearrange certificate.h for better organization
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18578
diff changeset
403 /*****************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35467
diff changeset
404 /* Certificate Functions */
18583
a3e6934ba7a8 - Rearrange certificate.h for better organization
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18578
diff changeset
405 /*****************************************************************************/
a3e6934ba7a8 - Rearrange certificate.h for better organization
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18578
diff changeset
406
18467
6bd91f3acf84 - Add purple_certificate_verify_destroy and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18466
diff changeset
407 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
408 * purple_certificate_get_type:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
409 *
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
410 * Returns: The #GType for the #PurpleCertificate boxed structure.
34792
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34246
diff changeset
411 */
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34246
diff changeset
412 GType purple_certificate_get_type(void);
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34246
diff changeset
413
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34246
diff changeset
414 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
415 * purple_certificate_copy:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
416 * @crt: Instance to duplicate
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
417 *
18653
ac29c2efe90e - Add purple_certificate_copy and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18647
diff changeset
418 * Makes a duplicate of a certificate
ac29c2efe90e - Add purple_certificate_copy and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18647
diff changeset
419 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
420 * Returns: Pointer to new instance
18653
ac29c2efe90e - Add purple_certificate_copy and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18647
diff changeset
421 */
ac29c2efe90e - Add purple_certificate_copy and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18647
diff changeset
422 PurpleCertificate *
ac29c2efe90e - Add purple_certificate_copy and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18647
diff changeset
423 purple_certificate_copy(PurpleCertificate *crt);
ac29c2efe90e - Add purple_certificate_copy and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18647
diff changeset
424
ac29c2efe90e - Add purple_certificate_copy and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18647
diff changeset
425 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
426 * purple_certificate_copy_list:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
427 * @crt_list: List to duplicate
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
428 *
18655
43b99fe59f54 - Add purple_certificate_copy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18653
diff changeset
429 * Duplicates an entire list of certificates
43b99fe59f54 - Add purple_certificate_copy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18653
diff changeset
430 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
431 * Returns: New list copy
18655
43b99fe59f54 - Add purple_certificate_copy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18653
diff changeset
432 */
43b99fe59f54 - Add purple_certificate_copy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18653
diff changeset
433 GList *
43b99fe59f54 - Add purple_certificate_copy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18653
diff changeset
434 purple_certificate_copy_list(GList *crt_list);
43b99fe59f54 - Add purple_certificate_copy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18653
diff changeset
435
43b99fe59f54 - Add purple_certificate_copy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18653
diff changeset
436 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
437 * purple_certificate_destroy:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
438 * @crt: Instance to destroy. May be NULL.
18466
881319eb171d - Add certificate_destroy and certificate_destroy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18465
diff changeset
439 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
440 * Destroys and free()'s a Certificate
18466
881319eb171d - Add certificate_destroy and certificate_destroy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18465
diff changeset
441 */
881319eb171d - Add certificate_destroy and certificate_destroy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18465
diff changeset
442 void
881319eb171d - Add certificate_destroy and certificate_destroy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18465
diff changeset
443 purple_certificate_destroy (PurpleCertificate *crt);
881319eb171d - Add certificate_destroy and certificate_destroy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18465
diff changeset
444
881319eb171d - Add certificate_destroy and certificate_destroy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18465
diff changeset
445 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
446 * purple_certificate_destroy_list:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
447 * @crt_list: List of certificates to destroy. May be NULL.
18466
881319eb171d - Add certificate_destroy and certificate_destroy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18465
diff changeset
448 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
449 * Destroy an entire list of Certificate instances and the containing list
18466
881319eb171d - Add certificate_destroy and certificate_destroy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18465
diff changeset
450 */
881319eb171d - Add certificate_destroy and certificate_destroy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18465
diff changeset
451 void
881319eb171d - Add certificate_destroy and certificate_destroy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18465
diff changeset
452 purple_certificate_destroy_list (GList * crt_list);
881319eb171d - Add certificate_destroy and certificate_destroy_list
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18465
diff changeset
453
18473
a7251d502f6a - Add purple_certificate_get_fingerprint_sha1
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18472
diff changeset
454 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
455 * purple_certificate_signed_by:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
456 * @crt: Certificate instance to check signature of
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
457 * @issuer: Certificate thought to have signed 'crt'
19016
3cf632c31eb3 - Add purple_certificate_signed_by
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19007
diff changeset
458 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
459 * Check whether 'crt' has a valid signature made by 'issuer'
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
460 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
461 * Returns: TRUE if 'crt' has a valid signature made by 'issuer',
19016
3cf632c31eb3 - Add purple_certificate_signed_by
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19007
diff changeset
462 * otherwise FALSE
3cf632c31eb3 - Add purple_certificate_signed_by
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19007
diff changeset
463 */
35473
b5427137c6d0 Remove @todo
Ankit Vani <a@nevitus.org>
parents: 35472
diff changeset
464 /* TODO Find a way to give the reason (bad signature, not the issuer, etc.) */
19016
3cf632c31eb3 - Add purple_certificate_signed_by
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19007
diff changeset
465 gboolean
3cf632c31eb3 - Add purple_certificate_signed_by
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19007
diff changeset
466 purple_certificate_signed_by(PurpleCertificate *crt, PurpleCertificate *issuer);
3cf632c31eb3 - Add purple_certificate_signed_by
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19007
diff changeset
467
3cf632c31eb3 - Add purple_certificate_signed_by
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19007
diff changeset
468 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
469 * purple_certificate_check_signature_chain:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
470 * @chain: List of PurpleCertificate instances comprising the chain,
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
471 * in the order certificate, issuer, issuer's issuer, etc.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
472 * @failing: A pointer to a PurpleCertificate*. If not NULL, if the
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
473 * chain fails to validate, this will be set to the
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
474 * certificate whose signature could not be validated.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
475 *
27936
1763b40b18bd Fix GnuTLS validation of the CACert Chain. Closes #4458.
Paul Aurich <darkrain42@pidgin.im>
parents: 25888
diff changeset
476 * Check that a certificate chain is valid and, if not, the failing certificate.
1763b40b18bd Fix GnuTLS validation of the CACert Chain. Closes #4458.
Paul Aurich <darkrain42@pidgin.im>
parents: 25888
diff changeset
477 *
1763b40b18bd Fix GnuTLS validation of the CACert Chain. Closes #4458.
Paul Aurich <darkrain42@pidgin.im>
parents: 25888
diff changeset
478 * Uses purple_certificate_signed_by() to verify that each PurpleCertificate
1763b40b18bd Fix GnuTLS validation of the CACert Chain. Closes #4458.
Paul Aurich <darkrain42@pidgin.im>
parents: 25888
diff changeset
479 * in the chain carries a valid signature from the next. A single-certificate
1763b40b18bd Fix GnuTLS validation of the CACert Chain. Closes #4458.
Paul Aurich <darkrain42@pidgin.im>
parents: 25888
diff changeset
480 * chain is considered to be valid.
1763b40b18bd Fix GnuTLS validation of the CACert Chain. Closes #4458.
Paul Aurich <darkrain42@pidgin.im>
parents: 25888
diff changeset
481 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
482 * Returns: TRUE if the chain is valid. See description.
27936
1763b40b18bd Fix GnuTLS validation of the CACert Chain. Closes #4458.
Paul Aurich <darkrain42@pidgin.im>
parents: 25888
diff changeset
483 */
1763b40b18bd Fix GnuTLS validation of the CACert Chain. Closes #4458.
Paul Aurich <darkrain42@pidgin.im>
parents: 25888
diff changeset
484 gboolean
32590
65bb6a842cdc Remove the old deprecated purple_certificate_check_signature_chain.
Andrew Victor <andrew.victor@mxit.com>
parents: 29930
diff changeset
485 purple_certificate_check_signature_chain(GList *chain,
27936
1763b40b18bd Fix GnuTLS validation of the CACert Chain. Closes #4458.
Paul Aurich <darkrain42@pidgin.im>
parents: 25888
diff changeset
486 PurpleCertificate **failing);
1763b40b18bd Fix GnuTLS validation of the CACert Chain. Closes #4458.
Paul Aurich <darkrain42@pidgin.im>
parents: 25888
diff changeset
487
1763b40b18bd Fix GnuTLS validation of the CACert Chain. Closes #4458.
Paul Aurich <darkrain42@pidgin.im>
parents: 25888
diff changeset
488 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
489 * purple_certificate_import:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
490 * @scheme: Scheme to import under
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
491 * @filename: File path to import from
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
492 *
18577
7b4c95fb042d - Add purple_certificate_import
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18573
diff changeset
493 * Imports a PurpleCertificate from a file
7b4c95fb042d - Add purple_certificate_import
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18573
diff changeset
494 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
495 * Returns: Pointer to a new PurpleCertificate, or NULL on failure
18577
7b4c95fb042d - Add purple_certificate_import
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18573
diff changeset
496 */
7b4c95fb042d - Add purple_certificate_import
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18573
diff changeset
497 PurpleCertificate *
18578
95080ca9610a - Fixed naming issues in previous revision
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18577
diff changeset
498 purple_certificate_import(PurpleCertificateScheme *scheme, const gchar *filename);
18577
7b4c95fb042d - Add purple_certificate_import
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18573
diff changeset
499
7b4c95fb042d - Add purple_certificate_import
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18573
diff changeset
500 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
501 * purple_certificates_import:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
502 * @scheme: Scheme to import under
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
503 * @filename: File path to import from
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
504 *
29930
80f4616de5ce Implement reading multiple certificates from a single "bundle" of
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27936
diff changeset
505 * Imports a list of PurpleCertificates from a file
80f4616de5ce Implement reading multiple certificates from a single "bundle" of
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27936
diff changeset
506 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
507 * Returns: Pointer to a GSList of new PurpleCertificates, or NULL on failure
29930
80f4616de5ce Implement reading multiple certificates from a single "bundle" of
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27936
diff changeset
508 */
80f4616de5ce Implement reading multiple certificates from a single "bundle" of
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27936
diff changeset
509 GSList *
80f4616de5ce Implement reading multiple certificates from a single "bundle" of
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27936
diff changeset
510 purple_certificates_import(PurpleCertificateScheme *scheme, const gchar *filename);
80f4616de5ce Implement reading multiple certificates from a single "bundle" of
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27936
diff changeset
511
80f4616de5ce Implement reading multiple certificates from a single "bundle" of
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27936
diff changeset
512 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
513 * purple_certificate_export:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
514 * @filename: File to export the certificate to
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
515 * @crt: Certificate to export
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
516 *
18496
3bb8e716482e - Add purple_certificate_export and associated libpurple stuff
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18494
diff changeset
517 * Exports a PurpleCertificate to a file
3bb8e716482e - Add purple_certificate_export and associated libpurple stuff
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18494
diff changeset
518 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
519 * Returns: TRUE if the export succeeded, otherwise FALSE
18496
3bb8e716482e - Add purple_certificate_export and associated libpurple stuff
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18494
diff changeset
520 */
3bb8e716482e - Add purple_certificate_export and associated libpurple stuff
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18494
diff changeset
521 gboolean
3bb8e716482e - Add purple_certificate_export and associated libpurple stuff
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18494
diff changeset
522 purple_certificate_export(const gchar *filename, PurpleCertificate *crt);
3bb8e716482e - Add purple_certificate_export and associated libpurple stuff
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18494
diff changeset
523
3bb8e716482e - Add purple_certificate_export and associated libpurple stuff
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18494
diff changeset
524
3bb8e716482e - Add purple_certificate_export and associated libpurple stuff
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18494
diff changeset
525 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
526 * purple_certificate_get_fingerprint_sha1:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
527 * @crt: Certificate instance
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
528 *
18473
a7251d502f6a - Add purple_certificate_get_fingerprint_sha1
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18472
diff changeset
529 * Retrieves the certificate public key fingerprint using SHA1.
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
530 * See purple_base16_encode_chunked().
18473
a7251d502f6a - Add purple_certificate_get_fingerprint_sha1
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18472
diff changeset
531 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
532 * Returns: Binary representation of the hash. You are responsible for free()ing
18473
a7251d502f6a - Add purple_certificate_get_fingerprint_sha1
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18472
diff changeset
533 * this.
a7251d502f6a - Add purple_certificate_get_fingerprint_sha1
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18472
diff changeset
534 */
a7251d502f6a - Add purple_certificate_get_fingerprint_sha1
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18472
diff changeset
535 GByteArray *
a7251d502f6a - Add purple_certificate_get_fingerprint_sha1
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18472
diff changeset
536 purple_certificate_get_fingerprint_sha1(PurpleCertificate *crt);
a7251d502f6a - Add purple_certificate_get_fingerprint_sha1
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18472
diff changeset
537
19020
a9af8402bb04 - Expose get_unique_id and get_issuer_unique_id through libpurple functions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19017
diff changeset
538 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
539 * purple_certificate_get_unique_id:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
540 * @crt: Certificate instance
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
541 *
19020
a9af8402bb04 - Expose get_unique_id and get_issuer_unique_id through libpurple functions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19017
diff changeset
542 * Get a unique identifier for the certificate
a9af8402bb04 - Expose get_unique_id and get_issuer_unique_id through libpurple functions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19017
diff changeset
543 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
544 * Returns: String representing the certificate uniquely. Must be g_free()'ed
19020
a9af8402bb04 - Expose get_unique_id and get_issuer_unique_id through libpurple functions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19017
diff changeset
545 */
a9af8402bb04 - Expose get_unique_id and get_issuer_unique_id through libpurple functions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19017
diff changeset
546 gchar *
a9af8402bb04 - Expose get_unique_id and get_issuer_unique_id through libpurple functions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19017
diff changeset
547 purple_certificate_get_unique_id(PurpleCertificate *crt);
a9af8402bb04 - Expose get_unique_id and get_issuer_unique_id through libpurple functions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19017
diff changeset
548
a9af8402bb04 - Expose get_unique_id and get_issuer_unique_id through libpurple functions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19017
diff changeset
549 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
550 * purple_certificate_get_issuer_unique_id:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
551 * @crt: Certificate instance
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
552 *
19020
a9af8402bb04 - Expose get_unique_id and get_issuer_unique_id through libpurple functions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19017
diff changeset
553 * Get a unique identifier for the certificate's issuer
a9af8402bb04 - Expose get_unique_id and get_issuer_unique_id through libpurple functions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19017
diff changeset
554 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
555 * Returns: String representing the certificate's issuer uniquely. Must be
19020
a9af8402bb04 - Expose get_unique_id and get_issuer_unique_id through libpurple functions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19017
diff changeset
556 * g_free()'ed
a9af8402bb04 - Expose get_unique_id and get_issuer_unique_id through libpurple functions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19017
diff changeset
557 */
a9af8402bb04 - Expose get_unique_id and get_issuer_unique_id through libpurple functions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19017
diff changeset
558 gchar *
a9af8402bb04 - Expose get_unique_id and get_issuer_unique_id through libpurple functions
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19017
diff changeset
559 purple_certificate_get_issuer_unique_id(PurpleCertificate *crt);
18481
d220d85caaf1 - Add purple_certificate_get_subject_name and associated libpurple
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18477
diff changeset
560
d220d85caaf1 - Add purple_certificate_get_subject_name and associated libpurple
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18477
diff changeset
561 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
562 * purple_certificate_get_subject_name:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
563 * @crt: Certificate instance
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
564 *
18481
d220d85caaf1 - Add purple_certificate_get_subject_name and associated libpurple
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18477
diff changeset
565 * Gets the certificate subject's name
d220d85caaf1 - Add purple_certificate_get_subject_name and associated libpurple
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18477
diff changeset
566 *
d220d85caaf1 - Add purple_certificate_get_subject_name and associated libpurple
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18477
diff changeset
567 * For X.509, this is the "Common Name" field, as we're only using it
d220d85caaf1 - Add purple_certificate_get_subject_name and associated libpurple
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18477
diff changeset
568 * for hostname verification at the moment
d220d85caaf1 - Add purple_certificate_get_subject_name and associated libpurple
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18477
diff changeset
569 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
570 * Returns: Newly allocated string with the certificate subject.
18481
d220d85caaf1 - Add purple_certificate_get_subject_name and associated libpurple
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18477
diff changeset
571 */
d220d85caaf1 - Add purple_certificate_get_subject_name and associated libpurple
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18477
diff changeset
572 gchar *
d220d85caaf1 - Add purple_certificate_get_subject_name and associated libpurple
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18477
diff changeset
573 purple_certificate_get_subject_name(PurpleCertificate *crt);
d220d85caaf1 - Add purple_certificate_get_subject_name and associated libpurple
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18477
diff changeset
574
18643
a6a86ac3c219 - Add certificate_check_subject_name and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18642
diff changeset
575 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
576 * purple_certificate_check_subject_name:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
577 * @crt: Certificate instance
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
578 * @name: Name to check.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
579 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
580 * Check the subject name against that on the certificate
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
581 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
582 * Returns: TRUE if it is a match, else FALSE
18643
a6a86ac3c219 - Add certificate_check_subject_name and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18642
diff changeset
583 */
a6a86ac3c219 - Add certificate_check_subject_name and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18642
diff changeset
584 gboolean
a6a86ac3c219 - Add certificate_check_subject_name and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18642
diff changeset
585 purple_certificate_check_subject_name(PurpleCertificate *crt, const gchar *name);
a6a86ac3c219 - Add certificate_check_subject_name and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18642
diff changeset
586
18647
45240511f4eb - Add expiration/activation functions for Certificates
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18646
diff changeset
587 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
588 * purple_certificate_get_times:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
589 * @crt: Certificate instance
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
590 * @activation: Reference to store the activation time at. May be NULL
18647
45240511f4eb - Add expiration/activation functions for Certificates
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18646
diff changeset
591 * if you don't actually want it.
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
592 * @expiration: Reference to store the expiration time at. May be NULL
18647
45240511f4eb - Add expiration/activation functions for Certificates
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18646
diff changeset
593 * if you don't actually want it.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
594 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
595 * Get the expiration/activation times.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
596 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
597 * Returns: TRUE if the requested values were obtained, otherwise FALSE.
18647
45240511f4eb - Add expiration/activation functions for Certificates
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18646
diff changeset
598 */
45240511f4eb - Add expiration/activation functions for Certificates
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18646
diff changeset
599 gboolean
34246
2ca1bb194693 Update certificate API to use 64-bit unsigned values instead of time_t.
Daniel Atallah <datallah@pidgin.im>
parents: 33637
diff changeset
600 purple_certificate_get_times(PurpleCertificate *crt, gint64 *activation, gint64 *expiration);
18643
a6a86ac3c219 - Add certificate_check_subject_name and associated machinery
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18642
diff changeset
601
32767
581cd5f30198 Add a function for retrieving the raw DER representation of a
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
602 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
603 * purple_certificate_get_der_data:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
604 * @crt: Certificate instance
32767
581cd5f30198 Add a function for retrieving the raw DER representation of a
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
605 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
606 * Retrieves the certificate data in DER form.
32767
581cd5f30198 Add a function for retrieving the raw DER representation of a
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
607 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
608 * Returns: Binary DER representation of the certificate - must be freed using
32767
581cd5f30198 Add a function for retrieving the raw DER representation of a
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
609 * g_byte_array_free().
581cd5f30198 Add a function for retrieving the raw DER representation of a
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
610 */
581cd5f30198 Add a function for retrieving the raw DER representation of a
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
611 GByteArray *
581cd5f30198 Add a function for retrieving the raw DER representation of a
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
612 purple_certificate_get_der_data(PurpleCertificate *crt);
581cd5f30198 Add a function for retrieving the raw DER representation of a
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
613
32885
d65261e7426e Add a function for converting a PurpleCertificate to a string
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32787
diff changeset
614 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
615 * purple_certificate_get_display_string:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
616 * @crt: Certificate instance
32885
d65261e7426e Add a function for converting a PurpleCertificate to a string
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32787
diff changeset
617 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
618 * Retrieves a string suitable for displaying a certificate to the user.
32885
d65261e7426e Add a function for converting a PurpleCertificate to a string
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32787
diff changeset
619 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
620 * Returns: String representing the certificate that may be displayed to the user
32885
d65261e7426e Add a function for converting a PurpleCertificate to a string
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32787
diff changeset
621 * - must be freed using g_free().
d65261e7426e Add a function for converting a PurpleCertificate to a string
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32787
diff changeset
622 */
d65261e7426e Add a function for converting a PurpleCertificate to a string
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32787
diff changeset
623 char *
d65261e7426e Add a function for converting a PurpleCertificate to a string
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32787
diff changeset
624 purple_certificate_get_display_string(PurpleCertificate *crt);
d65261e7426e Add a function for converting a PurpleCertificate to a string
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32787
diff changeset
625
18583
a3e6934ba7a8 - Rearrange certificate.h for better organization
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18578
diff changeset
626 /*****************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35467
diff changeset
627 /* Certificate Pool Functions */
18583
a3e6934ba7a8 - Rearrange certificate.h for better organization
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18578
diff changeset
628 /*****************************************************************************/
34792
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34246
diff changeset
629
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34246
diff changeset
630 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
631 * purple_certificate_pool_get_type:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
632 *
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
633 * Returns: The #GType for the #PurpleCertificatePool boxed structure.
34792
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34246
diff changeset
634 */
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
635 /* TODO: Boxing of PurpleCertificatePool is a temporary solution to having a
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
636 * GType for certificate pools. This should rather be a GObject instead of
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
637 * a GBoxed. */
34792
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34246
diff changeset
638 GType purple_certificate_pool_get_type(void);
09228ea79272 Added GBoxed to certificate, certificate pool, xfer, log
Ankit Vani <a@nevitus.org>
parents: 34246
diff changeset
639
18573
c7fd4fbb4339 - Add purple_certificate_pool_mkpath helper function
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18572
diff changeset
640 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
641 * purple_certificate_pool_mkpath:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
642 * @pool: CertificatePool to build a path for
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
643 * @id: Key to look up a Certificate by. May be NULL.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
644 *
18573
c7fd4fbb4339 - Add purple_certificate_pool_mkpath helper function
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18572
diff changeset
645 * Helper function for generating file paths in ~/.purple/certificates for
c7fd4fbb4339 - Add purple_certificate_pool_mkpath helper function
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18572
diff changeset
646 * CertificatePools that use them.
c7fd4fbb4339 - Add purple_certificate_pool_mkpath helper function
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18572
diff changeset
647 *
18645
805a3f4b259d - Fix overzealous escaping cause by ancestor revision
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18644
diff changeset
648 * All components will be escaped for filesystem friendliness.
805a3f4b259d - Fix overzealous escaping cause by ancestor revision
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18644
diff changeset
649 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
650 * Returns: A newly allocated path of the form
18645
805a3f4b259d - Fix overzealous escaping cause by ancestor revision
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18644
diff changeset
651 * ~/.purple/certificates/scheme_name/pool_name/unique_id
18573
c7fd4fbb4339 - Add purple_certificate_pool_mkpath helper function
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18572
diff changeset
652 */
c7fd4fbb4339 - Add purple_certificate_pool_mkpath helper function
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18572
diff changeset
653 gchar *
c7fd4fbb4339 - Add purple_certificate_pool_mkpath helper function
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18572
diff changeset
654 purple_certificate_pool_mkpath(PurpleCertificatePool *pool, const gchar *id);
c7fd4fbb4339 - Add purple_certificate_pool_mkpath helper function
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18572
diff changeset
655
18584
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
656 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
657 * purple_certificate_pool_usable:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
658 * @pool: Pool to check
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
659 *
18818
6460aa4cfa41 - Add purple_certificate_pool_usable to check whether a pool's
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18663
diff changeset
660 * Determines whether a pool can be used.
6460aa4cfa41 - Add purple_certificate_pool_usable to check whether a pool's
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18663
diff changeset
661 *
6460aa4cfa41 - Add purple_certificate_pool_usable to check whether a pool's
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18663
diff changeset
662 * Checks whether the associated CertificateScheme is loaded.
6460aa4cfa41 - Add purple_certificate_pool_usable to check whether a pool's
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18663
diff changeset
663 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
664 * Returns: TRUE if the pool can be used, otherwise FALSE
18818
6460aa4cfa41 - Add purple_certificate_pool_usable to check whether a pool's
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18663
diff changeset
665 */
6460aa4cfa41 - Add purple_certificate_pool_usable to check whether a pool's
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18663
diff changeset
666 gboolean
6460aa4cfa41 - Add purple_certificate_pool_usable to check whether a pool's
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18663
diff changeset
667 purple_certificate_pool_usable(PurpleCertificatePool *pool);
6460aa4cfa41 - Add purple_certificate_pool_usable to check whether a pool's
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18663
diff changeset
668
6460aa4cfa41 - Add purple_certificate_pool_usable to check whether a pool's
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18663
diff changeset
669 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
670 * purple_certificate_pool_get_scheme:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
671 * @pool: Pool to get the scheme of
19000
ec4a9c38e415 - Add purple_certificate_pool_get_scheme helper function
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18899
diff changeset
672 *
35458
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
673 * Looks up the scheme the pool operates under.
385156e1b493 Fix some gtk-doc warnings from account to connection
Ankit Vani <a@nevitus.org>
parents: 35436
diff changeset
674 * See purple_certificate_pool_usable()
19000
ec4a9c38e415 - Add purple_certificate_pool_get_scheme helper function
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18899
diff changeset
675 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
676 * Returns: Pointer to the pool's scheme, or NULL if it isn't loaded.
19000
ec4a9c38e415 - Add purple_certificate_pool_get_scheme helper function
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18899
diff changeset
677 */
ec4a9c38e415 - Add purple_certificate_pool_get_scheme helper function
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18899
diff changeset
678 PurpleCertificateScheme *
ec4a9c38e415 - Add purple_certificate_pool_get_scheme helper function
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18899
diff changeset
679 purple_certificate_pool_get_scheme(PurpleCertificatePool *pool);
ec4a9c38e415 - Add purple_certificate_pool_get_scheme helper function
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18899
diff changeset
680
ec4a9c38e415 - Add purple_certificate_pool_get_scheme helper function
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18899
diff changeset
681 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
682 * purple_certificate_pool_contains:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
683 * @pool: Pool to look in
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
684 * @id: ID to look for
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
685 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
686 * Check for presence of an ID in a pool.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
687 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
688 * Returns: TRUE if the ID is in the pool, else FALSE
18584
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
689 */
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
690 gboolean
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
691 purple_certificate_pool_contains(PurpleCertificatePool *pool, const gchar *id);
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
692
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
693 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
694 * purple_certificate_pool_retrieve:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
695 * @pool: Pool to fish in
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
696 * @id: ID to look up
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
697 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
698 * Retrieve a certificate from a pool.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
699 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
700 * Returns: Retrieved certificate, or NULL if it wasn't there
18584
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
701 */
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
702 PurpleCertificate *
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
703 purple_certificate_pool_retrieve(PurpleCertificatePool *pool, const gchar *id);
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
704
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
705 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
706 * purple_certificate_pool_store:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
707 * @pool: Pool to add to
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
708 * @id: ID to store the certificate with
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
709 * @crt: Certificate to store
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
710 *
18584
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
711 * Add a certificate to a pool
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
712 *
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
713 * Any pre-existing certificate of the same ID will be overwritten.
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
714 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
715 * Returns: TRUE if the operation succeeded, otherwise FALSE
18584
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
716 */
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
717 gboolean
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
718 purple_certificate_pool_store(PurpleCertificatePool *pool, const gchar *id, PurpleCertificate *crt);
d4410000050f - Add pool retrieve, contains, and store functions to certificate API
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18583
diff changeset
719
18661
a3c1e2719e45 - Add pool_get_idlist / pool_destroy_idlist
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18658
diff changeset
720 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
721 * purple_certificate_pool_delete:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
722 * @pool: Pool to remove from
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
723 * @id: ID to remove
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
724 *
18899
45bdab2558f8 - Add purple_certificate_pool_delete
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18818
diff changeset
725 * Remove a certificate from a pool
45bdab2558f8 - Add purple_certificate_pool_delete
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18818
diff changeset
726 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
727 * Returns: TRUE if the operation succeeded, otherwise FALSE
18899
45bdab2558f8 - Add purple_certificate_pool_delete
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18818
diff changeset
728 */
45bdab2558f8 - Add purple_certificate_pool_delete
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18818
diff changeset
729 gboolean
45bdab2558f8 - Add purple_certificate_pool_delete
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18818
diff changeset
730 purple_certificate_pool_delete(PurpleCertificatePool *pool, const gchar *id);
45bdab2558f8 - Add purple_certificate_pool_delete
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18818
diff changeset
731
45bdab2558f8 - Add purple_certificate_pool_delete
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18818
diff changeset
732 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
733 * purple_certificate_pool_get_idlist:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
734 * @pool: Pool to enumerate
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
735 *
18661
a3c1e2719e45 - Add pool_get_idlist / pool_destroy_idlist
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18658
diff changeset
736 * Get the list of IDs currently in the pool.
a3c1e2719e45 - Add pool_get_idlist / pool_destroy_idlist
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18658
diff changeset
737 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
738 * Returns: GList pointing to newly-allocated id strings. Free using
18661
a3c1e2719e45 - Add pool_get_idlist / pool_destroy_idlist
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18658
diff changeset
739 * purple_certificate_pool_destroy_idlist()
a3c1e2719e45 - Add pool_get_idlist / pool_destroy_idlist
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18658
diff changeset
740 */
a3c1e2719e45 - Add pool_get_idlist / pool_destroy_idlist
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18658
diff changeset
741 GList *
a3c1e2719e45 - Add pool_get_idlist / pool_destroy_idlist
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18658
diff changeset
742 purple_certificate_pool_get_idlist(PurpleCertificatePool *pool);
a3c1e2719e45 - Add pool_get_idlist / pool_destroy_idlist
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18658
diff changeset
743
a3c1e2719e45 - Add pool_get_idlist / pool_destroy_idlist
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18658
diff changeset
744 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
745 * purple_certificate_pool_destroy_idlist:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
746 * @idlist: ID List to destroy
18661
a3c1e2719e45 - Add pool_get_idlist / pool_destroy_idlist
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18658
diff changeset
747 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
748 * Destroys the result given by purple_certificate_pool_get_idlist()
18661
a3c1e2719e45 - Add pool_get_idlist / pool_destroy_idlist
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18658
diff changeset
749 */
a3c1e2719e45 - Add pool_get_idlist / pool_destroy_idlist
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18658
diff changeset
750 void
a3c1e2719e45 - Add pool_get_idlist / pool_destroy_idlist
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18658
diff changeset
751 purple_certificate_pool_destroy_idlist(GList *idlist);
a3c1e2719e45 - Add pool_get_idlist / pool_destroy_idlist
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18658
diff changeset
752
17506
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
753 /*****************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35467
diff changeset
754 /* Certificate Subsystem API */
17506
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
755 /*****************************************************************************/
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
756
18470
6a1deea19882 - Add purple_certificate_register_builtins
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18467
diff changeset
757 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
758 * purple_certificate_init:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
759 *
18477
47243c0d52c6 - Certificate system now has init and uninit like other systems
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18473
diff changeset
760 * Initialize the certificate system
18470
6a1deea19882 - Add purple_certificate_register_builtins
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18467
diff changeset
761 */
6a1deea19882 - Add purple_certificate_register_builtins
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18467
diff changeset
762 void
18477
47243c0d52c6 - Certificate system now has init and uninit like other systems
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18473
diff changeset
763 purple_certificate_init(void);
47243c0d52c6 - Certificate system now has init and uninit like other systems
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18473
diff changeset
764
47243c0d52c6 - Certificate system now has init and uninit like other systems
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18473
diff changeset
765 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
766 * purple_certificate_uninit:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
767 *
18477
47243c0d52c6 - Certificate system now has init and uninit like other systems
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18473
diff changeset
768 * Un-initialize the certificate system
47243c0d52c6 - Certificate system now has init and uninit like other systems
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18473
diff changeset
769 */
47243c0d52c6 - Certificate system now has init and uninit like other systems
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18473
diff changeset
770 void
47243c0d52c6 - Certificate system now has init and uninit like other systems
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18473
diff changeset
771 purple_certificate_uninit(void);
18470
6a1deea19882 - Add purple_certificate_register_builtins
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18467
diff changeset
772
18657
4932aaf945ea - Add purple_certificate_get_handle
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18656
diff changeset
773 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
774 * purple_certificate_get_handle:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
775 *
18657
4932aaf945ea - Add purple_certificate_get_handle
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18656
diff changeset
776 * Get the Certificate subsystem handle for signalling purposes
4932aaf945ea - Add purple_certificate_get_handle
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18656
diff changeset
777 */
4932aaf945ea - Add purple_certificate_get_handle
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18656
diff changeset
778 gpointer
4932aaf945ea - Add purple_certificate_get_handle
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18656
diff changeset
779 purple_certificate_get_handle(void);
4932aaf945ea - Add purple_certificate_get_handle
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18656
diff changeset
780
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
781 /**
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
782 * purple_certificate_find_scheme:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
783 * @name: The scheme name. Case insensitive.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
784 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
785 * Look up a registered CertificateScheme by name
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
786 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
787 * Returns: Pointer to the located Scheme, or NULL if it isn't found.
18251
41e00264c49d - Add chunks of the certificate scheme registration interface
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18249
diff changeset
788 */
41e00264c49d - Add chunks of the certificate scheme registration interface
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18249
diff changeset
789 PurpleCertificateScheme *
41e00264c49d - Add chunks of the certificate scheme registration interface
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18249
diff changeset
790 purple_certificate_find_scheme(const gchar *name);
41e00264c49d - Add chunks of the certificate scheme registration interface
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18249
diff changeset
791
18658
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
792 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
793 * purple_certificate_get_schemes:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
794 *
18658
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
795 * Get all registered CertificateSchemes
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
796 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
797 * Returns: GList pointing to all registered CertificateSchemes . This value
18663
4b8a5bbdba2b - Add dire warnings to the purple_certificate_get_Xs docs
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18661
diff changeset
798 * is owned by libpurple
18658
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
799 */
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
800 GList *
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
801 purple_certificate_get_schemes(void);
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
802
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
803 /**
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
804 * purple_certificate_register_scheme:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
805 * @scheme: Pointer to the scheme to register.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
806 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
807 * Register a CertificateScheme with libpurple
18251
41e00264c49d - Add chunks of the certificate scheme registration interface
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18249
diff changeset
808 *
41e00264c49d - Add chunks of the certificate scheme registration interface
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18249
diff changeset
809 * No two schemes can be registered with the same name; this function enforces
41e00264c49d - Add chunks of the certificate scheme registration interface
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18249
diff changeset
810 * that.
41e00264c49d - Add chunks of the certificate scheme registration interface
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18249
diff changeset
811 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
812 * Returns: TRUE if the scheme was successfully added, otherwise FALSE
18251
41e00264c49d - Add chunks of the certificate scheme registration interface
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18249
diff changeset
813 */
41e00264c49d - Add chunks of the certificate scheme registration interface
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18249
diff changeset
814 gboolean
41e00264c49d - Add chunks of the certificate scheme registration interface
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18249
diff changeset
815 purple_certificate_register_scheme(PurpleCertificateScheme *scheme);
41e00264c49d - Add chunks of the certificate scheme registration interface
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18249
diff changeset
816
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
817 /**
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
818 * purple_certificate_unregister_scheme:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
819 * @scheme: Scheme to unregister.
18446
3e79caab7088 - Add unregister_scheme
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18251
diff changeset
820 * If the scheme is not registered, this is a no-op.
3e79caab7088 - Add unregister_scheme
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18251
diff changeset
821 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
822 * Unregister a CertificateScheme from libpurple
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
823 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
824 * Returns: TRUE if the unregister completed successfully
18446
3e79caab7088 - Add unregister_scheme
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18251
diff changeset
825 */
3e79caab7088 - Add unregister_scheme
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18251
diff changeset
826 gboolean
3e79caab7088 - Add unregister_scheme
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18251
diff changeset
827 purple_certificate_unregister_scheme(PurpleCertificateScheme *scheme);
3e79caab7088 - Add unregister_scheme
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18251
diff changeset
828
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
829 /**
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
830 * purple_certificate_find_verifier:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
831 * @scheme_name: Scheme name. Case insensitive.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
832 * @ver_name: The verifier name. Case insensitive.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
833 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
834 * Look up a registered PurpleCertificateVerifier by scheme and name
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
835 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
836 * Returns: Pointer to the located Verifier, or NULL if it isn't found.
18461
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
837 */
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
838 PurpleCertificateVerifier *
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
839 purple_certificate_find_verifier(const gchar *scheme_name, const gchar *ver_name);
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
840
18658
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
841 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
842 * purple_certificate_get_verifiers:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
843 *
18658
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
844 * Get the list of registered CertificateVerifiers
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
845 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
846 * Returns: GList of all registered PurpleCertificateVerifier. This value
18663
4b8a5bbdba2b - Add dire warnings to the purple_certificate_get_Xs docs
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18661
diff changeset
847 * is owned by libpurple
18658
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
848 */
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
849 GList *
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
850 purple_certificate_get_verifiers(void);
18461
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
851
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
852 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
853 * purple_certificate_register_verifier:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
854 * @vr: Verifier to register.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
855 *
18461
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
856 * Register a CertificateVerifier with libpurple
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
857 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
858 * Returns: TRUE if register succeeded, otherwise FALSE
18461
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
859 */
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
860 gboolean
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
861 purple_certificate_register_verifier(PurpleCertificateVerifier *vr);
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
862
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
863 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
864 * purple_certificate_unregister_verifier:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
865 * @vr: Verifier to unregister.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
866 *
18461
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
867 * Unregister a CertificateVerifier with libpurple
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
868 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
869 * Returns: TRUE if unregister succeeded, otherwise FALSE
18461
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
870 */
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
871 gboolean
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
872 purple_certificate_unregister_verifier(PurpleCertificateVerifier *vr);
8ae1cd456532 - CertificateVerifier register/unregister/find
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18460
diff changeset
873
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
874 /**
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
875 * purple_certificate_find_pool:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
876 * @scheme_name: Scheme name. Case insensitive.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
877 * @pool_name: Pool name. Case insensitive.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
878 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
879 * Look up a registered PurpleCertificatePool by scheme and name
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
880 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
881 * Returns: Pointer to the located Pool, or NULL if it isn't found.
18490
691b0b16f8be - Add find, register, and unregister for CertificatePools
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18489
diff changeset
882 */
691b0b16f8be - Add find, register, and unregister for CertificatePools
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18489
diff changeset
883 PurpleCertificatePool *
691b0b16f8be - Add find, register, and unregister for CertificatePools
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18489
diff changeset
884 purple_certificate_find_pool(const gchar *scheme_name, const gchar *pool_name);
691b0b16f8be - Add find, register, and unregister for CertificatePools
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18489
diff changeset
885
691b0b16f8be - Add find, register, and unregister for CertificatePools
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18489
diff changeset
886 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
887 * purple_certificate_get_pools:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
888 *
18658
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
889 * Get the list of registered Pools
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
890 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
891 * Returns: GList of all registered PurpleCertificatePool s. This value
18663
4b8a5bbdba2b - Add dire warnings to the purple_certificate_get_Xs docs
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18661
diff changeset
892 * is owned by libpurple
18658
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
893 */
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
894 GList *
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
895 purple_certificate_get_pools(void);
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
896
2cc5bc32898a - Add get_pools, get_verifiers, and get_schemes
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18657
diff changeset
897 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
898 * purple_certificate_register_pool:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
899 * @pool: Pool to register.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
900 *
18490
691b0b16f8be - Add find, register, and unregister for CertificatePools
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18489
diff changeset
901 * Register a CertificatePool with libpurple and call its init function
691b0b16f8be - Add find, register, and unregister for CertificatePools
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18489
diff changeset
902 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
903 * Returns: TRUE if the register succeeded, otherwise FALSE
18490
691b0b16f8be - Add find, register, and unregister for CertificatePools
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18489
diff changeset
904 */
691b0b16f8be - Add find, register, and unregister for CertificatePools
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18489
diff changeset
905 gboolean
691b0b16f8be - Add find, register, and unregister for CertificatePools
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18489
diff changeset
906 purple_certificate_register_pool(PurpleCertificatePool *pool);
691b0b16f8be - Add find, register, and unregister for CertificatePools
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18489
diff changeset
907
691b0b16f8be - Add find, register, and unregister for CertificatePools
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18489
diff changeset
908 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
909 * purple_certificate_unregister_pool:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
910 * @pool: Pool to unregister.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
911 *
18490
691b0b16f8be - Add find, register, and unregister for CertificatePools
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18489
diff changeset
912 * Unregister a CertificatePool with libpurple and call its uninit function
691b0b16f8be - Add find, register, and unregister for CertificatePools
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18489
diff changeset
913 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
914 * Returns: TRUE if the unregister succeeded, otherwise FALSE
18490
691b0b16f8be - Add find, register, and unregister for CertificatePools
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18489
diff changeset
915 */
691b0b16f8be - Add find, register, and unregister for CertificatePools
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18489
diff changeset
916 gboolean
691b0b16f8be - Add find, register, and unregister for CertificatePools
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18489
diff changeset
917 purple_certificate_unregister_pool(PurpleCertificatePool *pool);
17506
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
918
19489
772b691e901b - Add purple_certificate_display_x509
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19032
diff changeset
919 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
920 * purple_certificate_add_ca_search_path:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
921 * @path: Path to search for certificates.
22001
80abe994a8f3 Patch from Florian Quèze (the InstantBird dude) to add a search path for
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 21002
diff changeset
922 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
923 * Add a search path for certificates.
22001
80abe994a8f3 Patch from Florian Quèze (the InstantBird dude) to add a search path for
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 21002
diff changeset
924 */
80abe994a8f3 Patch from Florian Quèze (the InstantBird dude) to add a search path for
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 21002
diff changeset
925 void purple_certificate_add_ca_search_path(const char *path);
19489
772b691e901b - Add purple_certificate_display_x509
William Ehlhardt <williamehlhardt@gmail.com>
parents: 19032
diff changeset
926
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32767
diff changeset
927 G_END_DECLS
17506
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
928
eff6bdd382f3 - Added certificate.[ch] and got them integrated into the build
William Ehlhardt <williamehlhardt@gmail.com>
parents:
diff changeset
929 #endif /* _PURPLE_CERTIFICATE_H */

mercurial