Vendor custom mechanisms and attributes?

10/8/2010 8:47:03 PM
Gravatar
Total Posts 2

Vendor custom mechanisms and attributes?

Hi Ugo,

 

First up, this looks like excellent work, well done!  Is it possible to pass in vendor custom mechanisms? 

#define CKM_VENDOR_DEFINED 0x80000000

#define CKM_SOME_MECHANISM_1 0x80000001

#define CKM_SOME_MECHANISM_2 0x80000002
etc..
 

Ditto with custom attributes?

 

All the best,

Alastair

10/8/2010 10:02:32 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: Vendor custom mechanisms and attributes?

Hi,

first of all many thanks :)

Then, yes you can use custom attributes. The class ObjectAttribute defines

public const int CKA_VENDOR_DEFINED = 0x80000000;

so in your code you can define yout custom attributes:

public const int CKA_CUSTOM1 = ObjectAttribute .CKA_VENDOR_DEFINED + 1
public const int CKA_CUSTOM2 = ObjectAttribute .CKA_VENDOR_DEFINED + 2

Regards,

Ugo Chirico
http://www.ugosweb.com

10/8/2010 10:08:01 PM
Gravatar
Total Posts 2

Re: Vendor custom mechanisms and attributes?

Ugo, thank you for the quick reply. I will give the trial version a spin next week and be in touch - if it works as I think it does, this will be a godsend for some of my projects.

 

All the best,

Alastair

 

10/8/2010 10:21:43 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: Vendor custom mechanisms and attributes?

I forgot..
you can do the same also for custom mechanism. See Mechanism.CKM_VENDOR_DEFINED

I'm sure it works :) a lot of customers are using NCryptoki and all seems satisfacted ;)

Let me know...

Ugo