Where is Ssl_Session_ID_Context defined in ICSv6?? Can't find it! On Mon, Feb 16, 2009 at 12:57 PM, Arno Garrels <arno.garr...@gmx.de> wrote:
> You have to use FMyExternalSslSessionCache->GetSvrSession() and > FMyExternalSslSessionCache->CacheSvrSession()! > It is also required to set the SslContest.SslSessionCacheModes properly: > > [sslSESS_CACHE_SERVER,sslSESS_CACHE_NO_INTERNAL_LOOKUP,sslSESS_CACHE_NO_INTERNAL_STORE] > > Delphi code: > > {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > *} > procedure TSslWebServForm.SslHttpServer1SslSetSessionIDContext( > Sender : TObject; > var SessionIDContext : String); > begin > { Tell Openssl a Session_ID_Context. > } > { Openssl uses this data to tag a session before it's cached. > } > { It's an arbitrary custom string > } > SessionIDContext := Ssl_Session_ID_Context; > end; > > > {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > *} > procedure TSslWebServForm.SslHttpServer1SslSvrGetSession( > Sender : TObject; > var SslSession : Pointer; > SessId : Pointer; > Idlen : Integer; > var IncRefCount : Boolean); > var > LookupKey : string; > begin > SetLength(LookupKey, IDLen); > Move(SessId^, Pointer(LookupKey)^, IDLen); > SslSession := SslAvlSessionCache1.GetSvrSession(LookupKey + > Ssl_Session_ID_Context, > IncRefCount); > end; > > > {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > *} > procedure TSslWebServForm.SslHttpServer1SslSvrNewSession( > Sender : TObject; > SslSession, > SessId : Pointer; > Idlen : Integer; > var AddToInternalCache : Boolean); > var > LookupKey : string; > begin > SetLength(LookupKey, IDLen); > Move(SessId^, Pointer(LookupKey)^, IDLen); > SslAvlSessionCache1.CacheSvrSession(SslSession, > LookupKey + Ssl_Session_ID_Context, > AddToInternalCache); > if DisplaySslInfoCheckBox.Checked then > Display('[' + FormatDateTime('HH:NN:SS', Now) + ' ' + > TWSocket(Sender).GetPeerAddr + '] New SSL session created > and ' + > 'cached in external cache class.'); > end; > > > {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > *} > > -- > Arno Garrels > > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be > -- Gorkem Ates Fastream Technologies Software IQ: Innovation & Quality www.fastream.com | Email: supp...@fastream.com | Tel: +90-312-223-2830 | MSN: g_a...@hotmail.com Join IQWF Server Yahoo group at http://groups.yahoo.com/group/IQWFServer Join IQ Reverse Proxy Yahoo group at http://groups.yahoo.com/group/IQReverseProxy -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be