Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Removing U2F support (#18)
Browse files Browse the repository at this point in the history
* update filenames

* disabling U2F
  • Loading branch information
jleni authored Jun 21, 2020
1 parent d084568 commit cdd463e
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 27 deletions.
20 changes: 10 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
command: |
source /home/zondax/.cargo/env
cd /home/zondax/project
COIN=KSM_restricted make
COIN=Ledgeracio make
test_zemu:
machine:
Expand Down Expand Up @@ -87,12 +87,12 @@ jobs:
make
- run:
name: Rename installer
command: cp /home/zondax/project/app/pkg/zxtool.sh /home/zondax/project/app/pkg/install_KSM_app.sh
- run: /home/zondax/go/bin/ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace $(/home/zondax/project/app/pkg/zxtool.sh version) /home/zondax/project/app/pkg/install_KSM_app.sh
command: cp /home/zondax/project/app/pkg/zxtool.sh /home/zondax/project/app/pkg/install_app.sh
- run: /home/zondax/go/bin/ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace $(/home/zondax/project/app/pkg/zxtool.sh version) /home/zondax/project/app/pkg/install_app.sh
- run:
name: Rename elf
command: cp /home/zondax/project/app/bin/app.elf /home/zondax/project/app/bin/app_KSM.elf
- run: /home/zondax/go/bin/ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace $(/home/zondax/project/app/pkg/zxtool.sh version) /home/zondax/project/app/bin/app_KSM.elf
command: cp /home/zondax/project/app/bin/app.elf /home/zondax/project/app/bin/app.elf
- run: /home/zondax/go/bin/ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace $(/home/zondax/project/app/pkg/zxtool.sh version) /home/zondax/project/app/bin/app.elf

build_package_ledgeracio:
docker:
Expand All @@ -108,15 +108,15 @@ jobs:
command: |
source /home/zondax/.cargo/env
cd /home/zondax/project
COIN=KSM_restricted make
COIN=Ledgeracio make
- run:
name: Rename installer
command: cp /home/zondax/project/app/pkg/zxtool.sh /home/zondax/project/app/pkg/install_KSM_ledgeracio_app.sh
- run: /home/zondax/go/bin/ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace $(/home/zondax/project/app/pkg/zxtool.sh version) /home/zondax/project/app/pkg/install_KSM_ledgeracio_app.sh
command: cp /home/zondax/project/app/pkg/zxtool.sh /home/zondax/project/app/pkg/install_ledgeracio_app.sh
- run: /home/zondax/go/bin/ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace $(/home/zondax/project/app/pkg/zxtool.sh version) /home/zondax/project/app/pkg/install_ledgeracio_app.sh
- run:
name: Rename elf
command: cp /home/zondax/project/app/bin/app.elf /home/zondax/project/app/bin/app_KSM_ledgeracio.elf
- run: /home/zondax/go/bin/ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace $(/home/zondax/project/app/pkg/zxtool.sh version) /home/zondax/project/app/bin/app_KSM_ledgeracio.elf
command: cp /home/zondax/project/app/bin/app.elf /home/zondax/project/app/bin/app_ledgeracio.elf
- run: /home/zondax/go/bin/ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace $(/home/zondax/project/app/pkg/zxtool.sh version) /home/zondax/project/app/bin/app_ledgeracio.elf

workflows:
version: 2
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ file(GLOB_RECURSE LIB_SRC
${CMAKE_CURRENT_SOURCE_DIR}/app/src/parser.c
${CMAKE_CURRENT_SOURCE_DIR}/app/src/parser_impl.c
${CMAKE_CURRENT_SOURCE_DIR}/app/src/parser_txdef.c
${CMAKE_CURRENT_SOURCE_DIR}/app/src/polkadot_types.c
${CMAKE_CURRENT_SOURCE_DIR}/app/src/polkadot_dispatch.c
${CMAKE_CURRENT_SOURCE_DIR}/app/src/substrate_types.c
${CMAKE_CURRENT_SOURCE_DIR}/app/src/substrate_dispatch.c
${CMAKE_CURRENT_SOURCE_DIR}/app/src/lib/base58.c
${CMAKE_CURRENT_SOURCE_DIR}/app/src/lib/uint256.c
)
Expand Down
8 changes: 2 additions & 6 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ DEFINES += APP_STANDARD
APPNAME = "Kusama"
APPPATH = "44'/434'"

else ifeq ($(COIN),KSM_restricted)
else ifeq ($(COIN),Ledgeracio)
DEFINES += APP_RESTRICTED
APPNAME = "Kusama_sec"
APPPATH = "44'/434'"
Expand Down Expand Up @@ -96,10 +96,7 @@ DEFINES += HAVE_IO_USB HAVE_L4_USBLIB IO_USB_MAX_ENDPOINTS=7 IO_HID_EP_LEN

DEFINES += LEDGER_MAJOR_VERSION=$(APPVERSION_M) LEDGER_MINOR_VERSION=$(APPVERSION_N) LEDGER_PATCH_VERSION=$(APPVERSION_P)

DEFINES += HAVE_U2F HAVE_IO_U2F
DEFINES += U2F_PROXY_MAGIC=\"KSM\"
DEFINES += USB_SEGMENT_SIZE=64
DEFINES += U2F_MAX_MESSAGE_SIZE=264 #257+5+2
DEFINES += HAVE_BOLOS_APP_STACK_CANARY

DEFINES += HAVE_WEBUSB WEBUSB_URL_SIZE_B=0 WEBUSB_URL=""
Expand All @@ -117,7 +114,6 @@ DEFINES += HAVE_BAGL_FONT_OPEN_SANS_LIGHT_16PX
DEFINES += HAVE_UX_FLOW

#SDK_SOURCE_PATH += lib_blewbxx lib_blewbxx_impl
SDK_SOURCE_PATH += lib_ux
else
# Assume Nano S
DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=128
Expand Down Expand Up @@ -199,4 +195,4 @@ dep/%.d: %.c Makefile

listvariants:
@echo VARIANTS COIN KSM
@echo VARIANTS COIN KSM_restricted
@echo VARIANTS COIN Ledgeracio
2 changes: 1 addition & 1 deletion app/Makefile.version
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
APPVERSION_M=1
APPVERSION_N=2008
APPVERSION_P=2
APPVERSION_P=3
4 changes: 2 additions & 2 deletions app/src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
#include <stdio.h>
#include <zxmacros.h>
#include "parser.h"
#include "polkadot_dispatch.h"
#include "substrate_dispatch.h"

#if defined(APP_RESTRICTED)
#include "coin.h"
#include "crypto.h"
#include "polkadot_methods.h"
#include "substrate_methods.h"
#endif

#define FIELD_FIXED_TOTAL_COUNT 7
Expand Down
2 changes: 1 addition & 1 deletion app/src/parser_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "parser_impl.h"
#include "parser_txdef.h"
#include "coin.h"
#include "polkadot_dispatch.h"
#include "substrate_dispatch.h"
#include "crypto.h"
#include "bignum.h"

Expand Down
2 changes: 1 addition & 1 deletion app/src/parser_txdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extern "C" {

#include <stdint.h>
#include <stddef.h>
#include "polkadot_types.h"
#include "substrate_types.h"

typedef struct {
pd_CallIndex_t callIndex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
********************************************************************************/
#include "polkadot_dispatch.h"
#include "substrate_dispatch.h"

#include <stdint.h>
#include "zxmacros.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ extern "C" {
#include <stdint.h>
#include <stddef.h>
#include "parser_common.h"
#include "polkadot_types.h"
#include "substrate_types.h"

#define CHECK_ERROR(FUNC_CALL) { parser_error_t err = FUNC_CALL; if (err != parser_ok) return err; }

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion app/src/polkadot_types.c → app/src/substrate_types.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
********************************************************************************/
#include "polkadot_dispatch.h"
#include "substrate_dispatch.h"
#include "parser_impl.h"
#include "bignum.h"

Expand Down
2 changes: 1 addition & 1 deletion app/src/polkadot_types.h → app/src/substrate_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ parser_error_t _toStringu8_array_32(
uint8_t *pageCount);


#include "polkadot_methods.h"
#include "substrate_methods.h"

#ifdef __cplusplus
}
Expand Down

0 comments on commit cdd463e

Please sign in to comment.