.NET 2.0 and SslStream authentication

.NET 2.0 and SslStream authentication

Post by Harko » Wed, 29 Dec 2004 03:03:48


Hi everyone,

Could someone point me a tutorial on using SslStream (.NET 2)? Here is
what I have:

* When I try to read or write to a SslStream which is not authenticated
(ClientAuthenticate or ServerAuthenticate), I get an exception
(InvalidOperationException: "This operation is only allowed on
successfully authenticated context. Invoke one of Authenticate overload
methods first.");

* If I try to authenticate the server with ServerAuthenticate, I get an
exception (Win32Exception: "No credentials available on security
package.", translated from portuguese);

* If I authenticate the client only, with ClientAuthenticate, I also get
the first exception.

So, if someone could help, what should I do to use a SslStream?

Extra info: I'm using .NET 2.0.40607, Windows 2000 Professional (logging
on AD) and test certificate created with makecert.exe.

Thanks,
Harkos
---
 
 
 

.NET 2.0 and SslStream authentication

Post by Dominick B » Wed, 29 Dec 2004 03:49:11

hi,

i am currently working on a sample and a tool to troubleshoot with SslStream - i half way finished (and working so far). i can send you what i got...

One thing to note - i am not quite sure if SslStream in your .net build is working at all...i am using Nov CTP and they changed e.g. some of the method names, e.g. ClientAuthenticate -> AuthenticateAsClient a.s.o.



---
Dominick Baier - DevelopMentor
http://www.yqcomputer.com/

nntp://news.microsoft.com/microsoft.public.dotnet.security/< XXXX@XXXXX.COM >

Hi everyone,

Could someone point me a tutorial on using SslStream (.NET 2)? Here is
what I have:

* When I try to read or write to a SslStream which is not authenticated
(ClientAuthenticate or ServerAuthenticate), I get an exception
(InvalidOperationException: "This operation is only allowed on
successfully authenticated context. Invoke one of Authenticate overload
methods first.");

* If I try to authenticate the server with ServerAuthenticate, I get an
exception (Win32Exception: "No credentials available on security
package.", translated from portuguese);

* If I authenticate the client only, with ClientAuthenticate, I also get
the first exception.

So, if someone could help, what should I do to use a SslStream?

Extra info: I'm using .NET 2.0.40607, Windows 2000 Professional (logging
on AD) and test certificate created with makecert.exe.

Thanks,
Harkos
---

[microsoft.public.dotnet.security]

 
 
 

.NET 2.0 and SslStream authentication

Post by Harko » Wed, 29 Dec 2004 04:22:19

I would be glad to receive any help I could at this moment.
But what is this *Nov CTP* you talk about.

Thanks,
Harkos
---
 
 
 

.NET 2.0 and SslStream authentication

Post by Dominick B » Wed, 29 Dec 2004 05:19:18

it is the Community Tech Preview from November (available on msdn subscribers)



---
Dominick Baier - DevelopMentor
http://www.yqcomputer.com/

nntp://news.microsoft.com/microsoft.public.dotnet.security/< XXXX@XXXXX.COM >

I would be glad to receive any help I could at this moment.
But what is this *Nov CTP* you talk about.

Thanks,
Harkos
---


> hi,
>
> i am currently working on a sample and a tool to troubleshoot with SslStream - i half way finished (and working so far). i can send you what i got...
>
> One thing to note - i am not quite sure if SslStream in your .net build is working at all...i am using Nov CTP and they changed e.g. some of the method names, e.g. ClientAuthenticate -> AuthenticateAsClient a.s.o.

[microsoft.public.dotnet.security]
 
 
 

.NET 2.0 and SslStream authentication

Post by Harko » Wed, 29 Dec 2004 20:02:28

Is there any information on when this is going to be released to us,
mortals?

[]'s,
Harkos
---
Dominick Baier escreveu:
 
 
 

.NET 2.0 and SslStream authentication

Post by Dominick B » Thu, 30 Dec 2004 01:15:27

there is a october ctp of vc# express, maybe you try that one...

http://www.yqcomputer.com/



---
Dominick Baier - DevelopMentor
http://www.yqcomputer.com/

nntp://news.microsoft.com/microsoft.public.dotnet.security/<#khj$ XXXX@XXXXX.COM >

Is there any information on when this is going to be released to us,
mortals?

[]'s,
Harkos
---
Dominick Baier escreveu:
> it is the Community Tech Preview from November (available on msdn subscribers)
>
>
>
> ---
> Dominick Baier - DevelopMentor
> http://www.yqcomputer.com/

[microsoft.public.dotnet.security]
 
 
 

.NET 2.0 and SslStream authentication

Post by Harko » Thu, 30 Dec 2004 02:06:29

As far as I can see, I'm up-to-date but the problem persists...

[]'s,
Harkos
---

Dominick Baier escreveu:
 
 
 

.NET 2.0 and SslStream authentication

Post by Dominick B » Thu, 30 Dec 2004 02:30:49

gimme a email address and i send you my code...



---
Dominick Baier - DevelopMentor
http://www.yqcomputer.com/

nntp://news.microsoft.com/microsoft.public.dotnet.security/< XXXX@XXXXX.COM >

As far as I can see, I'm up-to-date but the problem persists...

[]'s,
Harkos
---

Dominick Baier escreveu:
> there is a october ctp of vc# express, maybe you try that one...
>
> http://www.yqcomputer.com/
>
>
>
> ---
> Dominick Baier - DevelopMentor
> http://www.yqcomputer.com/
>
> nntp://news.microsoft.com/microsoft.public.dotnet.security/<#khj$ XXXX@XXXXX.COM >
>
> Is there any information on when this is going to be released to us,
> mortals?
>
> []'s,
> Harkos
> ---
> Dominick Baier escreveu:
> > it is the Community Tech Preview from November (available on msdn subscribers)
> >
> >
> >
> > ---
> > Dominick Baier - DevelopMentor
> > http://www.yqcomputer.com/
>
> [microsoft.public.dotnet.security]

[microsoft.public.dotnet.security]
 
 
 

.NET 2.0 and SslStream authentication

Post by Dominick B » Thu, 30 Dec 2004 02:30:49

gimme a email address and i send you my code...



---
Dominick Baier - DevelopMentor
http://www.yqcomputer.com/

nntp://news.microsoft.com/microsoft.public.dotnet.security/< XXXX@XXXXX.COM >

As far as I can see, I'm up-to-date but the problem persists...

[]'s,
Harkos
---

Dominick Baier escreveu:
> there is a october ctp of vc# express, maybe you try that one...
>
> http://www.yqcomputer.com/
>
>
>
> ---
> Dominick Baier - DevelopMentor
> http://www.yqcomputer.com/
>
> nntp://news.microsoft.com/microsoft.public.dotnet.security/<#khj$ XXXX@XXXXX.COM >
>
> Is there any information on when this is going to be released to us,
> mortals?
>
> []'s,
> Harkos
> ---
> Dominick Baier escreveu:
> > it is the Community Tech Preview from November (available on msdn subscribers)
> >
> >
> >
> > ---
> > Dominick Baier - DevelopMentor
> > http://www.yqcomputer.com/
>
> [microsoft.public.dotnet.security]

[microsoft.public.dotnet.security]
 
 
 

.NET 2.0 and SslStream authentication

Post by Harko » Thu, 30 Dec 2004 19:22:52

Thanks for your help, but I "found" what I was doing wrong: The code is
correct, but I was using the wrong certificate. Now my streams are
working fine.

[]'s,
Harkos
---
Dominick Baier escreveu: