Lines Matching defs:str
343 ASN1_STRING *ASN1_STRING_dup(ASN1_STRING *str)
347 if (str == NULL) return(NULL);
348 if ((ret=ASN1_STRING_type_new(str->type)) == NULL)
350 if (!ASN1_STRING_set(ret,str->data,str->length))
355 ret->flags = str->flags;
359 int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len)
371 if ((str->length < len) || (str->data == NULL))
373 c=str->data;
375 str->data=OPENSSL_malloc(len+1);
377 str->data=OPENSSL_realloc(c,len+1);
379 if (str->data == NULL)
382 str->data=c;
386 str->length=len;
389 memcpy(str->data,data,len);
391 str->data[len]='\0';