Handle ASN1_SET_OF and PKCS12_STACK_OF using function