Der encoding: in PublicKeyVisitor, restore the use of dynamic_pointer_cast.
diff --git a/src/encoding/der/visitor/public-key-visitor.cpp b/src/encoding/der/visitor/public-key-visitor.cpp
index d5b6e3e..a2eab56 100644
--- a/src/encoding/der/visitor/public-key-visitor.cpp
+++ b/src/encoding/der/visitor/public-key-visitor.cpp
@@ -24,7 +24,7 @@
DerNodePtrList& children = derSeq.getChildren();
SimpleVisitor simpleVisitor;
- shared_ptr<DerSequence> algoSeq = static_cast<shared_ptr<DerSequence> >(children[0]);
+ shared_ptr<DerSequence> algoSeq = dynamic_pointer_cast<DerSequence>(children[0]);
OID algorithm = ndnboost::any_cast<OID>(algoSeq->getChildren()[0]->accept(simpleVisitor));
Blob raw = derSeq.getRaw();
return ndnboost::any(shared_ptr<PublicKey>(new PublicKey(algorithm, raw)));