Skip to content

Commit

Permalink
SDK/Speculos: bump versions
Browse files Browse the repository at this point in the history
*NB* the ledger-provided workflows always run on latest, so a new PR can occassionally fail, requiring this sort of PR to fix the issues.

For this particular bump, we fix:
- no longer refer to deprecated CX_APILEVEL constant. Ledger provide their own mechanism for preventing apps being sideloaded with incompatible versions.
- remove io_send_response_buffers <- which was integrated directly into the secure-sdk
  • Loading branch information
emturner committed Oct 11, 2023
1 parent e694e3e commit 8fd04f7
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
device: [nanos, nanosp, nanox, stax]
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:3.5.0
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:3.8.0
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ docker_speculos:
$(DOCKER) image tag $(LEDGERHQ)/speculos speculos

docker_ledger_app_builder:
$(DOCKER) pull $(LEDGERHQ)/ledger-app-builder/ledger-app-builder:3.5.0
$(DOCKER) image tag $(LEDGERHQ)/ledger-app-builder/ledger-app-builder:3.5.0 \
$(DOCKER) pull $(LEDGERHQ)/ledger-app-builder/ledger-app-builder:3.8.0
$(DOCKER) image tag $(LEDGERHQ)/ledger-app-builder/ledger-app-builder:3.8.0 \
ledger-app-builder

docker_ledger_app_ocaml:
Expand Down
13 changes: 6 additions & 7 deletions app/src/apdu_sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

#include "apdu.h"
#include "apdu_sign.h"
#include "compat.h"
#include "globals.h"
#include "handle_swap.h"
#include "keys.h"
Expand Down Expand Up @@ -196,12 +195,12 @@ refill(void)
PRINTF("[DEBUG] refill(errno: %s)\n",
tz_parser_result_name(st->errno));
// clang-format off
switch (st->errno) {
case TZ_BLO_IM_FULL: TZ_CHECK(refill_blo_im_full()); break;
case TZ_BLO_FEED_ME: TZ_CHECK(send_continue()); break;
case TZ_BLO_DONE: TZ_CHECK(refill_blo_done()); break;
default: TZ_CHECK(refill_error()); break;
}
switch (st->errno) {
case TZ_BLO_IM_FULL: TZ_CHECK(refill_blo_im_full()); break;
case TZ_BLO_FEED_ME: TZ_CHECK(send_continue()); break;
case TZ_BLO_DONE: TZ_CHECK(refill_blo_done()); break;
default: TZ_CHECK(refill_error()); break;
}
// clang-format on
} while (s2s
&& (st->errno == TZ_BLO_IM_FULL
Expand Down
25 changes: 0 additions & 25 deletions app/src/compat.h

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/handle_swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
#ifdef HAVE_SWAP

#include <format.h>
#include <io.h>
#include <swap.h>

#include "compat.h"
#include "handle_swap.h"
#include "keys.h"
#include "utils.h"
Expand Down
3 changes: 0 additions & 3 deletions app/src/parser/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
#include "os.h"
#include "os_io_seproxyhal.h"
#include "cx.h"
#if CX_APILEVEL < 8
#error "Only compiles with API level 8 or higher; requires newer firmware"
#endif
#else
#include <stdio.h>
#define PIC(x) ((void *)x)
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.integration-tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/ledgerhq/speculos:sha-6a34680
FROM ghcr.io/ledgerhq/speculos:sha-bced779

RUN apt update && \
apt install -y curl jq build-essential libsodium-dev git && \
Expand Down

0 comments on commit 8fd04f7

Please sign in to comment.