Skip to content

Commit

Permalink
Include public module headers when compiling modules.
Browse files Browse the repository at this point in the history
Also fix the nullness requirements for schnorr nonce-pair generation.
  • Loading branch information
gmaxwell committed Sep 24, 2015
1 parent 1f41437 commit 4e64608
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/secp256k1_schnorr.h
Expand Up @@ -94,7 +94,7 @@ int secp256k1_schnorr_generate_nonce_pair(
const unsigned char *sec32,
secp256k1_nonce_function noncefp,
const void* noncedata
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(6) SECP256K1_ARG_NONNULL(7);
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);

/** Produce a partial Schnorr signature, which can be combined using
* secp256k1_schnorr_partial_combine, to end up with a full signature that is
Expand Down
1 change: 1 addition & 0 deletions src/modules/ecdh/main_impl.h
Expand Up @@ -7,6 +7,7 @@
#ifndef _SECP256K1_MODULE_ECDH_MAIN_
#define _SECP256K1_MODULE_ECDH_MAIN_

#include "include/secp256k1_ecdh.h"
#include "ecmult_const_impl.h"

int secp256k1_ecdh(const secp256k1_context* ctx, unsigned char *result, const secp256k1_pubkey *point, const unsigned char *scalar) {
Expand Down
1 change: 1 addition & 0 deletions src/modules/schnorr/main_impl.h
Expand Up @@ -7,6 +7,7 @@
#ifndef SECP256K1_MODULE_SCHNORR_MAIN
#define SECP256K1_MODULE_SCHNORR_MAIN

#include "include/secp256k1_schnorr.h"
#include "modules/schnorr/schnorr_impl.h"

static void secp256k1_schnorr_msghash_sha256(unsigned char *h32, const unsigned char *r32, const unsigned char *msg32) {
Expand Down
4 changes: 2 additions & 2 deletions src/modules/schnorr/schnorr.h
Expand Up @@ -4,8 +4,8 @@
* file COPYING or http://www.opensource.org/licenses/mit-license.php. *
***********************************************************************/

#ifndef _SECP256K1_SCHNORR_
#define _SECP256K1_SCHNORR_
#ifndef _SECP256K1_MODULE_SCHNORR_H_
#define _SECP256K1_MODULE_SCHNORR_H_

#include "scalar.h"
#include "group.h"
Expand Down
2 changes: 2 additions & 0 deletions src/modules/schnorr/tests_impl.h
Expand Up @@ -7,6 +7,8 @@
#ifndef SECP256K1_MODULE_SCHNORR_TESTS
#define SECP256K1_MODULE_SCHNORR_TESTS

#include "include/secp256k1_schnorr.h"

void test_schnorr_end_to_end(void) {
unsigned char privkey[32];
unsigned char message[32];
Expand Down

0 comments on commit 4e64608

Please sign in to comment.