aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/asn1/asn1_time.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-11-09 16:43:57 -0500
committerJack Lloyd <[email protected]>2017-11-09 16:43:57 -0500
commitb08f26d3658db3213d98932cbc6dd3e6efdc8b85 (patch)
treec1cfb432aaa1625d6a1cfff7bf7487b75dcd0286 /src/lib/asn1/asn1_time.cpp
parent54baf3a3d3ee070e3740859298f92d69b042c9c6 (diff)
Remove use of transcode
Diffstat (limited to 'src/lib/asn1/asn1_time.cpp')
-rw-r--r--src/lib/asn1/asn1_time.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/lib/asn1/asn1_time.cpp b/src/lib/asn1/asn1_time.cpp
index 2cd225915..f6a0c414e 100644
--- a/src/lib/asn1/asn1_time.cpp
+++ b/src/lib/asn1/asn1_time.cpp
@@ -8,7 +8,6 @@
#include <botan/asn1_time.h>
#include <botan/der_enc.h>
#include <botan/ber_dec.h>
-#include <botan/charset.h>
#include <botan/exceptn.h>
#include <botan/parsing.h>
#include <botan/calendar.h>
@@ -41,20 +40,14 @@ void X509_Time::encode_into(DER_Encoder& der) const
if(m_tag != GENERALIZED_TIME && m_tag != UTC_TIME)
throw Invalid_Argument("X509_Time: Bad encoding tag");
- der.add_object(m_tag, UNIVERSAL,
- Charset::transcode(to_string(),
- LOCAL_CHARSET,
- LATIN1_CHARSET));
+ der.add_object(m_tag, UNIVERSAL, to_string());
}
void X509_Time::decode_from(BER_Decoder& source)
{
BER_Object ber_time = source.get_next_object();
- set_to(Charset::transcode(ASN1::to_string(ber_time),
- LATIN1_CHARSET,
- LOCAL_CHARSET),
- ber_time.type_tag);
+ set_to(ASN1::to_string(ber_time), ber_time.type_tag);
}
std::string X509_Time::to_string() const