diff options
author | lloyd <[email protected]> | 2010-11-03 20:05:46 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-11-03 20:05:46 +0000 |
commit | 8b755ab03eb3cf3868810f6116bbc88c293ce268 (patch) | |
tree | 1a6d77675da45f15f3cbbc7168c82d577bbf5120 | |
parent | 23836c690363a0fbdf39e2c347b87eed3f20e089 (diff) |
is_string_type was only used in one place, asn1_alt.cpp, so make it an
anon namespace function there.
-rw-r--r-- | src/asn1/asn1_alt.cpp | 18 | ||||
-rw-r--r-- | src/asn1/asn1_obj.h | 5 | ||||
-rw-r--r-- | src/asn1/asn1_str.cpp | 12 |
3 files changed, 18 insertions, 17 deletions
diff --git a/src/asn1/asn1_alt.cpp b/src/asn1/asn1_alt.cpp index 1fccf6ac0..1fc1f66e2 100644 --- a/src/asn1/asn1_alt.cpp +++ b/src/asn1/asn1_alt.cpp @@ -17,6 +17,24 @@ namespace Botan { +namespace { + +/* +* Check if type is a known ASN.1 string type +*/ +bool is_string_type(ASN1_Tag tag) + { + return (tag == NUMERIC_STRING || + tag == PRINTABLE_STRING || + tag == VISIBLE_STRING || + tag == T61_STRING || + tag == IA5_STRING || + tag == UTF8_STRING || + tag == BMP_STRING); + } + +} + /* * Create an AlternativeName */ diff --git a/src/asn1/asn1_obj.h b/src/asn1/asn1_obj.h index 8a7e6cea2..692a6fde6 100644 --- a/src/asn1/asn1_obj.h +++ b/src/asn1/asn1_obj.h @@ -98,11 +98,6 @@ bool BOTAN_DLL operator>=(const X509_Time&, const X509_Time&); bool BOTAN_DLL operator<(const X509_Time&, const X509_Time&); bool BOTAN_DLL operator>(const X509_Time&, const X509_Time&); -/* -* Helper Functions -*/ -bool BOTAN_DLL is_string_type(ASN1_Tag); - } #endif diff --git a/src/asn1/asn1_str.cpp b/src/asn1/asn1_str.cpp index efdf1a9b3..b28f36d90 100644 --- a/src/asn1/asn1_str.cpp +++ b/src/asn1/asn1_str.cpp @@ -60,18 +60,6 @@ ASN1_Tag choose_encoding(const std::string& str, } /* -* Check if type is a known ASN.1 string type -*/ -bool is_string_type(ASN1_Tag tag) - { - if(tag == NUMERIC_STRING || tag == PRINTABLE_STRING || - tag == VISIBLE_STRING || tag == T61_STRING || tag == IA5_STRING || - tag == UTF8_STRING || tag == BMP_STRING) - return true; - return false; - } - -/* * Create an ASN1_String */ ASN1_String::ASN1_String(const std::string& str, ASN1_Tag t) : tag(t) |