Home | History | Annotate | Download | only in asn1

Lines Matching refs:str

343 int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str)
345 if (str == NULL)
347 dst->type = str->type;
348 if (!ASN1_STRING_set(dst,str->data,str->length))
350 dst->flags = str->flags;
354 ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *str)
357 if (!str)
362 if (!ASN1_STRING_copy(ret,str))
370 int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len)
382 if ((str->length < len) || (str->data == NULL))
384 c=str->data;
386 str->data=OPENSSL_malloc(len+1);
388 str->data=OPENSSL_realloc(c,len+1);
390 if (str->data == NULL)
393 str->data=c;
397 str->length=len;
400 memcpy(str->data,data,len);
402 str->data[len]='\0';
407 void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len)
409 if (str->data)
410 OPENSSL_free(str->data);
411 str->data = data;
412 str->length = len;