summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/hx509
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-08-05 11:25:50 +1000
committerAndrew Bartlett <abartlet@samba.org>2009-08-05 12:18:17 +1000
commitcd1d7f4be7d31388ab79c797acaf6d7730113112 (patch)
tree3d25e28089d1cffa5d7dadca529e29b936681607 /source4/heimdal/lib/hx509
parent8bba340e65e84ee09a7da4d97bc7838d3eefbb15 (diff)
downloadsamba-cd1d7f4be7d31388ab79c797acaf6d7730113112.tar.gz
samba-cd1d7f4be7d31388ab79c797acaf6d7730113112.tar.bz2
samba-cd1d7f4be7d31388ab79c797acaf6d7730113112.zip
s4:heimdal: import lorikeet-heimdal-200908050050 (commit 8714779fa7376fd9f7761587639e68b48afc8c9c)
This also adds a new hdb-glue.c file, to cope with Heimdal's uncondtional enabling of SQLITE. (Very reasonable, but not required for Samba4's use). Andrew Bartlett
Diffstat (limited to 'source4/heimdal/lib/hx509')
-rw-r--r--source4/heimdal/lib/hx509/ks_file.c4
-rw-r--r--source4/heimdal/lib/hx509/name.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/source4/heimdal/lib/hx509/ks_file.c b/source4/heimdal/lib/hx509/ks_file.c
index 74808f7607..553191a774 100644
--- a/source4/heimdal/lib/hx509/ks_file.c
+++ b/source4/heimdal/lib/hx509/ks_file.c
@@ -340,7 +340,7 @@ pem_func(hx509_context context, const char *type,
ret = (*formats[j].func)(context, NULL, pem_ctx->c,
header, data, len, ai);
- if (ret) {
+ if (ret && (pem_ctx->flags & HX509_CERTS_UNPROTECT_ALL)) {
hx509_set_error_string(context, HX509_ERROR_APPEND, ret,
"Failed parseing PEM format %s", type);
return ret;
@@ -354,8 +354,6 @@ pem_func(hx509_context context, const char *type,
"Found no matching PEM format for %s", type);
return ret;
}
- if (ret && (pem_ctx->flags & HX509_CERTS_UNPROTECT_ALL))
- return ret;
return 0;
}
diff --git a/source4/heimdal/lib/hx509/name.c b/source4/heimdal/lib/hx509/name.c
index b8f48d5236..23736edde3 100644
--- a/source4/heimdal/lib/hx509/name.c
+++ b/source4/heimdal/lib/hx509/name.c
@@ -235,8 +235,10 @@ _hx509_Name_to_string(const Name *n, char **str)
if (ss == NULL)
_hx509_abort("allocation failure"); /* XXX */
ret = wind_ucs2utf8(bmp, bmplen, ss, NULL);
- if (ret)
+ if (ret) {
+ free(ss);
return ret;
+ }
ss[k] = '\0';
break;
}
@@ -260,8 +262,10 @@ _hx509_Name_to_string(const Name *n, char **str)
if (ss == NULL)
_hx509_abort("allocation failure"); /* XXX */
ret = wind_ucs4utf8(uni, unilen, ss, NULL);
- if (ret)
+ if (ret) {
+ free(ss);
return ret;
+ }
ss[k] = '\0';
break;
}