From: Eugene Syromiatnikov Date: Thu, 4 Sep 2025 14:37:02 +0000 (+0200) Subject: apps: remove chopup_args() X-Git-Tag: openssl-3.3.5~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=70baefc22c107dc2857004cd8552d90657b765f5;p=thirdparty%2Fopenssl.git apps: remove chopup_args() The last (and only?) user has been removed in commit eca471391378 "APPS: Drop interactive mode in the 'openssl' program". Complements: eca471391378 "APPS: Drop interactive mode in the 'openssl' program" Signed-off-by: Eugene Syromiatnikov Reviewed-by: Dmitry Belyavskiy Reviewed-by: Paul Dale Reviewed-by: Neil Horman (Merged from https://github.com/openssl/openssl/pull/28441) (cherry picked from commit 3f77491cb336df843984139fbb6fb16f47daf876) --- diff --git a/apps/include/apps.h b/apps/include/apps.h index a1b2cbbdc3d..d239684e6ae 100644 --- a/apps/include/apps.h +++ b/apps/include/apps.h @@ -100,7 +100,6 @@ int wrap_password_callback(char *buf, int bufsiz, int verify, void *cb_data); /* progress callback for dsaparam, dhparam, req, genpkey, etc. */ int progress_cb(EVP_PKEY_CTX *ctx); -int chopup_args(ARGS *arg, char *buf); void dump_cert_text(BIO *out, X509 *x); void print_name(BIO *out, const char *title, const X509_NAME *nm); void print_bignum_var(BIO *, const BIGNUM *, const char *, diff --git a/apps/lib/apps.c b/apps/lib/apps.c index 4be6d0cba18..360d3058762 100644 --- a/apps/lib/apps.c +++ b/apps/lib/apps.c @@ -80,55 +80,6 @@ static int set_multi_opts(unsigned long *flags, const char *arg, const NAME_EX_TBL *in_tbl); int app_init(long mesgwin); -int chopup_args(ARGS *arg, char *buf) -{ - int quoted; - char c = '\0', *p = NULL; - - arg->argc = 0; - if (arg->size == 0) { - arg->size = 20; - arg->argv = app_malloc(sizeof(*arg->argv) * arg->size, "argv space"); - } - - for (p = buf;;) { - /* Skip whitespace. */ - while (*p && isspace(_UC(*p))) - p++; - if (*p == '\0') - break; - - /* The start of something good :-) */ - if (arg->argc >= arg->size) { - char **tmp; - - arg->size += 20; - tmp = OPENSSL_realloc(arg->argv, sizeof(*arg->argv) * arg->size); - if (tmp == NULL) - return 0; - arg->argv = tmp; - } - quoted = *p == '\'' || *p == '"'; - if (quoted) - c = *p++; - arg->argv[arg->argc++] = p; - - /* now look for the end of this */ - if (quoted) { - while (*p && *p != c) - p++; - *p++ = '\0'; - } else { - while (*p && !isspace(_UC(*p))) - p++; - if (*p) - *p++ = '\0'; - } - } - arg->argv[arg->argc] = NULL; - return 1; -} - #ifndef APP_INIT int app_init(long mesgwin) {