[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-cryptoapi
Subject:    Re: Need help understanding problem w/ EncryptMessage
From:       "Wong, Mark (markw)" <markw () SEQUENT ! COM>
Date:       2000-04-13 17:56:15
[Download RAW message or body]


I found what was causing the problem with EncryptMessage(), but I doubt it's
the root of my troubles.  Calling Sleep() for a few seconds in a thread seems
to corrupt the data I want to encrypt.  This happens randomly and removing
the Sleep() solves that problem, but I have a feeling Sleep() isn't the real
cause for the problem.

I'm fairly certain I'm not sharing SSPI context handles, but I suppose I
could be overlooking something.

I didn't know if it's still relevant to post the SSL message traffic to the
list, so I'll hold off on that.  How would I capture the message traffic?

Thanks,
Mark

> -----Original Message-----
> From: John Banes [SMTP:jbanes@EXCHANGE.MICROSOFT.COM]
> Sent: Monday, April 10, 2000 9:18 AM
> To:   CryptoAPI@DISCUSS.MICROSOFT.COM
> Subject:      Re: Need help understanding problem w/ EncryptMessage
>
> Our SSL implementation is thread-safe, but individual SSPI context handles
> are not. It's important when doing multiple SSL connections that you don't
> attempt to use the same context handle simultaneously in multiple threads,
> or use the same context handle to service more than one TCP connection. I
> haven't seen your particular failure mode before, but I suspect that your
> SSPI contexts are interfering with each other.
>
> Note that the same is not true of SSPI credential handles. I would
> encourage
> you to create a single server credential and use it with all incoming
> connections.
>
> If you were to post to the list all of the SSL message traffic and the
> buffers that you're passing into EncryptMessage we may be able to spot the
> cause of the error.
>
> Regards,
>
> John
>
>
>
> -----Original Message-----
> From: Wong, Mark (markw) [mailto:markw@SEQUENT.COM]
> Sent: Friday, April 07, 2000 2:37 PM
> To: CryptoAPI@DISCUSS.MICROSOFT.COM
> Subject: Re: Need help understanding problem w/ EncryptMessage
>
>
> I'm using the SSL3 protocol.
>
> > -----Original Message-----
> > From: John Banes [SMTP:jbanes@EXCHANGE.MICROSOFT.COM]
> > Sent: Friday, April 07, 2000 1:53 PM
> > To:   CryptoAPI@DISCUSS.MICROSOFT.COM
> > Subject:      Re: Need help understanding problem w/ EncryptMessage
> >
> > What security package are you using? That is, are you using SSL, NTLM, or
> > Kerberos?
> >
> > -----Original Message-----
> > From: Wong, Mark (markw) [mailto:markw@SEQUENT.COM]
> > Sent: Friday, April 07, 2000 12:21 PM
> > To: CryptoAPI@DISCUSS.MICROSOFT.COM
> > Subject: Need help understanding problem w/ EncryptMessage
> >
> >
> > I'm trying to write a multi-threaded socket server on Windows 2000
> Advanced
> > Server and I'm getting an SEC_E_INTERNAL_ERROR (80090304) from
> > SecurityFunctionTable.EncryptMessage().  This occurs whether I'm running
> 1
> > or
> > multiple threads on the server, but only when I make simultaneous
> requests,
> > on the order of 2 or more.  I'm using the process.h _beginthread() to
> start
> > my threads.
> >
> > I'm compiling with the flags /MT /nologo /Gd /Zi /c and I'm linking the
> > libraries ws2_32.lib mswsock.lib secur32.lib crypt32.lib.
> >
> > I'm lost as to how to get more information that would help explain what's
> > going on and I hope I've provided enough information for someone to give
> me
> > a
> > tip.
> >
> > Thanks,
> > Mark
> >
> > ----------------------------------------------------------------
> > Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
> > contains important info including how to unsubscribe.  Save time, search
> > the archives at http://discuss.microsoft.com/archives/index.html
> >
> > ----------------------------------------------------------------
> > Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
> > contains important info including how to unsubscribe.  Save time, search
> > the archives at http://discuss.microsoft.com/archives/index.html
>
> ----------------------------------------------------------------
> Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
> contains important info including how to unsubscribe.  Save time, search
> the archives at http://discuss.microsoft.com/archives/index.html
>
> ----------------------------------------------------------------
> Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
> contains important info including how to unsubscribe.  Save time, search
> the archives at http://discuss.microsoft.com/archives/index.html

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic