aboutsummaryrefslogtreecommitdiff
path: root/openssl/agent/pkcs11/url.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/agent/pkcs11/url.cxx')
-rw-r--r--openssl/agent/pkcs11/url.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/openssl/agent/pkcs11/url.cxx b/openssl/agent/pkcs11/url.cxx
index 5bed7b0..8823480 100644
--- a/openssl/agent/pkcs11/url.cxx
+++ b/openssl/agent/pkcs11/url.cxx
@@ -27,13 +27,14 @@ namespace openssl
{
const char* b (s.c_str ());
char* e (nullptr);
+ errno = 0; // We must clear it according to POSIX.
uint64_t v (strtoull (b, &e, 10)); // Can't throw.
if (errno != ERANGE && e == b + s.size () && v >= min && v <= max)
return v;
}
- throw invalid_argument (string ("invalid ") + what + " '" + s + "'");
+ throw invalid_argument (string ("invalid ") + what + " '" + s + '\'');
}
// url_traits
@@ -133,7 +134,7 @@ namespace openssl
if (i == e)
throw invalid_argument (
- "no value for attribute '" + string (s, b, n) + "'");
+ "no value for attribute '" + string (s, b, n) + '\'');
string a;
url::decode (s.begin () + b, s.begin () + i, back_inserter (a));
@@ -167,7 +168,7 @@ namespace openssl
auto set = [&an] (auto& attr, auto&& val)
{
if (attr)
- throw invalid_argument ("duplicate attribute '" + an + "'");
+ throw invalid_argument ("duplicate attribute '" + an + '\'');
attr = move (val);
};
@@ -212,7 +213,7 @@ namespace openssl
else if (an == "type")
set (type, move (av));
else
- throw invalid_argument ("unknown attribute '" + an + "'");
+ throw invalid_argument ("unknown attribute '" + an + '\'');
}
}
@@ -239,7 +240,7 @@ namespace openssl
auto set = [&an] (auto& attr, auto&& val)
{
if (attr)
- throw invalid_argument ("duplicate attribute '" + an + "'");
+ throw invalid_argument ("duplicate attribute '" + an + '\'');
attr = move (val);
};