Closed Bug 222037 Opened 21 years ago Closed 21 years ago

HTTPS doesn't work under BONE netstack in 1.5* trunk

Categories

(Core :: Security, defect)

x86
BeOS
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: sergei_d, Assigned: darin.moz)

Details

Attachments

(2 files)

It's impossible to access secure sites with BONE builds of Mozilla 1.5* and
Firebird 0.61*
Summary: HTTPS don't work under BONE netstack in 1.5* trink → HTTPS doesn't work under BONE netstack in 1.5* trunk
reporter: please provide a HTTP+SOCKET log.  see directions here:

  http://www.mozilla.org/projects/netlib/http/http-debugging.html

thx!
Attached file HTTP debug logfile
that's a log file done according mentioned page.
At start it loaded mozilla.org page,
then i attemted to access https://www.hansa.ee site.
All recommendations about changes in source code to find out issue are welcomed
- i have here source tree from 23-Sept-2003.
Whole build takes about 6-8 hours on this crappy machine, but little changes
may be tried very quickly
log file indicates this nspr error PR_ADDRESS_NOT_SUPPORTED_ERROR:

-2145864664[8018b428]:   trying address: 193.40.195.42
-2145864664[8018b428]:   idle [0] { handler=807dbcf0 condition=0 pollflags=6 }
-2145864664[8018b428]: nsSocketTransportService::AddToPollList [handler=807dbcf0]
-2145864664[8018b428]:   active=1 idle=1
-2145864664[8018b428]: nsSocketTransportService::RemoveFromIdleList
[handler=807dbcf0]
-2145864664[8018b428]:   active=1 idle=0
-2145864664[8018b428]:   calling PR_Poll [active=1 idle=0]
-2145864664[8018b428]: nsSocketTransport::OnSocketReady [this=807dbcf0 outFlags=2]
-2145864664[8018b428]:   advancing to STATE_TRANSFERRING
-2145864664[8018b428]: nsSocketTransport::SendStatus [this=807dbcf0 status=804b0004]
-2145864664[8018b428]: nsHttpTransaction::OnSocketStatus [this=80712160
status=804b0004 progress=0]
-2145864664[8018b428]:   active [0] { handler=807dbcf0 condition=0 pollflags=7 }
-2145864664[8018b428]:   calling PR_Poll [active=1 idle=0]
-2145864664[8018b428]: nsSocketTransport::OnSocketReady [this=807dbcf0 outFlags=3]
-2145864664[8018b428]: nsSocketOutputStream::OnSocketReady [this=807dbd9c cond=0]
-2145864664[8018b428]: nsHttpConnection::OnSocketWritable [this=8079b988]
-2145864664[8018b428]:   writing transaction request stream
-2145864664[8018b428]: nsSocketOutputStream::Write [this=807dbd9c count=424]
-2145864664[8018b428]:   calling PR_Write [count=424]
-2145864664[8018b428]:   PR_Write returned [n=-1]
-2145864664[8018b428]: ErrorAccordingToNSPR [in=-5985 out=80004005]

i can't tell from the log file why this error is being generates.  someone who
can reproduce this should step through PR_Write in the debugger to see where the
error is being generated.  probably somewhere in NSS, but who knows!?
More info:
HTTPS connections asserts with the following info:
Assertion failure: IsValidNetAddr(addr) == PR_TRUE, at prsocket.c:1097 

(The line number is from 2003-09-23 build.)

It's reproducible with all? https-addresses. I've been using
https://www.verisign.com
suspecting big DNS-patch - http://bugzilla.mozilla.org/show_bug.cgi?id=205726
changing component
Component: Networking → Security: General
adding Wan-Teh and Darin - as fix of this bug seems to require changes in nspr
It seems that this bug may be of interest
http://bugzilla.mozilla.org/show_bug.cgi?id=134099#c12

They seemed to have the same problem under BONE.
I have a build with working https now it seems. I am going to diff prsocket.c
and bnet.c to see exactly what I've changed and see if I can make a patch.
More or less stolen from unix.c.
Comment on attachment 138415 [details] [diff] [review]
Patch to get HTTPS working

patch solved problem and seems quite plain
r=sergei_d@fi.tartu.ee
port-only change.
Asking for approval
Attachment #138415 - Flags: review+
Attachment #138415 - Flags: approval1.6?
Comment on attachment 138415 [details] [diff] [review]
Patch to get HTTPS working

setting sr request to inform wtc about approval request
Attachment #138415 - Flags: superreview?(wchang0222)
Comment on attachment 138415 [details] [diff] [review]
Patch to get HTTPS working

sr=darin (this is consistent with what was done for other platforms)
Attachment #138415 - Flags: superreview?(wchang0222) → superreview+
Comment on attachment 138415 [details] [diff] [review]
Patch to get HTTPS working

if you can get this on the 1.6 branch in the next day or so we can take it.
otherwise just apply the patch for beos specific port, and then in the future
pick it up in mozilla for 1.7
Attachment #138415 - Flags: approval1.6? → approval1.6+
ok, I checked this in on the 1.6 branch.
I'm leaving NSS_CLIENT_TAG and nspr trunk checkin to someone else (I couldn't
checkin to nspr trunk anyway, afaik)
> NSS_CLIENT_TAG

err, I meant whichever branch/tag of nspr mozilla trunk currently uses
Comment on attachment 138415 [details] [diff] [review]
Patch to get HTTPS working

r=wtc.	This patch is correct.	I also verified
that we've already applied the same fix to accept,
recvfrom, and getsockname, which have the same
problem.

I've checked in this patch on the NSPR trunk and
NSPRPUB_PRE_4_2_CLIENT_BRANCH.
so we should be able to mark this one fixed now, correct?
Status: NEW → RESOLVED
Closed: 21 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: