2
0
mirror of synced 2025-02-20 17:38:13 +00:00

Merge pull request #3 from yglukhov/enable-ecdh

Enable ECDH + some minor fixes
This commit is contained in:
Eugene Kabanov 2018-03-15 20:37:28 +02:00 committed by GitHub
commit e0f371e770
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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