annotate libpurple/sslconn.h @ 20115:a68d51d60177

Create purple_connection_ssl_error(), which converts a PurpleSslErrorType to a PurpleDisconnectReason then calls purple_connection_error_reason().
author Will Thompson <will.thompson@collabora.co.uk>
date Wed, 19 Sep 2007 15:00:48 +0000
parents 6bf32c9e15a7
children f3cfcbbac3d8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2 * @file sslconn.h SSL API
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 * @ingroup core
20074
6bf32c9e15a7 remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents: 19680
diff changeset
4 */
6bf32c9e15a7 remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents: 19680
diff changeset
5
6bf32c9e15a7 remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents: 19680
diff changeset
6 /* purple
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
7 *
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
8 * Purple is the legal property of its developers, whose names are too numerous
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 * source distribution.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 * (at your option) any later version.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20 * GNU General Public License for more details.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
19680
44b4e8bd759b The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 18968
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
25 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
26 #ifndef _PURPLE_SSLCONN_H_
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
27 #define _PURPLE_SSLCONN_H_
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
28
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29 typedef enum
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
30 {
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
31 PURPLE_SSL_HANDSHAKE_FAILED = 1,
18954
d07258902ff3 - Add PURPLE_SSL_CERTIFICATE_INVALID error code
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18944
diff changeset
32 PURPLE_SSL_CONNECT_FAILED = 2,
d07258902ff3 - Add PURPLE_SSL_CERTIFICATE_INVALID error code
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18944
diff changeset
33 PURPLE_SSL_CERTIFICATE_INVALID = 3
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
34 } PurpleSslErrorType;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
35
20115
a68d51d60177 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents: 20074
diff changeset
36 #include "certificate.h"
a68d51d60177 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents: 20074
diff changeset
37 #include "proxy.h"
a68d51d60177 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents: 20074
diff changeset
38
a68d51d60177 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents: 20074
diff changeset
39 #define PURPLE_SSL_DEFAULT_PORT 443
a68d51d60177 Create purple_connection_ssl_error(), which converts a PurpleSslErrorType
Will Thompson <will.thompson@collabora.co.uk>
parents: 20074
diff changeset
40
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
41 typedef struct _PurpleSslConnection PurpleSslConnection;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
42
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
43 typedef void (*PurpleSslInputFunction)(gpointer, PurpleSslConnection *,
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
44 PurpleInputCondition);
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
45 typedef void (*PurpleSslErrorFunction)(PurpleSslConnection *, PurpleSslErrorType,
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
46 gpointer);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
47
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
48 struct _PurpleSslConnection
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
49 {
17288
a7887e79b723 Partial documentation on SslConnection struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17287
diff changeset
50 /** Hostname to which the SSL connection will be made */
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
51 char *host;
17288
a7887e79b723 Partial documentation on SslConnection struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17287
diff changeset
52 /** Port to connect to */
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
53 int port;
17289
bf516a0c430e More documenting
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17288
diff changeset
54 /** Data to pass to PurpleSslConnection::connect_cb() */
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
55 void *connect_cb_data;
17289
bf516a0c430e More documenting
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17288
diff changeset
56 /** Callback triggered once the SSL handshake is complete */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
57 PurpleSslInputFunction connect_cb;
17290
3bccbafea8c1 - Completed SslConnection fields docs
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17289
diff changeset
58 /** Callback triggered if there is an error during connection */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
59 PurpleSslErrorFunction error_cb;
17289
bf516a0c430e More documenting
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17288
diff changeset
60 /** Data passed to PurpleSslConnection::recv_cb() */
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
61 void *recv_cb_data;
17290
3bccbafea8c1 - Completed SslConnection fields docs
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17289
diff changeset
62 /** User-defined callback executed when the SSL connection receives data */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
63 PurpleSslInputFunction recv_cb;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
64
17288
a7887e79b723 Partial documentation on SslConnection struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17287
diff changeset
65 /** File descriptor used to refer to the socket */
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
66 int fd;
17290
3bccbafea8c1 - Completed SslConnection fields docs
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17289
diff changeset
67 /** Glib event source ID; used to refer to the received data callback
3bccbafea8c1 - Completed SslConnection fields docs
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17289
diff changeset
68 * in the glib eventloop */
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
69 int inpa;
17290
3bccbafea8c1 - Completed SslConnection fields docs
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17289
diff changeset
70 /** Data related to the underlying TCP connection */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
71 PurpleProxyConnectData *connect_data;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
72
17288
a7887e79b723 Partial documentation on SslConnection struct
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17287
diff changeset
73 /** Internal connection data managed by the SSL backend (GnuTLS/LibNSS/whatever) */
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
74 void *private_data;
18944
3a71a46d171c - Add verifier field to SslConnection
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18931
diff changeset
75
3a71a46d171c - Add verifier field to SslConnection
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18931
diff changeset
76 /** Verifier to use in authenticating the peer */
3a71a46d171c - Add verifier field to SslConnection
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18931
diff changeset
77 PurpleCertificateVerifier *verifier;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
78 };
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
79
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
80 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
81 * SSL implementation operations structure.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
82 *
17289
bf516a0c430e More documenting
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17288
diff changeset
83 * Every SSL implementation must provide all of these and register it via purple_ssl_set_ops()
17287
4248f884451f Clarify documentation
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17286
diff changeset
84 * These should not be called directly! Instead, use the purple_ssl_* functions.
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
85 */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
86 typedef struct
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
87 {
17286
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
88 /** Initializes the SSL system provided.
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
89 * @return TRUE if initialization succeeded
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
90 */
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
91 gboolean (*init)(void);
17286
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
92 /** Unloads the SSL system. Inverse of init. */
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
93 void (*uninit)(void);
17286
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
94 /** Sets up the SSL connection for a PurpleSslConnection once
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
95 * the TCP connection has been established */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
96 void (*connectfunc)(PurpleSslConnection *gsc);
17287
4248f884451f Clarify documentation
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17286
diff changeset
97 /** Destroys the internal data of the SSL connection provided.
4248f884451f Clarify documentation
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17286
diff changeset
98 * Freeing gsc itself is left to purple_ssl_close()
4248f884451f Clarify documentation
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17286
diff changeset
99 *
4248f884451f Clarify documentation
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17286
diff changeset
100 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
101 void (*close)(PurpleSslConnection *gsc);
17286
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
102 /** Reads data from a connection (like POSIX read())
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
103 * @param gsc Connection context
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
104 * @param data Pointer to buffer to drop data into
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
105 * @param len Maximum number of bytes to read
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
106 * @return Number of bytes actually written into the buffer, or <0 on error
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
107 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
108 size_t (*read)(PurpleSslConnection *gsc, void *data, size_t len);
17286
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
109 /** Writes data to a connection (like POSIX send())
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
110 * @param gsc Connection context
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
111 * @param data Data buffer to send data from
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
112 * @param len Number of bytes to send from buffer
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
113 * @return The number of bytes written (may be less than len) or <0 on error
b765fdcde59e Documented the SslOps structure
William Ehlhardt <williamehlhardt@gmail.com>
parents: 16672
diff changeset
114 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
115 size_t (*write)(PurpleSslConnection *gsc, const void *data, size_t len);
18187
33690062e8b3 - Expose get_peer_certificates in the SslOps struct, and modify gnutls
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17497
diff changeset
116 /** Obtains the certificate chain provided by the peer
33690062e8b3 - Expose get_peer_certificates in the SslOps struct, and modify gnutls
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17497
diff changeset
117 *
33690062e8b3 - Expose get_peer_certificates in the SslOps struct, and modify gnutls
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17497
diff changeset
118 * @param gsc Connection context
33690062e8b3 - Expose get_peer_certificates in the SslOps struct, and modify gnutls
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17497
diff changeset
119 * @return A newly allocated list containing the certificates
33690062e8b3 - Expose get_peer_certificates in the SslOps struct, and modify gnutls
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17497
diff changeset
120 * the peer provided.
18944
3a71a46d171c - Add verifier field to SslConnection
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18931
diff changeset
121 * @see PurpleCertificate
18187
33690062e8b3 - Expose get_peer_certificates in the SslOps struct, and modify gnutls
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17497
diff changeset
122 * @todo Decide whether the ordering of certificates in this
33690062e8b3 - Expose get_peer_certificates in the SslOps struct, and modify gnutls
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17497
diff changeset
123 * list can be guaranteed.
33690062e8b3 - Expose get_peer_certificates in the SslOps struct, and modify gnutls
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17497
diff changeset
124 */
33690062e8b3 - Expose get_peer_certificates in the SslOps struct, and modify gnutls
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17497
diff changeset
125 GList * (* get_peer_certificates)(PurpleSslConnection * gsc);
33690062e8b3 - Expose get_peer_certificates in the SslOps struct, and modify gnutls
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17497
diff changeset
126
16672
516f14bef90e Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15823
diff changeset
127 void (*_purple_reserved2)(void);
516f14bef90e Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15823
diff changeset
128 void (*_purple_reserved3)(void);
516f14bef90e Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15823
diff changeset
129 void (*_purple_reserved4)(void);
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
130 } PurpleSslOps;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
131
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
132 #ifdef __cplusplus
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
133 extern "C" {
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
134 #endif
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
135
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
136 /**************************************************************************/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
137 /** @name SSL API */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
138 /**************************************************************************/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
139 /*@{*/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
140
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
141 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
142 * Returns whether or not SSL is currently supported.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
143 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
144 * @return TRUE if SSL is supported, or FALSE otherwise.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
145 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
146 gboolean purple_ssl_is_supported(void);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
147
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
148 /**
18968
1677ead39ee3 - Add purple_ssl_strerror for handy error description power!
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18954
diff changeset
149 * Returns a human-readable string for an SSL error
1677ead39ee3 - Add purple_ssl_strerror for handy error description power!
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18954
diff changeset
150 *
1677ead39ee3 - Add purple_ssl_strerror for handy error description power!
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18954
diff changeset
151 * @param error Error code
1677ead39ee3 - Add purple_ssl_strerror for handy error description power!
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18954
diff changeset
152 * @return Human-readable error explanation
1677ead39ee3 - Add purple_ssl_strerror for handy error description power!
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18954
diff changeset
153 */
1677ead39ee3 - Add purple_ssl_strerror for handy error description power!
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18954
diff changeset
154 const gchar * purple_ssl_strerror(PurpleSslErrorType error);
1677ead39ee3 - Add purple_ssl_strerror for handy error description power!
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18954
diff changeset
155
1677ead39ee3 - Add purple_ssl_strerror for handy error description power!
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18954
diff changeset
156 /**
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
157 * Makes a SSL connection to the specified host and port. The caller
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
158 * should keep track of the returned value and use it to cancel the
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
159 * connection, if needed.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
160 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
161 * @param account The account making the connection.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
162 * @param host The destination host.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
163 * @param port The destination port.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
164 * @param func The SSL input handler function.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
165 * @param error_func The SSL error handler function. This function
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
166 * should NOT call purple_ssl_close(). In the event
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
167 * of an error the PurpleSslConnection will be
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
168 * destroyed for you.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
169 * @param data User-defined data.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
170 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
171 * @return The SSL connection handle.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
172 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
173 PurpleSslConnection *purple_ssl_connect(PurpleAccount *account, const char *host,
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
174 int port, PurpleSslInputFunction func,
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
175 PurpleSslErrorFunction error_func,
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
176 void *data);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
177
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
178 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
179 * Makes a SSL connection using an already open file descriptor.
18929
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
180 * DEPRECATED. Use purple_ssl_connect_with_host_fd instead.
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
181 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
182 * @param account The account making the connection.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
183 * @param fd The file descriptor.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
184 * @param func The SSL input handler function.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
185 * @param error_func The SSL error handler function.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
186 * @param data User-defined data.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
187 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
188 * @return The SSL connection handle.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
189 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
190 PurpleSslConnection *purple_ssl_connect_fd(PurpleAccount *account, int fd,
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
191 PurpleSslInputFunction func,
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
192 PurpleSslErrorFunction error_func,
18929
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
193 void *data);
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
194
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
195 /**
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
196 * Makes a SSL connection using an already open file descriptor.
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
197 *
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
198 * @param account The account making the connection.
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
199 * @param fd The file descriptor.
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
200 * @param func The SSL input handler function.
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
201 * @param error_func The SSL error handler function.
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
202 * @param host The hostname of the other peer (to verify the CN)
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
203 * @param data User-defined data.
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
204 *
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
205 * @return The SSL connection handle.
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
206 */
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
207 PurpleSslConnection *purple_ssl_connect_with_host_fd(PurpleAccount *account, int fd,
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
208 PurpleSslInputFunction func,
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
209 PurpleSslErrorFunction error_func,
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
210 const char *host,
67cb28c0ec89 applied changes from e52b685d84ca8874da6e3e71199829e513500642
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18187
diff changeset
211 void *data);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
212
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
213 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
214 * Adds an input watcher for the specified SSL connection.
17308
2d2c72f70e8c Add note on use of purple_ssl_input_add
William Ehlhardt <williamehlhardt@gmail.com>
parents: 17290
diff changeset
215 * Once the SSL handshake is complete, use this to watch for actual data across it.
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
216 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
217 * @param gsc The SSL connection handle.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
218 * @param func The callback function.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
219 * @param data User-defined data.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
220 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
221 void purple_ssl_input_add(PurpleSslConnection *gsc, PurpleSslInputFunction func,
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
222 void *data);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
223
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
224 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
225 * Closes a SSL connection.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
226 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
227 * @param gsc The SSL connection to close.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
228 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
229 void purple_ssl_close(PurpleSslConnection *gsc);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
230
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
231 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
232 * Reads data from an SSL connection.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
233 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
234 * @param gsc The SSL connection handle.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
235 * @param buffer The destination buffer.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
236 * @param len The maximum number of bytes to read.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
237 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
238 * @return The number of bytes read.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
239 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
240 size_t purple_ssl_read(PurpleSslConnection *gsc, void *buffer, size_t len);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
241
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
242 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
243 * Writes data to an SSL connection.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
244 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
245 * @param gsc The SSL connection handle.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
246 * @param buffer The buffer to write.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
247 * @param len The length of the data to write.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
248 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
249 * @return The number of bytes written.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
250 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
251 size_t purple_ssl_write(PurpleSslConnection *gsc, const void *buffer, size_t len);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
252
18931
e634122cec47 - purple_ssl_get_peer_certificates
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18929
diff changeset
253 /**
e634122cec47 - purple_ssl_get_peer_certificates
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18929
diff changeset
254 * Obtains the peer's presented certificates
e634122cec47 - purple_ssl_get_peer_certificates
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18929
diff changeset
255 *
e634122cec47 - purple_ssl_get_peer_certificates
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18929
diff changeset
256 * @param gsc The SSL connection handle
e634122cec47 - purple_ssl_get_peer_certificates
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18929
diff changeset
257 *
e634122cec47 - purple_ssl_get_peer_certificates
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18929
diff changeset
258 * @return The peer certificate chain, in the order of certificate, issuer,
e634122cec47 - purple_ssl_get_peer_certificates
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18929
diff changeset
259 * issuer's issuer, etc. NULL if no certificates have been provided,
e634122cec47 - purple_ssl_get_peer_certificates
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18929
diff changeset
260 */
e634122cec47 - purple_ssl_get_peer_certificates
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18929
diff changeset
261 GList * purple_ssl_get_peer_certificates(PurpleSslConnection *gsc);
e634122cec47 - purple_ssl_get_peer_certificates
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18929
diff changeset
262
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
263 /*@}*/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
264
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
265 /**************************************************************************/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
266 /** @name Subsystem API */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
267 /**************************************************************************/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
268 /*@{*/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
269
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
270 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
271 * Sets the current SSL operations structure.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
272 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
273 * @param ops The SSL operations structure to assign.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
274 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
275 void purple_ssl_set_ops(PurpleSslOps *ops);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
276
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
277 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
278 * Returns the current SSL operations structure.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
279 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
280 * @return The SSL operations structure.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
281 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
282 PurpleSslOps *purple_ssl_get_ops(void);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
283
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
284 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
285 * Initializes the SSL subsystem.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
286 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
287 void purple_ssl_init(void);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
288
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
289 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
290 * Uninitializes the SSL subsystem.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
291 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
292 void purple_ssl_uninit(void);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
293
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
294 /*@}*/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
295
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
296 #ifdef __cplusplus
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
297 }
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
298 #endif
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
299
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
300 #endif /* _PURPLE_SSLCONN_H_ */