New version of x509_check.c