diff options
Diffstat (limited to 'lib/libssl/src/apps/apps.c')
-rw-r--r-- | lib/libssl/src/apps/apps.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/lib/libssl/src/apps/apps.c b/lib/libssl/src/apps/apps.c index e92e95b332c..753dbf52b57 100644 --- a/lib/libssl/src/apps/apps.c +++ b/lib/libssl/src/apps/apps.c @@ -211,7 +211,7 @@ chopup_args(ARGS *arg, char *buf, int *argc, char **argv[]) i = 0; if (arg->count == 0) { arg->count = 20; - arg->data = (char **)OPENSSL_malloc(sizeof(char *)*arg->count); + arg->data = (char **)malloc(sizeof(char *)*arg->count); } for (i = 0; i < arg->count; i++) arg->data[i] = NULL; @@ -231,7 +231,7 @@ chopup_args(ARGS *arg, char *buf, int *argc, char **argv[]) if (num >= arg->count) { char **tmp_p; int tlen = arg->count + 20; - tmp_p = (char **)OPENSSL_realloc(arg->data, + tmp_p = (char **)realloc(arg->data, sizeof(char *)*tlen); if (tmp_p == NULL) return 0; @@ -284,13 +284,13 @@ int dump_cert_text (BIO *out, X509 *x) p = X509_NAME_oneline(X509_get_subject_name(x), NULL, 0); BIO_puts(out, "subject="); BIO_puts(out, p); - OPENSSL_free(p); + free(p); p = X509_NAME_oneline(X509_get_issuer_name(x), NULL, 0); BIO_puts(out, "\nissuer="); BIO_puts(out, p); BIO_puts(out, "\n"); - OPENSSL_free(p); + free(p); return 0; } @@ -413,7 +413,7 @@ password_callback(char *buf, int bufsiz, int verify, ok = UI_add_input_string(ui, prompt, ui_flags, buf, PW_MIN_LENGTH, bufsiz - 1); if (ok >= 0 && verify) { - buff = (char *)OPENSSL_malloc(bufsiz); + buff = (char *)malloc(bufsiz); ok = UI_add_verify_string(ui, prompt, ui_flags, buff, PW_MIN_LENGTH, bufsiz - 1, buf); } @@ -425,7 +425,7 @@ password_callback(char *buf, int bufsiz, int verify, if (buff) { OPENSSL_cleanse(buff, (unsigned int)bufsiz); - OPENSSL_free(buff); + free(buff); } if (ok >= 0) @@ -442,7 +442,7 @@ password_callback(char *buf, int bufsiz, int verify, res = 0; } UI_free(ui); - OPENSSL_free(prompt); + free(prompt); } return res; } @@ -1200,7 +1200,7 @@ print_name(BIO *out, const char *title, X509_NAME *nm, unsigned long lflags) buf = X509_NAME_oneline(nm, 0, 0); BIO_puts(out, buf); BIO_puts(out, "\n"); - OPENSSL_free(buf); + free(buf); } else { if (mline) BIO_puts(out, "\n"); @@ -1330,7 +1330,7 @@ make_config_name() char *p; len = strlen(t) + strlen(OPENSSL_CONF) + 2; - p = OPENSSL_malloc(len); + p = malloc(len); BUF_strlcpy(p, t, len); BUF_strlcat(p, "/", len); BUF_strlcat(p, OPENSSL_CONF, len); @@ -1607,7 +1607,7 @@ load_index(char *dbfile, DB_ATTR *db_attr) } } - if ((retdb = OPENSSL_malloc(sizeof(CA_DB))) == NULL) { + if ((retdb = malloc(sizeof(CA_DB))) == NULL) { fprintf(stderr, "Out of memory\n"); goto err; } @@ -1809,7 +1809,7 @@ free_index(CA_DB *db) if (db) { if (db->db) TXT_DB_free(db->db); - OPENSSL_free(db); + free(db); } } @@ -1849,11 +1849,11 @@ X509_NAME * parse_name(char *subject, long chtype, int multirdn) { size_t buflen = strlen(subject)+1; /* to copy the types and values into. due to escaping, the copy can only become shorter */ - char *buf = OPENSSL_malloc(buflen); + char *buf = malloc(buflen); size_t max_ne = buflen / 2 + 1; /* maximum number of name elements */ - char **ne_types = OPENSSL_malloc(max_ne * sizeof (char *)); - char **ne_values = OPENSSL_malloc(max_ne * sizeof (char *)); - int *mval = OPENSSL_malloc (max_ne * sizeof (int)); + char **ne_types = malloc(max_ne * sizeof (char *)); + char **ne_values = malloc(max_ne * sizeof (char *)); + int *mval = malloc (max_ne * sizeof (int)); char *sp = subject, *bp = buf; int i, ne_num = 0; @@ -1942,22 +1942,22 @@ parse_name(char *subject, long chtype, int multirdn) goto error; } - OPENSSL_free(ne_values); - OPENSSL_free(ne_types); - OPENSSL_free(buf); - OPENSSL_free(mval); + free(ne_values); + free(ne_types); + free(buf); + free(mval); return n; error: X509_NAME_free(n); if (ne_values) - OPENSSL_free(ne_values); + free(ne_values); if (ne_types) - OPENSSL_free(ne_types); + free(ne_types); if (mval) - OPENSSL_free(mval); + free(mval); if (buf) - OPENSSL_free(buf); + free(buf); return NULL; } @@ -2141,7 +2141,7 @@ pkey_ctrl_string(EVP_PKEY_CTX *ctx, char *value) vtmp++; } rv = EVP_PKEY_CTX_ctrl_str(ctx, stmp, vtmp); - OPENSSL_free(stmp); + free(stmp); return rv; } @@ -2437,14 +2437,14 @@ next_protos_parse(unsigned short *outlen, const char *in) if (len >= 65535) return NULL; - out = OPENSSL_malloc(strlen(in) + 1); + out = malloc(strlen(in) + 1); if (!out) return NULL; for (i = 0; i <= len; ++i) { if (i == len || in[i] == ',') { if (i - start > 255) { - OPENSSL_free(out); + free(out); return NULL; } out[start] = i - start; |