security+examples+tests: Updating examples and tests for the updated security API

Change-Id: Ie3f37bf3d0002a35333812b0dec582e7d3567d42
diff --git a/tests/test-encode-decode-benchmark.cpp b/tests/test-encode-decode-benchmark.cpp
index f68502d..b4e227f 100644
--- a/tests/test-encode-decode-benchmark.cpp
+++ b/tests/test-encode-decode-benchmark.cpp
@@ -153,8 +153,8 @@
                                           DEFAULT_PUBLIC_KEY_DER, sizeof(DEFAULT_PUBLIC_KEY_DER),
                                           DEFAULT_PRIVATE_KEY_DER, sizeof(DEFAULT_PRIVATE_KEY_DER));
 
-  keyChain.identities().addCertificateAsDefault(*keyChain.identities().selfSign(keyName));
-  Name certificateName = keyChain.identities().getDefaultCertificateName();
+  keyChain.addCertificateAsDefault(*keyChain.selfSign(keyName));
+  Name certificateName = keyChain.getDefaultCertificateName();
   
   // Set up publisherPublicKeyDigest and signatureBits in case useCrypto is false.
   uint8_t signatureBitsArray[128];