Closed Bug 331369 Opened 19 years ago Closed 19 years ago

ECC certificate request POP verification failed

Categories

(JSS Graveyard :: Library, defect)

4.2.3
x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nkwan, Assigned: nkwan)

Details

Attachments

(1 file)

SubjectPublicKeyInfo.toPublicKey() will fail on ECC key due to the following bug https://bugzilla.mozilla.org/show_bug.cgi?id=328909 To fix the problem, we can change the code from return PK11PubKey.fromRaw(type, subjectPublicKey.getBits()); to return PK11PubKey.fromSPKI(getEncoded()); The javadoc in PK11PubKey.fromRaw said "This method works for RSA key s but not DSA or EC keys. Use fromSPKI() instead"
Attached patch Proposed patchSplinter Review
Calling PK11PubKey.fromSPKI instead of PK11PubKey.fromRaw
Attachment #215921 - Flags: review?(glen.beasley)
Comment on attachment 215921 [details] [diff] [review] Proposed patch before you check in could you remove PrivateKey.Type type = PrivateKey.Type.fromOID( algorithm.getOID() ); since the code no longer needs the type, and could you change the JavaDoc to state that "RSA, DSA, and ECC keys can be converted."
Attachment #215921 - Flags: review?(glen.beasley) → review+
thanks Glen, I have removed the OID line, and checked the code in to the trunk cvs commit: Examining . Checking in SubjectPublicKeyInfo.java; /cvsroot/mozilla/security/jss/org/mozilla/jss/pkix/primitive/SubjectPublicKeyInfo.java,v <-- SubjectPublicKeyInfo.java new revision: 1.7; previous revision: 1.6 done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: