Opened 5 years ago

Closed 5 years ago

#7271 closed defect (fixed)

flashproxy-reg-email on Windows produces OpenSSL error 0B084002

Reported by: aallai Owned by: dcf
Priority: High Milestone:
Component: Archived/Flashproxy Version:
Severity: Keywords:
Cc: dcf@… Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

When run on Windows, flashproxy-reg-email produces the following error:

Failed to register: [Errno 185090050] _ssl.c:340: error:0B084002:x509 certific
ate routines:X509_load_cert_crl_file:system lib

This is due to the use of tempfile.NamedTemporaryFile? to store a TLS certificate. On windows NT or later, the temporary file cannot be reopened while still in use. See the tempfile module documentation at http://docs.python.org/library/tempfile.html.

Child Tickets

Change History (5)

comment:1 Changed 5 years ago by aallai

I think this would be best fixed using the code related to ticket #7016 (running as a managed proxy), to take
into account TOR_PT_STATE_LOCATION. Should I wait until the code for that ticket is merged into the main repo,
or just clone https://gitweb.torproject.org/user/dcf/flashproxy.git and work from there?

comment:2 Changed 5 years ago by aallai

Status: newneeds_review

I have a fix for this at https://github.com/aallai/flashproxy.git, branch ticket#7271.    

I use mkstemp and close the file when done.

comment:3 Changed 5 years ago by dcf

Priority: minormajor

https://github.com/aallai/flashproxy/commit/40c5b689 looks good. I'm guessing that because of the following https://github.com/aallai/flashproxy/commit/8692e306, there is an exception at runtime unless we use the file descriptor functions?

comment:4 Changed 5 years ago by aallai

mkstemp returns a file descriptor instead of a file object, I had misread the doc. We could use os.fdopen on it, and then use the regular file functions.

comment:5 Changed 5 years ago by dcf

Resolution: fixed
Status: needs_reviewclosed

Thanks, I squashed the two commits and merged them.

Note: See TracTickets for help on using tickets.