Accessing NSS PKCS#11 (Shared) Database with libp11 under Windows?
Matthias Ballreich <[email protected]>
| Newsgroups | gmane.comp.encryption.opensc.devel |
|---|---|
| Message-ID | <AM4PR0601MB1924D20F61E6627C360C4FD4FBA70@AM4PR0601MB1924.eurprd06.prod.outlook.com> |
Hi there,
I want to access (read and write) the Mozilla NSS Database (PKCS#11 Module) with libp11 and OpenSSL.
This is my actual Code but it did not work under Windows. I always got "-1" as return value, which tells, error on loading.
So where is the problem? What do i wrong? Has anybody got it working under Windows?
#include <libp11.h>
int main(int argc, char **argv)
{
int rc = 0;
PKCS11_CTX *pkcs11_ctx;
pkcs11_ctx = PKCS11_CTX_new();
PKCS11_CTX_init_args(pkcs11_ctx,
"configdir='C:/Users/Username/AppData/Roaming/Mozilla/Firefox/Profiles/5wzkdcjx.default' certPrefix='' keyPrefix='' secmod='secmod.db'");
rc = PKCS11_CTX_load(pkcs11_ctx, " C:/Program Files (x86)/Mozilla/Firefox/softokn3.dll ");
printf("Desc: %s\n", pkcs11_ctx->description);
if (rc)
printf("Error loading Module");
}
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Opensc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensc-devel