--TEST-- Bug #50713 (openssl_pkcs7_verify() may ignore untrusted CAs) --EXTENSIONS-- openssl --FILE-- saveCaCert($cacertFile); $certificateGenerator->saveNewCertAndKey('bug50713', $certFile, $keyFile, 1024); var_dump(openssl_pkcs7_sign($inFile, $outFile, 'file://' . $certFile, 'file://' . $keyFile, [], PKCS7_NOCERTS)); var_dump(openssl_pkcs7_verify($outFile, 0, $signersFile, [$cacertFile], $certFile)); var_dump(strlen(file_get_contents($signersFile)) > 0); ?> --CLEAN-- --EXPECT-- bool(true) bool(true) bool(true)