Remove use of UniquePtr from keystore
Remove UniquePtr from keystore in favour of std::unique_ptr
Change-Id: I8e02adab4326028e26dbf59ac836679abe2a40de
diff --git a/keystore/keystore.cpp b/keystore/keystore.cpp
index bc2e0dc..130a30e 100644
--- a/keystore/keystore.cpp
+++ b/keystore/keystore.cpp
@@ -647,7 +647,7 @@
struct BIO_Delete {
void operator()(BIO* p) const { BIO_free(p); }
};
-typedef UniquePtr<BIO, BIO_Delete> Unique_BIO;
+typedef std::unique_ptr<BIO, BIO_Delete> Unique_BIO;
ResponseCode KeyStore::importBlobAsKey(Blob* blob, const char* filename, uid_t uid) {
// We won't even write to the blob directly with this BIO, so const_cast is okay.
@@ -670,7 +670,7 @@
return ResponseCode::SYSTEM_ERROR;
}
- UniquePtr<unsigned char[]> pkcs8key(new unsigned char[len]);
+ std::unique_ptr<unsigned char[]> pkcs8key(new unsigned char[len]);
uint8_t* tmp = pkcs8key.get();
if (i2d_PKCS8_PRIV_KEY_INFO(pkcs8.get(), &tmp) != len) {
ALOGE("Couldn't convert to PKCS#8");