Skip to content

Unexpected i2d_X509 length#953

Open
Chenjp wants to merge 1 commit intoapache:mainfrom
Chenjp:i2d_X509_failure
Open

Unexpected i2d_X509 length#953
Chenjp wants to merge 1 commit intoapache:mainfrom
Chenjp:i2d_X509_failure

Conversation

@Chenjp
Copy link
Contributor

@Chenjp Chenjp commented Feb 26, 2026

Edge case: consider the possibility of zero length.

Consider the possibility of zero length.
@markt-asf
Copy link
Contributor

What problem does this solve?

@michael-o
Copy link
Member

EXAMPLES
Allocate and encode the DER encoding of an X509 structure:

int len;
unsigned char *buf;

buf = NULL;
len = i2d_X509(x, &buf);
if (len	< 0)
    /* error */

@markt-asf
Copy link
Contributor

The len < 0 case is already covered so again, what problem does this solve?

@Chenjp
Copy link
Contributor Author

Chenjp commented Mar 23, 2026 via email

@Chenjp
Copy link
Contributor Author

Chenjp commented Mar 23, 2026 via email

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.

3 participants