mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-06 03:40:04 +00:00
pkcs7.c: Use pkcs7_get_version for signerInfo
The function pkcs7_get_version can be used again when parsing the version of the signerInfo. Both require that the version be equal to 1. The pkcs7_get_version function will return error if the found value is not the expected version as opposed to mbedtls_asn1_get_int which does not. Signed-off-by: Nick Child <nick.child@ibm.com>
This commit is contained in:
parent
6671841d91
commit
6427b34dec
@ -289,7 +289,7 @@ static int pkcs7_get_signers_info_set( unsigned char **p, unsigned char *end,
|
||||
|
||||
end_set = end_set_signer;
|
||||
|
||||
ret = mbedtls_asn1_get_int( p, end_set, &signers_set->version );
|
||||
ret = pkcs7_get_version( p, end_set, &signers_set->version );
|
||||
if( ret != 0 )
|
||||
return( MBEDTLS_ERR_PKCS7_INVALID_SIGNER_INFO );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user