summaryrefslogtreecommitdiff
path: root/lib/x509/common.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2018-03-29 14:21:59 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2018-10-12 10:30:37 +0200
commit4a11812d9c47213fe1d06bb7b8136901a6b26674 (patch)
treef242c8af22873ad9974f1a4eb46061c031bda86b /lib/x509/common.c
parent679f3f23fb6132051f855c836aefb6aac2e62881 (diff)
downloadgnutls-4a11812d9c47213fe1d06bb7b8136901a6b26674.tar.gz
pkcs11 uris: the URI scheme is case insensitivetmp-uris
Makes the comparisons of the URI scheme to use c_strcasecmp from gnulib. It also replaces various straw strcasecmp with the gnulib variant. This ensures that comparison will be reliable irrespective of the locale. Resolves #590 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/x509/common.c')
-rw-r--r--lib/x509/common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/x509/common.c b/lib/x509/common.c
index 4a3e8376f7..b0ee8b80cc 100644
--- a/lib/x509/common.c
+++ b/lib/x509/common.c
@@ -30,6 +30,7 @@
#include <x509.h>
#include <num.h>
#include <x509_b64.h>
+#include <c-strcase.h>
#include "x509_int.h"
#include "extras/hex.h"
#include <common.h>
@@ -164,7 +165,7 @@ const char *_gnutls_ldap_string_to_oid(const char *str, unsigned str_len)
do {
if ((_oid2str[i].ldap_desc != NULL) &&
(str_len == _oid2str[i].ldap_desc_size) &&
- (strncasecmp(_oid2str[i].ldap_desc, str, str_len) ==
+ (c_strncasecmp(_oid2str[i].ldap_desc, str, str_len) ==
0))
return _oid2str[i].oid;
i++;