You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Colin Higgs <co...@ed.ac.uk> on 2005/04/15 14:52:47 UTC

trouble with win32 perl bindings and https

I'm not sure whether this is the right list or if there is one 
specifically for the perl bindings but the FAQ implies one should post 
to this list if not sure...

I'm having trouble with the perl bindings for subversion when using 
https schema URLs. This is using the precompiled binaries for win32 and 
subversion version 1.1.4 downloaded from here:

http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91

A shortened form of what I'm doing:

   $svn = SVN::Client->new(
     auth=>[SVN::Client::get_ssl_server_trust_prompt_provider
	  (\&svn_server_trust_callback)]);

   my $url = "https://somewhere/something"
   my $list = $svn->ls($url,"HEAD",0);

   sub svn_server_trust_callback {
       my ($cred,$realm,$ifailed,$server_cert_info,$may_save) = @_;

       print "Failed with: $ifailed\n";

       $cred->accepted_failures($SVN::Auth::SSL::UNKNOWNCA);
       print "Leaving callback\n";
   }

When I run this it dies at the $svn->ls stage (or more accurately, 
inside the callback at $cred->accepted_failures):

"Type error in argument 2 of 
svn_auth_cred_ssl_server_trust_t_accepted_failures_set. Expected 
_p_apr_uint32_t at <path to svn>/perl/SVN/Base.pm line 80."

The print of $ifailed yields 8 (i.e. UNKNOWNCA). If I don't give 
accepted_failures an argument the program executes (i.e. doesn't die) 
but it does fail to fetch view/fetch the URL, since it now won't trust 
my UNKNOWNCA certificate.

Lastly, the command line tool "svn" works fine fetching the same URLs. 
For now, I'll just wrap invocations of the command line, but it would be 
nice to do it "right" (i.e. through the $svn object).

Colin.

-- 
Unix is designed to help you avoid doing boring, repetitive things
     - if you can remember how.
Windows makes boring, repetitive things pretty and easy to remember
     - but you still end up doing boring repetitive things.

Colin Higgs,
School of Engineering and Electronics
University of Edinburgh                 Email:  colin.higgs@ed.ac.uk
King's Buildings, Mayfield Road,        Tel:    +44 (0)131 6508557
Edinburgh, Scotland, EH9 3JL            Fax:    +44 (0)131 6506551



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org