Closed
Bug 479341
Opened 17 years ago
Closed 17 years ago
make WeaveCrypto::GenerateKeypair() call PK11_GenerateKeyPairWithOpFlags()
Categories
(Cloud Services :: General, defect)
Cloud Services
General
Tracking
(Not tracked)
RESOLVED
FIXED
0.3
People
(Reporter: myk, Assigned: Dolske)
References
Details
(Whiteboard: delicious-bacon-wanted+)
Attachments
(1 file)
|
1.94 KB,
patch
|
Details | Diff | Splinter Review |
According to dolske in bug 476539, comment 9: "You might be able work around [a test failure on PK11_GenerateKeyPair() with the XULRunner-based test harness in bug 476539] by having WeaveCrypto::GenerateKeypair()
call PK11_GenerateKeyPairWithOpFlags() instead of PK11_GenerateKeyPair()... The
latter generates a key with CKA_PRIVATE set, which requires the token to be
logged into. Weave doesn't need that, it's only using this API (instead of the
WithOpFlags flavor) because it's a bit simpler simpler to use."
Assigning this bug per bug 476539, comment 10.
| Reporter | ||
Updated•17 years ago
|
Whiteboard: delicious-bacon-wanted+
Comment 1•17 years ago
|
||
mmmmm bacon :-)
| Assignee | ||
Comment 2•17 years ago
|
||
Yeah, sorry, forgot about this.
Updated•17 years ago
|
Target Milestone: -- → 0.4
| Assignee | ||
Comment 3•17 years ago
|
||
Well, I feel a little silly... I remembered this being as a tedious problem that required building up an object template by hand, but it's actually a fairly trivial fix.
This fixes test_crypto_keypair, but not test_records_crypto...
That fails with:
*** CHECK FAILED: TypeError: crypto.generateRandomKey is not a function
Which is a little odd, because it certainly is a function. Looks like the problem is that something's redefining |crypto| after it's initially assigned. If I dump it right before the error it's "[object Crypto]". But if I assign it from getService() again, it's the expected "[xpconnect wrapped IWeaveCrypto]". [But then the test fails a little further down with a different problem.]
Not sure exactly what's causing that, but I suspect it's a test problem.
| Reporter | ||
Comment 4•17 years ago
|
||
Yup, it's a test problem. The XULRunner harness runs tests in a window, which has a window.crypto property that cannot be set, so the test throws "TypeError: setting a property that has only a getter" when trying to set it to the IWeaveCrypto service, and |crypto| is not what the test code needs it to be.
I fixed that in the latest version of the harness, and I also fixed one other issue in the Weave code that the new harness reveals. With the patch in this bug, the latest harness patch in bug 476539 works as expected. Thanks Justin!
| Assignee | ||
Comment 5•17 years ago
|
||
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: 0.4 → 0.3
Updated•16 years ago
|
Component: Weave → General
Product: Mozilla Labs → Weave
Updated•16 years ago
|
QA Contact: weave → general
You need to log in
before you can comment on or make changes to this bug.
Description
•