summaryrefslogtreecommitdiff
path: root/asn.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-09-29 15:09:25 -0400
committerJeffrey Walton <noloader@gmail.com>2019-09-29 15:09:25 -0400
commit7a927b4d8270c017d533a29f1e21be8c6d595ba9 (patch)
treeeb5973f36b717a5fa90ecf58073860f1a55d2d40 /asn.h
parentbf8a765c32acf7d5b32bbcfc4642e5fe3ad9a9b4 (diff)
downloadcryptopp-git-7a927b4d8270c017d533a29f1e21be8c6d595ba9.tar.gz
Update BERDecodeTextString
Diffstat (limited to 'asn.h')
-rw-r--r--asn.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/asn.h b/asn.h
index d6e4f7e0..18d4fd73 100644
--- a/asn.h
+++ b/asn.h
@@ -13,6 +13,8 @@
#include "queue.h"
#include "misc.h"
+#include <iosfwd>
+
// Issue 340
#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
# pragma GCC diagnostic push
@@ -138,7 +140,7 @@ CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeTextString(BufferedTransformation &bt,
/// \param bt BufferedTransformation object for reading
/// \param str the string to encode
/// \param asnTag the ASN.1 type
-/// \details DEREncodeTextString() can be used for UTF8_STRING, PRINTABLE_STRING, and IA5_STRING
+/// \details BERDecodeTextString() can be used for UTF8_STRING, PRINTABLE_STRING, and IA5_STRING
CRYPTOPP_DLL size_t CRYPTOPP_API BERDecodeTextString(BufferedTransformation &bt, std::string &str, byte asnTag);
/// \brief DER encode bit string
@@ -207,6 +209,8 @@ public:
return m_values;
}
+ std::ostream& Print(std::ostream& out) const;
+
protected:
friend bool operator==(const OID &lhs, const OID &rhs);
friend bool operator!=(const OID &lhs, const OID &rhs);
@@ -805,6 +809,8 @@ inline bool operator<(const ::CryptoPP::OID &lhs, const ::CryptoPP::OID &rhs)
{return std::lexicographical_compare(lhs.m_values.begin(), lhs.m_values.end(), rhs.m_values.begin(), rhs.m_values.end());}
inline ::CryptoPP::OID operator+(const ::CryptoPP::OID &lhs, unsigned long rhs)
{return ::CryptoPP::OID(lhs)+=rhs;}
+inline std::ostream& operator<<(std::ostream& out, const OID &oid)
+ { return oid.Print(out); }
#endif
NAMESPACE_END