libpurple/tls-certificate.h

branch
purple-ssl-to-gio
changeset 37622
14d1273cae74
parent 37621
2a2f1068e0f0
child 37632
4879ef4db7cf
equal deleted inserted replaced
37621:2a2f1068e0f0 37622:14d1273cae74
116 * Returns: @client, similar to g_object_connect() 116 * Returns: @client, similar to g_object_connect()
117 */ 117 */
118 gpointer 118 gpointer
119 purple_tls_certificate_attach_to_socket_client(GSocketClient *client); 119 purple_tls_certificate_attach_to_socket_client(GSocketClient *client);
120 120
121
122 /**
123 * PurpleTlsCertificateInfo
124 *
125 * An opaque structure to contain parsed certificate info, which
126 * can subsequently be accessed by purple_tls_certificate_info_*
127 * functions.
128 */
129 typedef struct _PurpleTlsCertificateInfo PurpleTlsCertificateInfo;
130
131 /**
132 * purple_tls_certificate_get_info:
133 * @certificate: Certificate from which to parse the info
134 *
135 * Returns a #PurpleTlsCertificateInfo containing parsed information
136 * of the certificate.
137 *
138 * Returns: #PurpleTlsCertificateInfo parsed from the certificate
139 */
140 PurpleTlsCertificateInfo *
141 purple_tls_certificate_get_info(GTlsCertificate *certificate);
142
143 /**
144 * purple_tls_certificate_info_free:
145 * @info: #PurpleTlsCertificateInfo object to free
146 *
147 * Frees @info.
148 */
149 void
150 purple_tls_certificate_info_free(PurpleTlsCertificateInfo *info);
151
152 /**
153 * purple_tls_certificate_info_get_display_string:
154 * @info: #PurpleTlsCertificateInfo from which to generate a display string
155 *
156 * Generates a user readable string to display information from @info
157 *
158 * Returns: A user readable string suitable to display to the user
159 */
160 gchar *
161 purple_tls_certificate_info_get_display_string(PurpleTlsCertificateInfo *info);
162
163 /**
164 * purple_tls_certificate_get_subject_name:
165 * @certificate: Certificate from which to get the subject name
166 *
167 * Returns the common subject name of the cert
168 *
169 * Returns: The subject name of the cert
170 */
171 gchar *
172 purple_tls_certificate_info_get_subject_name(PurpleTlsCertificateInfo *info);
173
174 /**
175 * purple_tls_certificate_get_fingerprint_sha1:
176 * @certificate: Certificate from which to get the SHA1 fingerprint
177 *
178 * Returns the SHA1 fingerprint of the cert
179 *
180 * Returns: The SHA1 fingerprint of the cert
181 */
182 GByteArray *
183 purple_tls_certificate_get_fingerprint_sha1(GTlsCertificate *certificate);
184
121 G_END_DECLS 185 G_END_DECLS
122 186
123 #endif /* _PURPLE_TLS_CERTIFICATE_H */ 187 #endif /* _PURPLE_TLS_CERTIFICATE_H */

mercurial