On Thu, Dec 18, 2003, Philip L Smith wrote:

> Hi Lutz
> 
> Have run with ssldump, there doesn't seem to be any session_id being 
> sent from the client.
> 
> I presume it would show up something like session_id[32]=... under the 
> C>S  Handshake section.
> 
> What else might I be doing wrong, or have not set ?
> 
> In overview this is what I do:
> 
> 
>    Trace("CTcp::CTcp()","globalSessionID", CTcp::globalSessionId);
>    // only do the following if the overall sessionid was set
>    if (CTcp::globalSessionId != 0)
>    {
>        // load the session from disk
>        FILE * filePtr;
> 
>        char fileString[128];
>        sprintf(fileString, "/tmp/session_id.%d", CTcp::globalSessionId);
>        Trace("Loading SSL Session",fileString,0);
> 
>        if ((filePtr = fopen(fileString,  "r")) != NULL)
>        {
>            Trace("Loading SSL Session from file",fileString,0);
>            SSL_SESSION s;
>            SSL_SESSION * ps;
>            ps = &s;
>            ps = PEM_read_SSL_SESSION(filePtr, &ps, NULL, NULL);
>            ps = &s;
>            ssl_session_print (ps);
> 
>            // force it to be used ?
>            int added = 0;
>            ps = &s;
>            added = SSL_set_session(m_pSslV23Connection, ps);
>            Trace("Setting SSL Session","SSL_set_session() 
> m_pSslV23Connection",added);
> 
>            // close the file
>            fclose(filePtr);
>        }
>        else
>        {
>            Trace("Loading SSL Session", "No session file present",0);
>        }
>    }
> }
> 
> --- ~ startup code ---
> 

This may not be the problem but that PEM stuff looks decidedly dodgy. Just do:

s = PEM_read_SSL_SESSION(filePtr, NULL, NULL, NULL);

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to