| 66 | } |
| 67 | |
| 68 | void run(const u8 *data, size_t size) |
| 69 | { |
| 70 | struct hmac_sha256 expected; |
| 71 | u8 num_splits; |
| 72 | |
| 73 | if (size < 1) |
| 74 | return; |
| 75 | hmac_key_len = (size_t) data[0]; |
| 76 | ++data; --size; |
| 77 | |
| 78 | if (size < hmac_key_len) |
| 79 | return; |
| 80 | hmac_key = (unsigned char*) data; |
| 81 | data += hmac_key_len; size -= hmac_key_len; |
| 82 | |
| 83 | if (size < 1) |
| 84 | return; |
| 85 | num_splits = *data; |
| 86 | ++data; --size; |
| 87 | |
| 88 | /* Compute expected HMAC using the one-shot function. */ |
| 89 | hmac_sha256(&expected, hmac_key, hmac_key_len, data, size); |
| 90 | test_split_update(num_splits, &expected, data, size); |
| 91 | test_vs_openssl(&expected, data, size); |
| 92 | } |
| 93 |
nothing calls this directly
no test coverage detected