diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-03-04 23:29:51 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-03-04 23:29:51 +0000 |
commit | 9985bed331b388e871a89cf043ae21c1177eaa24 (patch) | |
tree | 8fa799a7ec68dec7c8e77f4f0875b9dfb7bddaf0 /crypto/x509v3 | |
parent | 789285aa960fec0004a796e9f60f94f19035d887 (diff) | |
download | openssl-new-9985bed331b388e871a89cf043ae21c1177eaa24.tar.gz |
Deleted my str_dup() function from X509V3: the same functionality is provided
by BUF_MEM_strdup(). Added text documentation to the BUF_MEM stuff.
Diffstat (limited to 'crypto/x509v3')
-rw-r--r-- | crypto/x509v3/v3_enum.c | 2 | ||||
-rw-r--r-- | crypto/x509v3/v3_lib.c | 2 | ||||
-rw-r--r-- | crypto/x509v3/v3_utl.c | 15 | ||||
-rw-r--r-- | crypto/x509v3/x509v3.h | 3 |
4 files changed, 5 insertions, 17 deletions
diff --git a/crypto/x509v3/v3_enum.c b/crypto/x509v3/v3_enum.c index 3ce97cd560..835bde919f 100644 --- a/crypto/x509v3/v3_enum.c +++ b/crypto/x509v3/v3_enum.c @@ -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); } diff --git a/crypto/x509v3/v3_lib.c b/crypto/x509v3/v3_lib.c index 0500ef5a35..268617303f 100644 --- a/crypto/x509v3/v3_lib.c +++ b/crypto/x509v3/v3_lib.c @@ -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) diff --git a/crypto/x509v3/v3_utl.c b/crypto/x509v3/v3_utl.c index 0d2ae9dac3..40b7810d0d 100644 --- a/crypto/x509v3/v3_utl.c +++ b/crypto/x509v3/v3_utl.c @@ -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 */ diff --git a/crypto/x509v3/x509v3.h b/crypto/x509v3/x509v3.h index f40bb027f3..1f25fc8f86 100644 --- a/crypto/x509v3/x509v3.h +++ b/crypto/x509v3/x509v3.h @@ -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(); |