if (so->type == V_ASN1_SEQUENCE)
if (so && (so->type == V_ASN1_SEQUENCE))
int get_signed_seq2string(si,str1,str2)PKCS7_SIGNER_INFO *si;char **str1;char **str2;	{	ASN1_TYPE *so;	if (signed_seq2string_nid == -1)		signed_seq2string_nid=			OBJ_create("1.9.9999","OID_example","Our example OID");	/* To retrieve */	so=PKCS7_get_signed_attribute(si,signed_seq2string_nid);	if (so->type == V_ASN1_SEQUENCE)		{		ASN1_CTX c;		ASN1_STRING *s;		long length;		ASN1_OCTET_STRING *os1,*os2;		s=so->value.sequence;		c.p=ASN1_STRING_data(s);		c.max=c.p+ASN1_STRING_length(s);		if (!asn1_GetSequence(&c,&length)) goto err;		/* Length is the length of the seqence */		c.q=c.p;		if ((os1=d2i_ASN1_OCTET_STRING(NULL,&c.p,c.slen)) == NULL) 			goto err;		c.slen-=(c.p-c.q);		c.q=c.p;		if ((os2=d2i_ASN1_OCTET_STRING(NULL,&c.p,c.slen)) == NULL) 			goto err;		c.slen-=(c.p-c.q);		if (!asn1_Finish(&c)) goto err;		*str1=malloc(os1->length+1);		*str2=malloc(os2->length+1);		memcpy(*str1,os1->data,os1->length);		memcpy(*str2,os2->data,os2->length);		(*str1)[os1->length]='\0';		(*str2)[os2->length]='\0';		ASN1_OCTET_STRING_free(os1);		ASN1_OCTET_STRING_free(os2);		return(1);		}err:	return(0);	}