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>
diff --git a/library/pkcs7.c b/library/pkcs7.c
index 1c73709..5fa02e3 100644
--- a/library/pkcs7.c
+++ b/library/pkcs7.c
@@ -289,7 +289,7 @@
 
     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 );