From 067050b2ebc1dc61d28ff01f8e5455947a57d01e Mon Sep 17 00:00:00 2001 From: Lukasz Rymanowski Date: Thu, 29 May 2014 15:49:39 +0200 Subject: [PATCH] shared/crypto: Fix byte order of sign counter added to signature --- src/shared/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/crypto.c b/src/shared/crypto.c index b50baa5ae..d4c4cc7dd 100644 --- a/src/shared/crypto.c +++ b/src/shared/crypto.c @@ -301,7 +301,7 @@ bool bt_crypto_sign_att(struct bt_crypto *crypto, const uint8_t key[16], * As to BT spec. 4.1 Vol[3], Part C, chapter 10.4.1 sign counter should * be placed in the signature */ - put_le32(sign_cnt, out + 8); + put_be32(sign_cnt, out + 8); /* * The most significant octet of hash corresponds to out[0] - swap it. -- 2.47.3