|
libopensc asn1 boolean handling: msg#00241encryption.opensc.devel
Hello list, There seems to be a problem with handling / encoding / decoding values in libopensc that are stored as ASN1 boolean type. The higher level code represents these boolean values as integer values (0/1). However the encoding/decoding functions assume an u8 (unsigned char) type. For instance the authority boolean pkcs15-cert.c: if (infop->authority) sc_format_asn1_entry(asn1_com_cert_attr + 1, (void *) &infop->authority, NULL, 1); This will most likely cause problems on non little-endian systems. For testing purposes I replaced these constructs with something like which is a crude fix: if (infop->authority) { u8 authority=infop->authority; sc_format_asn1_entry(asn1_com_cert_attr + 1, (void *) &authority, NULL, 1); } However, it would probably be better to use the u8 type to store the boolean values for the authority/native attributes, wouldn't it? WIlliam. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Using OpenCT via PC/SC Lite: 00241, buchal |
|---|---|
| Next by Date: | openct release: 00241, Andreas Jellinghaus |
| Previous by Thread: | Using OpenCT via PC/SC Litei: 00241, buchal |
| Next by Thread: | Re: libopensc asn1 boolean handling: 00241, Nils Larsch |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |