ucs: fix Persona key extraction
[siplcs.git] / src / core / sipe-certificate.h
blobfcce6db41fd25608cc2eac55a47fdaed64fe158b
1 /**
2 * @file sipe-certificate.h
4 * pidgin-sipe
6 * Copyright (C) 2011 SIPE Project <http://sipe.sourceforge.net/>
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 * Interface dependencies:
27 * <glib.h>
30 /* Forward declarations */
31 struct sipe_core_private;
33 /**
34 * Find TLS-DSK user certificate for a given target
36 * @param sipe_private SIPE core private data
37 * @param target target name from authentication header
39 * @return opaque pointer to the certificate. The caller does not own
40 * the certificate, i.e. he must not free it!
42 gpointer sipe_certificate_tls_dsk_find(struct sipe_core_private *sipe_private,
43 const gchar *target);
46 /**
47 * Trigger the generation of TLS-DSK user certificate for a given target
49 * @param sipe_private SIPE core private data
50 * @param target target name from authentication header
51 * @param uri URI for the Certificate Provisioning Service
52 * @return @c TRUE if certificate generation was triggered
54 gboolean sipe_certificate_tls_dsk_generate(struct sipe_core_private *sipe_private,
55 const gchar *target,
56 const gchar *uri);
58 /**
59 * Initialize certificate data
61 * @param sipe_private SIPE core private data
63 gboolean sipe_certificate_init(struct sipe_core_private *sipe_private);
65 /**
66 * Free certificate data
68 * @param sipe_private SIPE core private data
70 void sipe_certificate_free(struct sipe_core_private *sipe_private);