Skip to content

Fixes issue with uninitialized caKey#277

Merged
anhu merged 3 commits intowolfSSL:masterfrom
dgarske:csr_sign
Nov 30, 2021
Merged

Fixes issue with uninitialized caKey#277
anhu merged 3 commits intowolfSSL:masterfrom
dgarske:csr_sign

Conversation

@dgarske
Copy link
Copy Markdown
Member

@dgarske dgarske commented Nov 29, 2021

Fixes issue with uninitialized caKey found with valgrind reported in ZD 13212.

Copy link
Copy Markdown
Member

@anhu anhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initCaKey declaration and usage needs to be guarded by HAVE_ECC since caKey's declaration is guarded by HAVE_ECC.

@anhu
Copy link
Copy Markdown
Member

anhu commented Nov 29, 2021

Same goes for initCsrKey as well.

@anhu anhu assigned dgarske and unassigned anhu Nov 29, 2021
…uplicate with_altnames and combined into existing example.
@dgarske dgarske requested a review from anhu November 29, 2021 21:29
@dgarske dgarske assigned anhu and unassigned dgarske Nov 29, 2021
Copy link
Copy Markdown
Member

@anhu anhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I've left a couple of comments. Also, I think the description of this PR no longer fits.

Comment thread certgen/csr_sign.c Outdated
const char* csrPemFile = argv[2];
const char* caCertPemFile = argv[3];
const char* caKeyPemFile = argv[4];
const char* typeStr = "ecc";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic on line 86 is no longer required.

Comment thread certgen/csr_sign.c Outdated
static void usage(void)
{
printf("Usage: ./csr_sign [type] [csr.pem] [ca-cert.pem] [ca-key.pem]\n");
printf("Usage: ./csr_sign [csr.pem] [ca-cert.pem] [ca-key.pem]\n");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not positive about this, but I think square brackets means its optional. But the way the code works below, these are not optional args.

@dgarske dgarske requested a review from anhu November 29, 2021 22:34
Copy link
Copy Markdown
Member

@anhu anhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we're good to go!

@anhu anhu merged commit b96386c into wolfSSL:master Nov 30, 2021
@dgarske dgarske deleted the csr_sign branch November 30, 2021 19:20
yota22721 pushed a commit to yota22721/wolfssl-examples that referenced this pull request Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants