This is an automated email from the ASF dual-hosted git repository.

radu pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-committer-cli.git


The following commit(s) were added to refs/heads/master by this push:
     new 7032a37  SLING-10837 - The KEYS file should be retrieved from the 
correct location
7032a37 is described below

commit 7032a37fa4a9cd630dcb2404b45e37557830fe56
Author: Radu Cotescu <[email protected]>
AuthorDate: Tue Sep 21 20:47:17 2021 +0200

    SLING-10837 - The KEYS file should be retrieved from the correct location
    
    * corrected URL from which the KEYS file is retrieved
---
 .../java/org/apache/sling/cli/impl/pgp/PGPSignatureValidator.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/src/main/java/org/apache/sling/cli/impl/pgp/PGPSignatureValidator.java 
b/src/main/java/org/apache/sling/cli/impl/pgp/PGPSignatureValidator.java
index d813061..4a2c902 100644
--- a/src/main/java/org/apache/sling/cli/impl/pgp/PGPSignatureValidator.java
+++ b/src/main/java/org/apache/sling/cli/impl/pgp/PGPSignatureValidator.java
@@ -55,6 +55,8 @@ import org.osgi.service.component.annotations.Reference;
 @Component(service = PGPSignatureValidator.class)
 public class PGPSignatureValidator {
 
+    private static final String KEYS_FILE_URL = 
"https://downloads.apache.org/sling/KEYS";;
+
     @Reference
     private HttpClientFactory httpClientFactory;
 
@@ -94,7 +96,7 @@ public class PGPSignatureValidator {
         if (Files.notExists(keysFilePath)) {
             try {
                 try (CloseableHttpClient client = 
httpClientFactory.newClient()) {
-                    HttpGet get = new 
HttpGet("https://people.apache.org/keys/group/sling.asc";);
+                    HttpGet get = new HttpGet(KEYS_FILE_URL);
                     try (CloseableHttpResponse response = client.execute(get)) 
{
                         try (InputStream content = 
response.getEntity().getContent()) {
                             IOUtils.copy(content, new 
FileOutputStream(keysFilePath.toFile()));
@@ -103,7 +105,7 @@ public class PGPSignatureValidator {
                 }
             } catch (IOException e) {
                 throw new IllegalStateException(
-                        "Cannot download Sling key file from 
https://people.apache.org/keys/group/sling.asc";, e);
+                        "Cannot download Sling key file from " + 
KEYS_FILE_URL, e);
             }
         }
         try (InputStream in = Files.newInputStream(keysFilePath)) {

Reply via email to