mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 20:15:03 -05:00
added support for new SQLite cert database format: added a runtime check for version 3.12.0, and depending on the result add 'sql:' prefix to cert database directory so that newer SQLIte database format works.
This commit is contained in:
parent
4002714825
commit
9448659fc6
@ -991,8 +991,11 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
|
|||||||
rv = NSS_NoDB_Init(NULL);
|
rv = NSS_NoDB_Init(NULL);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rv = NSS_Initialize(certDir, NULL, NULL, "secmod.db",
|
char *certpath = PR_smprintf("%s%s",
|
||||||
NSS_INIT_READONLY);
|
NSS_VersionCheck("3.12.0") ? "sql:" : "",
|
||||||
|
certDir);
|
||||||
|
rv = NSS_Initialize(certpath, "", "", "", NSS_INIT_READONLY);
|
||||||
|
PR_smprintf_free(certpath);
|
||||||
}
|
}
|
||||||
if(rv != SECSuccess) {
|
if(rv != SECSuccess) {
|
||||||
infof(conn->data, "Unable to initialize NSS database\n");
|
infof(conn->data, "Unable to initialize NSS database\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user