Skip to content

Commit

Permalink
fixup! pkg/libcose: Add package for COSE
Browse files Browse the repository at this point in the history
  • Loading branch information
bergzand committed Apr 9, 2018
1 parent 4bfcd12 commit ad758cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion pkg/libcose/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PKG_NAME=libcose
PKG_URL=https://github.com/bergzand/libcose
PKG_VERSION=v0.2
PKG_VERSION=v0.2.1
PKG_LICENSE=LGPL

.PHONY: all
Expand Down
5 changes: 3 additions & 2 deletions tests/unittests/tests-libcose/tests-libcose.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
* Copyright (C) 2018 Freie Universität Berlin
* Copyright (C) 2018 Inria
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
Expand Down Expand Up @@ -121,8 +123,7 @@ static void test_libcose_01(void)

/* First signer */
printf("Payload added, generating keypair\n");
crypto_sign_keypair(pk, sk);
//cose_crypto_keypair_ed25519(pk, sk);
cose_crypto_keypair_ed25519(pk, sk);
printf("Keypair ready, building signer\n");
cose_key_init(&signer);
cose_key_set_keys(&signer, COSE_EC_CURVE_ED25519, COSE_ALGO_EDDSA, pk, NULL, sk);
Expand Down
15 changes: 2 additions & 13 deletions tests/unittests/tests-libcose/tests-libcose.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
* Copyright (C) 2018 Freie Universität Berlin
* Copyright (C) 2018 Inria
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
Expand All @@ -23,24 +25,11 @@
extern "C" {
#endif

/**
* @brief MANDATORY function for collecting random Bytes
* required by the tweetnacl package
*/
extern void randombytes(uint8_t *target, uint64_t n);

/**
* @brief The entry point of this test suite.
*/
void tests_libcose(void);

/**
* @brief Generates tests for libcose
*
* @return embUnit tests if successful, NULL if not.
*/
Test *tests_libcose_tests(void);

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit ad758cc

Please sign in to comment.