72 if (obj == NULL)
return(-1);
83 if (i < 0)
return(-1);
86 if (buf == NULL)
return(data->
length);
87 memcpy(buf,data->
data,i);
94 if (name == NULL)
return(0);
103 if (obj == NULL)
return(-2);
115 if (name == NULL)
return(-1);
120 for (lastpos++; lastpos < n; lastpos++)
141 int i,n,set_prev,set_next;
151 if (loc == n)
return(ret);
168 if (set_prev+1 < set_next)
169 for (i=loc; i<n; i++)
182 X509_NAME_ENTRY_free(ne);
194 X509_NAME_ENTRY_free(ne);
199 const unsigned char *
bytes,
int len,
int loc,
int set)
206 X509_NAME_ENTRY_free(ne);
219 if (name == NULL)
return(0);
223 else if (loc < 0) loc=n;
265 for (i=loc+1; i<n; i++)
270 if (new_name != NULL)
271 X509_NAME_ENTRY_free(new_name);
276 const char *field,
int type,
const unsigned char *
bytes,
int len)
316 if ((ne == NULL) || (*ne == NULL))
318 if ((ret=X509_NAME_ENTRY_new()) == NULL)
329 if ((ne != NULL) && (*ne == NULL)) *ne=ret;
332 if ((ne == NULL) || (ret != *ne))
333 X509_NAME_ENTRY_free(ret);
339 if ((ne == NULL) || (obj == NULL))
346 return((ne->
object == NULL)?0:1);
350 const unsigned char *
bytes,
int len)
354 if ((ne == NULL) || ((bytes == NULL) && (len != 0)))
return(0);
359 if (len < 0) len=strlen((
const char *)bytes);
374 if (ne == NULL)
return(NULL);
380 if (ne == NULL)
return(NULL);