security: Enable exporting/importing ECDSA key
Change-Id: I58f722337f26cad4eb6a3c83d883814efc4ed8df
Refs: #1660
diff --git a/src/encoding/oid.hpp b/src/encoding/oid.hpp
index 7da47a6..d5f99ca 100644
--- a/src/encoding/oid.hpp
+++ b/src/encoding/oid.hpp
@@ -35,14 +35,17 @@
class OID
{
public:
- OID ()
+ OID()
{
}
+ explicit
OID(const char* oid);
+ explicit
OID(const std::string& oid);
+ explicit
OID(const std::vector<int>& oid)
: m_oid(oid)
{
@@ -55,19 +58,22 @@
}
void
- setIntegerList(const std::vector<int>& value){
+ setIntegerList(const std::vector<int>& value)
+ {
m_oid = value;
}
std::string
toString() const;
- bool operator == (const OID& oid) const
+ bool
+ operator==(const OID& oid) const
{
return equal(oid);
}
- bool operator != (const OID& oid) const
+ bool
+ operator!=(const OID& oid) const
{
return !equal(oid);
}
@@ -90,6 +96,15 @@
std::vector<int> m_oid;
};
+namespace oid {
+//crypto algorithm
+extern const OID RSA;
+extern const OID ECDSA;
+
+//certificate entries
+extern const OID ATTRIBUTE_NAME;
+}
+
}
#endif // NDN_ENCODING_OID_HPP