QCA::scanForPlugins();
int main(int argc, char** argv){    // the Initializer object sets things up, and     // also does cleanup when it goes out of scope    QCA::Initializer init;    QCoreApplication app(argc, argv);    // get all the available providers loaded.    QCA::scanForPlugins();    if ( !QCA::isSupported( "cert" ) ) {	std::cout << "Sorry, no PKI certificate support" << std::endl;    	return 1;    }    QList<QCA::Certificate> certlist;    if (argc >= 2) {	std::cout << "Reading certificates from : " << argv[1] << std::endl;	QCA::CertificateCollection filecerts;	QCA::ConvertResult importResult;	filecerts = QCA::CertificateCollection::fromFlatTextFile( argv[1], &importResult );	if ( QCA::ConvertGood == importResult) {	    std::cout << "Import succeeded" << std::endl;	    certlist == filecerts.certificates();	}    } else {	if ( !QCA::haveSystemStore() ) {	    std::cout << "System certificates not available" << std::endl;	    return 2;	}	QCA::CertificateCollection systemcerts = QCA::systemStore();	certlist = systemcerts.certificates();    }    std::cout << "Cert size: " << certlist.count() << std::endl;    QCA::Certificate cert;    foreach (cert, certlist) {	std::cout << "Serial Number:";	std::cout << qPrintable(cert.serialNumber().toString()) << std::endl;	dumpSubjectInfo( cert.subjectInfo() );	dumpIssuerInfo( cert.issuerInfo() );	if ( cert.isCA() ) {	    std::cout << "Is certificate authority" << std::endl;	} else {	    std::cout << "Is not a certificate authority" << std::endl;	}	if (cert.isSelfSigned() ) {	    std::cout << "Self signed" << std::endl;	} else {	    std::cout << "Is not self-signed!!!" << std::endl;	}	std::cout << "Valid from " << qPrintable(cert.notValidBefore().toString());	std::cout << ", until " << qPrintable(cert.notValidAfter().toString());	//std::cout << std::endl;	//std::cout << "PEM:" << std::endl;	//std::cout << qPrintable(cert.toPEM());	std::cout << std::endl << std::endl;   }    return 0;}