diff --git a/src/jamidht/eth/libdevcore/FixedHash.h b/src/jamidht/eth/libdevcore/FixedHash.h index d6347aa75cd47dc39129cbd292c5671999cb9d13..29b2602a2f6d7fadd9b401c7eadbebb47e6c0e7f 100644 --- a/src/jamidht/eth/libdevcore/FixedHash.h +++ b/src/jamidht/eth/libdevcore/FixedHash.h @@ -332,6 +332,9 @@ public: ConstructFromHashType _t = FixedHash<T>::AlignLeft) : FixedHash<T>(_h, _t) {} + SecureFixedHash(SecureFixedHash<T> const& _h) + : FixedHash<T>(_h.makeInsecure()) + {} template<unsigned M> explicit SecureFixedHash(SecureFixedHash<M> const& _h, ConstructFromHashType _t = FixedHash<T>::AlignLeft) diff --git a/src/jamidht/eth/libdevcrypto/Common.cpp b/src/jamidht/eth/libdevcrypto/Common.cpp index 9a38eb209fc15ce41771813a728af9f00eff7818..a1999af20a0466808dc772ffdf8ffa9a8138a575 100644 --- a/src/jamidht/eth/libdevcrypto/Common.cpp +++ b/src/jamidht/eth/libdevcrypto/Common.cpp @@ -33,9 +33,11 @@ namespace { secp256k1_context const* getCtx() { - static std::unique_ptr<secp256k1_context, decltype(&secp256k1_context_destroy)> - s_ctx {secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY), - &secp256k1_context_destroy}; + struct secp256k1Deleter { + void operator()(secp256k1_context* b) { secp256k1_context_destroy(b); } + }; + static std::unique_ptr<secp256k1_context, secp256k1Deleter> + s_ctx(secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY)); return s_ctx.get(); }