aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-12-04 08:11:13 -0500
committerJack Lloyd <[email protected]>2018-12-04 08:11:13 -0500
commit422ade7dc74a3221110fc2a173fc22f2e2cc235c (patch)
treeaf676105acd789f2abcf25e7ba27e895332257d7 /src/lib
parent358716e869b6ad7a29e69eb68efcb343efa6e345 (diff)
parente7efc94ddc8dda6101d38870b44e4bcda6371be1 (diff)
Merge GH #1767 Switch Travis builds to Xenial
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/prov/openssl/openssl_ec.cpp8
-rw-r--r--src/lib/utils/cpuid/cpuid_ppc.cpp4
2 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/prov/openssl/openssl_ec.cpp b/src/lib/prov/openssl/openssl_ec.cpp
index 026dfa5e0..53ed081a1 100644
--- a/src/lib/prov/openssl/openssl_ec.cpp
+++ b/src/lib/prov/openssl/openssl_ec.cpp
@@ -328,20 +328,22 @@ class OpenSSL_ECDH_KA_Operation final : public PK_Ops::Key_Agreement_with_KDF
const EC_GROUP* group = ::EC_KEY_get0_group(m_ossl_ec.get());
const size_t out_len = (::EC_GROUP_get_degree(group) + 7) / 8;
secure_vector<uint8_t> out(out_len);
- EC_POINT* pub_key = ::EC_POINT_new(group);
+
+ std::unique_ptr<EC_POINT, std::function<void (EC_POINT*)>> pub_key(
+ ::EC_POINT_new(group), ::EC_POINT_free);
if(!pub_key)
throw OpenSSL_Error("EC_POINT_new", ERR_get_error());
const int os2ecp_rc =
- ::EC_POINT_oct2point(group, pub_key, w, w_len, nullptr);
+ ::EC_POINT_oct2point(group, pub_key.get(), w, w_len, nullptr);
if(os2ecp_rc != 1)
throw OpenSSL_Error("EC_POINT_oct2point", ERR_get_error());
const int ecdh_rc = ::ECDH_compute_key(out.data(),
out.size(),
- pub_key,
+ pub_key.get(),
m_ossl_ec.get(),
/*KDF*/nullptr);
diff --git a/src/lib/utils/cpuid/cpuid_ppc.cpp b/src/lib/utils/cpuid/cpuid_ppc.cpp
index 43b684785..80a6241df 100644
--- a/src/lib/utils/cpuid/cpuid_ppc.cpp
+++ b/src/lib/utils/cpuid/cpuid_ppc.cpp
@@ -98,8 +98,10 @@ uint64_t CPUID::detect_cpu_features(size_t* cache_line_size)
0x003E, // IBM POWER6
0x003F, // IBM POWER7
0x004A, // IBM POWER7p
- 0x004D, // IBM POWER8
0x004B, // IBM POWER8E
+ 0x004C, // IBM POWER8 NVL
+ 0x004D, // IBM POWER8
+ 0x004E, // IBM POWER9
0x000C, // G4-7400
0x0039, // G5 970
0x003C, // G5 970FX