mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-22 11:41:02 +00:00
Fix bug in pkwrite with TinyCrypt but no RSA
This is pre-existing, fixing is required to make a newly added test pass.
This commit is contained in:
parent
f4afbf926e
commit
26b807dae8
|
@ -524,9 +524,19 @@ int mbedtls_pk_write_key_der( mbedtls_pk_context *key, unsigned char *buf, size_
|
|||
|
||||
#else /* MBEDTLS_ECP_C */
|
||||
|
||||
#if defined(MBEDTLS_USE_TINYCRYPT)
|
||||
|
||||
/* see above, replacing ECP_MAX_BYTES with 32 (256-bit) */
|
||||
#define ECP_PUB_DER_MAX_BYTES 30 + 2 * 32
|
||||
#define ECP_PRV_DER_MAX_BYTES 29 + 3 * 32
|
||||
|
||||
#else /* MBEDTLS_USE_TINYCRYPT */
|
||||
|
||||
#define ECP_PUB_DER_MAX_BYTES 0
|
||||
#define ECP_PRV_DER_MAX_BYTES 0
|
||||
|
||||
#endif /* MBEDTLS_USE_TINYCRYPT */
|
||||
|
||||
#endif /* MBEDTLS_ECP_C */
|
||||
|
||||
#define PUB_DER_MAX_BYTES RSA_PUB_DER_MAX_BYTES > ECP_PUB_DER_MAX_BYTES ? \
|
||||
|
|
Loading…
Reference in a new issue