Complete and correct support for directoryName constraints

Open
#19 3 comments 1 reaction 0 assignees View on GitHub

@sfackler is already working on this.

Since May 10, 2026.

  • #489 by @sfackler — open
  • #543 by @kais58 — open

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust

Research direction

Start by reproducing the failure with rustls's tlsclient-mio command and inspect the directoryName constraint handling in the certificate-validation code. Compare the issuer constraint with the certificate subject's name attributes, using the crt.sh certificate as a case study; done means the reported certificate validates correctly without regressing other directoryName checks.

Written by the indexing model from the issue text.

Description

Just to record: this and the parent repo do not correctly process directoryName name constraints. The easier reproducer for this is (in rustls):

$ ./target/debug/tlsclient-mio --http www.indicepa.gov.it
TLS error: InvalidCertificateData("invalid peer certificate: UnknownIssuer")

The issuer here is https://crt.sh/?id=5715019745&opt=cablint,x509lint,zlint and we're incorrectly processing the constraint against the end-certificate subject. There seems to be a lack of code that dissects the subject into name attributes, and no code at all for comparing sets of DN attributes for equality?

golang has the same issue https://github.com/golang/go/issues/55872

Dominant language
Rust
Stars
167
Forks
112
Avg merge
4h 28m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rustls/webpki

All issues in rustls/webpki

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.