hex_prin(out, av->value.octet_string->data, av->value.octet_string->length);
hex_prin(out, av->value.bit_string->data, av->value.bit_string->length);
int print_attribs (BIO *out, STACK_OF(X509_ATTRIBUTE) *attrlst, char *name){	X509_ATTRIBUTE *attr;	ASN1_TYPE *av;	char *value;	int i, attr_nid;	if(!attrlst) {		BIO_printf(out, "%s: <No Attributes>\n", name);		return 1;	}	if(!sk_X509_ATTRIBUTE_num(attrlst)) {		BIO_printf(out, "%s: <Empty Attributes>\n", name);		return 1;	}	BIO_printf(out, "%s\n", name);	for(i = 0; i < sk_X509_ATTRIBUTE_num(attrlst); i++) {		attr = sk_X509_ATTRIBUTE_value(attrlst, i);		attr_nid = OBJ_obj2nid(attr->object);		BIO_printf(out, "    ");		if(attr_nid == NID_undef) {			i2a_ASN1_OBJECT (out, attr->object);			BIO_printf(out, ": ");		} else BIO_printf(out, "%s: ", OBJ_nid2ln(attr_nid));		if(sk_ASN1_TYPE_num(attr->value.set)) {			av = sk_ASN1_TYPE_value(attr->value.set, 0);			switch(av->type) {				case V_ASN1_BMPSTRING:        			value = uni2asc(av->value.bmpstring->data,                                	       av->value.bmpstring->length);				BIO_printf(out, "%s\n", value);				OPENSSL_free(value);				break;				case V_ASN1_OCTET_STRING:				hex_prin(out, av->value.bit_string->data,					av->value.bit_string->length);				BIO_printf(out, "\n");					break;				case V_ASN1_BIT_STRING:				hex_prin(out, av->value.octet_string->data,					av->value.octet_string->length);				BIO_printf(out, "\n");					break;				default:					BIO_printf(out, "<Unsupported tag %d>\n", av->type);				break;			}		} else BIO_printf(out, "<No Values>\n");	}	return 1;}