Skip to content

der: Rudimentary implementation of TeletexString and VideotexString#691

Merged
tarcieri merged 4 commits into
RustCrypto:masterfrom
lumag:teletex
Jul 29, 2022
Merged

der: Rudimentary implementation of TeletexString and VideotexString#691
tarcieri merged 4 commits into
RustCrypto:masterfrom
lumag:teletex

Conversation

@lumag

@lumag lumag commented Jul 29, 2022

Copy link
Copy Markdown
Contributor

Add basic support for TeletexString and VideotexString tags. For now treat them as if they were IA5Strings, disallowing chars >= 0x80.

Fix the typo in printable_string.rs, which used PrintedString instead of PrintableString.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Comment thread der/src/asn1/videotex_string.rs Outdated
@tarcieri
tarcieri requested a review from carl-wallace July 29, 2022 21:47
@tarcieri

Copy link
Copy Markdown
Member

Between all of the similar-but-not-identical string types this is starting to feel like quite a bit of duplication.

Curious if this could be wrapped up in macro_rules! at the very least, but I'm fine with merging this PR as-is (at least, once it's been rustfmt'd)

Dmitry Baryshkov added 3 commits July 30, 2022 00:49
Add rudimentary TeletexString support. For the practical purposes the
TeletexString is treated as IA5String, disallowing (for now) the chars
from the non-ASCII space.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Add rudimentary VideotexString support. For the practical purposes the
VideotexString is treated as IA5String, disallowing (for now) the chars
from the non-ASCII space.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
As TeletexString got support, move the pkix_extensions/decode_idp test
out of 'negative' are and check that parsing actually works.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
@lumag

lumag commented Jul 29, 2022

Copy link
Copy Markdown
Contributor Author

Updated to pass rustfmt.

@tarcieri
tarcieri merged commit 44c5f15 into RustCrypto:master Jul 29, 2022
@carl-wallace

Copy link
Copy Markdown
Contributor

I pulled and ran a path validator against a set of busted certs that were discussed a few months back (some of which had teletex). Those now parse and validate. I don't recall why we didn't pursue this approach (other than maybe that teletex is more or less deprecated by 5280).

@lumag
lumag deleted the teletex branch July 29, 2022 22:21
@tarcieri

tarcieri commented Jul 29, 2022

Copy link
Copy Markdown
Member

I'm going to take a look at some approaches to removing duplication before I cut a release with this.


I don't recall why we didn't pursue this approach (other than maybe that teletex is more or less deprecated by 5280).

@carl-wallace last I recall we were talking about BMPString and VisibleString, which I thought we could avoid (or at least have a deprecation to point to) here:

https://datatracker.ietf.org/doc/html/rfc6818#section-3

@lumag

lumag commented Jul 29, 2022

Copy link
Copy Markdown
Contributor Author

@carl-wallace as you've mentioned it. I couldn't find an existing pki/path validation library/code using x509-cert. Could you hopefully point me to it?

@carl-wallace

carl-wallace commented Jul 29, 2022 via email

Copy link
Copy Markdown
Contributor

@lumag lumag mentioned this pull request Jul 30, 2022
5 tasks
@tarcieri tarcieri mentioned this pull request Dec 6, 2022
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