def x509_verify(cacert, cert, binary=False):
 ca = x509_parse_cert(cacert)
 crt = x509_parse_cert(cert, binary)
 return crt.verify(ca.get_pubkey())

def x509_verify ( cacert , cert , binary = False ) : ca = x509_parse_cert ( cacert ) crt = x509_parse_cert ( cert , binary ) return crt . verify ( ca . get_pubkey ( ) )
validate the certificates authenticity using a certification authority .