[Mono-dev] mono 2.6.3 breaks https connections

Marek Habersack grendel at twistedcode.net
Fri Mar 19 11:10:44 EDT 2010


On Fri, 19 Mar 2010 11:22:49 +0100
Latif Khalifa <latifer at radegastclient.org> wrote:

Hello,

> Yes, in order to provide X509 certificate generation capability, that
> would also work when executing under .NET, we've been including
> Mono.Security assembly with our binaries. That worked until 2.6.3. I
> guess we now have to find out a different way to generate self-signed
> server certs for https connections, that would run from the same set
> of shipped executables under both runtimes.
I'm guessing you need your own copy of Mono.Security only when running on .NET. The solution in such case is easy - use
reflection to load the types you need. If you detect you're running on Mono, do this:

Assembly asm = Assembly.Load ("Mono.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756");

or even

Assembly asm = Assembly.Load ("Mono.Security");

if you don't care for the version. On .NET use:

Assembly asm = Assembly.LoadFrom ("\\path\\to\\local\\copy\\of\\Mono.Security.dll");

And reflect on the returned assembly to get any types you want.

best,

marek
> 
> On Fri, Mar 19, 2010 at 6:17 AM, Miguel de Icaza <miguel at novell.com> wrote:
> > Hello,
> >
> >    It seems to me that he has a local copy of Mono.Security that he
> > is loading, and not using the system provided Mono.Security.
> >
> > On Fri, Mar 19, 2010 at 12:32 AM, Gonzalo Paniagua Javier
> > <gonzalo.mono at gmail.com> wrote:
> >> On Fri, 2010-03-19 at 00:28 +0100, Latif Khalifa wrote:
> >>> Just recompiled using mono 2.6.3 tarball and several of my
> >>> applications stopped working, all displaying this on the console
> >>>
> >>> ** (OpenSim.exe:25319): WARNING **: Missing method .ctor in assembly
> >>> /usr/lib/mono/gac/System/2.0.0.0__b77a5c561934e089/System.dll, type
> >>> Mono.Security.Protocol.Tls.CertificateValidationCallback2
> >>> ** (OpenSim.exe:25319): WARNING **: The class
> >>> Mono.Security.Protocol.Tls.CertificateValidationCallback2 could not be
> >>> loaded, used in System
> >>> ** (OpenSim.exe:25319): WARNING **: Missing method .ctor in assembly
> >>> /usr/lib/mono/gac/System/2.0.0.0__b77a5c561934e089/System.dll, type
> >>> Mono.Security.Protocol.Tls.CertificateValidationCallback2
> >>>
> >>> Both OpenSimulator and LibOpenmetaverse worked fine up to mono 2.6.1
> >>
> >> What prefix did you use when installing the tarball? That looks like the
> >> Mono.Security.dll you are using is the system installed one in /usr
> >> while the System.dll in your system has the latest changes from 2.6.3.
> >>
> >> -Gonzalo
> >>
> >>
> >> _______________________________________________
> >> Mono-devel-list mailing list
> >> Mono-devel-list at lists.ximian.com
> >> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >>
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list



More information about the Mono-devel-list mailing list