x509parse_crt() and x509parse_crt_der() return X509 password related codes
POLARSSL_ERR_X509_PASSWORD_MISMATCH is returned instead of
POLARSSL_ERR_PEM_PASSWORD_MISMATCH and
POLARSSL_ERR_X509_PASSWORD_REQUIRED instead of
POLARSSL_ERR_PEM_PASSWORD_REQUIRED
Rationale: For PKCS#8 encrypted keys the same are returned
(cherry picked from commit b495d3a2c7
)
This commit is contained in:
parent
72823091c2
commit
a4232a7ccb
2 changed files with 6 additions and 2 deletions
|
@ -2329,6 +2329,10 @@ int x509parse_key( rsa_context *rsa, const unsigned char *key, size_t keylen,
|
|||
pem_free( &pem );
|
||||
return( ret );
|
||||
}
|
||||
else if( ret == POLARSSL_ERR_PEM_PASSWORD_MISMATCH )
|
||||
return( POLARSSL_ERR_X509_PASSWORD_MISMATCH );
|
||||
else if( ret == POLARSSL_ERR_PEM_PASSWORD_REQUIRED )
|
||||
return( POLARSSL_ERR_X509_PASSWORD_REQUIRED );
|
||||
else if( ret != POLARSSL_ERR_PEM_NO_HEADER_FOOTER_PRESENT )
|
||||
return( ret );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue