tests: Extend object_size test to marshal an RSA key OBJECT up to SFL 8

Extend the test with 2 more expected sizes for marhshalled RSA key
OBJECT for up to the current StateFormatLevel 8.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
Stefan Berger 2026-03-05 11:24:05 -05:00 committed by Stefan Berger
parent 2672049313
commit 2c2d6bd29c

View File

@ -78,8 +78,9 @@ int main(void)
.seedCompatLevel = 1,
};
#pragma GCC diagnostics pop
static const size_t exp_sizes[7] = {
0, 3284, 3284, 3284, 3284, 3284, 3288,
static const size_t exp_sizes[9] = {
/* SFL: 0 .. 5 */ 0 , 3284, 3284, 3284, 3284, 3284,
/* SFL: 6 .. 8 */ 3288, 3288, 3288,
};
BYTE buffer[2 * MAX_MARSHALLED_OBJECT_SIZE];
UINT32 stateFormatLevel;
@ -87,7 +88,9 @@ int main(void)
INT32 size;
BYTE *buf;
for (stateFormatLevel = 1; stateFormatLevel <= 6; stateFormatLevel++) {
for (stateFormatLevel = 1;
stateFormatLevel < ARRAY_SIZE(exp_sizes);
stateFormatLevel++) {
/* this buffer must only be filled to <= MAX_MARSHALLED_OBJECT_SIZE bytes */
buf = buffer;
size = sizeof(buffer);