Transmit string

<[email protected]>
Newsgroups gmane.comp.apache.mod-ssl.user
Message-ID <[email protected]>
Dear Ralf S. Engelschall and other developers, I have problem.
Help me solve a problem, very need.

It is necessary read a line of the text (additional information on the user) in the module mod_ssl
and to transfer it in the module openssl.
Reading of a line to make in the mod_ssl: file: ssl_engine_pphrase.c; function: ssl_pphrase_Handle
and to transfer in the openssl: file: s3_srvr.c; function: ssl3_accept.

Apache 2.0.49 - Openssl0.9.6m

I make approximately as below:
//------mod_ssl.h------//
typedef struct {
    pid_t           pid;
    apr_pool_t     *pPool;
.....
    char	*szinf; //!!! <- Add
.....
    struct {
        void *pV1, *pV2, *pV3, *pV4, *pV5, *pV6, *pV7, *pV8, *pV9, *pV10;
    } rCtx;
} SSLModConfigRec;

//-----ssl_engine_pphrase.c----//
void ssl_pphrase_Handle(server_rec *s, apr_pool_t *p)
{
.....
    mc->szinf = apr_palloc(p,sizeof(char *) * 100);
    char *buf = apr_palloc(p, sizeof(char *) * 100);
    apr_file_open_stdout(&writetty, p);
    i = EVP_read_pw_string(buf, bufsize, "", FALSE);
    apr_cpystrn(mc->szinf,buf,strlen(buf)+1);
    //mc->inf - contain reading string
.....
}

//-----ssl_engine_init.c----//
static int ssl_server_import_key(server_rec *s, modssl_ctx_t *mctx, const char *id, int idx)
{
.....
apr_cpystrn(mctx->ssl_ctx->infO, mc->szinf,strlen(mc->szinf)+1); // <- copy string to struct ssl_ctx
.....
}

//-----ssl.h-----//
struct ssl_ctx_st
{
	char infO[100];    // <- string to openssl
	SSL_METHOD *method;
	unsigned long options;
	unsigned long mode;
.....
}

//-----s3_srvr.c-----//
int ssl3_accept(SSL *s)
{
   char *buf = s->ctx->infO; //NULL string !!!!! AND NEED GET inf from ssl_pphrase_Handle
.....
}

Seems, struct SSL_CTX clearing after fork process, this so?
And How can save string after fork process?
Suggest to me idea.

Thanks.

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email protected]
Automated List Manager                            [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.