Hi,

> -----Original Message-----
> From: Andre Zepezauer [mailto:andre.zepeza...@student.uni-halle.de]
> Sent: 23. tammikuuta 2011 4:45
> 
> On Sat, 2011-01-22 at 15:42 +0200, Martin Paljak wrote:
> > On Jan 21, 2011, at 9:33 AM, Aventra wrote:
> > > Could this fix that Andre has proposed be committed to trunk?
> > > It should work for all cards, since it only makes two elements of the
> TokenInfo optional.
> > Yes, but I'm not able to directly locate the relevant part in the ASN.1
> description (for objId) that tell they are optional that I could reference
in
> the commit message.
> >
> > If you can speed that up would help.
> 
> >From "A. ASN.1 module" (page 65):
> 
> AlgorithmInfo ::= SEQUENCE {
>       reference               Reference,
>       algorithm               PKCS15-ALGORITHM.&id({AlgorithmSet}),
>       parameters              PKCS15-
> ALGORITHM.&Parameters({AlgorithmSet}{@algorithm}),
>       supportedOperations     PKCS15-
> ALGORITHM.&Operations({AlgorithmSet}{@algorithm}),
>       algId                   PKCS15-
> ALGORITHM.&objectIdentifier({AlgorithmSet}{@algorithm}) OPTIONAL,
>       algRef                  Reference OPTIONAL
> }

I double checked from [1] this what Andre sent earlier.
As defined in the ASN.1 module those two attributes are optional.

This follows the PKCS#15 spec and fixes the regression bug.
Actually by definition the name should be algId instead of objId, but this
makes no difference.

This is important because currently you can't initialize cards using OpenSC
and
previously Initialized cards don't work either.

> In addition to the proposed patch a mechanism is required, so that the
> absence of these two fields could be noticed. That is because
> sc_supported_algo_info.algo_ref [1] will always hold a value. The
> question is, if that value is valid?
> 
> In the case of the absence of algRef in AlgorithmInfo (see above) the
> value of sc_supported_algo_info.algo_ref [1] is invalid.
> 
> Definition of Reference:
>       pkcs15-ub-reference INTEGER ::= 255
>       Reference ::= INTEGER (0..pkcs15-ub-reference)

Another question is then, what to do with these values, but for now we need
to fix this
and think of an solution later.

[1] ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-15/pkcs-15v1_1.asn

Thanks,
Toni

> 
> [1]
http://www.opensc-project.org/opensc/browser/trunk/src/libopensc/opensc.h#L1
48

_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to