Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ola_publickey

See ola_publickey.h

This module provides a set of primitives to manage public key certifcates (CAPK) used in EMV to support the Offline Data Authentication (ODA) process.

#include

Code Block
languagec
#include "ola.h"
#include <stdint.h>

--

tOlaPubKey

Code Block
languagec
typedef struct
{
    uint8_t rid[5];
    uint8_t idx[1];
    uint8_t modulusLen;
    uint8_t modulusValue[248];
    uint8_t exponentLen;
    uint8_t exponentValue[3];
    uint8_t expirDate[3];
} tOlaPubKey;

OLA’s CAPK definition.

ola_pubkey_flush

Code Block
void ola_pubkey_flush(void);

Reset L2 stack’s CAPK. Depending on OLA implementation, it corresponds to emptying CAPK files in flash or zeroing a specific structure in RAM. After that call, no CAPK are store by L2 stack.

ola_pubkey_add

Code Block
tOLAError ola_pubkey_add(
        const tOlaPubKey *key,
        const uint8_t *checksum
);

Add a CAPK into L2 stack’s. OLA Implementation creates a copy of key for further use. The checksum is optional (may be NULL) and corresponds to a SHA-1 of the tOlaPubKey instance refered by key.

ola_pubkey_find

Code Block
tOLAError ola_pubkey_find(
		tOlaPubKey *key,
        uint8_t *checksum
);

Look up for a specific CAPK. The checksum is optional (may be NULL) and corresponds to a SHA-1 of the tOlaPubKey instance refered by key.

ola_pubkey_get_next_id

Code Block
tOLAError ola_pubkey_get_next_id(
        uint8_t *idx,
        uint8_t *rid,
        int start
);

CAPK iterator. Use start = 1 to iterate from the beginning.

ola_pubkey_commit

Code Block
tOLAError ola_pubkey_commit(void);

Persist all previously added CAPK. Depending on OLA Implementation, it might be required to add all CAPK in a first step, then commit them in a second step for further use. This is typically dependent on L2 stack design.

ola_terminal

See ola_terminal.h

This module is not available from OLA 2.x version.

// Deprecated

N/A

N/A

...