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
}
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)
[1]
http://www.opensc-project.org/opensc/browser/trunk/src/libopensc/opensc.h#L148
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel