5
arg: certstore-path=[path],Path to the SSL/X509 Certificate store file (bundled QCA only)
9
class qc_certstore : public ConfObj
12
qc_certstore(Conf *c) : ConfObj(c) {}
13
QString name() const { return "certstore"; }
14
QString shortname() const { return "certstore"; }
16
QString checkString() const {
17
if (!QFile::exists("third-party/qca/qca") || !conf->getenv("QC_DISABLE_bundled_qca").isEmpty())
20
return ConfObj::checkString();
25
if (!QFile::exists("third-party/qca/qca") || !conf->getenv("QC_DISABLE_bundled_qca").isEmpty() || !QFile::exists("third-party/qca/qca-ossl")) {
31
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
35
QStringList pathsToTry;
37
path = conf->getenv("QC_CERTSTORE_PATH");
40
if(QFile::exists(path))
42
QString certPathString =
43
"QCA_SYSTEMSTORE_PATH=\\\\\\\\\\\\\"" + path + "\\\\\\\\\\\\\"";
44
conf->addDefine(certPathString);
50
// This is from Debian
51
pathsToTry.append( QString("/etc/ssl/certs/ca-certificates.crt") );
53
// Fedora Core 2 uses these
54
pathsToTry.append( QString("/usr/share/ssl/cert.pem") );
55
pathsToTry.append( QString("/usr/share/ssl/certs/ca-bundle.crt") );
57
// Fedora Core 5 changes to this
58
pathsToTry.append( QString("/etc/pki/tls/cert.pem") );
60
for(int n = 0; n < pathsToTry.count(); ++n)
62
if(QFile::exists(pathsToTry[n]))
69
// fall back to bundled
73
if(QFile::exists(conf->getenv("PREFIX") + "/certs/rootcerts.pem"))
74
path = "$$PREFIX/certs/rootcerts.pem";
76
path = "$$DATADIR/psi/certs/rootcerts.pem";
79
"qcasharedfiles.path = $$DATADIR/psi\n"
80
"qcasharedfiles.files = third-party/qca/qca/certs\n"
81
"INSTALLS += qcasharedfiles\n";
82
conf->addExtra(extra);
87
QString certPathString =
88
"QCA_SYSTEMSTORE_PATH=\\\\\\\\\\\\\"" + path + "\\\\\\\\\\\\\"";
89
conf->addDefine(certPathString);
95
QString resultString() const
98
return "using Windows built-in";
99
#elif defined(Q_OS_MAC)
100
return "using Mac built-in";
105
return "using bundled";
110
return ConfObj::resultString();