Skip to content
This repository was archived by the owner on Apr 14, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/crc.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <stdlib.h>
#include <assert.h>
#include "../libcryptoauth.h"
#include <arpa/inet.h>


const uint16_t crc_tab_8005_normal[256] = {
Expand Down Expand Up @@ -114,7 +115,7 @@ lca_calculate_crc16(const uint8_t *p, unsigned int length)
hibyte = lca_reverse_bits_in_byte(hibyte);
lobyte = lca_reverse_bits_in_byte(lobyte);

return lobyte << 8 | hibyte;
return ntohs(hibyte << 8 | lobyte);
}

bool
Expand Down
2 changes: 1 addition & 1 deletion src/ecdsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ lca_ecdsa_p256_verify (struct lca_octet_buffer pub_key,
" (ecdsa\n"
" (curve \"NIST P-256\")\n"
" (q %b)"
"))", pub_key.len, pub_key);
"))", pub_key.len, pub_key.ptr);

lca_print_sexp (g_pub_key);

Expand Down