Add stubs for x509parse_key_ec and co.
This commit is contained in:
parent
4250a1f818
commit
26833c2fc6
2 changed files with 236 additions and 0 deletions
|
@ -32,6 +32,7 @@
|
|||
#if defined(POLARSSL_X509_PARSE_C) || defined(POLARSSL_X509_WRITE_C)
|
||||
#include "asn1.h"
|
||||
#include "rsa.h"
|
||||
#include "ecp.h"
|
||||
#include "dhm.h"
|
||||
#include "md.h"
|
||||
#include "pk.h"
|
||||
|
@ -468,6 +469,59 @@ int x509parse_public_key_rsa( rsa_context *rsa,
|
|||
*/
|
||||
int x509parse_public_keyfile_rsa( rsa_context *rsa, const char *path );
|
||||
|
||||
/** \ingroup x509_module */
|
||||
/**
|
||||
* \brief Parse a private EC key
|
||||
*
|
||||
* \param eckey EC key to be initialized
|
||||
* \param key input buffer
|
||||
* \param keylen size of the buffer
|
||||
* \param pwd password for decryption (optional)
|
||||
* \param pwdlen size of the password
|
||||
*
|
||||
* \return 0 if successful, or a specific X509 or PEM error code
|
||||
*/
|
||||
int x509parse_key_ec( ecp_keypair *eckey,
|
||||
const unsigned char *key, size_t keylen,
|
||||
const unsigned char *pwd, size_t pwdlen );
|
||||
|
||||
/** \ingroup x509_module */
|
||||
/**
|
||||
* \brief Load and parse a private EC key
|
||||
*
|
||||
* \param eckey EC key to be initialized
|
||||
* \param path filename to read the private key from
|
||||
* \param password password to decrypt the file (can be NULL)
|
||||
*
|
||||
* \return 0 if successful, or a specific X509 or PEM error code
|
||||
*/
|
||||
int x509parse_keyfile_ec( ecp_keypair *eckey,
|
||||
const char *path, const char *password );
|
||||
|
||||
/** \ingroup x509_module */
|
||||
/**
|
||||
* \brief Parse a public EC key
|
||||
*
|
||||
* \param eckey EC key to be initialized
|
||||
* \param key input buffer
|
||||
* \param keylen size of the buffer
|
||||
*
|
||||
* \return 0 if successful, or a specific X509 or PEM error code
|
||||
*/
|
||||
int x509parse_public_key_ec( ecp_keypair *eckey,
|
||||
const unsigned char *key, size_t keylen );
|
||||
|
||||
/** \ingroup x509_module */
|
||||
/**
|
||||
* \brief Load and parse a public EC key
|
||||
*
|
||||
* \param eckey EC key to be initialized
|
||||
* \param path filename to read the private key from
|
||||
*
|
||||
* \return 0 if successful, or a specific X509 or PEM error code
|
||||
*/
|
||||
int x509parse_public_keyfile_ec( ecp_keypair *eckey, const char *path );
|
||||
|
||||
/** \ingroup x509_module */
|
||||
/**
|
||||
* \brief Parse DHM parameters
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue