Fix undocumented feature of pem_read_buffer()
Used to work only for RSAPrivateKey content, now accepts ECPrivateKey too, and may even work with similar enough structures when they appear.
This commit is contained in:
parent
e366342233
commit
f8648d51b1
2 changed files with 19 additions and 2 deletions
|
@ -84,6 +84,9 @@ void pem_init( pem_context *ctx );
|
|||
* POLARSSL_ERR_PEM_NO_HEADER_FOOTER_PRESENT, use_len is
|
||||
* the length to skip)
|
||||
*
|
||||
* \note Checks password correctness by verifying if the decrypted
|
||||
* text looks like a RSAPrivateKey or ECPrivateKey structure
|
||||
*
|
||||
* \return 0 on success, ior a specific PEM error code
|
||||
*/
|
||||
int pem_read_buffer( pem_context *ctx, const char *header, const char *footer,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue