Skip to content

Commit

Permalink
pkg/libcose: update to latest master
Browse files Browse the repository at this point in the history
  • Loading branch information
bergzand authored and kaspar030 committed Jul 17, 2019
1 parent f92297b commit f8d969c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 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.3.1
PKG_VERSION=8b5f651c3203682a2d98121cd3e5c844cb2b4c36
PKG_LICENSE=LGPL

.PHONY: all
Expand Down
2 changes: 1 addition & 1 deletion pkg/libcose/Makefile.dep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
USEPKG += cn-cbor
USEPKG += nanocbor

USEMODULE += libcose_crypt

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From 2d37e015c9fbf3711a7f931564983b20f2267da4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= <joakim.nohlgard@eistec.se>
Date: Tue, 15 May 2018 13:24:16 +0200
From ed69076abbe83ed256f1e1fbdf74726961c9071e Mon Sep 17 00:00:00 2001
From: Kaspar Schleiser <kaspar@schleiser.de>
Date: Fri, 5 Jul 2019 14:51:09 +0200
Subject: [PATCH] RIOT: Use RIOT random_bytes function instead of randombytes

---
src/crypt/hacl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/crypt/hacl.c b/src/crypt/hacl.c
index a16dbd7e30..cb4808d684 100644
index c24d751732..3bdcabf95e 100644
--- a/src/crypt/hacl.c
+++ b/src/crypt/hacl.c
@@ -18,10 +18,10 @@
@@ -19,10 +19,10 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
Expand All @@ -21,9 +21,9 @@ index a16dbd7e30..cb4808d684 100644
extern bool Hacl_Ed25519_verify(uint8_t *public, uint8_t *msg, uint32_t len1, uint8_t *signature);
-extern void randombytes(uint8_t *target, uint64_t n);

#ifdef CRYPTO_HACL_INCLUDE_CHACHAPOLY
int cose_crypto_aead_encrypt_chachapoly(uint8_t *c,
size_t *clen,
@@ -65,7 +65,7 @@ ssize_t cose_crypto_keygen_chachapoly(uint8_t *sk, size_t len)
@@ -67,7 +67,7 @@ COSE_ssize_t cose_crypto_keygen_chachapoly(uint8_t *sk, size_t len)
if (len < COSE_CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES) {
return COSE_ERR_NOMEM;
}
Expand All @@ -32,15 +32,15 @@ index a16dbd7e30..cb4808d684 100644
return COSE_CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES;
}

@@ -74,7 +74,7 @@ size_t cose_crypto_aead_nonce_chachapoly(uint8_t *nonce, size_t len)
@@ -76,7 +76,7 @@ size_t cose_crypto_aead_nonce_chachapoly(uint8_t *nonce, size_t len)
if (len < COSE_CRYPTO_AEAD_CHACHA20POLY1305_NONCEBYTES) {
return 0;
}
- randombytes(nonce, COSE_CRYPTO_AEAD_CHACHA20POLY1305_NONCEBYTES);
+ random_bytes(nonce, COSE_CRYPTO_AEAD_CHACHA20POLY1305_NONCEBYTES);
return COSE_CRYPTO_AEAD_CHACHA20POLY1305_NONCEBYTES;
}

#endif /* CRYPTO_HACL_INCLUDE_CHACHAPOLY */
--
2.17.0
2.22.0

0 comments on commit f8d969c

Please sign in to comment.