Thanx Gonzalo - have done exactly that, and it's working. And yes - I tried the site in Safari on the iPhone and it worked, but I'm definitely getting MonoTouch TLS errors in code.
Dino -----Original Message----- From: Gonzalo Paniagua Javier [mailto:[email protected]] Sent: Tuesday, March 20, 2012 8:34 PM To: Dean Cleaver Cc: [email protected] Subject: Re: [MonoTouch] Invalid Certificate received from server On Tue, Mar 20, 2012 at 7:55 PM, Dean Cleaver <[email protected]> wrote: > Hi, > > I’m having trouble with using Braintree Payments gateway because of an > apparent invalid certificate returned from server. Everything works > fine to their sandbox, but not to production, and they are 2 different > issuers (and > levels) of certificate: > > https://sandbox.braintreegateway.com > > https://www.braintreegateway.com > > The iPhone itself seems to trust the www.braintreegateway.com one when > I use Safari, but the Braintree C# API code is failing when I try it in > MonoTouch. > Works fine to the Sandbox one. > > Any ideas what could be the cause? If you can browse with Safari on the iphone to those sites without getting a certificate warning, it should work fine... While someone figures out what the real problem is, you can add this line to your code before using any System.Net code to workaround the problem: ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback ((a, b, c, d) => { return true; }); -Gonzalo _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
