@@ -129,7 +129,7 @@ int mbedtls_aes_ecb_test_mbedos(int verbose)
129
129
* there is an alternative underlying implementation i.e. when
130
130
* MBEDTLS_AES_ALT is defined.
131
131
*/
132
- if (ret == MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE && keybits == 192 ) {
132
+ if (ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED ) {
133
133
printf (" skipped\n " );
134
134
continue ;
135
135
} else if (ret != 0 ) {
@@ -138,7 +138,11 @@ int mbedtls_aes_ecb_test_mbedos(int verbose)
138
138
139
139
for (int j = 0 ; j < 10000 ; j++) {
140
140
ret = mbedtls_aes_crypt_ecb (&ctx, mode, buf, buf);
141
- if (ret != 0 ) {
141
+ if (ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED)
142
+ {
143
+ break ;
144
+ }
145
+ else if (ret != 0 ) {
142
146
goto exit;
143
147
}
144
148
}
@@ -205,7 +209,7 @@ int mbedtls_aes_cbc_test_mbedos(int verbose)
205
209
* there is an alternative underlying implementation i.e. when
206
210
* MBEDTLS_AES_ALT is defined.
207
211
*/
208
- if (ret == MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE && keybits == 192 ) {
212
+ if (ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED ) {
209
213
printf (" skipped\n " );
210
214
continue ;
211
215
} else if (ret != 0 ) {
@@ -222,7 +226,11 @@ int mbedtls_aes_cbc_test_mbedos(int verbose)
222
226
}
223
227
224
228
ret = mbedtls_aes_crypt_cbc (&ctx, mode, 16 , iv, buf, buf);
225
- if (ret != 0 ) {
229
+ if (ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED)
230
+ {
231
+ break ;
232
+ }
233
+ else if (ret != 0 ) {
226
234
goto exit;
227
235
}
228
236
@@ -356,7 +364,7 @@ int mbedtls_aes_cfb_test_mbedos(int verbose)
356
364
* there is an alternative underlying implementation i.e. when
357
365
* MBEDTLS_AES_ALT is defined.
358
366
*/
359
- if (ret == MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE && keybits == 192 ) {
367
+ if (ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED ) {
360
368
printf (" skipped\n " );
361
369
continue ;
362
370
} else if (ret != 0 ) {
@@ -372,7 +380,11 @@ int mbedtls_aes_cfb_test_mbedos(int verbose)
372
380
}
373
381
374
382
ret = mbedtls_aes_crypt_cfb128 (&ctx, mode, 64 , &offset, iv, buf, buf);
375
- if (ret != 0 ) {
383
+ if (ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED)
384
+ {
385
+ break ;
386
+ }
387
+ else if (ret != 0 ) {
376
388
goto exit;
377
389
}
378
390
@@ -507,7 +519,11 @@ int mbedtls_aes_ctr_test_mbedos(int verbose)
507
519
memcpy (key, aes_test_ctr_key[u], 16 );
508
520
509
521
offset = 0 ;
510
- if ((ret = mbedtls_aes_setkey_enc (&ctx, key, 128 )) != 0 ) {
522
+ ret = mbedtls_aes_setkey_enc (&ctx, key, 128 );
523
+ if (ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED) {
524
+ printf (" skipped\n " );
525
+ continue ;
526
+ } else if (ret != 0 ) {
511
527
goto exit;
512
528
}
513
529
@@ -523,6 +539,9 @@ int mbedtls_aes_ctr_test_mbedos(int verbose)
523
539
524
540
ret = mbedtls_aes_crypt_ctr (&ctx, len, &offset, nonce_counter,
525
541
stream_block, buf, buf);
542
+ if (ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED) {
543
+ continue ;
544
+ }
526
545
if (ret != 0 ) {
527
546
goto exit;
528
547
}
0 commit comments