1
votes

I'm using Apache Chemistry PHP client with local Alfresco repository with http protocol over 8080 and I can connect to the repo.

However, when I try to use the same library over other Alfresco repository over https protocol (port 8443) I get this exception:

[26-Jun-2016 01:51:10 Europe/Madrid] PHP Fatal error: Uncaught exception 'CmisRuntimeException' in /Example/cmis/cmis_repository_wrapper.php:176 Stack trace:

#0 /Example/cmis/cmis_repository_wrapper.php(210): CMISRepositoryWrapper->convertStatusCode(0, false)
#1 /Example/cmis/cmis_repository_wrapper.php(191): CMISRepositoryWrapper->doGet('http://192.168....')
#2 /Example/cmis/cmis_repository_wrapper.php(128): CMISRepositoryWrapper->connect('http://192.168....', 'angel', '123456', NULL)
#3 /Example/cmis/cmis_service.php(143): CMISRepositoryWrapper->__construct('http://192.168....', 'angel', '123456', NULL, Array)

I can see that doGet function use "http" URL but my string connection is with https.

What is the problem? The same code with Alfresco repository over http protocol is correct.

1
Have you configured your Alfresco repo to report HTTPS URLs for the external references rather than HTTP ones? As per docs.alfresco.com/5.0/tasks/configure-ssl-prod.html - Gagravarr
I use a docker Alfresco image. I've found one solution. If I modify file cmis_repository_wrapper.php, method doRequest and add this: curl_setopt($session, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($session, CURLOPT_SSL_VERIFYPEER, true); All go correct. So, I think that the problem is that my test site of alfresco https://..... the certificate is not validate, so it don't work correct. - aivdev
Which docker image are you using? (lots of people publish them and they're not all of the same quality!) And how are you configuring it for SSL? - Gagravarr
I use this one hub.docker.com/r/pdubois/docker-alfresco it's comming with ssl (non validate) certificate. Is very easy to deploy. - aivdev

1 Answers

0
votes

I use a docker Alfresco image.

I've found one solution.

If I modify file cmis_repository_wrapper.php, method doRequest and add this:

 curl_setopt($session, CURLOPT_SSL_VERIFYHOST, false);
 curl_setopt($session, CURLOPT_SSL_VERIFYPEER, true);

All go correct. So, I think that the problem is that my test site of alfresco https://..... the certificate is not validate, so it don't work correct.