author | Yifan Hong <elsk@google.com> | |
Tue, 12 Jun 2018 20:19:16 +0000 (13:19 -0700) | ||
committer | android-build-merger <android-build-merger@google.com> | |
Tue, 12 Jun 2018 20:19:16 +0000 (13:19 -0700) |
keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp | patch | blob | history | |
keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp | patch | blob | history |
diff --git a/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp b/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp
index 77fd6f7bf57a97a94392c434852f29508c28a003..70a5205b0345628627800d9537c72cf2df4d4726 100644 (file)
#include <iostream>
#include <openssl/evp.h>
+#include <openssl/mem.h>
#include <openssl/x509.h>
#include <android/hardware/keymaster/3.0/IKeymasterDevice.h>
char* cert_sub = X509_NAME_oneline(X509_get_subject_name(key_cert.get()), nullptr, 0);
EXPECT_STREQ("/CN=Android Keystore Key", cert_sub)
<< "Cert " << i << " has wrong subject. (Possibly b/38394614)";
- free(cert_sub);
+ OPENSSL_free(cert_sub);
}
- free(cert_issuer);
- free(signer_subj);
+ OPENSSL_free(cert_issuer);
+ OPENSSL_free(signer_subj);
if (dump_Attestations) std::cout << bin2hex(chain[i]) << std::endl;
}
diff --git a/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp b/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp
index bc33b2bfc2594be89ddf64c340fd32bc31bd86b1..202cf229f9a03209ee95c147a3d3a4c08866967a 100644 (file)
#include <iostream>
#include <openssl/evp.h>
+#include <openssl/mem.h>
#include <openssl/x509.h>
#include <cutils/properties.h>
char* cert_sub = X509_NAME_oneline(X509_get_subject_name(key_cert.get()), nullptr, 0);
EXPECT_STREQ("/CN=Android Keystore Key", cert_sub)
<< "Cert " << i << " has wrong subject.";
- free(cert_sub);
+ OPENSSL_free(cert_sub);
}
- free(cert_issuer);
- free(signer_subj);
+ OPENSSL_free(cert_issuer);
+ OPENSSL_free(signer_subj);
if (dump_Attestations) std::cout << bin2hex(chain[i]) << std::endl;
}