Question about new API

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about new API

Tarasov Viktor
Hello,

I am going to implement new API in Oberthur SC driver,
for a moment, for generate/store private key operations.

Both operations call the create_key() sc_pkcs15init operation.
I don't found, how can I distinguish these two operations using the
arguments transmitted to create_key().
(I need it to get know whether the temporary public key has to be created.)

So, considering the current trunk version, does there any method to
distinguish
store and generate key operations inside create_key()?
If no, is it possible to introduce new flags (something like
SC_PKCS15_PRKEY_[GENERATED,IMPORTED])
and use them in sc_pkcs15_prkey_info (introduce new member, applicate
these flags to 'access_flags', ...)?

Kind wishes,
Viktor.
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Question about new API

Stef Hoeben
Tarasov Viktor wrote:

>Hello,
>
>I am going to implement new API in Oberthur SC driver,
>for a moment, for generate/store private key operations.
>
>Both operations call the create_key() sc_pkcs15init operation.
>I don't found, how can I distinguish these two operations using the
>arguments transmitted to create_key().
>(I need it to get know whether the temporary public key has to be created.)
>  
>
Hm, seems to be missing indeed..

>So, considering the current trunk version, does there any method to
>distinguish
>store and generate key operations inside create_key()?
>If no, is it possible to introduce new flags (something like
>SC_PKCS15_PRKEY_[GENERATED,IMPORTED])
>and use them in sc_pkcs15_prkey_info (introduce new member, applicate
>these flags to 'access_flags', ...)?
>
Or maybe better to add a new param to create_key()?
(IMHO a flag in sc_pkcs15_prkey_info is not realy in place there.)

Just my 2 cents,

Stef
 
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Question about new API

Tarasov Viktor
Stef Hoeben wrote:

> Tarasov Viktor wrote:
>
>> Hello,
>>
>> I am going to implement new API in Oberthur SC driver,
>> for a moment, for generate/store private key operations.
>>
>> Both operations call the create_key() sc_pkcs15init operation.
>> I don't found, how can I distinguish these two operations using the
>> arguments transmitted to create_key().
>> (I need it to get know whether the temporary public key has to be
>> created.)
>>  
>>
> Hm, seems to be missing indeed..
>
>> So, considering the current trunk version, does there any method to
>> distinguish
>> store and generate key operations inside create_key()?
>> If no, is it possible to introduce new flags (something like
>> SC_PKCS15_PRKEY_[GENERATED,IMPORTED])
>> and use them in sc_pkcs15_prkey_info (introduce new member, applicate
>> these flags to 'access_flags', ...)?
>>
> Or maybe better to add a new param to create_key()?
> (IMHO a flag in sc_pkcs15_prkey_info is not realy in place there.)

OK, thank you.
Viktor.

> Just my 2 cents,
>
> Stef
>

_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel