Ticket #2 (closed defect: wontfix)

NB! Read about ReportingBugs before filing a ticket!

Opened 7 years ago

Last modified 2 years ago

pkcs11 segfaults

Reported by: aj Owned by: devel
Priority: normal Milestone:
Component: pkcs11 Version: 0.9.5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

#include "pkcs11-internal.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, NULL); printf("PKCS11_CTX_load returned %d\n",rc);

PKCS11_CTX_unload(ctx); PKCS11_CTX_free(ctx); return 0;

}

Change History

comment:1 Changed 7 years ago by nlarsch@…

do you have a backtrace ?

comment:2 Changed 6 years ago by martin

  • Status changed from new to closed
  • Resolution set to wontfix

comment:3 Changed 5 years ago by aj

the bug is in 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;
}

comment:4 Changed 2 years ago by martin

  • Milestone 0.10.0 deleted

Milestone 0.10.0 deleted

Note: See TracTickets for help on using tickets.