summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-02-28 13:32:09 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2014-03-14 19:23:33 +0100
commit0e036ad714738e22b689136a638b830993adb9d0 (patch)
tree0cf99396538996f92799800cd01c476bf1ac5545
parente9b4e00bb5ae38687bf3168bc786aeee8aa7aa9d (diff)
downloadgnutls-0e036ad714738e22b689136a638b830993adb9d0.tar.gz
Corrected error checking in _gnutls_x509_ext_gen_proxyCertInfo
-rw-r--r--lib/x509/extensions.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/x509/extensions.c b/lib/x509/extensions.c
index 41e2f6bc88..bc16e4d381 100644
--- a/lib/x509/extensions.c
+++ b/lib/x509/extensions.c
@@ -1229,7 +1229,7 @@ _gnutls_x509_ext_gen_proxyCertInfo(int pathLenConstraint,
if (pathLenConstraint < 0) {
result =
asn1_write_value(ext, "pCPathLenConstraint", NULL, 0);
- if (result < 0)
+ if (result != ASN1_SUCCESS)
result = _gnutls_asn2err(result);
} else
result =
@@ -1243,7 +1243,7 @@ _gnutls_x509_ext_gen_proxyCertInfo(int pathLenConstraint,
result = asn1_write_value(ext, "proxyPolicy.policyLanguage",
policyLanguage, 1);
- if (result < 0) {
+ if (result != ASN1_SUCCESS) {
gnutls_assert();
asn1_delete_structure(&ext);
return _gnutls_asn2err(result);
@@ -1251,7 +1251,7 @@ _gnutls_x509_ext_gen_proxyCertInfo(int pathLenConstraint,
result = asn1_write_value(ext, "proxyPolicy.policy",
policy, sizeof_policy);
- if (result < 0) {
+ if (result != ASN1_SUCCESS) {
gnutls_assert();
asn1_delete_structure(&ext);
return _gnutls_asn2err(result);