tools: print correct certificate in ndnsec cert-dump

refs #4323

Change-Id: I28a044b79a461c58acb5855ac32e1bfb649edd56
diff --git a/tools/ndnsec/cert-dump.cpp b/tools/ndnsec/cert-dump.cpp
index 60f57b1..436b399 100644
--- a/tools/ndnsec/cert-dump.cpp
+++ b/tools/ndnsec/cert-dump.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -146,7 +146,7 @@
         certificate = keyChain.getPib()
           .getIdentity(security::v2::extractIdentityFromCertName(name))
           .getKey(security::v2::extractKeyNameFromCertName(name))
-          .getDefaultCertificate();
+          .getCertificate(name);
       }
     }
     else {