Closed
Bug 962762
Opened 11 years ago
Closed 11 years ago
RSA_BlockType: Remove confusing comment and unnecessary values
Categories
(NSS :: Libraries, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
3.16
People
(Reporter: KaiE, Assigned: KaiE)
Details
Attachments
(2 files, 1 obsolete file)
1.29 KB,
patch
|
wtc
:
review+
|
Details | Diff | Splinter Review |
1.36 KB,
patch
|
Details | Diff | Splinter Review |
Type RSA_BlockType is prefixed with a comment.
A part of that comment says:
* The explicit value assignments are not needed (because C would give
* us those same values anyway) but are included as a reminder...
This is wrong, because the enum values aren't consecutive. Value 3 is missing.
I guess the comment was correct in the past, but probably something for value 3 got removed (?).
I propose to remove the mentioned two lines from the comment.
Assignee | ||
Comment 1•11 years ago
|
||
Value 3 was removed as part of this commit from bug 158747:
https://hg.mozilla.org/projects/nss/rev/7f5f39a8d010
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8363926 -
Flags: review?(ryan.sleevi)
Comment 3•11 years ago
|
||
Comment on attachment 8363926 [details] [diff] [review]
p-962762
Review of attachment 8363926 [details] [diff] [review]:
-----------------------------------------------------------------
r=wtc.
::: lib/freebl/rsapkcs.c
@@ +23,5 @@
>
> /*
> * RSA block types
> *
> * The actual values are important -- they are fixed, *not* arbitrary.
Only the values of RSA_BlockPrivate and RSA_BlockPublic are fixed.
This means, for example, RSA_BlockRaw can take the value of 3.
But this comment is fine.
@@ +30,5 @@
> RSA_BlockUnused = 0, /* unused */
> RSA_BlockPrivate = 1, /* pad for a private-key operation */
> RSA_BlockPublic = 2, /* pad for a public-key operation */
> RSA_BlockRaw = 4, /* simply justify the block appropriately */
> RSA_BlockTotal
We should remove the RSA_BlockTotal enum constant. It is
not used and doesn't really make sense when there is a missing
value (3).
We can also remove the RSA_BlockUnused enum constant. It is not
used.
Attachment #8363926 -
Flags: review+
Assignee | ||
Comment 4•11 years ago
|
||
how about this?
Assignee: nobody → kaie
Attachment #8363926 -
Attachment is obsolete: true
Attachment #8363926 -
Flags: review?(ryan.sleevi)
Attachment #8363954 -
Flags: review?(wtc)
Comment 5•11 years ago
|
||
r=ryan.sleevi as well
Comment 6•11 years ago
|
||
Comment on attachment 8363954 [details] [diff] [review]
p2-962762
Review of attachment 8363954 [details] [diff] [review]:
-----------------------------------------------------------------
r=wtc.
::: lib/freebl/rsapkcs.c
@@ +32,3 @@
> RSA_BlockPrivate = 1, /* pad for a private-key operation */
> RSA_BlockPublic = 2, /* pad for a public-key operation */
> RSA_BlockRaw = 4, /* simply justify the block appropriately */
Nit: it would be a good idea to remove this comma. Some older compiler
may not allow it.
Attachment #8363954 -
Flags: review?(wtc) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•11 years ago
|
Target Milestone: --- → 3.16
Assignee | ||
Updated•11 years ago
|
Summary: RSA_BlockType: Remove confusing comment about unnecessary enum assignments → RSA_BlockType: Remove confusing comment and unnecessary values
Assignee | ||
Comment 7•11 years ago
|
||
removing the comma as suggested
Assignee | ||
Comment 8•11 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•