Commit 9985bed3 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Deleted my str_dup() function from X509V3: the same functionality is provided

by BUF_MEM_strdup(). Added text documentation to the BUF_MEM stuff.
parent 789285aa
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5,6 +5,9 @@

 Changes between 0.9.1c and 0.9.2

  *) Add text documentation for the BUFFER functions.
     [Steve Henson]

  *) Added the new `Includes OpenSSL Cryptography Software' button as
     doc/openssl_button.{gif,html} which is similar in style to the old SSLeay
     button and can be used by applications based on OpenSSL to show the
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ ASN1_ENUMERATED *e;
	long strval;
	strval = ASN1_ENUMERATED_get(e);
	for(enam =(ENUMERATED_NAMES *)method->usr_data; enam->lname; enam++) {
		if(strval == enam->bitnum) return str_dup(enam->lname);
		if(strval == enam->bitnum) return BUF_strdup(enam->lname);
	}
	return i2s_ASN1_ENUMERATED(method, e);
}
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@

static STACK *ext_list = NULL;

static ext_cmp(X509V3_EXT_METHOD **a, X509V3_EXT_METHOD **b);
static int ext_cmp(X509V3_EXT_METHOD **a, X509V3_EXT_METHOD **b);
static void ext_list_free(X509V3_EXT_METHOD *ext);

int X509V3_EXT_add(ext)
+3 −12
Original line number Diff line number Diff line
@@ -66,15 +66,6 @@

static char *strip_spaces(char *name);

char *str_dup(str)
char *str;
{
	char *tmp;
	if(!(tmp = Malloc(strlen(str) + 1))) return NULL;
	strcpy(tmp, str);
	return tmp;
}

/* Add a CONF_VALUE name value pair to stack */

int X509V3_add_value(name, value, extlist)
@@ -84,8 +75,8 @@ STACK **extlist;
{
	CONF_VALUE *vtmp = NULL;
	char *tname = NULL, *tvalue = NULL;
	if(name && !(tname = str_dup(name))) goto err;
	if(value && !(tvalue = str_dup(value))) goto err;;
	if(name && !(tname = BUF_strdup(name))) goto err;
	if(value && !(tvalue = BUF_strdup(value))) goto err;;
	if(!(vtmp = (CONF_VALUE *)Malloc(sizeof(CONF_VALUE)))) goto err;
	if(!*extlist && !(*extlist = sk_new(NULL))) goto err;
	vtmp->section = NULL;
@@ -237,7 +228,7 @@ char *line;
	char *linebuf;
	int state;
	/* We are going to modify the line so copy it first */
	linebuf = str_dup(line);
	linebuf = BUF_strdup(line);
	state = HDR_NAME;
	ntmp = NULL;
	/* Go through all characters */
+0 −3
Original line number Diff line number Diff line
@@ -237,7 +237,6 @@ int i2d_ext_ku(STACK *a, unsigned char **pp);
STACK *d2i_ext_ku(STACK **a, unsigned char **pp, long length);
void ext_ku_free(STACK *a);
STACK *ext_ku_new(void);
char *str_dup(char *val);

#ifdef HEADER_CONF_H
GENERAL_NAME *v2i_GENERAL_NAME(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, CONF_VALUE *cnf);
@@ -308,8 +307,6 @@ STACK *d2i_ext_ku();
void ext_ku_free();
STACK *ext_ku_new();

char *str_dup();

#ifdef HEADER_CONF_H
void X509V3_conf_free();
X509_EXTENSION *X509V3_EXT_conf_nid();
Loading