Skip to content

Commit f5c073f

Browse files
Fix PKI include
1 parent 0b93e27 commit f5c073f

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

src/ledger_pki.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#include "apdu_constants.h"
22
#include "public_keys.h"
3-
#ifdef HAVE_LEDGER_PKI
4-
#include "os_pki.h"
5-
#endif
63

74
#define KEY_USAGE_STR(x) \
85
(x == CERTIFICATE_PUBLIC_KEY_USAGE_GENUINE_CHECK ? "GENUINE_CHECK" \

src/public_keys.h

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
********************************************************************************/
1717

1818
#pragma once
19+
1920
#include <stdint.h>
21+
#ifdef HAVE_LEDGER_PKI
22+
#include "os_pki.h"
23+
#endif
2024

2125
static const uint8_t LEDGER_SIGNATURE_PUBLIC_KEY[] = {
2226
#if defined(HAVE_CAL_TEST_KEY)
@@ -105,13 +109,13 @@ static const uint8_t LEDGER_NFT_SELECTOR_PUBLIC_KEY[] = {
105109
#endif
106110
};
107111

108-
extern int check_signature_with_pubkey(const char *tag,
109-
uint8_t *buffer,
110-
const uint8_t bufLen,
111-
const uint8_t *PubKey,
112-
const uint8_t keyLen,
112+
int check_signature_with_pubkey(const char *tag,
113+
uint8_t *buffer,
114+
const uint8_t bufLen,
115+
const uint8_t *PubKey,
116+
const uint8_t keyLen,
113117
#ifdef HAVE_LEDGER_PKI
114-
const uint8_t keyUsageExp,
118+
const uint8_t keyUsageExp,
115119
#endif
116-
uint8_t *signature,
117-
const uint8_t sigLen);
120+
uint8_t *signature,
121+
const uint8_t sigLen);

0 commit comments

Comments
 (0)