Windows and hidden service -- something incompatible with SSL?

Hideki Saito hsaito at comcast.net
Tue Aug 31 10:52:52 UTC 2004


Okay, here it is 

>    tor.exe!crypto_pk_read_private_key_from_file(crypto_pk_env_t *
env=0x00992e38, _iobuf * src=0x0046cc10)  Line 329 + 0xf    C

     tor.exe!crypto_pk_read_private_key_from_filename(crypto_pk_env_t *
env=0x00992e38, const char * keyfile=0x0012fa1c)  Line 353 + 0xd    C

     tor.exe!init_key_from_file(const char * fname=0x0012fa1c)  Line 204 +
0xd    C

     tor.exe!rend_service_load_keys()  Line 308 + 0xc    C

     tor.exe!do_main_loop()  Line 779 + 0xe    C

     tor.exe!tor_main(int argc=3, char * * argv=0x00993360)  Line 1141    C

     tor.exe!main(int argc=3, char * * argv=0x00993360)  Line 17 + 0xd    C

     tor.exe!mainCRTStartup()  Line 259 + 0x12    C



File pointer may be trashed somehow...

-    f_pr    0x0046cc10 {_ptr=0x00000000 <Bad Ptr> _cnt=0 _base=0x00000000
<Bad Ptr> ...}    _iobuf *



At this attempt, keyfile was:

+    keyfile    0x0012fa1c "c:¥¥hidden3¥¥private_key"    const char *



Now, here's something interesting...

Say, if c:¥hidden3 is NOT existing, tor runs fine, and c:¥hidden3 and
hostname and private_key are created.

Now, kill it, and then restart the program, then it crashs.



It is worth mentioning that c:/hidden3 does not work as well.

Also pointing this to c:/hidden3/ causes the program to complain that:

Aug 31 01:38:28.870 [warn] Error creating directory c:/hidden3/: File exists
Aug 31 01:38:28.880 [err] Error initializing keys; exiting

But, if c:/hidden3 does not exist, it works fine.

(Of course, killing tor and restarting it causes the error above. -- at
least it doesn't crash, but does not work right.)

It is also applicable when c:¥¥hidden3¥¥ or c:¥¥hidden3¥¥ is specified.

(c:¥hidden3¥ causes crash problem instead.)

If you need any more information, let me know!


> From: Nick Mathewson <nickm at freehaven.net>
> Reply-To: <or-dev at freehaven.net>
> Date: Mon, 30 Aug 2004 14:03:20 -0400
> To: <or-dev at freehaven.net>
> Cc: Hideki Saito <hsaito at comcast.net>
> Subject: Re: Windows and hidden service -- something incompatible with SSL?
> 
> On Sat, Aug 28, 2004 at 06:56:57AM -0700, Hideki Saito wrote:
>> Hello,
>> I'm actually pretty new to the list -- I was playing around with tor
>> code on Windows and found out something...
>> 
>> I was attempting running hidden service with config file:
>> HiddenServiceDir c:\\hidden
>> HiddenServicePort 80 127.0.0.1:8080
>> 
>> I was getting error:
>> Unhandled exception at 0x7c918fea in tor.exe: 0xC0000005: Access
>> violation writing location 0x00000010.
>> 
>> So I have studied the code for a bit and found out that:
>> 
>> Problem on the line:
>> env->key = PEM_read_RSAPrivateKey(src, NULL, NULL, NULL);
> 
> Thanks; I'll check it out!
> 
>> Seems like something wrong with this call -- I haven't really stepped
>> into this function as it seems like this function is provided by OpenSSL
>> (it'll take forever to take OpenSSL compiled with my puny machine...)
> 
> Actually, what would be more useful is if you can give me a backtrace:
> what function _called_ crypto_pk_read_private_key_from_file?  What was
> the value of 'src'?
> 
> 
> Thanks again for your help,
> -- 
> Nick Mathewson
> (PGP key changed on 15Aug2004; see http://wangafu.net/key.txt)




More information about the tor-dev mailing list