security: Change in KeyChain creation API
Also, enabling creation of default public/private storages
Change-Id: I77e83b4a7f7e043dce372145d80366b7bc2eb3e0
diff --git a/src/security/identity/osx-private-key-storage.cpp b/src/security/identity/osx-private-key-storage.cpp
index f41f89f..fec7671 100644
--- a/src/security/identity/osx-private-key-storage.cpp
+++ b/src/security/identity/osx-private-key-storage.cpp
@@ -277,13 +277,19 @@
if (!signature) throw Error("Signature is NULL!\n");
- return Block(Tlv::SignatureValue, ptr_lib::make_shared<Buffer>(CFDataGetBytePtr(signature), CFDataGetLength(signature)));
+ return Block(Tlv::SignatureValue,
+ ptr_lib::make_shared<Buffer>(CFDataGetBytePtr(signature), CFDataGetLength(signature)));
}
void
OSXPrivateKeyStorage::sign(Data &data,
const Name& keyName, DigestAlgorithm digestAlgorithm/* = DIGEST_ALGORITHM_SHA256 */)
{
+ const uint8_t *begin = data.wireEncode().value();
+ const uint8_t *end = &*data.getSignature().getInfo().end();
+
+ data.setSignature
+ (sign(begin, end-begin, keyName, digestAlgorithm));
}
ConstBufferPtr