Crate jpki

source ·

Structs

  • A struct represents a byte array. Dependents can read it from ptr to ptr+len, and should ignore about cap. ptr can be null pointer, so dependents must check the ptr is not null.

Functions

  • Closes the card.
  • Sign the computed digest using the key-pair for user authentication.
  • Closes the opened JPKI application.
  • Reads a certificate for user authentication. If ca is true, reads a CA certificate instead.
  • Reads a certificate for signing. PIN is required. If ca is true, reads a CA certificate instead.
  • Sign the computed digest using the key-pair for signing.
  • Initiates the libjpki library. Currently this occur no side effects, but it will be added in the future. So dependents should call this before using other functions.
  • Returns the latest error occurred before calling this function. If no error occurred before or failed to get the error, returns null pointer.
  • Creates a new card from the NFC card. This is an abstraction layer to support other protocols rather than NFC in the future.
  • Opens JPKI application on the card.
  • Creates a new NFC card delegate from the function pointer. This provided function will be called on transmitting APDU commands into the card.
  • Closes the NFC card.