Fix missing compile-time guards around CID-only constants
diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function
index 0640779..9f80b1e 100644
--- a/tests/suites/test_suite_ssl.function
+++ b/tests/suites/test_suite_ssl.function
@@ -38,11 +38,16 @@
unsigned char *key0 = NULL, *key1 = NULL;
unsigned char iv_enc[16], iv_dec[16];
+#if defined(MBEDTLS_SSL_CID)
unsigned char cid0[ SSL_CID_LEN_MIN ];
unsigned char cid1[ SSL_CID_LEN_MIN ];
rnd_std_rand( NULL, cid0, sizeof( cid0 ) );
rnd_std_rand( NULL, cid1, sizeof( cid1 ) );
+#else
+ ((void) cid0_len);
+ ((void) cid1_len);
+#endif /* MBEDTLS_SSL_CID */
maclen = 0;
@@ -241,6 +246,7 @@
memcpy( &t_out->iv_dec, iv_enc, sizeof( iv_enc ) );
memcpy( &t_out->iv_enc, iv_dec, sizeof( iv_dec ) );
+#if defined(MBEDTLS_SSL_CID)
/* Add CID */
memcpy( &t_in->in_cid, cid0, cid0_len );
memcpy( &t_in->out_cid, cid1, cid1_len );
@@ -250,6 +256,7 @@
memcpy( &t_out->out_cid, cid0, cid0_len );
t_out->in_cid_len = cid1_len;
t_out->out_cid_len = cid0_len;
+#endif /* MBEDTLS_SSL_CID */
cleanup:
@@ -372,7 +379,9 @@
rec.type = 42;
rec.ver[0] = num_records;
rec.ver[1] = num_records;
+#if defined(MBEDTLS_SSL_CID)
rec.cid_len = 0;
+#endif /* MBEDTLS_SSL_CID */
rec.buf = buf;
rec.buf_len = buflen;
@@ -490,7 +499,9 @@
rec.ver[1] = offset;
rec.buf = buf;
rec.buf_len = buflen;
+#if defined(MBEDTLS_SSL_CID)
rec.cid_len = 0;
+#endif /* MBEDTLS_SSL_CID */
switch( mode )
{