[PATCH] X.509: Fix crash caused by NULL pointer