Enable ECDH + some minor fixes

This commit is contained in:
Yuriy Glukhov 2018-03-15 20:34:55 +02:00
parent 089b0395dd
commit 2c3571598b
3 changed files with 9 additions and 4 deletions

View File

@ -4,6 +4,7 @@ from os import DirSep
const wrapperPath = currentSourcePath.rsplit(DirSep, 1)[0] & "/secp256k1_wrapper"
{.passC: "-I" & wrapperPath .}
{.passC: "-I" & wrapperPath & "/secp256k1".}
{.passC: "-I" & wrapperPath & "/secp256k1/src".}
{.passC: "-DHAVE_CONFIG_H".}
const secpSrc = wrapperPath & "/secp256k1/src/secp256k1.c"

10
secp256k1_wrapper/gen.sh Normal file → Executable file
View File

@ -1,9 +1,13 @@
#!/bin/sh
set -e
THIS_DIR=$(dirname "$0")
cd $THIS_DIR/secp256k1
./autogen.sh
./configure
./configure --enable-module-ecdh --enable-module-recovery --enable-experimental
make src/ecmult_static_context.h
cp src/ecmult_static_context.h "$THIS_DIR"
cp src/libsecp256k1-config.h "$THIS_DIR"
cd -
cp secp256k1/src/ecmult_static_context.h "$THIS_DIR"
cp secp256k1/src/libsecp256k1-config.h "$THIS_DIR"

View File

@ -12,7 +12,7 @@
/* #undef COVERAGE */
/* Define this symbol to enable the ECDH module */
/* #undef ENABLE_MODULE_ECDH */
#define ENABLE_MODULE_ECDH 1
/* Define this symbol to enable the ECDSA pubkey recovery module */
#define ENABLE_MODULE_RECOVERY 1