security+examples+tests: Updating examples and tests for the updated security API
Change-Id: Ie3f37bf3d0002a35333812b0dec582e7d3567d42
diff --git a/examples/producer.cpp b/examples/producer.cpp
index bfff287..d7d1048 100644
--- a/examples/producer.cpp
+++ b/examples/producer.cpp
@@ -84,7 +84,7 @@
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));
+ keyChain_.addCertificateAsDefault(*keyChain_.selfSign(keyName));
}
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
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];
diff --git a/tests/test-publish-async.cpp b/tests/test-publish-async.cpp
index 4f4ede7..a57a857 100644
--- a/tests/test-publish-async.cpp
+++ b/tests/test-publish-async.cpp
@@ -126,7 +126,7 @@
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));
+ keyChain.addCertificateAsDefault(*keyChain.selfSign(keyName));
Echo echo(keyChain, face);