blob: 2a10ca0893eb4421a7ff376eda8e4ee64c294a00 [file] [log] [blame] [view]
Dave Rodgman017a1992022-03-31 14:07:01 +01001Migrating to an auto generated psa_crypto_driver_wrappers.c file
2================================================================
Archana1f1a34a2021-11-17 08:44:07 +05303
4**This is a specification of work in progress. The implementation is not yet merged into Mbed TLS.**
5
6This document describes how to migrate to the auto generated psa_crypto_driver_wrappers.c file.
7It is meant to give the library user migration guidelines while the Mbed TLS project tides over multiple minor revs of version 1.0, after which this will be merged into psa-driver-interface.md.
8
9## Introduction
10
Dave Rodgman017a1992022-03-31 14:07:01 +010011The design of the Driver Wrappers code generation is based on the design proposal https://github.com/Mbed-TLS/mbedtls/pull/5067
Archana1f1a34a2021-11-17 08:44:07 +053012During the process of implementation there might be minor variations wrt versioning and broader implementation specific ideas, but the design remains the same.
13
14## Prerequisites
15
16Python3 and Jinja2 rev 2.10.1
17
18## Feature Version
19
201.0
21
22### What's critical for a migrating user
23
24The Driver Wrapper auto generation project is designed to use a python templating library ( Jinja2 ) to render templates based on drivers that are defined using a Driver descrioption JSON file(s).
25
26While that is the larger goal, for version 1.0 here's what's changed
27
28#### What's changed
29
30(1) psa_crypto_driver_wrappers.c will from this point on be auto generated.
Archanac08248d2021-12-19 09:28:39 +053031(2) The auto generation is based on the template file at scripts/data_files/driver_templates/psa_crypto_driver_wrappers.c.jinja.
Archana21b20c72021-12-19 10:02:23 +053032(3) So while all driver wrapper templating support is yet to come in, the library user will need to patch into the template file as needed, this could be read as replacing the template file with the current psa_crypto_driver_wrappers.c file maintained by the library user.