Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTF8String-encoded challengePassword attribute causes decode error #1783

Closed
pki-bot opened this issue Oct 3, 2020 · 3 comments
Closed

UTF8String-encoded challengePassword attribute causes decode error #1783

pki-bot opened this issue Oct 3, 2020 · 3 comments
Milestone

Comments

@pki-bot
Copy link

pki-bot commented Oct 3, 2020

This issue was migrated from Pagure Issue #1221. Originally filed by ftweedal (@frasertweedale) on 2014-12-04 08:18:57:


Original report: https://www.redhat.com/archives/pki-users/2014-December/msg00000.html

PKCS 9 (RFC 2985) §5.4.1 "Challenge password" states that "PKCS 9-
attribute processing systems MUST be able to recognize and process
all string types in DirectoryString values."

From RFC 5280:

DirectoryString ::= CHOICE {
teletexString TeletexString (SIZE (1..MAX)),
printableString PrintableString (SIZE (1..MAX)),
universalString UniversalString (SIZE (1..MAX)),
utf8String UTF8String (SIZE (1..MAX)),
bmpString BMPString (SIZE (1..MAX)) }

The precise cause of the error is in com.netscape.cms.servlet.cert.scep.ChallengePassword, where derVal.getPrintableString() is called, but none of the other string encodings are tried.

Proposed fix: add getDirectoryString() method to DerValue class, that checks that the tag is for one of the five string types above, then dispatches to getASN1CharString(). Also add corresponding getDirectoryString() method to DerInputStream class.

@pki-bot pki-bot added this to the 10.2.1 milestone Oct 3, 2020
@pki-bot
Copy link
Author

pki-bot commented Oct 3, 2020

@pki-bot pki-bot closed this as completed Oct 3, 2020
@pki-bot
Copy link
Author

pki-bot commented Oct 3, 2020

Comment from ftweedal (@frasertweedale) at 2014-12-16 04:45:16

pushed to master (cdebcd5)

@pki-bot
Copy link
Author

pki-bot commented Oct 3, 2020

Comment from ftweedal (@frasertweedale) at 2017-02-27 14:09:32

Metadata Update from @frasertweedale:

  • Issue assigned to frasertweedale
  • Issue set to the milestone: 10.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant