PR_Writev() of 0 bytes does not drive handshake

RESOLVED FIXED in 3.3

Status

NSS
Libraries
P2
normal
RESOLVED FIXED
17 years ago
17 years ago

People

(Reporter: John G. Myers, Assigned: Nelson Bolyard (seldom reads bugmail))

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
A write operation on an SSL FD is defined to complete any pending handshake 
before returning success.  A PR_Writev() of 0 bytes of data to an SSL socket is 
incorrectly returning success before the handshake is complete.
(Reporter)

Comment 1

17 years ago
Created attachment 39740 [details] [diff] [review]
Proposed fix
(Assignee)

Comment 2

17 years ago
This patch looks ok to me.  Both the NSS_3_2_BRANCH and the trunk are
now frozen I believe (for separate reasons, branch for mozilla, trunk
for NSS 3.3).  If you can get checkin approval from all the right 
people, (including Lord for the 3_2 branch, and wtc for branch or trunk, 
I think), it would be OK by me to check it in.

Comment 3

17 years ago
Nelson, you can check this in on the trunk.

This fix is too late for mozilla0.9.2.  We should be
able to check it in on NSS_3_2_BRANCH after the
Mozilla tree re-opens for mozilla0.9.3 checkins.

Comment 4

17 years ago
Since mozilla does not need this fix, we only need to
check it in on the trunk.
Priority: -- → P2
Target Milestone: --- → 3.3
(Reporter)

Comment 5

17 years ago
This problem was detected in a non-Mozilla project.  I don't know of any need to 
get this into Mozilla proper.

The caller in that other project already has code to trim 0-length iovecs, so 
can easily work around the problem by calling PR_Write() instead of PR_Writev() 
when the iovec count is 0.

Updated

17 years ago
Keywords: review

Updated

17 years ago
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 6

17 years ago
Nelson checked in the fix before he went on sabbatical.
This fix is in NSS 3.3.

Marked the bug fixed.
You need to log in before you can comment on or make changes to this bug.