psa_get_domain_parameters: for RSA, if e=65537, output an empty string
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index fba1936..dba244a 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -1044,6 +1044,12 @@
ret = mbedtls_rsa_export( rsa, NULL, NULL, NULL, NULL, &mpi );
if( ret != 0 )
goto exit;
+ if( mbedtls_mpi_cmp_int( &mpi, 65537 ) == 0 )
+ {
+ /* It's the default value, which is reported as an empty string,
+ * so there's nothing to do. */
+ goto exit;
+ }
buflen = mbedtls_mpi_size( &mpi );
buffer = mbedtls_calloc( 1, buflen );