* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gtlsclientconnection.h"
#include "ginitable.h"
#include "gioenumtypes.h"
-#include "gio-marshal.h"
#include "gsocket.h"
#include "gsocketconnectable.h"
#include "gtlsbackend.h"
*
* #GTlsClientConnection is the client-side subclass of
* #GTlsConnection, representing a client-side TLS connection.
- *
- * Since: 2.28
*/
/**
G_PARAM_STATIC_STRINGS));
/**
- * GTlsClientConnection:accepted-cas:
+ * GTlsClientConnection:accepted-cas: (type GLib.List) (element-type GLib.ByteArray):
*
* A list of the distinguished names of the Certificate Authorities
* that the server will accept client certificates signed by. If the
* server requests a client certificate during the handshake, then
* this property will be set after the handshake completes.
*
+ * Each item in the list is a #GByteArray which contains the complete
+ * subject DN of the certificate authority.
+ *
* Since: 2.28
*/
g_object_interface_install_property (iface,
- g_param_spec_boxed ("accepted-cas",
- P_("Accepted CAs"),
- P_("Distinguished names of the CAs the server accepts certificates from"),
- G_TYPE_STRV,
- G_PARAM_READABLE |
- G_PARAM_STATIC_STRINGS));
+ g_param_spec_pointer ("accepted-cas",
+ P_("Accepted CAs"),
+ P_("Distinguished names of the CAs the server accepts certificates from"),
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
}
/**
* must have pollable input and output streams) which is assumed to
* communicate with the server identified by @server_identity.
*
- * Return value: the new #GTlsClientConnection, or %NULL on error
+ * Returns: (transfer full) (type GTlsClientConnection): the new
+ * #GTlsClientConnection, or %NULL on error
*
* Since: 2.28
*/
-GTlsClientConnection *
+GIOStream *
g_tls_client_connection_new (GIOStream *base_io_stream,
GSocketConnectable *server_identity,
GError **error)
"base-io-stream", base_io_stream,
"server-identity", server_identity,
NULL);
- return G_TLS_CLIENT_CONNECTION (conn);
+ return G_IO_STREAM (conn);
}
/**
*
* Gets @conn's validation flags
*
- * Return value: the validation flags
+ * Returns: the validation flags
*
* Since: 2.28
*/
*
* Gets @conn's expected server identity
*
- * Return value: a #GSocketConnectable describing the
+ * Returns: (transfer none): a #GSocketConnectable describing the
* expected server identity, or %NULL if the expected identity is not
* known.
*
* highest-supported version of TLS; see
* g_tls_client_connection_set_use_ssl3().
*
- * Return value: whether @conn will use SSL 3.0
+ * Returns: whether @conn will use SSL 3.0
*
* Since: 2.28
*/
* during the TLS handshake if the server requests a certificate.
* Otherwise, it will be %NULL.
*
- * Return value: (transfer full) (array zero-terminated=1): the list
- * of CA names, which you must free (eg, with g_strfreev()).
+ * Each item in the list is a #GByteArray which contains the complete
+ * subject DN of the certificate authority.
+ *
+ * Returns: (element-type GByteArray) (transfer full): the list of
+ * CA DNs. You should unref each element with g_byte_array_unref() and then
+ * the free the list with g_list_free().
*
* Since: 2.28
*/
-char **
+GList *
g_tls_client_connection_get_accepted_cas (GTlsClientConnection *conn)
{
- char **accepted_cas = NULL;
+ GList *accepted_cas = NULL;
g_return_val_if_fail (G_IS_TLS_CLIENT_CONNECTION (conn), NULL);