Fix HASH_GetHMACOidTagByHashOidTag

RESOLVED FIXED in 3.12.7

Status

P2
normal
RESOLVED FIXED
10 years ago
9 years ago

People

(Reporter: nelson, Assigned: shailen.n.jain)

Tracking

({coverity})

3.12
3.12.7
coverity

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.03 KB, patch
nelson
: review+
Details | Diff | Splinter Review
Coverity caught this one.  CID 1258 file nss/lib/cryptohi/sechash.c

Function HASH_GetHMACOidTagByHashOidTag ignores its input argument and
produces a constant output.  It always sets error 
SEC_ERROR_INVALID_ALGORITHM and returns SEC_OID_UNKNOWN.

Clearly it has never been tested.  
Is it used?  Is it really needed?   
If not, let's get rid of it.

Updated

9 years ago
Summary: HASH_GetHMACOidTagByHashOidTag obviously untested - do we need it? → Remove HASH_GetHMACOidTagByHashOidTag

Comment 1

9 years ago
Created attachment 430930 [details] [diff] [review]
remove it
Assignee: rrelyea → timeless
Status: NEW → ASSIGNED
Attachment #430930 - Flags: review?(rrelyea)
Comment on attachment 430930 [details] [diff] [review]
remove it

r=nelson
Attachment #430930 - Flags: review+

Comment 3

9 years ago
Comment on attachment 430930 [details] [diff] [review]
remove it

r-

I actually needed this function recently. It's supposed to be exported.

bob
Attachment #430930 - Flags: review?(rrelyea) → review-

Comment 4

9 years ago
the first 2 instances of hmacoid should be hashoid.
(Reporter)

Updated

9 years ago
Attachment #430930 - Attachment is obsolete: true
(Reporter)

Updated

9 years ago
Assignee: timeless → rrelyea
Status: ASSIGNED → NEW
Summary: Remove HASH_GetHMACOidTagByHashOidTag → Fix HASH_GetHMACOidTagByHashOidTag
(Reporter)

Updated

9 years ago
Priority: -- → P2
(Assignee)

Comment 5

9 years ago
Created attachment 436458 [details] [diff] [review]
Patch V 1

Hi Bob,

   Can you please review this patch?

Thanks,
Shailendra
Attachment #436458 - Flags: review?(rrelyea)
(Reporter)

Updated

9 years ago
Attachment #436458 - Flags: review?(rrelyea) → review+
Comment on attachment 436458 [details] [diff] [review]
Patch V 1

r=nelson
Bug 469615: Fix HASH_GetHMACOidTagByHashOidTag
Patch contributed by Shailendra Jain <shailen.n.jain@gmail.com>, r=rrelyea

Checking in cryptohi/sechash.c; new revision: 1.10; previous revision: 1.9
Assignee: rrelyea → shailen.n.jain
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.12.7
You need to log in before you can comment on or make changes to this bug.