Hi

How should the data from CKA_VALUE be formatted so that d2i_PublicKey (OpenSSL) 
can understand the content of it? You are using this function in the 
pkcs11-tool to validate the public key.

I have tried to format the data as:
openssl asn1parse -inform PEM -i -in out.msg
    0:d=0  hl=3 l= 157 cons: SEQUENCE
    3:d=1  hl=2 l=  13 cons:  SEQUENCE
    5:d=2  hl=2 l=   9 prim:   OBJECT            :rsaEncryption
   16:d=2  hl=2 l=   0 prim:   NULL
   18:d=1  hl=3 l= 139 prim:  BIT STRING

Where the bit string is:
openssl asn1parse -inform PEM -i -in out.msg -strparse 18
    0:d=0  hl=3 l= 135 cons: SEQUENCE
    3:d=1  hl=3 l= 129 prim:  INTEGER           
:CD72AA7664C55B34F6F445B98CAC9A665CE93CBD8F906F05C3BD74FA65F3D993B57757B165FB0E32824741986511431B7DE2A673E52C23EB02CB7146CFCBDF3C4C6499E90C5866B052DBB21912FB4E1B07499525788C352381D7A48E29BFB51600A0CB3DA867F9EE3BA9FB58EC150D634373C45C245BE49F006351C1351594A5
  135:d=1  hl=2 l=   1 prim:  INTEGER           :03

I have also tried with DER encoding. Both solutions are understood by ans1parse 
but not by the test program.

// Rickard

Attachment: PGP.sig
Description: PGP signature

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

Reply via email to