Jump to content

Trust issue connecting to new SSL server

P4NET.API P4Connect

  • Please log in to reply
No replies to this topic

#1 samwise



  • Members
  • Pip
  • 7 posts

Posted 23 July 2015 - 01:07 AM


I've been debugging through the P4Connect source because it's a good example of using the P4API.NET library. I've had an issue in my own code trying to get trust to be established with a new SSL connection so I thought I'd see what P4Connect does. It has the same issues though. I'm using the latest bleeding edge P4Connect from the Workshop.

When I try to connect to an SSL server that has no trust currently established, I get "failed to connect" in the settings window. When I step through I can see it calls P4Connect.VerifySettings.CheckProjectRoot. In there, when it calls Connection.Connect, it throws a P4Exception with the message about "authenticity can't be established" etc. However I see that there is a call to Connection.Trust AFTER the Connect call.

I want to be able to programmatically accept the trust. What's the right way to do this? You can't call Connection.Trust before connecting, but connect requires trust.

I've also posted this in the P4Connect forum for more visibility. The documentation is not clear on how this should work, and the samples do the same thing as P4Connect.


Also tagged with one or more of these keywords: P4NET.API, P4Connect

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users