security: Handle certificate decoding error in validation process

Change-Id: I6365db2d9fd58c4dd5d7e1f840cc85253381e03c
Refs: #2212