Closed
Bug 352929
Opened 17 years ago
Closed 16 years ago
Remove unused function DER_Decode
Categories
(NSS :: Libraries, defect, P3)
NSS
Libraries
Tracking
(Not tracked)
RESOLVED
FIXED
3.11.8
People
(Reporter: wtc, Assigned: biswatosh2001)
Details
Attachments
(1 file, 1 obsolete file)
12.19 KB,
patch
|
wtc
:
review+
nelson
:
review+
|
Details | Diff | Splinter Review |
The function DER_Decode is not exported and is not used by NSS itself. We should remove it. Like SEC_ASN1DecodeItem, DER_Decode also allows extra input after the ASN.1 object in the buffer. This can be fixed by testing buf_len == header_len + contents_len after the der_capture call. But it doesn't make sense to fix dead code. We can use the QuickDER decoder to decode DER. It's not necessary to keep DER_Decode.
Updated•16 years ago
|
Assignee: nobody → biswatosh2001
Assignee | ||
Comment 1•16 years ago
|
||
Removes also der_decode() from derdec.c. der_decode() is either called by itself only or by DER_Decode(). Other functions in the same file are called from other places in nss. SEC_QuickDERDecodeItem() is being used in der decoding in lot of places in NSS. Plus, indeed, as Wan-Teh Chang noted, DER_Decode() is also not exported outside. Hence, we may remove these two functions.
Attachment #282393 -
Flags: review?(julien.pierre.boogz)
Comment 2•16 years ago
|
||
Comment on attachment 282393 [details] [diff] [review] Removes DER_Decode from nss/lib/util/derdec.c r- This patch is incomplete. The function declaration needs to be removed from header files, also.
Attachment #282393 -
Flags: review?(julien.pierre.boogz) → review-
Assignee | ||
Comment 3•16 years ago
|
||
Removes DER_Decode() declaration from nss/lib/util/secder.h ,in addition to what the previous patch (282393) was already doing.
Attachment #282393 -
Attachment is obsolete: true
Attachment #282497 -
Flags: review?(nelson)
Reporter | ||
Comment 4•16 years ago
|
||
Comment on attachment 282497 [details] [diff] [review] Patch ver 2. Now removes function declaration from header file also. r=wtc. Please delete the blank lines before the code you deleted so that blocks of code are separated by one blank line. Thanks! It would be nice to see if DER_Length can be merged with the QuickDER decoder. That would be another bug.
Attachment #282497 -
Flags: review?(nelson) → review+
Updated•16 years ago
|
Priority: -- → P3
Target Milestone: --- → 3.12
Comment 5•16 years ago
|
||
Comment on attachment 282497 [details] [diff] [review] Patch ver 2. Now removes function declaration from header file also. r=nelson
Attachment #282497 -
Flags: review+
Assignee | ||
Comment 6•16 years ago
|
||
Committing to nss/lib/util/derdec.c and secder.h to NSSBranch Checking in derdec.c; /cvsroot/mozilla/security/nss/lib/util/derdec.c,v <-- derdec.c new revision: 1.5; previous revision: 1.4 done Checking in secder.h; /cvsroot/mozilla/security/nss/lib/util/secder.h,v <-- secder.h new revision: 1.10; previous revision: 1.9 done
Assignee | ||
Comment 7•16 years ago
|
||
A mistake in the comment. I have commited to NSSHead and not to Branch. cvs commit comment also should have mentioned Head. Sorry for that. :(
Assignee | ||
Comment 8•16 years ago
|
||
This time checking to the Branch(NSS_3_11_BRANCH)... Checking in derdec.c; /cvsroot/mozilla/security/nss/lib/util/derdec.c,v <-- derdec.c new revision: 1.3.28.1; previous revision: 1.3 done Checking in secder.h; /cvsroot/mozilla/security/nss/lib/util/secder.h,v <-- secder.h new revision: 1.7.28.2; previous revision: 1.7.28.1 done
Status: NEW → ASSIGNED
Assignee | ||
Updated•16 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 9•16 years ago
|
||
Commited the changes both to the trunk and to the branch. Marking this bug as resolved fixed.
Reporter | ||
Comment 10•16 years ago
|
||
Biswatosh, thank you for fixing this bug. It is not necessary to fix noncritical bugs on the NSS_3_11_BRANCH. This bug's severity is only "trivial". Since you checked in the fix on the NSS_3_11_BRANCH, please update the target milestone to the next NSS 3.11.x release.
Assignee | ||
Comment 11•16 years ago
|
||
Although cvs commit opened up the editor and I had written comments in it but it did not succeed for some reason, when I saw it later. Hence, backed out the commits for derdec.c both in Branch and Trunk and again recommited them back with appropriate comments. The following details are just for reference log for backing out and recommiting back the new version of derdec.c. ******************************************************************** For Branch. Backing out... cvs update -j1.3.28.1 -j1.3 mozilla/security/nss/lib/util/derdec.c RCS file: /cvsroot/mozilla/security/nss/lib/util/derdec.c,v retrieving revision 1.3.28.1 retrieving revision 1.3 Merging differences between 1.3.28.1 and 1.3 into derdec.c [root@localhost util]# cvs commit derdec.c Checking in derdec.c; /cvsroot/mozilla/security/nss/lib/util/derdec.c,v <-- derdec.c new revision: 1.3.28.2; previous revision: 1.3.28.1 done Backout done. Recommiting ... Checking in derdec.c; /cvsroot/mozilla/security/nss/lib/util/derdec.c,v <-- derdec.c new revision: 1.3.28.3; previous revision: 1.3.28.2 done Recommited back derdec.c to the Branch. ***************************************************** For Head: Backing out... cvs update -j1.5 -j1.4 mozilla/security/nss/lib/util/derdec.c RCS file: /cvsroot/mozilla/security/nss/lib/util/derdec.c,v retrieving revision 1.5 retrieving revision 1.4 Merging differences between 1.5 and 1.4 into derdec.c Checking in derdec.c; /cvsroot/mozilla/security/nss/lib/util/derdec.c,v <-- derdec.c new revision: 1.6; previous revision: 1.5 done Backout done. Reecommiting derdec.c to the HEAD. [root@localhost util]# cvs commit derdec.c Checking in derdec.c; /cvsroot/mozilla/security/nss/lib/util/derdec.c,v <-- derdec.c new revision: 1.7; previous revision: 1.6 done Recommited back derdec.c to the Head. ***************************************
Assignee | ||
Comment 12•16 years ago
|
||
Since now, it is commited to the branch, setting the target to 3.11.8
Target Milestone: 3.12 → 3.11.8
You need to log in
before you can comment on or make changes to this bug.
Description
•