aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/asn1/asn1_str.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/asn1/asn1_str.cpp')
-rw-r--r--src/lib/asn1/asn1_str.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/lib/asn1/asn1_str.cpp b/src/lib/asn1/asn1_str.cpp
index 05be90e3d..809448888 100644
--- a/src/lib/asn1/asn1_str.cpp
+++ b/src/lib/asn1/asn1_str.cpp
@@ -62,22 +62,22 @@ ASN1_Tag choose_encoding(const std::string& str,
/*
* Create an ASN1_String
*/
-ASN1_String::ASN1_String(const std::string& str, ASN1_Tag t) : tag(t)
+ASN1_String::ASN1_String(const std::string& str, ASN1_Tag t) : m_tag(t)
{
- iso_8859_str = Charset::transcode(str, LOCAL_CHARSET, LATIN1_CHARSET);
-
- if(tag == DIRECTORY_STRING)
- tag = choose_encoding(iso_8859_str, "latin1");
-
- if(tag != NUMERIC_STRING &&
- tag != PRINTABLE_STRING &&
- tag != VISIBLE_STRING &&
- tag != T61_STRING &&
- tag != IA5_STRING &&
- tag != UTF8_STRING &&
- tag != BMP_STRING)
+ m_iso_8859_str = Charset::transcode(str, LOCAL_CHARSET, LATIN1_CHARSET);
+
+ if(m_tag == DIRECTORY_STRING)
+ m_tag = choose_encoding(m_iso_8859_str, "latin1");
+
+ if(m_tag != NUMERIC_STRING &&
+ m_tag != PRINTABLE_STRING &&
+ m_tag != VISIBLE_STRING &&
+ m_tag != T61_STRING &&
+ m_tag != IA5_STRING &&
+ m_tag != UTF8_STRING &&
+ m_tag != BMP_STRING)
throw Invalid_Argument("ASN1_String: Unknown string type " +
- std::to_string(tag));
+ std::to_string(m_tag));
}
/*
@@ -85,8 +85,8 @@ ASN1_String::ASN1_String(const std::string& str, ASN1_Tag t) : tag(t)
*/
ASN1_String::ASN1_String(const std::string& str)
{
- iso_8859_str = Charset::transcode(str, LOCAL_CHARSET, LATIN1_CHARSET);
- tag = choose_encoding(iso_8859_str, "latin1");
+ m_iso_8859_str = Charset::transcode(str, LOCAL_CHARSET, LATIN1_CHARSET);
+ m_tag = choose_encoding(m_iso_8859_str, "latin1");
}
/*
@@ -94,7 +94,7 @@ ASN1_String::ASN1_String(const std::string& str)
*/
std::string ASN1_String::iso_8859() const
{
- return iso_8859_str;
+ return m_iso_8859_str;
}
/*
@@ -102,7 +102,7 @@ std::string ASN1_String::iso_8859() const
*/
std::string ASN1_String::value() const
{
- return Charset::transcode(iso_8859_str, LATIN1_CHARSET, LOCAL_CHARSET);
+ return Charset::transcode(m_iso_8859_str, LATIN1_CHARSET, LOCAL_CHARSET);
}
/*
@@ -110,7 +110,7 @@ std::string ASN1_String::value() const
*/
ASN1_Tag ASN1_String::tagging() const
{
- return tag;
+ return m_tag;
}
/*