This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

求助关于c6748加密的问题



现在我的ini文件中已经设置bootExitType=securewithsk,可是我在执行setuserkey()函数中的resultval=SK——registerscwp()函数时总是返回的值和scw不相等是什么原因呢?

cek_kektest.rar
  • 看一下返回值到底是什么,对照下面说明,看是出的什么错。

    Syntax int SK_registerSCWP(scwp, numSC);
    Parameters int *scwp – pointer to an integer owned by the Operating System that tracks the current secure context.
    unsigned numSC – number of secure contexts into which the single secure stack block is divided
    Return Value SCWP, if no error
    SK_EPRIV if not called from supervisor privilege level
    SK_EINUSE if any secure contexts are currently allocated
    SK_EINVAL if scwp is not word-aligned
    SK_ECTX if numSC is bad (can only be 1, 2, 4 or 8)
    Constraints Must be called from supervisor privilege

  • 返回的是-1(#define SK_ESTACK -1 /* bad secure/non-secure stack */),例程是按照指导文档编写的。请问这个是什么原因引起的?