Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some sample programs can't show usage instructions #1120

Closed
redtangent opened this issue Oct 2, 2017 · 3 comments · Fixed by #6998
Closed

Some sample programs can't show usage instructions #1120

redtangent opened this issue Oct 2, 2017 · 3 comments · Fixed by #6998
Assignees
Labels
component-platform Portability layer and build scripts enhancement historical-reviewing Currently reviewing (for legacy PR/issues)

Comments

@redtangent
Copy link
Contributor

redtangent commented Oct 2, 2017

Description

  • Type: Bug
  • Priority: Minor

Bug

OS
linux|windows

mbed TLS build:
Version: All versions
Configuration: n/a
Compiler and options (if you used a pre-built binary, please indicate how you obtained it): n/a
Additional environment information: n/a

The following sample programs all appear to have a line if( argc == 0 ) before displaying usage instructions. The problem with that is unless main() is called via some means other than the shell, argc will always be greater than 0 as the first argument in argv is always the name of the program being executed. The line should be if( argc == 1 ) if it's meant to display when no arguments have been passed. That may be a mistake though, as some of the programs can execute with no provided options.

programs/util/pem2der.c
programs/x509/cert_req.c
programs/x509/cert_app.c
programs/x509/cert_write.c
programs/x509/req_app.c
programs/x509/crl_app.c
programs/pkey/dh_genprime.c
programs/pkey/key_app.c
programs/pkey/gen_key.c
programs/pkey/key_app_writer.c
programs/ssl/ssl_client2.c
programs/ssl/ssl_server2.c
programs/ssl/ssl_mail_client.c
@RonEld
Copy link
Contributor

RonEld commented Oct 3, 2017

Hi @redtangent Thank you for reporting this issue!
We will look into this issue

@ciarmcom
Copy link

ciarmcom commented Oct 3, 2017

ARM Internal Ref: IOTSSL-1797

@RonEld RonEld added the component-platform Portability layer and build scripts label Feb 17, 2019
@RonEld RonEld added enhancement and removed bug labels Jun 12, 2019
@aditya-deshpande-arm aditya-deshpande-arm added the historical-reviewing Currently reviewing (for legacy PR/issues) label Jan 24, 2023
@tom-cosgrove-arm
Copy link
Contributor

@aditya-deshpande-arm Fixing this should also fix the issue I mentioned today: #6700

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-platform Portability layer and build scripts enhancement historical-reviewing Currently reviewing (for legacy PR/issues)
Projects
None yet
6 participants