Generalized the x509write_csr_set_key_usage() function and key_usage

storage
This commit is contained in:
Paul Bakker 2013-08-26 12:05:14 +02:00
parent 6db915b5a9
commit e5eae76bf0
5 changed files with 149 additions and 37 deletions

View file

@ -80,7 +80,7 @@ typedef struct _x509_csr
rsa_context *rsa;
x509_req_name *subject;
md_type_t md_alg;
unsigned char key_usage;
asn1_named_data *extensions;
}
x509_csr;
@ -131,8 +131,10 @@ void x509write_csr_set_md_alg( x509_csr *ctx, md_type_t md_alg );
*
* \param ctx CSR context to use
* \param key_usage key usage bitstring to set
*
* \return 0 if successful, or POLARSSL_ERR_X509WRITE_MALLOC_FAILED
*/
void x509write_csr_set_key_usage( x509_csr *ctx, unsigned char key_usage );
int x509write_csr_set_key_usage( x509_csr *ctx, unsigned char key_usage );
/**
* \brief Free the contents of a CSR context