fix compile issues

This commit is contained in:
Conor Patrick 2019-02-26 15:30:57 -05:00
parent 1ed7833c9f
commit 14974e0ebe
4 changed files with 8 additions and 7 deletions

View File

@ -91,10 +91,10 @@ int16_t extend_fido2(CredentialId * credid, uint8_t * output)
} }
} }
int16_t extend_u2f(struct u2f_request_apdu* req, uint32_t len) int16_t extend_u2f(APDU_HEADER * req, uint8_t * payload, uint32_t len)
{ {
struct u2f_authenticate_request * auth = (struct u2f_authenticate_request *) req->payload; struct u2f_authenticate_request * auth = (struct u2f_authenticate_request *) payload;
uint16_t rcode; uint16_t rcode;
if (req->ins == U2F_AUTHENTICATE) if (req->ins == U2F_AUTHENTICATE)

View File

@ -7,8 +7,9 @@
#ifndef EXTENSIONS_H_ #ifndef EXTENSIONS_H_
#define EXTENSIONS_H_ #define EXTENSIONS_H_
#include "u2f.h" #include "u2f.h"
#include "apdu.h"
int16_t extend_u2f(struct u2f_request_apdu* req, uint32_t len); int16_t extend_u2f(APDU_HEADER * req, uint8_t * payload, uint32_t len);
int16_t extend_fido2(CredentialId * credid, uint8_t * output); int16_t extend_fido2(CredentialId * credid, uint8_t * output);

View File

@ -43,7 +43,7 @@ void u2f_request_ex(APDU_HEADER *req, uint8_t *payload, uint32_t len, CTAP_RESPO
goto end; goto end;
} }
#ifdef ENABLE_U2F_EXTENSIONS #ifdef ENABLE_U2F_EXTENSIONS
rcode = extend_u2f(req, len); // FIXME rcode = extend_u2f(req, payload, len);
#endif #endif
if (rcode != U2F_SW_NO_ERROR && rcode != U2F_SW_CONDITIONS_NOT_SATISFIED) // If the extension didn't do anything... if (rcode != U2F_SW_NO_ERROR && rcode != U2F_SW_CONDITIONS_NOT_SATISFIED) // If the extension didn't do anything...
{ {

View File

@ -27,7 +27,7 @@
uint8_t REBOOT_FLAG = 0; uint8_t REBOOT_FLAG = 0;
void BOOT_boot(void) void BOOT_boot(void)
{ {
typedef void (*pFunction)(void); typedef void (*pFunction)(void);
@ -79,7 +79,7 @@ int main()
init_millisecond_timer(1); init_millisecond_timer(1);
#if DEBUG_LEVEL > 0 #if DEBUG_LEVEL > 0
init_debug_uart(); init_debug_uart();
#endif #endif
printf1(TAG_GEN,"init device\n"); printf1(TAG_GEN,"init device\n");
@ -118,7 +118,7 @@ int main()
} }
#ifdef SOLO_HACKER #ifdef SOLO_HACKER
start_bootloader: start_bootloader:
#endif
SystemClock_Config(); SystemClock_Config();
init_gpio(); init_gpio();
init_millisecond_timer(0); init_millisecond_timer(0);