For some reason, with sql:/ prefix, the PKCS11 modules are not loaded.
This patch goes on top of Alon smartcard series.
Signed-off-by: Marc-André Lureau <mlureau@redhat.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
if (options->nss_db) {
rv = NSS_Init(options->nss_db);
} else {
if (options->nss_db) {
rv = NSS_Init(options->nss_db);
} else {
#ifndef _WIN32
path = g_strdup("/etc/pki/nssdb");
#else
#ifndef _WIN32
path = g_strdup("/etc/pki/nssdb");
#else
path = g_build_filename(
g_get_system_config_dirs()[0], "pki", "nssdb", NULL);
#endif
path = g_build_filename(
g_get_system_config_dirs()[0], "pki", "nssdb", NULL);
#endif
- db = g_strdup_printf("sql:%s", path);
- rv = NSS_Init(db);
- g_free(db);
g_free(path);
}
if (rv != SECSuccess) {
g_free(path);
}
if (rv != SECSuccess) {