You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by ap...@mail.ru on 2004/06/07 09:30:10 UTC
Re[2]: reading string in apache
> What do you mean standard C functions do not work in Apache?
> You mean like printf/scanf/etc?
Yes. and strlen, strcpy, malloc & etc.
> Well that's just because Apache's not reading from stdin and writing to stdout.
Ok. Question: How I can read from console?
> "What is method read?" What exactly are you trying to read, and from
> where, and in what version of Apache?
Apache 2.0.49 with ssl.
my method reading:
file: /modules/ssl/ssl_engine_pphrase.c
///////////////////////////////////////
void ssl_pphrase_Handle(server_rec *s, apr_pool_t *p)
{
//std variables list
................
char* mystr;
//I try
mystr = (char*)malloc(100); // or //mystr = apr_palloc(p, 100);
// scanf("%s",mystr); // not work - SEGMENTATION FAULT
EVP_read_pw_string(mystr, 100, "", FALSE); //function reading, sometimes mystr content not type symbols
free(mystr);
................
//function code
}
///////////////////////////////////////
Question: use function EVP_read_pw_string() not rightly?
What replace this function.
Or necessary use readtty(writetty), but how?
Thanks.