CKM: Check certificate validity before test 32/169832/1
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Fri, 9 Feb 2018 12:18:53 +0000 (13:18 +0100)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Fri, 9 Feb 2018 13:11:33 +0000 (14:11 +0100)
commit8f15307318daa49ecde9f0be7942a07633713b3b
treeb731b9baaa4a704e19810cccc5ba7dd63a92084a
parent93f72052bc238528d2c71141108deb656054df8d
CKM: Check certificate validity before test

When a certificate expires or a systemd date is incorrectly set the certificate
chain tests fail suggesting key-manager failure.

This commit adds a simple certificate validity check before the certificate is
used. If the certificate is not valid the test fails and a clear message is
delivered to the user. Each certificate is validated only once.

Change-Id: I4de5549e49b761472c224f6bb672d512386d398d
src/ckm/test-certs.cpp