Ejemplo n.º 1
0
        //[CLSCompliant(false)]
        private IntPtr SvnAuthSslServerTrustPromptWrapper(out IntPtr cred, IntPtr baton,
                                                          IntPtr realm, uint failures,
                                                          IntPtr cert_info,
                                                          int may_save, IntPtr pool)
        {
            cred = IntPtr.Zero;
            SvnError err = SvnError.NoError;

            SvnAuthProviderObject.SslServerTrustPrompt func =
                mFunc as SvnAuthProviderObject.SslServerTrustPrompt;
            try {
                SvnAuthCredSslServerTrust credSslServerTrust;
                Debug.Write(String.Format("[Callback:{0}]SslServerTrustPromptProvider({1:X},{2},{3},{4},{5},{6})...", baton.ToInt32(), new AprString(realm), unchecked ((int)failures), new SvnAuthSslServerCertInfo(cert_info), (may_save != 0), new AprPool(pool)));
                err = func(out credSslServerTrust, baton,
                           new AprString(realm), (SvnAuthCredSslServerTrust.CertFailures)failures,
                           new SvnAuthSslServerCertInfo(cert_info),
                           (may_save != 0), new AprPool(pool));
                Debug.WriteLine(String.Format("Done({0})", credSslServerTrust));
                cred = credSslServerTrust;
            }
            catch (SvnException e) {
                err = SvnError.Create(e.AprErr, SvnError.NoError, e.Message);
            }
            catch (Exception e) {
                err = SvnError.Create(215000, SvnError.NoError, e.Message);
            }
            return(err);
        }
Ejemplo n.º 2
0
 public void AddPromptProvider(SvnAuthProviderObject.SslServerTrustPrompt promptFunc,
                               IntPtr promptBaton)
 {
     if (mAuthObjs == null)
     {
         mAuthObjs = new ArrayList();
     }
     mAuthObjs.Add(SvnAuthProviderObject.GetPromptProvider(promptFunc, promptBaton,
                                                           mGlobalPool));
 }
Ejemplo n.º 3
0
 // svn_auth_ssl_server_trust_prompt_func_t Wrapper
 public SvnDelegate(SvnAuthProviderObject.SslServerTrustPrompt func)
 {
     mFunc        = func;
     mWrapperFunc = new Svn.svn_auth_ssl_server_trust_prompt_func_t(SvnAuthSslServerTrustPromptWrapper);
 }