summaryrefslogtreecommitdiff
path: root/drivers/auth/mbedtls/mbedtls_x509_parser.c
diff options
context:
space:
mode:
authordanh-arm <dan.handley@arm.com>2016-04-07 17:10:44 +0100
committerdanh-arm <dan.handley@arm.com>2016-04-07 17:10:44 +0100
commit5d29c7601561542b9bb1c07b398cd0c1db9feecf (patch)
tree10b084df5d83c662e6e12631b4b68794a9c21f29 /drivers/auth/mbedtls/mbedtls_x509_parser.c
parenta8f6e21eb4ba4b515955abc16ea9041bcf0009ed (diff)
parent48279d52a7e339e88b5088ce5a276bf169c71754 (diff)
Merge pull request #572 from jcastillo-arm/jc/tbb_nvcounter
TBB NVcounter support
Diffstat (limited to 'drivers/auth/mbedtls/mbedtls_x509_parser.c')
-rw-r--r--drivers/auth/mbedtls/mbedtls_x509_parser.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/auth/mbedtls/mbedtls_x509_parser.c b/drivers/auth/mbedtls/mbedtls_x509_parser.c
index 52e69719..1a6a9a75 100644
--- a/drivers/auth/mbedtls/mbedtls_x509_parser.c
+++ b/drivers/auth/mbedtls/mbedtls_x509_parser.c
@@ -405,6 +405,13 @@ static int check_integrity(void *img, unsigned int img_len)
/*
* Extract an authentication parameter from an X509v3 certificate
+ *
+ * This function returns a pointer to the extracted data and its length.
+ * Depending on the type of parameter, a pointer to the data stored in the
+ * certificate may be returned (i.e. an octet string containing a hash). Other
+ * data may need to be copied and formatted (i.e. integers). In the later case,
+ * a buffer of the correct type needs to be statically allocated, filled and
+ * returned.
*/
static int get_auth_param(const auth_param_type_desc_t *type_desc,
void *img, unsigned int img_len,
@@ -422,6 +429,7 @@ static int get_auth_param(const auth_param_type_desc_t *type_desc,
*param_len = (unsigned int)tbs.len;
break;
case AUTH_PARAM_HASH:
+ case AUTH_PARAM_NV_CTR:
/* All these parameters are included as X509v3 extensions */
rc = get_ext(type_desc->cookie, param, param_len);
break;