gnome-keyring r1139 - in trunk: . pk
- From: nnielsen svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-keyring r1139 - in trunk: . pk
- Date: Tue, 29 Apr 2008 14:26:51 +0100 (BST)
Author: nnielsen
Date: Tue Apr 29 13:26:51 2008
New Revision: 1139
URL: http://svn.gnome.org/viewvc/gnome-keyring?rev=1139&view=rev
Log:
* pk/gkr-pk-cert.c: Don't use critical warnings on invalid
certificates.
Modified:
trunk/ChangeLog
trunk/pk/gkr-pk-cert.c
Modified: trunk/pk/gkr-pk-cert.c
==============================================================================
--- trunk/pk/gkr-pk-cert.c (original)
+++ trunk/pk/gkr-pk-cert.c Tue Apr 29 13:26:51 2008
@@ -516,7 +516,8 @@
return ret;
cdata = gkr_pkix_asn1_read_element (cert->data->asn1, cert->data->raw, cert->data->n_raw,
"tbsCertificate.subject", &n_data);
- g_return_val_if_fail (cdata, CKR_GENERAL_ERROR);
+ if (!cdata)
+ return CKR_GENERAL_ERROR;
gkr_pk_attribute_set_data (attr, cdata, n_data);
return CKR_OK;
@@ -525,7 +526,8 @@
return ret;
cdata = gkr_pkix_asn1_read_element (cert->data->asn1, cert->data->raw, cert->data->n_raw,
"tbsCertificate.issuer", &n_data);
- g_return_val_if_fail (cdata, CKR_GENERAL_ERROR);
+ if (!cdata)
+ return CKR_GENERAL_ERROR;
gkr_pk_attribute_set_data (attr, cdata, n_data);
return CKR_OK;
@@ -533,7 +535,8 @@
if ((ret = load_certificate (cert)) != CKR_OK)
return ret;
data = gkr_pkix_asn1_read_value (cert->data->asn1, "tbsCertificate.serialNumber", &n_data, NULL);
- g_return_val_if_fail (data, CKR_GENERAL_ERROR);
+ if (!cdata)
+ return CKR_GENERAL_ERROR;
gkr_pk_attribute_set_data (attr, data, n_data);
g_free (data);
return CKR_OK;
@@ -566,7 +569,7 @@
"tbsCertificate.validity.notBefore" :
"tbsCertificate.validity.notAfter",
&time))
- g_return_val_if_reached (CKR_GENERAL_ERROR);
+ return CKR_GENERAL_ERROR;
gkr_pk_attribute_set_date (attr, time);
return CKR_OK;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]