1 /* 2 * This file and its contents are supplied under the terms of the 3 * Common Development and Distribution License (), version 1.0. 4 * You may only use this file in accordance with the terms of version 5 * 1.0 of the CDDL. 6 * 7 * A full copy of the text of the CDDL should have accompanied this 8 * source. A copy of the CDDL is also available via the Internet at 9 * http://www.illumos.org/license/CDDL. 10 */ 11 12 /* 13 * Copyright 2025 RackTop Systems, Inc. 14 */ 15 16 #include <sys/crypto/ioctl.h> 17 #include <sys/sha2.h> 18 19 #include "hmac_sha2_data.h" 20 21 /* 22 * Arrays of tests. 23 */ 24 25 uint8_t *DATA[] = { DATA0, DATA1, DATA2, DATA3, DATA4, DATA5, DATA6 }; 26 27 size_t DATALEN[] = { 28 sizeof (DATA0), sizeof (DATA1), sizeof (DATA2), sizeof (DATA3), 29 sizeof (DATA4), sizeof (DATA5), sizeof (DATA6) 30 }; 31 32 uint8_t *KEY[] = { KEY0, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6 }; 33 34 size_t KEYLEN[] = { 35 sizeof (KEY0), sizeof (KEY1), sizeof (KEY2), sizeof (KEY3), 36 sizeof (KEY4), sizeof (KEY5), sizeof (KEY6) 37 }; 38 39 uint8_t *HMAC[] = { HMAC0, HMAC1, HMAC2, HMAC3, HMAC4, HMAC5, HMAC6 }; 40 41 char *mechname = SUN_CKM_SHA256_HMAC; 42 size_t msgcount = 7; 43 size_t hmac_len = SHA256_DIGEST_LENGTH; 44