Closed
Bug 672828
Opened 14 years ago
Closed 11 years ago
PK11_PubDeriveWithKDF does not call PORT_SetError when returning NULL due to unrecognized key type
Categories
(NSS :: Libraries, defect, P2)
NSS
Libraries
Tracking
(Not tracked)
RESOLVED
FIXED
3.16.1
People
(Reporter: briansmith, Assigned: Cykesiopka)
Details
Attachments
(1 file, 1 obsolete file)
|
1013 bytes,
patch
|
ryan.sleevi
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #668397 +++
See:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/security/nss/lib/pk11wrap/pk11skey.c&rev=1.122&mark=1898,1905,1907,1912-1913,1918#1897
I believe the whole function body can be replaced with:
return privKey->keyType == ecKey
? pk11_PubDeriveECKeyWithKDF(privKey, pubKey, isSender,
randomA, randomB, derive,
target, operation, keySize,
kdf, sharedData, wincx)
: PK11_PubDerive(privKey, pubKey, isSender, randomA,
randomB, derive, target, operation,
keySize, wincx);
| Assignee | ||
Comment 1•11 years ago
|
||
Patch for the change described in Comment 0.
Attachment #8395443 -
Flags: review?(ryan.sleevi)
Comment 2•11 years ago
|
||
Comment on attachment 8395443 [details] [diff] [review]
bug672828_v1.patch
Review of attachment 8395443 [details] [diff] [review]:
-----------------------------------------------------------------
Use PORT_SetError(SEC_ERROR_BAD_KEY) in the default case.
Attachment #8395443 -
Flags: review?(ryan.sleevi) → review-
Comment 3•11 years ago
|
||
Comment on attachment 8395443 [details] [diff] [review]
bug672828_v1.patch
Review of attachment 8395443 [details] [diff] [review]:
-----------------------------------------------------------------
::: lib/pk11wrap/pk11skey.c
@@ +2221,5 @@
> + target, operation, keySize,
> + kdf, sharedData, wincx)
> + : PK11_PubDerive(privKey, pubKey, isSender, randomA,
> + randomB, derive, target, operation,
> + keySize, wincx);
Also, using the ? : operator for such a complicated expression
makes the code harder to read.
| Assignee | ||
Comment 4•11 years ago
|
||
(In reply to Wan-Teh Chang from comment #3)
> Comment on attachment 8395443 [details] [diff] [review]
> bug672828_v1.patch
>
> Review of attachment 8395443 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: lib/pk11wrap/pk11skey.c
> @@ +2221,5 @@
> > + target, operation, keySize,
> > + kdf, sharedData, wincx)
> > + : PK11_PubDerive(privKey, pubKey, isSender, randomA,
> > + randomB, derive, target, operation,
> > + keySize, wincx);
>
> Also, using the ? : operator for such a complicated expression
> makes the code harder to read.
Noted, thanks.
| Assignee | ||
Comment 5•11 years ago
|
||
+ Use PORT_SetError(SEC_ERROR_BAD_KEY) in the default case
Assignee: nobody → cykesiopka.bmo
Attachment #8395443 -
Attachment is obsolete: true
Attachment #8396165 -
Flags: review?(ryan.sleevi)
Updated•11 years ago
|
Attachment #8396165 -
Flags: review?(ryan.sleevi) → review+
| Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 6•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.16.1
Updated•11 years ago
|
Keywords: checkin-needed
Updated•11 years ago
|
Priority: -- → P2
You need to log in
before you can comment on or make changes to this bug.
Description
•