Discussions  >  SharpSvn Community Support and Feedback  >  RE: [SharpSvn] "certificate verification failed" exception

Back to topic list

RE: [SharpSvn] "certificate verification failed" exception

Author rhuijben (OCN Member)
Full name Bert Huijben
Date 2009-02-06 20:04:50 PST
Message > -----Original Message-----
> From: Quirijn Slings [mailto:XXXX@XXXX]
> Sent: Saturday, February 07, 2009 1:08 AM
> To: XXXX@XXXX; Gabe Moothart
> Subject: RE: [SharpSvn] "certificate verification failed" exception
>
> I have the same problem, due to a self-signed certificate on the
> server. I tried using the AddExpectedError, like this:
> SvnCheckOutArgs coArgs = new SvnCheckOutArgs();
> coArgs.AddExpectedEr​ror(SvnErrorCode.SVN​_ERR_RA_DAV_REQUEST_​FAILED);
> client.CheckOut(target, workdir, coArgs);

You can handle the .SslServerTrustHandlers event on the SvnAuthentication
class.

using(SvnClient cl = new SvnClient())
{
   cl.Authentication.Ss​lServerTrustHandlers​ +=
    delegate(object sender, SvnSslServerTrustEventArgs e)
    {
      // Look at the rest of the arguments of E whether you wish to accept

      // If accept:
      e.AcceptedFailures = e.Failures;
      e.Save = true; // Save acceptance to authentication store
    };

   // And now just use cl like you normally would on the first
authentication
   // failed the delegate is called
}

If you are working on a Windows Forms program I would suggest linking to
SharpSvn.UI and
calling
SvnUI.Bind(cl, MainForm);

Then you get a default UI on all authentication request types. (Including
the certificate authentication, etc.)

    Bert

« Previous message in topic | 3 of 6 | Next message in topic »

Messages

Show all messages in topic

[SharpSvn] "certificate verification failed" exception gmoothart (OCN Member) Gabe Moothart 2008-12-22 09:12:48 PST
     RE: [SharpSvn] "certificate verification failed" exception quirijn (OCN Member) Quirijn Slings 2009-02-06 16:08:17 PST
         RE: [SharpSvn] "certificate verification failed" exception rhuijben (OCN Member) Bert Huijben 2009-02-06 20:04:50 PST
             RE: [SharpSvn] "certificate verification failed" exception quirijn (OCN Member) Quirijn Slings 2009-02-10 14:31:11 PST
                 RE: [SharpSvn] "certificate verification failed" exception ansarisufiyan (OCN Member) Sufiyan Ansari 2010-04-21 00:17:13 PDT
                     RE: [SharpSvn] "certificate verification failed" exception ansarisufiyan (OCN Member) Sufiyan Ansari 2010-04-21 00:18:57 PDT
Messages per page: