Closed Bug 95982 Opened 23 years ago Closed 23 years ago

rsa.c: RSA_PrivateKeyOp will return uninitialized SECStatus on success.

Categories

(NSS :: Libraries, enhancement)

x86
Linux
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mozilla-bugs, Assigned: bugz)

References

()

Details

Attachments

(1 obsolete file)

Summary says it all. RSA_PrivateKeyOp ends by returning "rv", but rv is never initialized unless "err" is non-zero. I have no idea how important this function is, but this can't be good.
Blocks: 59652
Assigned the bug to Bob. Bob, how serious is this bug?
Assignee: wtc → relyea
This is my code. I agree it looks confusing, but there is no bug. If you follow the success path, you find that the macro CHECK_SEC_OK must be called, wrapped around the actual private key op code. If you look at the definition of CHECK_SEC_OK at http://lxr.mozilla.org/mozilla/source/security/nss/lib/freebl/secmpi.h#39, you will see that it sets rv. I agree the use of the wrapping macro is confusing at first glance, but this is at best an enhancement, not a bug. -Ian
Severity: normal → enhancement
Ian, please propose a target milestone for this bug.
Assignee: relyea → ian.mcgreer
Priority: -- → P1
Target Milestone: --- → 3.4
Comment on attachment 56155 [details] [diff] [review] "draft" patch to add function (need to decide where it is called, also). Note the #ifdef'ed error value. How do we want to trap this error? oops. wrong rsa bug ;)
Attachment #56155 - Attachment is obsolete: true
I don't think this is a bug. As I noted before, the variable is initialized, just within a macro.
Status: NEW → RESOLVED
Closed: 23 years ago
Priority: P1 → --
Resolution: --- → WONTFIX
Actually, this compiler warning was fixed by relyea@netscape.com on Sep 20 15:14, rv is now initialized when declared. Reopening to be able to make "resolved fixed"
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Fixed, see above.
Status: REOPENED → RESOLVED
Closed: 23 years ago23 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: