Parsing of PKCS#8 encrypted private key files added and PKCS#12 basis
PKCS#8 encrypted key file support has been added to x509parse_key() with support for some PCKS#12 PBE functions (pbeWithSHAAnd128BitRC4, pbeWithSHAAnd3-KeyTripleDES-CBC and pbeWithSHAAnd2-KeyTripleDES-CBC)
This commit is contained in:
parent
65a1909dc6
commit
cf6e95d9a8
15 changed files with 793 additions and 17 deletions
|
@ -105,6 +105,10 @@
|
|||
#include "polarssl/pem.h"
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_PKCS12_C)
|
||||
#include "polarssl/pkcs12.h"
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_RSA_C)
|
||||
#include "polarssl/rsa.h"
|
||||
#endif
|
||||
|
@ -216,6 +220,15 @@ void error_strerror( int ret, char *buf, size_t buflen )
|
|||
snprintf( buf, buflen, "PEM - Bad input parameters to function" );
|
||||
#endif /* POLARSSL_PEM_C */
|
||||
|
||||
#if defined(POLARSSL_PKCS12_C)
|
||||
if( use_ret == -(POLARSSL_ERR_PKCS12_BAD_INPUT_DATA) )
|
||||
snprintf( buf, buflen, "PKCS12 - Bad input parameters to function" );
|
||||
if( use_ret == -(POLARSSL_ERR_PKCS12_FEATURE_UNAVAILABLE) )
|
||||
snprintf( buf, buflen, "PKCS12 - Feature not available, e.g. unsupported encryption scheme" );
|
||||
if( use_ret == -(POLARSSL_ERR_PKCS12_PBE_INVALID_FORMAT) )
|
||||
snprintf( buf, buflen, "PKCS12 - PBE ASN.1 data not as expected" );
|
||||
#endif /* POLARSSL_PKCS12_C */
|
||||
|
||||
#if defined(POLARSSL_RSA_C)
|
||||
if( use_ret == -(POLARSSL_ERR_RSA_BAD_INPUT_DATA) )
|
||||
snprintf( buf, buflen, "RSA - Bad input parameters to function" );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue