summaryrefslogtreecommitdiff
path: root/lib/x509
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2013-01-25 19:54:15 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2013-01-25 19:58:37 +0100
commit17e7ed7369103167855a8392e32721542f3e01c8 (patch)
tree5a9eb706068f74775682fe1d044243d84ed64605 /lib/x509
parentf6998532f146b68c462a20d46a0533ed261db238 (diff)
downloadgnutls-17e7ed7369103167855a8392e32721542f3e01c8.tar.gz
use the non-locale dependent versions of isxxx functions.
Diffstat (limited to 'lib/x509')
-rw-r--r--lib/x509/common.c3
-rw-r--r--lib/x509/pkcs12_encr.c3
-rw-r--r--lib/x509/x509_dn.c11
3 files changed, 10 insertions, 7 deletions
diff --git a/lib/x509/common.c b/lib/x509/common.c
index 5f89fa0a1d..35ab13f41f 100644
--- a/lib/x509/common.c
+++ b/lib/x509/common.c
@@ -31,6 +31,7 @@
#include <x509_b64.h>
#include "x509_int.h"
#include <common.h>
+#include <c-ctype.h>
struct oid_to_string
{
@@ -222,7 +223,7 @@ size_t size;
* characters then treat it as printable.
*/
for (i = 0; i < input->size; i++)
- if (!isascii (input->data[i]))
+ if (!c_isascii (input->data[i]))
ascii = 1;
if (ascii == 0)
diff --git a/lib/x509/pkcs12_encr.c b/lib/x509/pkcs12_encr.c
index ba4e39e98c..9f26a3130a 100644
--- a/lib/x509/pkcs12_encr.c
+++ b/lib/x509/pkcs12_encr.c
@@ -24,6 +24,7 @@
#include <gnutls_mpi.h>
#include <gnutls_errors.h>
#include <x509_int.h>
+#include <c-ctype.h>
/* Returns 0 if the password is ok, or a negative error
* code instead.
@@ -35,7 +36,7 @@ _pkcs12_check_pass (const char *pass, size_t plen)
for (i = 0; i < plen; i++)
{
- if (isascii (pass[i]))
+ if (c_isascii (pass[i]))
continue;
return GNUTLS_E_INVALID_PASSWORD;
}
diff --git a/lib/x509/x509_dn.c b/lib/x509/x509_dn.c
index fbfb4e8b10..fad77bb978 100644
--- a/lib/x509/x509_dn.c
+++ b/lib/x509/x509_dn.c
@@ -30,6 +30,7 @@
#include <common.h>
#include <gnutls_x509.h>
#include <x509_b64.h>
+#include <c-ctype.h>
typedef int (*set_dn_func) (void*, const char *oid, unsigned int raw_flag, const void *name, unsigned int name_size);
@@ -44,7 +45,7 @@ int dn_attr_crt_set( set_dn_func f, void* crt, const char *attr, unsigned attr_l
if (value_len == 0 || attr_len == 0)
return gnutls_assert_val(GNUTLS_E_PARSING_ERROR);
- if (isdigit(attr[0]) != 0)
+ if (c_isdigit(attr[0]) != 0)
{
if (attr_len >= sizeof(_oid))
return gnutls_assert_val(GNUTLS_E_PARSING_ERROR);
@@ -100,7 +101,7 @@ int ret;
while (*p != 0 && *p != '\n')
{
/* Skip leading whitespace */
- while (isspace(*p))
+ while (c_isspace(*p))
p++;
if (err)
@@ -113,7 +114,7 @@ int ret;
name_end = p;
/* Whitespace */
- while (isspace(*p))
+ while (c_isspace(*p))
p++;
/* Equals sign */
@@ -125,7 +126,7 @@ int ret;
p++;
/* Whitespace */
- while (isspace(*p))
+ while (c_isspace(*p))
p++;
/* Attribute value */
@@ -133,7 +134,7 @@ int ret;
while (*p != 0 && (*p != ',' || (*p == ',' && *(p-1) == '\\')) && *p != '\n')
p++;
value_end = p;
- while (value_end > value_start && isspace(value_end[-1]))
+ while (value_end > value_start && c_isspace(value_end[-1]))
value_end--;
/* Comma, or the end of the string */