Add 'const' to SEC_DerSignData, ssl3_UpdateHandshakeHashes. Remove PK11_ImportPrivateKey.

RESOLVED FIXED in 3.13

Status

NSS
Libraries
P2
minor
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: Wan-Teh Chang, Assigned: Wan-Teh Chang)

Tracking

unspecified
3.13

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [const])

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
Created attachment 464968 [details] [diff] [review]
Proposed patch

The proposed patch adds 'const' to SEC_DerSignData
and ssl3_UpdateHandshakeHashes so that callers don't
have to cast away the 'const' from arguments.

It is necessary to cast away 'const' here for the
'data' field of a SECItem:

-    sd.data.data = buf;
+    sd.data.data = (unsigned char*) buf;

The patch also removes unused and unexported function
PK11_ImportPrivateKey.  Please use this MXR query to
verify that:
http://mxr.mozilla.org/security/search?string=PK11_ImportPrivateKey
Attachment #464968 - Flags: review?(emaldona)

Updated

8 years ago
Attachment #464968 - Flags: review?(emaldona) → review+
(Assignee)

Comment 1

8 years ago
I checked in the patch on the NSS trunk (NSS 3.13).

Checking in cryptohi/cryptohi.h;
/cvsroot/mozilla/security/nss/lib/cryptohi/cryptohi.h,v  <--  cryptohi.h
new revision: 1.15; previous revision: 1.14
done
Checking in cryptohi/secsign.c;
/cvsroot/mozilla/security/nss/lib/cryptohi/secsign.c,v  <--  secsign.c
new revision: 1.23; previous revision: 1.22
done
Checking in pk11wrap/pk11pk12.c;
/cvsroot/mozilla/security/nss/lib/pk11wrap/pk11pk12.c,v  <--  pk11pk12.c
new revision: 1.15; previous revision: 1.14
done
Checking in ssl/ssl3con.c;
/cvsroot/mozilla/security/nss/lib/ssl/ssl3con.c,v  <--  ssl3con.c
new revision: 1.144; previous revision: 1.143
done
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: 3.12.8 → 3.13
(Assignee)

Updated

8 years ago
Whiteboard: [const]
You need to log in before you can comment on or make changes to this bug.