This component does not do key management.
It is the calling application's responsibility to manage and provide the proper keys to this component. This method can be invoked many times to change the keys in use.
Note, that either pPublicKeyFile or pPrivateKeyFile parameters can be NULL depending on the value of the mode parameter to initialize. It is possible that a released product would not include its private key and only need its public key to verify its license file.
- Parameters
-
pPublicKey | [ in ] A pointer to a p6ICryptoKey interface containing the public key Can be NULL if mode == LICENSE_CREATE (i.e., used for calls to verifyLicenseFile). |
pPrivateKey | [ in ] A pointer to a private key Can be NULL if mode == LICENSE_VERIFY (i.e., used for calls to createLicenseFile). |
algorithm | [ in ] The type of signing algorthm to use to generate or verify the license. |
- Returns
Success | P6R::eOk | |
Failure | P6R::eNotInitialized | A successful call to initialize was not made before this call. |
P6R:eInvalidArg | m_mode is LICENSE_VERIFY and pPublicKeyFile is NULL, or m_mode is LICENSE_CREATE and pPrivateKeyFile is NULL. | |
P6R::eWrongKeyClass | P6R::CKC_PRIVATE and P6R::CKC_PUBLIC keys required |