Skip to content

Raise usage error when parsing empty certificate #4822

Open
@goatgoose

Description

@goatgoose

Problem:

Currently, s2n-tls will raise an internal error when parsing an empty certificate like the following:

-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----

This occurs when the s2n-tls PEM parser is invoked, in functions like s2n_cert_chain_and_key_load_pem().

Solution:

s2n-tls should instead return a usage error with a more helpful error message. We should also make sure that similar parsing issues result in usage errors.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions