aboutsummaryrefslogtreecommitdiffstats
path: root/src/asn1/asn1_str.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-29 02:32:08 +0000
committerlloyd <[email protected]>2008-09-29 02:32:08 +0000
commit9e3118d4ded9af1f75ec0512fa9a6bc3725a6ae1 (patch)
treeb07370ecee2404bc5cf4cf82abf1ccf992dfa3a4 /src/asn1/asn1_str.cpp
parentbd27a130b13667feb26f3157d67d21f8ddb5986e (diff)
Hardcode use of Latin1 encoding if an encoding using ASN.1 DIRECTORY STRING
is encountered and the charaters will not fit into PRINTABLE STRING. Previously was toggle-able between Latin1 and UTF-8 via policy config. However does not seem worth the depencencies especially as AFAIK nobody has ever touched this setting. If its functionality turns out to be needed then something can be arranged later on.
Diffstat (limited to 'src/asn1/asn1_str.cpp')
-rw-r--r--src/asn1/asn1_str.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/asn1/asn1_str.cpp b/src/asn1/asn1_str.cpp
index 52dcdc55e..eadc7a75d 100644
--- a/src/asn1/asn1_str.cpp
+++ b/src/asn1/asn1_str.cpp
@@ -8,7 +8,6 @@
#include <botan/ber_dec.h>
#include <botan/charset.h>
#include <botan/parsing.h>
-#include <botan/libstate.h>
namespace Botan {
@@ -78,8 +77,7 @@ ASN1_String::ASN1_String(const std::string& str, ASN1_Tag t) : tag(t)
iso_8859_str = Charset::transcode(str, LOCAL_CHARSET, LATIN1_CHARSET);
if(tag == DIRECTORY_STRING)
- tag = choose_encoding(iso_8859_str,
- global_state().option("x509/ca/str_type"));
+ tag = choose_encoding(iso_8859_str, "latin1");
if(tag != NUMERIC_STRING &&
tag != PRINTABLE_STRING &&
@@ -98,8 +96,7 @@ 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,
- global_state().option("x509/ca/str_type"));
+ tag = choose_encoding(iso_8859_str, "latin1");
}
/*************************************************