Gilles Peskine a69572b437 pk_import_into_psa: test persistent keys
Test the behavior of mbedtls_pk_get_psa_attributes() and
mbedtls_pk_import_into_psa() with respect to lifetime. In particular, test
that they work with persistent keys as documented.

Test cases generated by the following script:
```
for old in [('transparent', '0:0:1'),
            ('opaque volatile [export]', '1:0:1'),
            ('opaque volatile [copy]', '1:0:0'),
            ('opaque persistent [export]', '1:1:1'),
            ('opaque persistent [copy]', '1:1:0')]:
    for to_public in [('pair', '0'),
                      ('public', '1')]:
        for to_persistent in [('volatile', '0'),
                              ('persistent', '1')]:
            depends = ('\ndepends_on:MBEDTLS_USE_PSA_CRYPTO'
                       if old[0].startswith('opaque')
                       else '')
            print(f"""\
PSA import into PSA: {old[0]} -> {to_persistent[0]} {to_public[0]}{depends}
pk_import_into_psa_lifetime:{old[1]}:{to_public[1]}:{to_persistent[1]}
""")
```

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-03-15 13:25:28 +01:00
..
2024-01-16 18:38:55 +00:00
2024-01-16 16:27:34 +00:00
2023-07-27 14:17:27 +01:00
2024-02-01 13:54:46 +00:00
2023-07-27 14:17:27 +01:00
2023-07-27 14:17:27 +01:00
2023-07-27 14:17:27 +01:00
2023-07-27 16:02:42 +01:00
2023-03-21 16:28:00 +01:00
2023-07-27 14:17:27 +01:00
2023-12-14 23:34:48 +00:00
2023-03-31 18:04:34 +01:00
2024-01-22 15:45:49 +00:00