keystore_lib/src/util/ksutil.cpp
int cmdUnload(char *argv[])
{
  int arg, res;
  uint8_t clientTicket[KEYSTORE_CLIENT_TICKET_SIZE];
  uint32_t slotId;

  /* arg 1: client_ticket */
  arg = 0;

  res = readDataFromFile(argv[arg], clientTicket, sizeof(clientTicket));
  if (errRead(res, sizeof(clientTicket), argv[arg]))
    return res;

  /* arg 2: slot_id */
  arg++;
  slotId = 0;
  res = readNumFromFile(argv[arg], &slotId);
  if (errReadNum(res, argv[arg]))
  {
    return res;
  }

  /* api: unloadKey */
  ksutilHexdump("clientTicket", clientTicket, sizeof(clientTicket));
  ksutilHexdump("slotId", &slotId, sizeof(slotId));
  res = ias_keystore_unload_key(clientTicket, slotId);

  ks_fprintf(stderr, "unloadKey result: %d\n", res);

  errApi(res, "unloadKey");

  return res;
}
/*
 * Unload key from keystore
 * @param argv arguments entry use ksutil to get more info
 * @return 0 on success or error code
 */
Unload key from keystore
@param argv arguments entry use ksutil to get more info
@return 0 on success or error code
Unload key from keystore @param argv arguments entry use ksutil to get more info @return 0 on success or error code
int cmdUnload(char *argv[])
{
  int arg, res;
  uint8_t clientTicket[KEYSTORE_CLIENT_TICKET_SIZE];
  uint32_t slotId;
  arg = 0;
  res = readDataFromFile(argv[arg], clientTicket, sizeof(clientTicket));
  if (errRead(res, sizeof(clientTicket), argv[arg]))
    return res;
  arg++;
  slotId = 0;
  res = readNumFromFile(argv[arg], &slotId);
  if (errReadNum(res, argv[arg]))
  {
    return res;
  }
  ksutilHexdump("clientTicket", clientTicket, sizeof(clientTicket));
  ksutilHexdump("slotId", &slotId, sizeof(slotId));
  res = ias_keystore_unload_key(clientTicket, slotId);
  ks_fprintf(stderr, "unloadKey result: %d\n", res);
  errApi(res, "unloadKey");
  return res;
}
int cmdUnload ( char * argv [ ] ) { int arg , res ; uint8_t clientTicket [ KEYSTORE_CLIENT_TICKET_SIZE ] ; uint32_t slotId ; arg = 0 ; res = readDataFromFile ( argv [ arg ] , clientTicket , sizeof ( clientTicket ) ) ; if ( errRead ( res , sizeof ( clientTicket ) , argv [ arg ] ) ) return res ; arg ++ ; slotId = 0 ; res = readNumFromFile ( argv [ arg ] , & slotId ) ; if ( errReadNum ( res , argv [ arg ] ) ) { return res ; } ksutilHexdump ( " " , clientTicket , sizeof ( clientTicket ) ) ; ksutilHexdump ( " " , & slotId , sizeof ( slotId ) ) ; res = ias_keystore_unload_key ( clientTicket , slotId ) ; ks_fprintf ( stderr , " \n " , res ) ; errApi ( res , " " ) ; return res ; }
Unload key from keystore
 @param argv arguments entry use ksutil to get more info
 @return 0 on success or error code
Unload key from keystore @param argv arguments entry use ksutil to get more info @return 0 on success or error code
/* arg 1: client_ticket */ /* arg 2: slot_id */ /* api: unloadKey */