diff options
author | Simon Warta <[email protected]> | 2015-08-08 18:53:45 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-08-11 10:50:14 +0200 |
commit | ee415570876d8d91e99bab7dc7a14209419a93af (patch) | |
tree | bf53d44ab4f7c7a8e68787e963a0edaabcb0ded4 | |
parent | b2d31e4bc77c9bb707bdf5ad3f76882a07134721 (diff) |
Explicitly fwd declase classes BER_Decoder, DER_Encoder
-rw-r--r-- | src/lib/asn1/asn1_obj.h | 7 | ||||
-rw-r--r-- | src/lib/asn1/asn1_time.cpp | 8 | ||||
-rw-r--r-- | src/lib/asn1/asn1_time.h | 7 |
3 files changed, 10 insertions, 12 deletions
diff --git a/src/lib/asn1/asn1_obj.h b/src/lib/asn1/asn1_obj.h index d208ec78e..46707e23a 100644 --- a/src/lib/asn1/asn1_obj.h +++ b/src/lib/asn1/asn1_obj.h @@ -13,6 +13,9 @@ namespace Botan { +class BER_Decoder; +class DER_Encoder; + /** * ASN.1 Type and Class Tags */ @@ -61,13 +64,13 @@ class BOTAN_DLL ASN1_Object * Encode whatever this object is into to * @param to the DER_Encoder that will be written to */ - virtual void encode_into(class DER_Encoder& to) const = 0; + virtual void encode_into(DER_Encoder& to) const = 0; /** * Decode whatever this object is from from * @param from the BER_Decoder that will be read from */ - virtual void decode_from(class BER_Decoder& from) = 0; + virtual void decode_from(BER_Decoder& from) = 0; virtual ~ASN1_Object() {} }; diff --git a/src/lib/asn1/asn1_time.cpp b/src/lib/asn1/asn1_time.cpp index f6aceeefb..381a21b2d 100644 --- a/src/lib/asn1/asn1_time.cpp +++ b/src/lib/asn1/asn1_time.cpp @@ -35,11 +35,6 @@ X509_Time::X509_Time(const std::string& t_spec, ASN1_Tag tag) set_to(t_spec, tag); } - - -/* -* DER encode a X509_Time -*/ void X509_Time::encode_into(DER_Encoder& der) const { if(m_tag != GENERALIZED_TIME && m_tag != UTC_TIME) @@ -51,9 +46,6 @@ void X509_Time::encode_into(DER_Encoder& der) const LATIN1_CHARSET)); } -/* -* Decode a BER encoded X509_Time -*/ void X509_Time::decode_from(BER_Decoder& source) { BER_Object ber_time = source.get_next_object(); diff --git a/src/lib/asn1/asn1_time.h b/src/lib/asn1/asn1_time.h index f2b1c7975..313b26b06 100644 --- a/src/lib/asn1/asn1_time.h +++ b/src/lib/asn1/asn1_time.h @@ -19,8 +19,11 @@ namespace Botan { class BOTAN_DLL X509_Time : public ASN1_Object { public: - void encode_into(class DER_Encoder&) const override; - void decode_from(class BER_Decoder&) override; + /// DER encode a X509_Time + void encode_into(DER_Encoder&) const override; + + // Decode a BER encoded X509_Time + void decode_from(BER_Decoder&) override; /// Return an internal string representation of the time std::string to_string() const; |