OpenSC/OpenSC — pull request #90 by viktorTarasov (2012-09-02 18:05:42+00:00)
Title: libopensc:  for OID use the {value, len} data type

Currently the '{value}' data type is used to hold the OID value.
It's not easy to manipulate and as a consequence the number of bugs.

This one reported by Andreas Schwier :
https://github.com/OpenSC/OpenSC/commit/8e75d971cb7eadfef9b5b50adb3cb6d18e641ed2#commitcomment-1792477

In pkcs15-algo sc_asn1_get_algorithm_info() can return the OID without ending '-1' values:
https://github.com/OpenSC/OpenSC/blob/staging/src/libopensc/pkcs15-algo.c#L452
https://github.com/OpenSC/OpenSC/blob/staging/src/libopensc/pkcs15-algo.c#L459

In proposed patch the data type '{value, length}', more common in use, introduced to hold OID value.