Skip to content

Example print_cert skips signature verification for self-signed certs #226

@sbellem

Description

@sbellem

The current code, under examples/print_cert.rs, checks whether the subject and issuer are the same with

if x509.subject() == x509.issuer() {

At least, with the self-signed certificates I am trying the example against, the condition check returns false even though the subject and issuer are the same. Using something like

        if x509.subject().to_string() == x509.issuer().to_string() {

fixes the issue.

More broadly this seems to be related to #20.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions