Fix typo and avoid warning.

This commit is contained in:
Dr. Stephen Henson 2008-02-28 13:18:26 +00:00
parent 61b05a0025
commit a70a49a018
2 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value)
else else
{ {
ASN1_STRING *sdup; ASN1_STRING *sdup;
sdup = ASN1_STRING_dup(sdup); sdup = ASN1_STRING_dup(value);
if (!sdup) if (!sdup)
return 0; return 0;
ASN1_TYPE_set(a, type, sdup); ASN1_TYPE_set(a, type, sdup);

View File

@ -286,8 +286,8 @@ int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj)
int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype, const void *data, int len) int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype, const void *data, int len)
{ {
ASN1_TYPE *ttmp; ASN1_TYPE *ttmp;
ASN1_STRING *stmp; ASN1_STRING *stmp = NULL;
int atype; int atype = 0;
if (!attr) return 0; if (!attr) return 0;
if(attrtype & MBSTRING_FLAG) { if(attrtype & MBSTRING_FLAG) {
stmp = ASN1_STRING_set_by_NID(NULL, data, len, attrtype, stmp = ASN1_STRING_set_by_NID(NULL, data, len, attrtype,