Closed Bug 335619 Opened 20 years ago Closed 20 years ago

the Template error of org.mozilla.jss.pkix.cmmf.PKIStatusInfo

Categories

(JSS Graveyard :: Library, defect, P2)

4.2.4
x86
Windows 2000
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rocky-s, Assigned: glenbeasley)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.2) Gecko/20060404 SeaMonkey/1.0.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.2) Gecko/20060404 SeaMonkey/1.0.1 the asn structure of PKIStatusInfo is PKIStatusInfo ::= SEQUENCE { status PKIStatus, statusString PKIFreeText OPTIONAL, failInfo PKIFailureInfo OPTIONAL } Element'statusString' and 'failInfo' are all OPTIONAL . But the template that defined at line 165-170 in PKIStatusInfo.java is : public Template() { seqt = new SEQUENCE.Template(); seqt.addElement( INTEGER.getTemplate() ); seqt.addElement(new SEQUENCE.OF_Template(UTF8String.getTemplate())); seqt.addElement( BIT_STRING.getTemplate() ); } I think It should be seqt.addOptionalElement(new SEQUENCE.OF_Template(UTF8String.getTemplate())); seqt.addOptionalElement( BIT_STRING.getTemplate() ); otherwise , it will occurs Exception when decode with empty element 'statusString ' and 'failInfo' Reproducible: Always
Attachment #220035 - Flags: review?(nkwan)
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Version: unspecified → 4.2
Attachment #220035 - Flags: review?(nkwan) → review+
cvs commit -m "335619 Template Fix for optional elements by rocky-s r=nkwan" cvs commit: Examining . Enter passphrase for key '/home/gb134726/.ssh/id_dsa': Checking in PKIStatusInfo.java; /cvsroot/mozilla/security/jss/org/mozilla/jss/pkix/cmmf/PKIStatusInfo.java,v <-- PKIStatusInfo.java new revision: 1.5; previous revision: 1.4 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.2.4
Version: 4.2 → 4.2.4
Missing priority
Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: