OpenSSL certificate verification can only check a single purpose. Run the checks with all allowed purposes and accept any.