<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Not able to add certificate from Alfresco - in local Windows-Eclipse environment in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/not-able-to-add-certificate-from-alfresco-in-local-windows/m-p/95725#M28157</link>
    <description>&lt;P&gt;Hello Afaust,&lt;/P&gt;&lt;P&gt;Thanks for the response.&lt;/P&gt;&lt;P&gt;Alfresco-Windows-machine has a correct certificate and has no issue.&lt;/P&gt;&lt;P&gt;I issue is, not being able to call a URL (URL is hosted in that Alfresco-Windows-machine) from a different Windows-machine, where I run local-Java-code in Eclipse. I obtained the correct certificate from the&amp;nbsp;Alfresco-Windows-machine. After that, I attempted to install that certificate in the JRE of the&amp;nbsp;local-Java-Eclipse-machine. The&amp;nbsp;local-Java-Eclipse-machine has Java driver code (e.g. Java main method) that calls URL hosted in&amp;nbsp;Alfresco-Windows-machine. The&amp;nbsp;local-Java-Eclipse-machine does NOT have any server, or anything else, only has a Java-driver class that can make HTTP(s) call to the URL hosted in&amp;nbsp;Alfresco-Windows-machine. The&amp;nbsp;local-Java-Eclipse-machine (even with the certificate installed in its JRE) is not being able to succeed in calling the URL of the&amp;nbsp;Alfresco-Windows-machine.&lt;/P&gt;&lt;P&gt;My questions:&lt;/P&gt;&lt;P&gt;1. Are you suggesting any different configuration in&amp;nbsp;local-Java-Eclipse-machine, which only has the has the Java driver (it does not have Alfresco, does not have Tomcat). It simply makes the HTTP(S) calls the URL hosted in the Alfresco-Windows machine.&lt;/P&gt;&lt;P&gt;2. I do not understand what exact SOLR-type configuration you are suggesting for the&amp;nbsp;local-Java-Eclipse-machine.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Oct 2020 17:04:15 GMT</pubDate>
    <dc:creator>SG</dc:creator>
    <dc:date>2020-10-28T17:04:15Z</dc:date>
    <item>
      <title>Not able to add certificate from Alfresco - in local Windows-Eclipse environment</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/not-able-to-add-certificate-from-alfresco-in-local-windows/m-p/95723#M28155</link>
      <description>&lt;P&gt;I am trying to run the driver-Java-code locally inside my Windows-Eclipse and attempting to make the HTTPS call to a webservice deployed in a different Windows-Alfresco server.&lt;/P&gt;&lt;P&gt;The webservice deployed in the Windows-Alfresco server is created using Java-backed-WebScript. The webservice URL attempted to be called is similar to: &lt;A href="https://mydomain.org/alfresco/service/extract/abc" target="_blank" rel="noopener nofollow noreferrer"&gt;https://mydomain.org/alfresco/service/extract/abc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This is what I have attempted:&lt;/P&gt;&lt;P&gt;I took the valid certificate from the Alfresco-Windows server and added to my local-Eclipse-Windows machine’s JRE using the following:&lt;/P&gt;&lt;P&gt;keytool -import -trustcacerts -alias mycertificate -file C:\Documentation\ mycertificate.cer -keystore keystore.jks&lt;/P&gt;&lt;P&gt;After that, I also made sure that the certificate is indeed installed and verified that using:&lt;/P&gt;&lt;P&gt;keytool -list -v -keystore keystore.jks&lt;/P&gt;&lt;P&gt;I also verified that Eclipse is also configured to use the same JRE, where I imported the certificate from Alfresco.&lt;/P&gt;&lt;P&gt;Even with that, I still get the error as follows, when I attempt to execute the Java-client-code from my Windows-Eclipse, attempting to call the URL deployed in the remote Windows-Alfresco server:&lt;/P&gt;&lt;P&gt;Called URL =&lt;A href="https://mydomain.org/alfresco/service/extract/abc" target="_blank" rel="noopener nofollow noreferrer"&gt;https://mydomain.org/alfresco/service/extract/abc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;I get exception stacktrace as:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target&lt;BR /&gt;at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)&lt;BR /&gt;at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)&lt;BR /&gt;at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)&lt;BR /&gt;at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)&lt;BR /&gt;at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)&lt;BR /&gt;at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)&lt;BR /&gt;at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)&lt;BR /&gt;at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)&lt;BR /&gt;at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)&lt;BR /&gt;at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)&lt;BR /&gt;at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)&lt;BR /&gt;at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)&lt;BR /&gt;at sun.net.&lt;A href="http://www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559" target="_blank" rel="nofollow noopener noreferrer"&gt;www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559&lt;/A&gt;)&lt;BR /&gt;at sun.net.&lt;A href="http://www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185" target="_blank" rel="nofollow noopener noreferrer"&gt;www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185&lt;/A&gt;)&lt;BR /&gt;at sun.net.&lt;A href="http://www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564" target="_blank" rel="nofollow noopener noreferrer"&gt;www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564&lt;/A&gt;)&lt;BR /&gt;at sun.net.&lt;A href="http://www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492" target="_blank" rel="nofollow noopener noreferrer"&gt;www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492&lt;/A&gt;)&lt;BR /&gt;at sun.net.&lt;A href="http://www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263" target="_blank" rel="nofollow noopener noreferrer"&gt;www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263&lt;/A&gt;)&lt;BR /&gt;at MyDreiver.java:63)&lt;BR /&gt;Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target&lt;BR /&gt;at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)&lt;BR /&gt;at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)&lt;BR /&gt;at sun.security.validator.Validator.validate(Validator.java:262)&lt;BR /&gt;at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)&lt;BR /&gt;at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)&lt;BR /&gt;at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)&lt;BR /&gt;at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)&lt;BR /&gt;... 15 more&lt;BR /&gt;Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target&lt;BR /&gt;at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)&lt;BR /&gt;at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)&lt;BR /&gt;at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)&lt;BR /&gt;at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)&lt;BR /&gt;... 21 more&lt;/P&gt;&lt;P&gt;My question:&lt;/P&gt;&lt;P&gt;1. Any suggestion will be appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2020 15:21:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/not-able-to-add-certificate-from-alfresco-in-local-windows/m-p/95723#M28155</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2020-10-23T15:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to add certificate from Alfresco - in local Windows-Eclipse environment</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/not-able-to-add-certificate-from-alfresco-in-local-windows/m-p/95724#M28156</link>
      <description>&lt;P&gt;When you do calls to HTTPS URLs protected by self-signed or other untrusted certificates, you should never rely on the certificate being added to the JRE. Instead, you custom code should use its own truststore for certificate / host validation, i.e. similar to how Alfresco uses the ssl.truststore for handling the SSL certificate validation if SOLR and Repository are set up in a mTLS configuration.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Oct 2020 14:08:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/not-able-to-add-certificate-from-alfresco-in-local-windows/m-p/95724#M28156</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2020-10-24T14:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to add certificate from Alfresco - in local Windows-Eclipse environment</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/not-able-to-add-certificate-from-alfresco-in-local-windows/m-p/95725#M28157</link>
      <description>&lt;P&gt;Hello Afaust,&lt;/P&gt;&lt;P&gt;Thanks for the response.&lt;/P&gt;&lt;P&gt;Alfresco-Windows-machine has a correct certificate and has no issue.&lt;/P&gt;&lt;P&gt;I issue is, not being able to call a URL (URL is hosted in that Alfresco-Windows-machine) from a different Windows-machine, where I run local-Java-code in Eclipse. I obtained the correct certificate from the&amp;nbsp;Alfresco-Windows-machine. After that, I attempted to install that certificate in the JRE of the&amp;nbsp;local-Java-Eclipse-machine. The&amp;nbsp;local-Java-Eclipse-machine has Java driver code (e.g. Java main method) that calls URL hosted in&amp;nbsp;Alfresco-Windows-machine. The&amp;nbsp;local-Java-Eclipse-machine does NOT have any server, or anything else, only has a Java-driver class that can make HTTP(s) call to the URL hosted in&amp;nbsp;Alfresco-Windows-machine. The&amp;nbsp;local-Java-Eclipse-machine (even with the certificate installed in its JRE) is not being able to succeed in calling the URL of the&amp;nbsp;Alfresco-Windows-machine.&lt;/P&gt;&lt;P&gt;My questions:&lt;/P&gt;&lt;P&gt;1. Are you suggesting any different configuration in&amp;nbsp;local-Java-Eclipse-machine, which only has the has the Java driver (it does not have Alfresco, does not have Tomcat). It simply makes the HTTP(S) calls the URL hosted in the Alfresco-Windows machine.&lt;/P&gt;&lt;P&gt;2. I do not understand what exact SOLR-type configuration you are suggesting for the&amp;nbsp;local-Java-Eclipse-machine.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 17:04:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/not-able-to-add-certificate-from-alfresco-in-local-windows/m-p/95725#M28157</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2020-10-28T17:04:15Z</dc:date>
    </item>
  </channel>
</rss>

