summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/RFC2253.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceSSL/RFC2253.cpp')
-rw-r--r--cpp/src/IceSSL/RFC2253.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/cpp/src/IceSSL/RFC2253.cpp b/cpp/src/IceSSL/RFC2253.cpp
index d622969448b..fc446a9d5a3 100644
--- a/cpp/src/IceSSL/RFC2253.cpp
+++ b/cpp/src/IceSSL/RFC2253.cpp
@@ -7,6 +7,8 @@
//
// **********************************************************************
+#include <IceUtil/StringUtil.h>
+
#include <IceSSL/Plugin.h>
#include <IceSSL/RFC2253.h>
@@ -270,10 +272,10 @@ parseAttributeType(const string& data, size_t& pos)
//
// First the OID case.
//
- if(isdigit(static_cast<unsigned char>(data[pos])) ||
+ if(IceUtilInternal::isDigit(data[pos]) ||
(data.size() - pos >= 4 && (data.substr(pos, 4) == "oid." || data.substr(pos, 4) == "OID.")))
{
- if(!isdigit(static_cast<unsigned char>(data[pos])))
+ if(!IceUtilInternal::isDigit(data[pos]))
{
result += data.substr(pos, 4);
pos += 4;
@@ -282,7 +284,7 @@ parseAttributeType(const string& data, size_t& pos)
while(true)
{
// 1*DIGIT
- while(pos < data.size() && isdigit(static_cast<unsigned char>(data[pos])))
+ while(pos < data.size() && IceUtilInternal::isDigit(data[pos]))
{
result += data[pos];
++pos;
@@ -293,7 +295,7 @@ parseAttributeType(const string& data, size_t& pos)
result += data[pos];
++pos;
// 1*DIGIT must follow "."
- if(pos < data.size() && !isdigit(static_cast<unsigned char>(data[pos])))
+ if(pos < data.size() && !IceUtilInternal::isDigit(data[pos]))
{
throw ParseException(__FILE__, __LINE__, "invalid attribute type (expected end of data)");
}
@@ -304,7 +306,7 @@ parseAttributeType(const string& data, size_t& pos)
}
}
}
- else if(isalpha(static_cast<unsigned char>(data[pos])))
+ else if(IceUtilInternal::isAlpha(data[pos]))
{
//
// The grammar is wrong in this case. It should be ALPHA
@@ -314,8 +316,8 @@ parseAttributeType(const string& data, size_t& pos)
result += data[pos];
++pos;
// 1* KEYCHAR
- while(pos < data.size() && (isalpha(static_cast<unsigned char>(data[pos])) ||
- isdigit(static_cast<unsigned char>(data[pos])) || data[pos] == '-'))
+ while(pos < data.size() &&
+ (IceUtilInternal::isAlpha(data[pos]) || IceUtilInternal::isDigit(data[pos]) || data[pos] == '-'))
{
result += data[pos];
++pos;