Code Drop Two (Update One)
This is the second code drop for the white-box api reference implementation and tests. This corrects the errors in the license white-box reference implementation and implements the remaining test cases. It should be noted that there is one test case missing, the test case for handling ChromeOS's unique policy settings. In order to make the tests easier to create and read, a license builder class was created and golden content and keys were wrapped in their own classes. How key errors are communicated was changed in the API. WB_RESULT_NO_SUCH_KEY and WB_RESULT_WRONG_KEY_TYPE were merged into WB_RESULT_KEY_UNAVAILABLE.
This commit is contained in:
15
api/result.h
15
api/result.h
@@ -29,23 +29,20 @@ typedef enum {
|
||||
// The message and signature did not pass signature verification.
|
||||
WB_RESULT_INVALID_SIGNATURE = 5,
|
||||
|
||||
// A key was requested that had not been loaded into the white-box.
|
||||
WB_RESULT_NO_SUCH_KEY = 6,
|
||||
|
||||
// A key was requested that was found in the white-box, but is being used
|
||||
// improperly.
|
||||
WB_RESULT_WRONG_KEY_TYPE = 7,
|
||||
// The request key is not available for the operations. For example, no key
|
||||
// exists for the given key id.
|
||||
WB_RESULT_KEY_UNAVAILABLE = 6,
|
||||
|
||||
// The requested key's security level is not sufficient for the operation.
|
||||
WB_RESULT_INSUFFICIENT_SECURITY_LEVEL = 8,
|
||||
WB_RESULT_INSUFFICIENT_SECURITY_LEVEL = 7,
|
||||
|
||||
// The input data failed to be verified. This may happen if the data was
|
||||
// corrupted or tampered.
|
||||
WB_RESULT_DATA_VERIFICATION_ERROR = 9,
|
||||
WB_RESULT_DATA_VERIFICATION_ERROR = 8,
|
||||
|
||||
// The padding at the end of the decrypted data does not match the
|
||||
// specification.
|
||||
WB_RESULT_INVALID_PADDING = 10,
|
||||
WB_RESULT_INVALID_PADDING = 9,
|
||||
} WB_Result;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user