Hi,

On Wed, Jul 02, 2008 at 02:02:15AM -0700, Steven adonis wrote:
> Can anyone give me a simple program in console mode and just calling 
> C_Initialize(); ??

        Let yourself to be possibly inspired by (e.g):
        
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/pkcs11/pkcs11_kernel/common/kernelGeneral.c#C_Initialize
        
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/cmd-crypto/pktool/common.c#init_pkcs11

        .. and run your stuff on (Open)Solaris OS. Asking windows
        environment related questions on opensolaris discussion list
        looks little bit weird (at least to me).

        [ snip - just a sloppy example ]

tipo.czech:/tmp$ cc -lpkcs11 ./c.c 
tipo.czech:/tmp$ ./a.out 
ret_val: 0
tipo.czech:/tmp$ cat ./c.c 
#include <stdio.h>
#include <security/cryptoki.h>
#include <security/pkcs11.h>

int 
main()
{
        printf("ret_val: %d\n", C_Initialize(NULL));
        return(0);
}
tipo.czech:/tmp$ 

        [ snip ]


        /j.
        

Reply via email to