For new tickets please use the main OpenSC Trac (direct link)
Ticket #7 (closed defect: invalid)
Segfault from libp11?
| Reported by: | martin | Owned by: | opensc-devel@… |
|---|---|---|---|
| Priority: | normal | Component: | libp11 |
| Version: | 0.2.1 | Severity: | major |
| Keywords: | Cc: |
Description
Change History
Note: See
TracTickets for help on using
tickets.

the bug here is the example code. this works fine for me:
#include <libp11.h> #include <stdio.h> int main(int argc, char **argv) { PKCS11_CTX *ctx; int rc; ctx = PKCS11_CTX_new(); if (!ctx) { fprintf(stderr, "fatal: PKCS11_CTX_new failed!"); return 1; } rc = PKCS11_CTX_load(ctx, "/home/aj/opentest/lib/opensc-pkcs11.so"); if (rc != 0) { printf("PKCS11_CTX_load returned %d\n", rc); PKCS11_CTX_free(ctx); return 1; } PKCS11_CTX_unload(ctx); PKCS11_CTX_free(ctx); return 0; }