Skip to content

[Bug]: cert->pubkeystored is never cleared even when the public key is #10028

@DrKatieL

Description

@DrKatieL

Contact Details

No response

Version

latest master

Description

Note this may impact other locations. It's causing incorrect behavior after FillSigner is called. Line 26630 of asn.c is
cert->publicKey = 0; /* in case lock fails don't free here. */
However, this doesn't clear cert->pubkeystored.
If FillSigner is called a second time on the same cert, line 26598 then copies the null cert->publicKey object into the signer object and proceeds to attempt to use it.
if (cert->pubKeyStored) { signer->publicKey = cert->publicKey; signer->pubKeySize = cert->pubKeySize; }

Reproduction steps

grep asn.c for "cert->publicKey = 0". grep for "cert->pubkeystored".

Relevant log output

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions