Files
mbedtls/library
Hanno Becker 713c9e187f Use in-place decryption in pk_parse_pkcs8_encrypted_der
The stack buffer used to hold the decrypted key in pk_parse_pkcs8_encrypted_der
was statically sized to 2048 bytes, which is not enough for DER encoded 4096bit
RSA keys.

This commit resolves the problem by performing the key-decryption in-place,
circumventing the introduction of another stack or heap copy of the key.

There are two situations where pk_parse_pkcs8_encrypted_der is invoked:
1. When processing a PEM-encoded encrypted key in pk_parse_key.
   This does not need adaption since the PEM context used to hold the decoded
   key is already constructed and owned by pk_parse_key.
2. When processing a DER-encoded encrypted key in pk_parse_key.
   In this case, pk_parse_key calls pk_parse_pkcs8_encrypted_der with
   the buffer provided by the user, which is declared const. The commit
   therefore adds a small code paths making a copy of the keybuffer before
   calling pk_parse_pkcs8_encrypted_der.
2017-09-28 16:54:39 +01:00
..
2015-01-28 15:34:01 +00:00
2015-03-06 13:17:10 +00:00
2015-03-06 13:17:10 +00:00
2015-03-06 13:17:10 +00:00
2015-03-06 13:17:10 +00:00
2015-03-06 13:17:10 +00:00
2016-11-10 15:40:53 +00:00
2015-03-06 13:17:10 +00:00
2015-03-06 13:17:10 +00:00
2017-08-10 11:52:14 +01:00
2015-03-06 13:17:10 +00:00
2015-03-06 13:17:10 +00:00
2015-03-06 13:17:10 +00:00
2015-08-31 11:07:51 +02:00
2015-03-06 13:17:10 +00:00
2016-01-08 15:28:40 +01:00
2015-03-06 13:17:10 +00:00
2015-03-23 14:11:11 +01:00
2015-10-27 15:12:39 +01:00
2015-04-02 10:53:59 +01:00
2017-02-15 10:44:02 +00:00
2015-03-11 09:13:42 +00:00
2015-03-06 13:17:10 +00:00
2015-09-30 16:46:07 +02:00
2015-03-06 13:17:10 +00:00
2015-03-06 13:17:10 +00:00
2017-06-08 15:59:38 +01:00
2015-03-06 13:17:10 +00:00
2015-08-19 14:48:34 +02:00
2016-10-13 22:11:15 +01:00
2015-03-06 13:17:10 +00:00
2015-03-06 13:17:10 +00:00