5 * Purple is the legal property of its developers, whose names are too numerous
6 * to list here. Please refer to the COPYRIGHT file distributed with this
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
24 #ifndef _PURPLE_TLS_CERTIFICATE_INFO_H
25 #define _PURPLE_TLS_CERTIFICATE_INFO_H
27 * SECTION:tls-certificate-info
28 * @section_id: libpurple-tls-certificate-info
29 * @short_description: TLS certificate information parsing
30 * @title: TLS Certificate Info API
32 * The TLS certificate info API provides information parsing functions
33 * for #GTlsCertificate's. This information can then be presented to the
34 * user, usually to help them decide whether or not to trust a given
41 * PurpleTlsCertificateInfo
43 * An opaque structure to contain parsed certificate info, which
44 * can subsequently be accessed by purple_tls_certificate_info_*
47 typedef struct _PurpleTlsCertificateInfo PurpleTlsCertificateInfo
;
49 #define PURPLE_TYPE_TLS_CERTIFICATE_INFO \
50 (purple_tls_certificate_info_get_type())
53 * purple_tls_certificate_info_get_type:
55 * Returns: The #GType for the #PurpleTlsCertificateInfo boxed structure.
57 GType
purple_tls_certificate_info_get_type(void);
60 * purple_tls_certificate_get_info:
61 * @certificate: Certificate from which to parse the info
63 * Returns a #PurpleTlsCertificateInfo containing parsed information
66 * Returns: #PurpleTlsCertificateInfo parsed from the certificate
68 PurpleTlsCertificateInfo
*
69 purple_tls_certificate_get_info(GTlsCertificate
*certificate
);
72 * purple_tls_certificate_info_free:
73 * @info: #PurpleTlsCertificateInfo object to free
78 purple_tls_certificate_info_free(PurpleTlsCertificateInfo
*info
);
81 * purple_tls_certificate_info_get_display_string:
82 * @info: #PurpleTlsCertificateInfo from which to generate a display string
84 * Generates a user readable string to display information from @info
86 * Returns: A user readable string suitable to display to the user
89 purple_tls_certificate_info_get_display_string(PurpleTlsCertificateInfo
*info
);
92 * purple_tls_certificate_get_subject_name:
93 * @certificate: Certificate from which to get the subject name
95 * Returns the common subject name of the cert
97 * Returns: The subject name of the cert
100 purple_tls_certificate_info_get_subject_name(PurpleTlsCertificateInfo
*info
);
103 * purple_tls_certificate_get_fingerprint_sha1:
104 * @certificate: Certificate from which to get the SHA1 fingerprint
106 * Returns the SHA1 fingerprint of the cert
108 * Returns: (transfer full): The SHA1 fingerprint of the cert
111 purple_tls_certificate_get_fingerprint_sha1(GTlsCertificate
*certificate
);
115 #endif /* _PURPLE_TLS_CERTIFICATE_INFO_H */