summaryrefslogtreecommitdiff
path: root/lib/x509
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2009-06-03 06:44:19 +0200
committerSimon Josefsson <simon@josefsson.org>2009-06-03 06:44:19 +0200
commit74a79f645da522f3b2519bd98d6eab1fb81debf5 (patch)
tree07aa498a6e928fa790b21c14be83e8588d01710f /lib/x509
parent0cb9bce03167fb5bd2c2a03d4381865006b22030 (diff)
downloadgnutls-74a79f645da522f3b2519bd98d6eab1fb81debf5.tar.gz
Fix malloc failure error strings.
Diffstat (limited to 'lib/x509')
-rw-r--r--lib/x509/output.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/lib/x509/output.c b/lib/x509/output.c
index e81c1fb10f..e6951b2660 100644
--- a/lib/x509/output.c
+++ b/lib/x509/output.c
@@ -188,7 +188,8 @@ print_ski (gnutls_string * str, gnutls_x509_crt_t cert)
buffer = gnutls_malloc (size);
if (!buffer)
{
- addf (str, "error: malloc: %s\n", gnutls_strerror (err));
+ addf (str, "error: malloc: %s\n",
+ gnutls_strerror (GNUTLS_E_MEMORY_ERROR));
return;
}
@@ -246,7 +247,8 @@ print_aki (gnutls_string * str, int type, cert_type_t cert)
buffer = gnutls_malloc (size);
if (!buffer)
{
- addf (str, "error: malloc: %s\n", gnutls_strerror (err));
+ addf (str, "error: malloc: %s\n",
+ gnutls_strerror (GNUTLS_E_MEMORY_ERROR));
return;
}
@@ -340,7 +342,8 @@ print_crldist (gnutls_string * str, gnutls_x509_crt_t cert)
buffer = gnutls_malloc (size);
if (!buffer)
{
- addf (str, "error: malloc: %s\n", gnutls_strerror (err));
+ addf (str, "error: malloc: %s\n",
+ gnutls_strerror (GNUTLS_E_MEMORY_ERROR));
return;
}
@@ -420,7 +423,8 @@ print_key_purpose (gnutls_string * str, const char *prefix, int type,
buffer = gnutls_malloc (size);
if (!buffer)
{
- addf (str, "error: malloc: %s\n", gnutls_strerror (err));
+ addf (str, "error: malloc: %s\n",
+ gnutls_strerror (GNUTLS_E_MEMORY_ERROR));
return;
}
@@ -531,7 +535,8 @@ print_san (gnutls_string * str, const char *prefix, int type,
buffer = gnutls_malloc (size);
if (!buffer)
{
- addf (str, "error: malloc: %s\n", gnutls_strerror (err));
+ addf (str, "error: malloc: %s\n",
+ gnutls_strerror (GNUTLS_E_MEMORY_ERROR));
return;
}
@@ -603,7 +608,8 @@ print_san (gnutls_string * str, const char *prefix, int type,
if (!oid)
{
gnutls_free (buffer);
- addf (str, "error: malloc: %s\n", gnutls_strerror (err));
+ addf (str, "error: malloc: %s\n",
+ gnutls_strerror (GNUTLS_E_MEMORY_ERROR));
return;
}
@@ -854,7 +860,8 @@ print_extensions (gnutls_string * str, const char *prefix, int type,
buffer = gnutls_malloc (extlen);
if (!buffer)
{
- addf (str, "error: malloc: %s\n", gnutls_strerror (err));
+ addf (str, "error: malloc: %s\n",
+ gnutls_strerror (GNUTLS_E_MEMORY_ERROR));
continue;
}
@@ -1097,7 +1104,8 @@ print_cert (gnutls_string * str, gnutls_x509_crt_t cert, int notsigned)
buffer = gnutls_malloc (size);
if (!buffer)
{
- addf (str, "error: malloc: %s\n", gnutls_strerror (err));
+ addf (str, "error: malloc: %s\n",
+ gnutls_strerror (GNUTLS_E_MEMORY_ERROR));
return;
}
@@ -1529,7 +1537,8 @@ print_crl (gnutls_string * str, gnutls_x509_crl_t crl, int notsigned)
buffer = gnutls_malloc (extlen);
if (!buffer)
{
- addf (str, "error: malloc: %s\n", gnutls_strerror (err));
+ addf (str, "error: malloc: %s\n",
+ gnutls_strerror (GNUTLS_E_MEMORY_ERROR));
continue;
}
@@ -1632,7 +1641,8 @@ print_crl (gnutls_string * str, gnutls_x509_crl_t crl, int notsigned)
buffer = gnutls_malloc (size);
if (!buffer)
{
- addf (str, "error: malloc: %s\n", gnutls_strerror (err));
+ addf (str, "error: malloc: %s\n",
+ gnutls_strerror (GNUTLS_E_MEMORY_ERROR));
return;
}
@@ -1864,7 +1874,8 @@ print_crq (gnutls_string * str, gnutls_x509_crq_t cert)
buffer = gnutls_malloc (extlen);
if (!buffer)
{
- addf (str, "error: malloc: %s\n", gnutls_strerror (err));
+ addf (str, "error: malloc: %s\n",
+ gnutls_strerror (GNUTLS_E_MEMORY_ERROR));
continue;
}
@@ -1909,7 +1920,8 @@ print_crq_other (gnutls_string * str, gnutls_x509_crq_t crq)
buffer = gnutls_malloc (size);
if (!buffer)
{
- addf (str, "error: malloc: %s\n", gnutls_strerror (err));
+ addf (str, "error: malloc: %s\n",
+ gnutls_strerror (GNUTLS_E_MEMORY_ERROR));
return;
}