]> git.baikalelectronics.ru Git - arm-tf.git/commit
refactor(auth): avoid parsing signature algorithm twice
authorDemi Marie Obenour <demiobenour@gmail.com>
Thu, 8 Dec 2022 20:24:23 +0000 (15:24 -0500)
committerDemi Marie Obenour <demiobenour@gmail.com>
Fri, 30 Dec 2022 00:18:22 +0000 (19:18 -0500)
commit63cc49d0aa431848e91a9322b52f4484312dce43
treef368d8782657276a2c77c5af097a88d117b5c324
parent94c0cfbb82980439003713b8fcb7ae78859be069
refactor(auth): avoid parsing signature algorithm twice

Since the two instances of the signature algorithm in a certificate must
be bitwise identical, it is not necessary to parse both of them.
Instead, it suffices to parse one of them, and then check that the other
fits in the remaining buffer space and is equal to the first.

Change-Id: Id0a0663165f147879ac83b6a540378fd4873b0dd
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
drivers/auth/mbedtls/mbedtls_x509_parser.c