ASN.1 specification(*1) uses a term "BIT STRING" not "BITFIELD" in section 8.6.4.2. (*1) http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf It seems that we should use ASN1_BIT_STRING instead of ASN1_BITFIELD.
Created attachment 4530 [details] an implementation.
Merged