diff options
author | Jeffrey Walton <noloader@gmail.com> | 2018-04-03 17:32:56 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2018-04-03 17:32:56 -0400 |
commit | c27d3a944246113251caf4b0b844475ce2ca164a (patch) | |
tree | 468cda8e4ad73685882ab98cfab3f5b0c6f1ca55 /asn.h | |
parent | 9888d22d4bd2d090c9d67bde1e096ec80b046b3d (diff) | |
download | cryptopp-git-c27d3a944246113251caf4b0b844475ce2ca164a.tar.gz |
Make ASN.1 decoder m_values protected
Diffstat (limited to 'asn.h')
-rw-r--r-- | asn.h | 23 |
1 files changed, 15 insertions, 8 deletions
@@ -201,6 +201,15 @@ public: /// </pre>
void BERDecodeAndCheck(BufferedTransformation &bt) const;
+ const std::vector<word32>& GetValues() const {
+ return m_values;
+ }
+
+protected:
+ friend bool operator==(const OID &lhs, const OID &rhs);
+ friend bool operator!=(const OID &lhs, const OID &rhs);
+ friend bool operator<(const OID &lhs, const OID &rhs);
+
std::vector<word32> m_values;
private:
@@ -213,6 +222,7 @@ class EncodedObjectFilter : public Filter {
public:
enum Flag {PUT_OBJECTS=1, PUT_MESSANGE_END_AFTER_EACH_OBJECT=2, PUT_MESSANGE_END_AFTER_ALL_OBJECTS=4, PUT_MESSANGE_SERIES_END_AFTER_ALL_OBJECTS=8};
+ enum State {IDENTIFIER, LENGTH, BODY, TAIL, ALL_DONE} m_state;
virtual ~EncodedObjectFilter() {}
@@ -233,13 +243,11 @@ public: private:
BufferedTransformation & CurrentTarget();
- word32 m_flags;
- unsigned int m_nObjects, m_nCurrentObject, m_level;
- std::vector<unsigned int> m_positions;
ByteQueue m_queue;
- enum State {IDENTIFIER, LENGTH, BODY, TAIL, ALL_DONE} m_state;
- byte m_id;
+ std::vector<unsigned int> m_positions;
lword m_lengthRemaining;
+ word32 m_nObjects, m_nCurrentObject, m_level, m_flags;
+ byte m_id;
};
/// \brief BER General Decoder
@@ -265,8 +273,8 @@ public: protected:
BufferedTransformation &m_inQueue;
- bool m_finished, m_definiteLength;
lword m_length;
+ bool m_finished, m_definiteLength;
private:
void Init(byte asnTag);
@@ -294,9 +302,8 @@ public: private:
BufferedTransformation &m_outQueue;
- bool m_finished;
-
byte m_asnTag;
+ bool m_finished;
};
/// \brief BER Sequence Decoder
|