324a325,365 > #ifdef MS_WINDOWS > /* > Workaround for Windows (By Hideki Saito) > here's library related problem that the program crashes when attempted > calling PEM_read_RSAPrivateKey. > > Value 1024 and 100 are quite a "blind-shot." > If there are anything more appropriate, feel free to put in. > */ > > char *data; > BIO *b; > char *line; > > tor_assert(env && src); > > b = BIO_new(BIO_s_mem()); /* Create a memory BIO */ > > > data = malloc(1024); > line = malloc(100); > > fgets(line,100,src); > strcpy(data,line); > > while(fgets(line,100,src)) > { > strcat(data,line); > } > free(line); > > BIO_puts(b,data); > > free(data); > > if (env->key) > RSA_free(env->key); > > env->key = PEM_read_bio_RSAPrivateKey(b,NULL,NULL,NULL); > > #else 329a371,372 > #endif >