* If @data includes multiple certificates, only the first one will be
* parsed.
*
- * Return value: the new certificate, or %NULL if @data is invalid
+ * Returns: the new certificate, or %NULL if @data is invalid
*
* Since: 2.28
*/
* set @error. Otherwise, this behaves like
* g_tls_certificate_new_from_pem().
*
- * Return value: the new certificate, or %NULL on error
+ * Returns: the new certificate, or %NULL on error
*
* Since: 2.28
*/
* function will return %NULL and set @error. Otherwise, this behaves
* like g_tls_certificate_new_from_pem().
*
- * Return value: the new certificate, or %NULL on error
+ * Returns: the new certificate, or %NULL on error
*
* Since: 2.28
*/
* PEM-encoded certificates, this will return an empty list and not
* set @error.
*
- * Return value: (element-type Gio.TlsCertificate) (transfer full): a
+ * Returns: (element-type Gio.TlsCertificate) (transfer full): a
* #GList containing #GTlsCertificate objects. You must free the list
* and its contents when you are done with it.
*
{
gchar *cert_pem;
GTlsCertificate *cert = NULL;
+ GError *parse_error = NULL;
- cert_pem = parse_next_pem_certificate (&p, end, FALSE, error);
+ cert_pem = parse_next_pem_certificate (&p, end, FALSE, &parse_error);
if (cert_pem)
- {
- cert = g_tls_certificate_new_internal (cert_pem, NULL, error);
- g_free (cert_pem);
- }
+ {
+ cert = g_tls_certificate_new_internal (cert_pem, NULL, &parse_error);
+ g_free (cert_pem);
+ }
if (!cert)
- {
- g_list_free_full (queue.head, g_object_unref);
- queue.head = NULL;
- break;
- }
+ {
+ if (parse_error)
+ {
+ g_propagate_error (error, parse_error);
+ g_list_free_full (queue.head, g_object_unref);
+ queue.head = NULL;
+ }
+ break;
+ }
g_queue_push_tail (&queue, cert);
}
*
* Gets the #GTlsCertificate representing @cert's issuer, if known
*
- * Return value: (transfer none): The certificate of @cert's issuer,
+ * Returns: (transfer none): The certificate of @cert's issuer,
* or %NULL if @cert is self-signed or signed with an unknown
* certificate.
*
* (All other #GTlsCertificateFlags values will always be set or unset
* as appropriate.)
*
- * Return value: the appropriate #GTlsCertificateFlags
+ * Returns: the appropriate #GTlsCertificateFlags
*
* Since: 2.28
*/
* their #GTlsCertificate:issuer, #GTlsCertificate:private-key, or
* #GTlsCertificate:private-key-pem properties differ.
*
- * Return value: whether the same or not
+ * Returns: whether the same or not
*
* Since: 2.34
*/